计算IP地址、网络地址、广播地址

例子:156.26.0.0/28
28表示28个1:
11111111.11111111.11111111.11110000
=
255.255.255.240
网络号运算=子网掩码(二进制)与ip地址(二进制)进行AND运算
网络号:
11111111.11111111.11111111.11110000
and
10011100.00011010.00000000.00000000
=
10011100.00011010.00000000.00000000 (运算结果)
=
156.26.0.0( 转十进制 )
广播地址运算=子网掩码取反(二进制)与IP地址(二进制)或运算
广播地址:
10011100.00011010.0000000.00000000
or
00000000.00000000.0000000.00001111
=
10011100.00011010.0000000.00001111(运算结果)
=
156.26.0.15( 转十进制 )

4 thoughts on “计算IP地址、网络地址、广播地址”

Leave a Reply

Your email address will not be published. Required fields are marked *