行至水穷处 坐看“云”起时

Cloud Native ADN -> CNadn.Net

[原创]怎么解释ip unnumered与RIP的种种情况??

下面的所有实验用RIPV1的收发机制怎么来解释其路由表结果?

拓扑:(lo0)R1(S1/1)—————-(S1/0)R2

相同的主类,都有子网,相同的子网掩码长度
R1
interface Loopback0
 ip address 172.16.1.1 255.255.255.0
interface Serial1/1
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 172.16.0.0

R2
interface Loopback0
 ip address 172.16.2.2 255.255.255.0
interface Serial1/0
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 172.16.0.0
结果:
R1:Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 3 subnets
R       172.16.0.0 [120/1] via 172.16.2.2, 00:00:07, Serial1/1
C       172.16.1.0 is directly connected, Loopback0
R       172.16.2.0 [120/1] via 172.16.2.2, 00:00:07, Serial1/1

R2:Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 3 subnets
R       172.16.0.0 [120/1] via 172.16.1.1, 00:00:07, Serial1/0
R       172.16.1.0 [120/1] via 172.16.1.1, 00:00:07, Serial1/0
C       172.16.2.0 is directly connected, Loopback0
相互PING都能通

相同主类,都含子网,不同的子网掩码长度
R1:配置不变,R2LO0地址改为ip add 172.16.65.2 255.255.192.0
结果:
R1Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 3 subnets
R       172.16.0.0 [120/1] via 172.16.65.2, 00:00:02, Serial1/1
C       172.16.1.0 is directly connected, Loopback0
R       172.16.64.0 [120/1] via 172.16.65.2, 00:00:02, Serial1/1
R2:Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
R       172.16.0.0/18 [120/1] via 172.16.1.1, 00:00:05, Serial1/0
R       172.16.1.0/32 [120/1] via 172.16.1.1, 00:00:05, Serial1/0
C       172.16.64.0/18 is directly connected, Loopback0
想不通为什么出现上面的路由表结果~~~~~
R1上PING 172.16.65.2不同,R2 ping 172.16.1.1也不通。
不通:R1的3个子网全是/24掩码,没有172。16。65。2这样的可匹配的网络。
R2上PING 172.16.1.1的时候172.16.0.0/18可以匹配,但是到了R1后R1回不来也不通。

相同主类,都无子网
R1
interface Loopback0
 ip address 172.16.1.1 255.255.0.0
interface Serial1/1
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 172.16.0.0

R2
interface Loopback0
 ip address 172.16.2.2 255.255.0.0
interface Serial1/0
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 172.16.0.0
结果:
两边都是主类直连,无其他路由,显然不能相互PING通。(这也不符合要求,2路由器接口处于相同网段)
C    172.16.0.0/16 is directly connected, Loopback0

总结:相同主类,必须具有相同的子网掩码才能正常在RIP/IGRP下工作。

 

不同主类,都有子网,子网掩码长度相同
R1
interface Loopback0
 ip address 172.16.1.1 255.255.255.0
interface Serial1/1
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 172.16.0.0

R2
interface Loopback0
 ip address 182.16.2.2 255.255.255.0
interface Serial1/0
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 182.16.0.0
结果:
R1:Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Loopback0
     182.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
R       182.16.2.0/32 [120/1] via 182.16.2.2, 00:00:19, Serial1/1
R       182.16.0.0/16 [120/1] via 182.16.2.2, 00:00:19, Serial1/1

R2:Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
R       172.16.0.0/16 [120/1] via 172.16.1.1, 00:00:16, Serial1/0
R       172.16.1.0/32 [120/1] via 172.16.1.1, 00:00:16, Serial1/0
     182.16.0.0/24 is subnetted, 1 subnets
C       182.16.2.0 is directly connected, Loopback0
相互都能PING通,双方都将对方的子网号用/32标记成主机路由,从 version 11.0(2)开始都自动为对方产生一个主类条目。

不同主类,都有子网,子网掩码长度不同
R1
interface Loopback0
 ip address 172.16.1.1 255.255.255.0
interface Serial1/1
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 172.16.0.0

R2
interface Loopback0
 ip address 182.16.2.130 255.255.255.128
interface Serial1/0
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 182.16.0.0
结果:
R1:
Gateway of last resort is not set

     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Loopback0
     182.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
R       182.16.2.128/32 [120/1] via 182.16.2.130, 00:00:12, Serial1/1
R       182.16.0.0/16 [120/1] via 182.16.2.130, 00:00:12, Serial1/1

R2:Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
R       172.16.0.0/16 [120/1] via 172.16.1.1, 00:00:21, Serial1/0
R       172.16.1.0/32 [120/1] via 172.16.1.1, 00:00:21, Serial1/0
     182.16.0.0/25 is subnetted, 1 subnets
C       182.16.2.128 is directly connected, Loopback0
相互都能PING通,双方都将对方的子网号用/32标记成主机路由,从 version 11.0(2)开始都自动为对方产生一个主类条目。

不同主类,都无子网
R1
interface Loopback0
 ip address 172.16.1.1 255.255.0.0
interface Serial1/1
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 172.16.0.0

R2
interface Loopback0
 ip address 182.16.2.2 255.255.0.0
interface Serial1/0
 ip unnumbered Loopback0
 serial restart-delay 0
router rip
 network 182.16.0.0
结果:
R1:Gateway of last resort is not set

C    172.16.0.0/16 is directly connected, Loopback0
R    182.16.0.0/16 [120/1] via 182.16.2.2, 00:00:08, Serial1/1< /p>

R2:Gateway of last r
esort is not set

R    172.16.0.0/16 [120/1] via 172.16.1.1, 00:00:23, Serial1/0
C    182.16.0.0/16 is directly connected, Loopback0
相互都能PING通,从 version 11.0(2)开始都自动为对方产生一个主类条目

总结:不同主类,怎么着在RIP/IGRP下都通。

上面的所有实验用RIPV1的收发机制怎么来解释其路由表结果?

http://www.cisco.com/en/US/tech/tk648/tk362/technologies_tech_note09186a0080094e8d.shtml
http://www.cisco.com/en/US/tech/tk365/technologies_configuration_example09186a00801ec9e0.shtml

点赞
  1. AY说道:

    这种玩意好像没啥研究价值吧,实际工程不可能这么干啊。
    而且这跟RIP本身没关系啊,有类协议都一样的原则,条目过主类边界后使用原始主类掩码,不过主类边界用接收路由器接口的掩码,因为条目不带前缀长度。只不过那个“主类网络号/掩码”的条目是Cisco IOS自己加的。
    这是Cisco IOS对无编号接口在路由进程内的应用的一种折衷。原则是:RTR_A(S0)--RTR_B(S0)拓扑中,如果使用有类协议,并且如果A带有一个子网化的网络、且其主类网络号码跟B所带网络的主类网络号码不同的情况下,B需要为A的子网添加一个到其主类网络的路由条目,反之亦然。

    纳米 于 2007-1-15 17:34:11 回复

    博主回复测试

    游客 于 2007-1-15 17:35:14 回复

    游客测试

    我我我我 于 2007-1-15 17:39:22 回复

    回复第2个

    我我我外我 于 2007-1-15 17:41:12 回复

    我我我外我

发表评论

电子邮件地址不会被公开。 必填项已用*标注