思科RIP过滤修改AD、Mertric值

岁酱吖の 提交于 2021-01-01 06:45:28

实验名称:思科过滤修改AD、Mertric值
实验需求:路由器R4过滤掉R1、R2的loopback的10.10.1.1 10.10.2.2地址,修改R3路由表中一个前缀地址AD值,修改R3到R4路由表前缀中一个地址的Mertric值
实验思路:在每个路由器设置IP,设置RIP,在R3设置过滤、修改命令
实验拓扑:


实验命令:

R1>en
R1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int f0/0
R1(config-if)#no shu
R1(config-if)#ip add 192.168
Dec 15 18:03:25.875: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
Dec 15 18:03:26.875: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#ip add 192.168.12.1 255.255.255.0
R1(config-if)#exi
R1(config)#int l 0
R1(config-if)#ip add 10.10.1.1 255.255.255.0
R1(config-if)#exi
R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no au
R1(config-router)#net 192.168.12.0
R1(config-router)#net 10.10.1.0















R2>en
R2#configure t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#int f0/1
R2(config-if)#no shu
R2(config-if)#ip add
Dec 15 18:04:17.975: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
Dec 15 18:04:18.975: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R2(config-if)#ip add 192.168.12.2 255.255.255.0
R2(config-if)#exi
R2(config)#int l 0
R2(config-if)#ip add 10.10.2.2 255.255.255.0
R2(config-if)#exi
R2(config)#int f0/0
R2(config-if)#no shu
R2(config-if)#ip add 192.168.23.2 255.255.255.0
R2(config-if)#exi
R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no au
R2(config-router)#net 192.168.12.0
R2(config-router)#net 192.168.23.0
R2(config-router)#net 10.10.2.0
R2(config-router)#redistribute static
R2(config-router)#






















R3>
R3>en
R3#configure t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#int f0/1
R3(config-if)#no shu
R3(config-if)#ip add 192.168.23.3 255.255.255.0
R3(config-if)#exi
R3(config)#int f0/0
R3(config-if)#no shu
R3(config-if)#ip add 192.168.34.3 255.255.255.0
R3(config-if)#exi
R3(config)#int l 0
R3(config-if)#ip add 10.10.3.3 255.255.255.0
R3(config-if)#exi
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no au
R3(config-router)#net 192.168.23.0
R3(config-router)#net 192.168.34.0
R3(config-router)#net 10.10.3.0
R3(config-router)#exi
R3(config)#ip access-list standard a
R3(config-std-nacl)#10 deny 10.10.0.0 0.0.3.0
R3(config-std-nacl)#20 per
R3(config-std-nacl)#20 permit any
R3(config-std-nacl)#exi
R3(config)#router rip
R3(config-router)#distribute-list a out fastEthernet 0/0
R3(config-router)#exi
R3(config)#ip access-list standard b
R3(config-std-nacl)#10 permit 192.168.12.0 0.0.0.0
R3(config-std-nacl)#exi
R3(config)#router rip
R3(config-router)#distance 250 192.168.23.2 0.0.0.0 b
R3(config-router)#exi
R3(config)#ip access-list standard c
R3(config-std-nacl)#10 permit 192.168.12.0 0.0.0.0
R3(config-std-nacl)#exi
R3(config)#router rip
R3(config-router)#offset-list c out 4 fastEthernet 0/0
R3(config-router)#exi
R3(config)#exi
R3#clear ip route
R3#clear ip route

R3#clear ip route
R3#clear ip route

R3#clear ip route
R3#clear ip route

R3#clear ip route
R3#clear ip route

R3#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.12.0/24 [250/1] via 192.168.23.2, 00:00:01, FastEthernet0/1
10.0.0.0/24 is subnetted, 4 subnets
R 10.10.1.0 [120/2] via 192.168.23.2, 00:00:01, FastEthernet0/1
R 10.10.2.0 [120/1] via 192.168.23.2, 00:00:01, FastEthernet0/1
C 10.10.3.0 is directly connected, Loopback0
R 10.10.4.0 [120/1] via 192.168.34.4, 00:00:05, FastEthernet0/0
C 192.168.23.0/24 is directly connected, FastEthernet0/1
C 192.168.34.0/24 is directly connected, FastEthernet0/0
R3#show ip route rip
R 192.168.12.0/24 [250/1] via 192.168.23.2, 00:00:13, FastEthernet0/1
10.0.0.0/24 is subnetted, 4 subnets
R 10.10.1.0 [120/2] via 192.168.23.2, 00:00:13, FastEthernet0/1
R 10.10.2.0 [120/1] via 192.168.23.2, 00:00:13, FastEthernet0/1
R 10.10.4.0 [120/1] via 192.168.34.4, 00:00:04, FastEthernet0/0
R3#













R4>
R4>en
R4#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#int f0/1
R4(config-if)#no shu
R4(config-if)#ip add 192.16
Dec 15 18:07:57.251: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
Dec 15 18:07:58.251: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R4(config-if)#ip add 192.168.34.4 255.255.255.0
R4(config-if)#exi
R4(config)#int l 0
R4(config-if)#ip add 10.10.4.4 255.255.255.0
R4(config-if)#exi
R4(config)#router rip
R4(config-router)#version 2
R4(config-router)#no au
R4(config-router)#net 192.168.34.0
R4(config-router)#net 10.10.4.0
R4(config-router)#exi
R4(config)#exi
R4#clear ip route
R4#clear ip route

R4#clear ip route
R4#clear ip route

R4#clear ip route
R4#clear ip route

R4#clear ip route
R4#clear ip route

R4#clear ip route
R4#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.12.0/24 [120/6] via 192.168.34.3, 00:00:09, FastEthernet0/1
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.4.0 is directly connected, Loopback0
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:09, FastEthernet0/1
C 192.168.34.0/24 is directly connected, FastEthernet0/1
R4#show ip route rip
R 192.168.12.0/24 [120/6] via 192.168.34.3, 00:00:00, FastEthernet0/1
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:00, FastEthernet0/1
R4#show ip route rip
R 192.168.12.0/24 [120/6] via 192.168.34.3, 00:00:04, FastEthernet0/1
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:04, FastEthernet0/1
R4#show ip route rip
R 192.168.12.0/24 [120/6] via 192.168.34.3, 00:00:13, FastEthernet0/1
R 192.168.23.0/24 [120/1] via 192.168.34.3, 00:00:13, FastEthernet0/1
R4#













易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!