客户提供如下网络配置信息:
公网 IP : 219.150.116.142
子网掩码: 255.255.255.254
网关: 219.150.116.1
根据客户提供IP地址、掩码、网关在防火墙接口或网卡上配置显示如下出错信息:
![bb](//img.blog.itpub.net/blog/attachment/201403/11/26008584_1394507936gYfx.png?x-oss-process=style/bb)
255.255.255.254作为子网掩码不符合理论,因为在这个31位掩码下只有一个主机位,是没有有效IP地址的。但像这种31位掩码在PPP数据链路层协议上能见到,该掩码下IP地址主要用于拨号线路上。
31位掩码在ppp链路上应用:
serial restart-delay 0
router rip
version 2
network 192.168.5.0
ip route 0.0.0.0 0.0.0.0 192.168.5.3
--------------------------------
R2#show run
hostname R2
interface Serial1/0
ip address 192.168.5.3 255.255.255.254
encapsulation ppp
serial restart-delay 0
interface Serial1/1
ip address 192.168.6.1 255.255.255.0
router rip
version 2
network 192.168.5.0
network 192.168.6.0
---------------------------------------
R3#sh
run
interface Serial1/0
ip address 192.168.6.2 255.255.255.0
router rip
version 2
network 192.168.6.0
--------------------------------------
r1#ping 192.168.6.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
192.168.6.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5),
round-trip min/avg/max = 52/90/128 ms
R3#ping 192.168.5.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
192.168.5.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5),
round-trip min/avg/max = 120/132/144 ms
!!!!!
savings as using a 31-bit subnet mask, but may only be used in links using
PPP encapsulation [RFC1332]. The use of host addresses allows for the
assignment of IP addresses belonging to different networks at each side of the link,
causing link and network management not to be straight forward.
公网 IP : 219.150.116.142
子网掩码: 255.255.255.254
网关: 219.150.116.1
根据客户提供IP地址、掩码、网关在防火墙接口或网卡上配置显示如下出错信息:
![bb](http://img.blog.itpub.net/blog/attachment/201403/11/26008584_1394507936gYfx.png?x-oss-process=style/bb)
255.255.255.254作为子网掩码不符合理论,因为在这个31位掩码下只有一个主机位,是没有有效IP地址的。但像这种31位掩码在PPP数据链路层协议上能见到,该掩码下IP地址主要用于拨号线路上。
31位掩码在ppp链路上应用:
R1#sh run
interface Serial1/1
ip address 192.168.5.2 255.255.255.254
serial restart-delay 0
router rip
version 2
network 192.168.5.0
ip route 0.0.0.0 0.0.0.0 192.168.5.3
--------------------------------
R2#show run
hostname R2
interface Serial1/0
ip address 192.168.5.3 255.255.255.254
encapsulation ppp
serial restart-delay 0
interface Serial1/1
ip address 192.168.6.1 255.255.255.0
router rip
version 2
network 192.168.5.0
network 192.168.6.0
---------------------------------------
R3#sh
run
interface Serial1/0
ip address 192.168.6.2 255.255.255.0
router rip
version 2
network 192.168.6.0
--------------------------------------
r1#ping 192.168.6.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
192.168.6.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5),
round-trip min/avg/max = 52/90/128 ms
R3#ping 192.168.5.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to
192.168.5.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5),
round-trip min/avg/max = 120/132/144 ms
!!!!!
补充:RFC1332文档上有一段说明
This option provides the same address spacesavings as using a 31-bit subnet mask, but may only be used in links using
PPP encapsulation [RFC1332]. The use of host addresses allows for the
assignment of IP addresses belonging to different networks at each side of the link,
causing link and network management not to be straight forward.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26008584/viewspace-1107305/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26008584/viewspace-1107305/