ops - IP范围 ip range : 10.140.0.0/24 代表什么? (CIDR/netmask)

访问量: 333

参考: https://networkengineering.stackexchange.com/questions/7106/how-do-you-calculate-the-prefix-network-subnet-and-host-numbers
https://www.quora.com/In-CIDR-notation-how-do-you-know-if-10-10-0-0-24-can-create-256-unique-IP-addresses

世界上怎么会有这么可怕的东西.... Orz

对于程序员来说: 

10.140.0.0~ 10.140.0.255 跟  10.140.0.0/24 是一个意思. 

这里是一个计算器:

ultratools.com/tools/netMaskResult

可以看的出来,  /24,  /25, /26 得到的值都是不一样的.

/24
Start IP: 10.140.0.0 
End IP: 10.140.0.255 
Addresses: 256
Class: Class C
Netmask: 255.255.255.0.
Binary: 11111111	11111111	11111111	00000000 

/25
Start IP: 10.140.0.0 
End IP: 10.140.0.127 
Addresses: 128Class: -
Netmask: 255.255.255.128.
Binary: 11111111	11111111	11111111	10000000 

/26
Start IP: 10.140.0.0 
End IP: 10.140.0.63 
Addresses: 64Class: -
Netmask: 255.255.255.192.
Binary: 11111111	11111111	11111111	11000000

订阅/RSS Feed

Subscribe

分类/category