案例:
说明: 192.168.10.1/24
192.168.20.1/24
192.168.30.1/24用loopback模拟的.
默认的RIPv1使用广播更新的,现在要把RT1 和 RT3 之间不能交换路由信息,但RT1 和 RT2 ,RT2 和 RT3 可以交换信息。
路由表信息:
- RT1#show ip route
- Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
- D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
- N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
- E1 - OSPF external type 1, E2 - OSPF external type 2
- i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
- ia - IS-IS inter area, * - candidate default, U - per-user static route
- o - ODR, P - periodic downloaded static route
- Gateway of last resort is not set
- R 192.168.30.0/24 [120/1] via 192.168.1.3, 00:00:14, FastEthernet0/0
- C 192.168.10.0/24 is directly connected, Loopback0
- R 192.168.20.0/24 [120/1] via 192.168.1.2, 00:00:27, FastEthernet0/0
- C 192.168.1.0/24 is directly connected, FastEthernet0/0
可以看到此时RT1与RT3 交换了路由信息。
报文的通告方式:
- RT1#debug ip rip
- RIP protocol debugging is on
- RT1#
- *Mar 1 00:07:46.587: RIP: received v1 update from 192.168.1.3 on FastEthernet0/0
- *Mar 1 00:07:46.587: 192.168.30.0 in 1 hops
- *Mar 1 00:07:49.427: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (192.168.1.1)
- *Mar 1 00:07:49.431: RIP: build update entries
- *Mar 1 00:07:49.431: network 192.168.10.0 metric 1
可以看到 还是广播的更新。
解决方案:
- RT1(config)#router rip
- RT1(config-router)#passive-interface fastEthernet 0/0
- RT1(config-router)#neighbor 192.168.1.2
- RT3(config)#router rip
- RT3(config-router)#passive-interface fastEthernet 0/0
- RT3(config-router)#neighbor 192.168.1.2
配置完成后的结果
路由表信息:
- RT1#sh ip route
- Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
- D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
- N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
- E1 - OSPF external type 1, E2 - OSPF external type 2
- i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
- ia - IS-IS inter area, * - candidate default, U - per-user static route
- o - ODR, P - periodic downloaded static route
- Gateway of last resort is not set
- C 192.168.10.0/24 is directly connected, Loopback0
- R 192.168.20.0/24 [120/1] via 192.168.1.2, 00:00:20, FastEthernet0/0
- C 192.168.1.0/24 is directly connected, FastEthernet0/0
此时 RT1已经学不到RT3上面的路由了。
报文的通告方式:
- RT1#debug ip rip
- *Mar 1 00:13:31.547: RIP: sending v1 update to 192.168.1.2 via FastEthernet0/0 (192.168.1.1)
- *Mar 1 00:13:31.551: RIP: build update entries
- *Mar 1 00:13:31.551: network 192.168.10.0 metric 1
- *Mar 1 00:13:36.175: RIP: sending v1 update to 255.255.255.255 via Loopback0 (192.168.10.1)
- *Mar 1 00:13:36.179: RIP: build update entries
- *Mar 1 00:13:36.179: network 192.168.1.0 metric 1
- *Mar 1 00:13:36.183: network 192.168.20.0 metric 2
- *Mar 1 00:13:37.555: RIP: received v1 update from 192.168.1.2 on FastEthernet0/0
- *Mar 1 00:13:37.555: 192.168.20.0 in 1 hops
此时看到 通告方式已经有广播变成了 单播.
本文原创,如需转载请注明出处。
联系方式:[email protected]