1、RedistributingCCNP Lab ManualLab 1. Redistributing into RIP and OSPF实验目的:1、掌握RIP与OSPF的重发布配置。2、理解OSPF的E1与E2类型的路由。实验拓扑图:实验步骤及要求:1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。2、配置R1与R2的OSPF路由协议和R2与R3的RIP路由协议。3、查看R1、R2和R3的路由表:R1#show ip route Gateway of last resort is not set 172.16.0.0/16 is variably subnett
2、ed, 3 subnets, 2 masksC 172.16.255.0/30 is directly connected, Serial1/1C 172.16.1.0/24 is directly connected, Loopback0C 172.16.2.0/24 is directly connected, Loopback1R1#R2#show ip route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.255.0/30 is di
3、rectly connected, Serial1/0O 172.16.1.0/24 110/65 via 172.16.255.1, 00:02:47, Serial1/0O 172.16.2.0/24 110/65 via 172.16.255.1, 00:02:47, Serial1/0 192.168.255.0/30 is subnetted, 1 subnetsC 192.168.255.0 is directly connected, Serial1/1R 192.168.1.0/24 120/1 via 192.168.255.1, 00:00:10, Serial1/1R 1
4、92.168.2.0/24 120/1 via 192.168.255.1, 00:00:10, Serial1/1R2#R3#show ip route Gateway of last resort is not setC 192.168.255.0/24 is directly connected, Serial1/0C 192.168.1.0/24 is directly connected, Loopback0C 192.168.2.0/24 is directly connected, Loopback1R3#4、根据show ip route命令可以看出,只有R2路由才可以学习到整
5、个网络的完整路由。是因为,R2路由处于OSPF与RIP网络的边界。其同时运行了两种不同的路由协议。5、为了确保R1和R2能够学习到整个网络路由。在R2上配置路由重发布。配置如下:R2(config)#router ospf 1R2(config-router)#redistribute rip metric 200 subnets R2(config-router)#exitR2(config)#router ripR2(config-router)#redistribute ospf 1 metric 10R2(config-router)#exit6、查看R1路由器和R3路由器的路由表:R
6、1#show ip router 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksC 172.16.255.0/30 is directly connected, Serial1/1C 172.16.1.0/24 is directly connected, Loopback0C 172.16.2.0/24 is directly connected, Loopback1 192.168.255.0/30 is subnetted, 1 subnetsO E2 192.168.255.0 110/200 via 172.16.255
7、.2, 00:02:47, Serial1/1O E2 192.168.1.0/24 110/200 via 172.16.255.2, 00:02:53, Serial1/1O E2 192.168.2.0/24 110/200 via 172.16.255.2, 00:02:53, Serial1/1R1#R3#show ip routerR 172.16.0.0/16 120/10 via 192.168.255.2, 00:00:24, Serial1/0C 192.168.255.0/24 is directly connected, Serial1/0C 192.168.1.0/2
8、4 is directly connected, Loopback0C 192.168.2.0/24 is directly connected, Loopback1R3#7、确认路由有效性:R1#ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 112/137/144 msR1#R3#ping 1
9、72.16.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 120/148/192 msR3#8、实验完成。工大瑞普Cisco课程开发小组CCNP Lab ManualLab 2. Redistribution Using Administrative Distance实验目的:1、掌握通过修改管理距离解决重发布选择次佳路由
10、问题。实验拓扑图:实验步骤及要求:1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。2、按照拓扑配置RIP和OSPF的路由协议,将RIP或OSPF重分发到各自的区域。3、查看R2和R5的路由表:R2#show ip route Gateway of last resort is not set 172.16.0.0/30 is subnetted, 3 subnetsC 172.16.255.0 is directly connected, Serial1/1O 172.16.255.4 110/128 via 172.16.255.2, 00:01:44, Se
11、rial1/1O 172.16.255.8 110/192 via 172.16.255.2, 00:01:44, Serial1/1R 10.0.0.0/8 120/1 via 192.168.1.1, 00:00:21, Serial1/0C 192.168.1.0/24 is directly connected, Serial1/0O E2 192.168.2.0/24 110/200 via 172.16.255.2, 00:01:44, Serial1/1R2#R5#show ip route Gateway of last resort is not set 172.16.0.0
12、/30 is subnetted, 3 subnetsO 172.16.255.0 110/192 via 172.16.255.9, 00:02:08, Serial1/0O 172.16.255.4 110/128 via 172.16.255.9, 00:02:08, Serial1/0C 172.16.255.8 is directly connected, Serial1/0O E2 10.0.0.0/8 110/200 via 172.16.255.9, 00:02:08, Serial1/0O E2 192.168.1.0/24 110/200 via 172.16.255.9,
13、 00:02:08, Serial1/0C 192.168.2.0/24 is directly connected, FastEthernet0/0R5#4、通过观察两台路由器的路表,可以看出R5路由器到达10.0.0.0/8的网络并不是直接通过R1路由器,而是通过R4-R3-R2-R1-10.0.0.0/8。通过拓扑可以看出,此条路由并不是最佳的路由。产生此问题的最主要的原因是:因为在R2路由器上配置路由重发布,R2将10.0.0.0/8网络通告给其它的路由器时,其重发布路由的管理距离是110,即OSPF的管理距离。当此条路由到达R5上时,R5会比较RIP与OSPF的管理距离后,再决定采用
14、谁的路由。因此造成了R5认为到达10.0.0.0/8网络最佳路由是通过OSPF的区域。而不是直接选择从R1到达。是因为:管理距离决定路由器选择何种路由协议产生的路由。5、为了解决此问题,我们可以通过修改本地某条路由的管理距离来强制路由器选择最佳路由,配置如下:R5(config)#access-list 1 permit 10.0.0.0 0.255.255.255R5(config)#router ripR5(config-router)#distance 80 192.168.2.1 0.0.0.0 1R5(config-router)#exitR5(config)#exit6、再次查看R
15、5的路由表:R5#show ip route Gateway of last resort is not set 172.16.0.0/30 is subnetted, 3 subnetsO 172.16.255.0 110/192 via 172.16.255.9, 00:00:02, Serial1/0O 172.16.255.4 110/128 via 172.16.255.9, 00:00:02, Serial1/0C 172.16.255.8 is directly connected, Serial1/0R 10.0.0.0/8 80/1 via 192.168.2.1, 00:0
16、0:02, FastEthernet0/0O E2 192.168.1.0/24 110/200 via 172.16.255.9, 00:00:02, Serial1/0C 192.168.2.0/24 is directly connected, FastEther7、为了确保网络的稳定,因此建议在R2路由器上也采用相同的配置,进行管理距离值的设定。具体配置请参照第6步。8、实验完成。工大瑞普Cisco课程开发小组CCNP Lab ManualLab 3. Filtering Routing Updates with a Distribute List实验目的:1、掌握基于distribu
17、te命令的路由过滤配置方法。实验拓扑图:实验步骤及要求:1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。2、按照拓扑配置OSPF和RIP v2的路由协议。并关闭RIP v2的自动汇总。3、在R2上配置路由重发布。4、查看R1和R3的路由表:R1#show ip route Gateway of last resort is not set 172.16.0.0/30 is subnetted, 5 subnetsC 172.16.255.0 is directly connected, Serial1/1C 172.16.0.0 is directly conn
18、ected, Loopback0C 172.16.1.0 is directly connected, Loopback0C 172.16.2.0 is directly connected, Loopback0C 172.16.3.0 is directly connected, Loopback0O E2 192.168.255.0/24 110/200 via 172.16.255.2, 00:00:15, Serial1/1O E2 192.168.0.0/24 110/200 via 172.16.255.2, 00:00:15, Serial1/1O E2 192.168.1.0/
19、24 110/200 via 172.16.255.2, 00:00:15, Serial1/1O E2 192.168.2.0/24 110/200 via 172.16.255.2, 00:00:15, Serial1/1O E2 192.168.3.0/24 110/200 via 172.16.255.2, 00:00:15, Serial1/1R1#R3#show ip route Gateway of last resort is not set 172.16.0.0/30 is subnetted, 5 subnetsR 172.16.255.0 120/10 via 192.1
20、68.255.2, 00:00:01, Serial1/0R 172.16.0.0 120/10 via 192.168.255.2, 00:00:01, Serial1/0R 172.16.1.0 120/10 via 192.168.255.2, 00:00:01, Serial1/0R 172.16.2.0 120/10 via 192.168.255.2, 00:00:01, Serial1/0R 172.16.3.0 120/10 via 192.168.255.2, 00:00:01, Serial1/0C 192.168.255.0/24 is directly connecte
21、d, Serial1/0C 192.168.0.0/24 is directly connected, Loopback0C 192.168.1.0/24 is directly connected, Loopback0C 192.168.2.0/24 is directly connected, Loopback0C 192.168.3.0/24 is directly connected, Loopback0R3#5、根据拓扑的需要,在R2上配置路由过滤,以过滤OSPF的路由。配置如下:R2(config)#access-list 1 deny 172.16.0.0 0.0.0.255R2
22、(config)#access-list 1 deny 172.16.1.0 0.0.0.255R2(config)#access-list 1 permit anyR2(config)#router rip R2(config-router)#distribute-list 1 out ospf 1R2(config-router)#exitR2(config)#6、查看R3的路由,进行确认:R3#show ip route Gateway of last resort is not setR 172.16.255.0 120/10 via 192.168.255.2, 00:00:02,
23、Serial1/0R 172.16.2.0 120/10 via 192.168.255.2, 00:00:02, Serial1/0R 172.16.3.0 120/10 via 192.168.255.2, 00:00:02, Serial1/0C 192.168.255.0/24 is directly connected, Serial1/0C 192.168.0.0/24 is directly connected, Loopback0C 192.168.1.0/24 is directly connected, Loopback0C 192.168.2.0/24 is direct
24、ly connected, Loopback0C 192.168.3.0/24 is directly connected, Loopback0R3#7、配置R2过滤RIP的路由:R2(config)#access-list 2 deny 192.168.2.0 0.0.0.255R2(config)#access-list 2 deny 192.168.3.0 0.0.0.255R2(config)#access-list 2 permit any R2(config)#router ospf 1R2(config-router)#distribute-list 2 out ripR2(co
25、nfig-router)#exit8、查看R1的路由表:R1#show ip route Gateway of last resort is not set 172.16.0.0/30 is subnetted, 5 subnetsC 172.16.255.0 is directly connected, Serial1/1C 172.16.0.0 is directly connected, Loopback0C 172.16.1.0 is directly connected, Loopback0C 172.16.2.0 is directly connected, Loopback0C
26、172.16.3.0 is directly connected, Loopback0O E2 192.168.255.0/24 110/200 via 172.16.255.2, 00:19:20, Serial1/1O E2 192.168.0.0/24 110/200 via 172.16.255.2, 00:19:20, Serial1/1O E2 192.168.1.0/24 110/200 via 172.16.255.2, 00:19:20, Serial1/1R1#9、实验完成。工大瑞普Cisco课程开发小组CCNP Lab ManualLab 4. Filtering Rou
27、ting Updates with a Router Maps实验目的:1、掌握基于Route-map的路由过滤配置方法。2、掌握route-map的命令语法。实验拓扑图:实验步骤及要求:1、配置各台路由器的IP地址,并且使用Ping命令确认各路由器的直连口的互通性。2、按照拓扑配置OSPF和RIP v2的路由协议。并关闭RIP v2的自动汇总。3、在R2上配置路由重发布。4、查看R1和R3的路由表:R1#show ip route Gateway of last resort is not set 172.16.0.0/30 is subnetted, 5 subnetsC 172.16.2
28、55.0 is directly connected, Serial1/1C 172.16.0.0 is directly connected, Loopback0C 172.16.1.0 is directly connected, Loopback0C 172.16.2.0 is directly connected, Loopback0C 172.16.3.0 is directly connected, Loopback0O E2 192.168.255.0/24 110/200 via 172.16.255.2, 00:00:15, Serial1/1O E2 192.168.0.0
29、/24 110/200 via 172.16.255.2, 00:00:15, Serial1/1O E2 192.168.1.0/24 110/200 via 172.16.255.2, 00:00:15, Serial1/1O E2 192.168.2.0/24 110/200 via 172.16.255.2, 00:00:15, Serial1/1O E2 192.168.3.0/24 110/200 via 172.16.255.2, 00:00:15, Serial1/1R3#show ip route Gateway of last resort is not set 172.1
30、6.0.0/30 is subnetted, 5 subnetsR 172.16.255.0 120/10 via 192.168.255.2, 00:00:01, Serial1/0R 172.16.0.0 120/10 via 192.168.255.2, 00:00:01, Serial1/0R 172.16.1.0 120/10 via 192.168.255.2, 00:00:01, Serial1/0R 172.16.2.0 120/10 via 192.168.255.2, 00:00:01, Serial1/0R 172.16.3.0 120/10 via 192.168.255.2, 00:00:01, Serial1/0C 192.168.255.0/24 is directly connected, Serial1/0C 192
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1