2010年11月27日 星期六

IP遮罩

Netmask:   255.255.255.0 = 24   
11111111.11111111.11111111 .00000000

Address:   192.168.0.1         
Netmask:   255.255.255.0 = 24  
Wildcard:  0.0.0.255           
=>
Network:   192.168.0.0/24      
Broadcast: 192.168.0.255      
HostMin:   192.168.0.1         
HostMax:   192.168.0.254      
Hosts/Net: 254     (254個IP,一個class C)

-----------------------------------------------------------------
四分之一
Address:   192.168.0.1           11000000.10101000.00000000.00 000001
Netmask:   255.255.255.192 = 26  11111111.11111111.11111111.11 000000
Wildcard:  0.0.0.63              00000000.00000000.00000000.00 111111
=>
Network:   192.168.0.0/26        11000000.10101000.00000000.00 000000 (Class C)
Broadcast: 192.168.0.63          11000000.10101000.00000000.00 111111
HostMin:   192.168.0.1           11000000.10101000.00000000.00 000001
HostMax:   192.168.0.62          11000000.10101000.00000000.00 111110
Hosts/Net: 62       

-----------------------------------------------------------------------------------------------------------------------
Address:   163.23.115.193        10100011.00010111.01110011.11 000001
Netmask:   255.255.255.192 = 26  11111111.11111111.11111111.11 000000
Wildcard:  0.0.0.63              00000000.00000000.00000000.00 111111
=>
Network:   163.23.115.192/26     10100011.00010111.01110011.11 000000 (Class B)
Broadcast: 163.23.115.255        10100011.00010111.01110011.11 111111
HostMin:   163.23.115.193        10100011.00010111.01110011.11 000001
HostMax:   163.23.115.254        10100011.00010111.01110011.11 111110
Hosts/Net: 62                        
--------------------------------------------------------------------------------------------------------------


如果遮罩是255.255.255.255=32
192.168.0.1/32
指單台主機
Address:   192.168.0.1         
Netmask:   255.255.255.255 = 32
Wildcard:  0.0.0.0            
=>
Network:   192.168.0.1/32     
Broadcast: 192.168.0.1        
HostMin:   192.168.0.1       
HostMax:   192.168.0.1       
Hosts/Net: 1                   

沒有留言:

張貼留言