在RIP中过滤路由
首先查看一下R3的路由表信息:
r3#sh ip rou
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 1.0.0.0/8 [120/2] via 192.1.1.2, 00:00:04, Serial2/0
C 192.1.1.0/24 is directly connected, Serial2/0
R 148.1.0.0/16 [120/1] via 192.1.1.2, 00:00:14, Serial2/0
在R3上想要过滤掉148.1.1.0这个网段的路由信息
distribute-list 1 in s2/0
access-list 1 deny 148.1.0.0
access-list 1 permit any
再来看R3的路由表:
r3#sh ip rou
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 1.0.0.0/8 [120/2] via 192.1.1.2, 00:00:24, Serial2/0
C 192.1.1.0/24 is directly connected, Serial2/0
R 148.1.0.0/16 [120/1] via 192.1.1.2, 00:00:52, Serial2/0
路由表刷新完成后:
r3#sh ip rou
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 1.0.0.0/8 [120/2] via 192.1.1.2, 00:00:04, Serial2/0
C 192.1.1.0/24 is directly connected, Serial2/0
148.1.1.0这个网段的路由信息已经没有了,LO口的路由信息还在 说明RIP中过滤路由只是过滤掉一些不必要的,路由器不想接收的信息,并不影响它
对其它路由信息的接收。这个过程是利用分发列表来实现的。转自杜松之家
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论