ITPub博客

首页 > IT基础架构 > 网络安全 > 关于客户255.255.255.254掩码的问题

关于客户255.255.255.254掩码的问题

原创 网络安全 作者:wangmj_183 时间:2014-03-11 11:38:23 0 删除 编辑
客户提供如下网络配置信息:
公网
IP  219.150.116.142
子网掩码:255.255.255.254
网关:    219.150.116.1

根据客户提供IP地址、掩码、网关在防火墙接口或网卡上配置显示如下出错信息:



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

encapsulation 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
!!!!!

补充:RFC1332文档上有一段说明

This option provides the same address space
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.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26008584/viewspace-1107305/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-09-25

  • 博文量
    5
  • 访问量
    31116