如果相同的路由通过更好的路径存在,路由器不会学习 RIPv2 宣布的默认路由

网络工程 路由 杜松-朱诺斯 撕裂
2022-02-24 15:32:43

假设有以下简单的网络拓扑:

r1 ◄ ► r3

▲      ▲
▼      ▼

r2 ◄ ► r4

所有四个路由器在所有接口上都使用 RIPv2。r1r2宣布默认路由,这意味着r4r3(它r1通过 RIP 学习)和接收默认路由r2例如,这里是从r4面向接口的数据包捕获r3

18:20:23.759926 02:06:dd:04:ff:f1 > 01:00:5e:00:00:09, ethertype IPv4 (0x0800), length 326: (tos 0xc0, ttl 1, id 50254, offset 0, flags [none], proto UDP (17), length 312)
    10.10.129.1.520 > 224.0.0.9.520: [udp sum ok] 
        RIPv2, Response, length: 284, routes: 14 or less
          Auth header: Packet Len 264, Key-ID 1, Auth Data Len 20, SeqNo 1591543212, MBZ 0, MBZ 0
          AFI IPv4,       200.0.1.0/24, tag 0x0000, metric: 3, next-hop: self
          AFI IPv4,        10.5.5.0/24, tag 0x0000, metric: 1, next-hop: self
          AFI IPv4,     10.10.128.1/32, tag 0x0000, metric: 1, next-hop: self
          AFI IPv4,     192.168.1.0/30, tag 0x0000, metric: 1, next-hop: self
          AFI IPv4,     192.168.3.0/24, tag 0x0000, metric: 1, next-hop: self
          AFI IPv4,         0.0.0.0/0 , tag 0x0064, metric: 2, next-hop: self
          AFI IPv4,      10.1.254.0/24, tag 0x0000, metric: 2, next-hop: self
          AFI IPv4,   10.10.128.100/32, tag 0x0000, metric: 2, next-hop: self
          AFI IPv4,   10.10.128.200/32, tag 0x0000, metric: 3, next-hop: self
          AFI IPv4,       100.0.0.0/24, tag 0x0000, metric: 2, next-hop: self
          AFI IPv4,     200.0.100.0/24, tag 0x0000, metric: 4, next-hop: self
          AFI IPv4,     200.0.200.0/24, tag 0x0000, metric: 5, next-hop: self
          Auth trailer:
          0x0000:  b144 2983 094a 463d f34f 96d3 77e3 9809

如上所示,r3确实宣布了默认路由。但是,从以下内容看不到r4

root@r4> show route receive-protocol rip 10.10.129.1 0.0.0.0      

inet.0: 20 destinations, 21 routes (20 active, 0 holddown, 0 hidden)

root@r4> 

我知道它r4更喜欢默认路由 via r2,因为它的跳数较少,但为什么默认路由没有被r3看到的输出或作为 in 的输出show route receive-protocol rip的非活动路由宣布show route protocol ripr4

0个回答
没有发现任何回复~