IPv4地址范围以及子网范围计算+子网掩码表

IPv4地址范围以及子网范围计算

1. 分类IP范围

Class Range
A 0.0.0.0 - 10.255.255.255
B 128.0.0.0 - 191.255.255.255
C 192.0.0.0 - 223.255.255.255
D 224.0.0.0 - 239.255.255.255
E 240.0.0.0 - 255.255.255.255

2. 保留IP范围

10.0.0.0 - 10.255.255.255
127.0.0.0 - 127.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255

3. 子网范围计算

如:
1.1.1.101/28
/28表示前面28位的值为1,即 11111111 11111111 11111111 11110000
换算成10进制为 255.255.255.240
因此, /28 = 255.255.255.240 netmask

然后, 256 - 240 = 16, 即子网范围为16
1.1.1.0
1.1.1.16
1.1.1.32
… …

因此,1.1.1.101 位于 1.1.1.96 - 1.1.1.111

4. 子网掩码表

子网掩码位数 子网掩码 Hosts
/31 255.255.255.254 1 host
/30 255.255.255.252 2 hosts
/29 255.255.255.248 6 hosts
/28 255.255.255.240 14 hosts
/27 255.255.255.224 30 hosts
/26 255.255.255.192 62 hosts
/25 255.255.255.128 126 hosts
/24 255.255.255.0 254 hosts
/23 255.255.254.0 510 hosts
/22 255.255.252.0 1022 hosts
/21 255.255.248.0 2046 hosts
/20 255.255.240.0 4094 hosts
/19 255.255.224.0 8190 hosts
/18 255.255.192.0 16382 hosts
/17 255.255.128.0 32766 hosts
/16 255.255.0.0 65534 hosts
/15 255.254.0.0 131070 hosts
/14 255.252.0.0 262142 hosts
/13 255.248.0.0 524286 hosts
/12 255.240.0.0 1048574 hosts
/11 255.224.0.0 2097150 hosts
/10 255.192.0.0 4194302 hosts
/9 255.128.0.0 8388606 hosts
/8 255.0.0.0 16777214 hosts

你可能感兴趣的:(网络,网络,网络安全,渗透测试,计算机网络)