《LAB5 静态路由.docx》由会员分享,可在线阅读,更多相关《LAB5 静态路由.docx(4页珍藏版)》请在金锄头文库上搜索。
1、LAB4 静态路由实验目的:1, 正确配置静态路由,看懂路由表。2, 理解负载均衡的概念,实现简单的负载均衡。3, 理解管理距离的概念,学会使用浮动的静态路由。实验要求:1,如图所示配置每台设备的IP地址,要求所有直连互相ping通,路由器串口的IP地址根据路由器的编号定义,如:R1的s0/0口连接的是192.168.12.0网段,那么R1的s0/0口的地址就是19.168.12.1/24,而R2的s0/0口的地址就是192.168.12.2/24。2,在R1,R2,R3,R4上配置静态路由,要求全网互通。R1的静态路由配置必须使用下一跳地址,R2必须使用直连接口,R4使用默认路由。4, R2
2、到R4,R3到R1是否负载均衡,如果不能负载均衡,使用Router(config)#no ip cef和Router(config-if)#no ip route-cache,再观察实验现象。5, 现在要求正常情况下R2和R3使用以太网通信,当以太网链路断开时,自动跳转到串行链路,使用浮动静态路由实现。实验拓扑:实验步骤:1, 如图所示,正确cisco路由器接口的地址,能ping通直连。2, 按照需求写静态路由,实现全网互通:R1必须使用下一跳地址,如下:R1(config)#ip route 192.168.23.0 255.255.255.0 192.168.12.2R1(config)#
3、ip route 192.168.34.0 255.255.255.0 192.168.12.2R1(config)#ip route 172.16.23.0.0 255.255.255.0 192.168.12.2R2必须使用直连接口:如下R2(config)#ip route 192.168.34.0 255.255.255.0 f0/0R2(config)#ip route 192.168.34.0 255.255.255.0 s0/1R3 没有要求,使用cisco推荐的下一跳:R3(config)#ip route 192.168.12.0 255.255.255.0 192.168.
4、23.2R3(config)#ip route 192.168.12.0 255.255.255.0 172.16.23.2R4写默认路由;R4(config)#ip route 0.0.0.0 255.255.255.255 192.168.34.3此时查看R2和R3的路由表,观察现象,发现到达192.168.34.0/24网段有两个下一跳。R2#show ip routeCodes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OS
5、PF, 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, E - EGP i - IS-IS, 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 downlo
6、aded static routeGateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.23.0 is directly connected, FastEthernet0/0C 192.168.12.0/24 is directly connected, Serial0/0C 192.168.23.0/24 is directly connected, Serial0/1S 192.168.34.0/24 is directly connected, FastEthernet0/0 is
7、directly connected, Serial0/1R3#show ip routeCodes: C - connected, S - static, I - IGRP, 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, E
8、- EGP i - IS-IS, 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 routeGateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.23.0 is directly connected, FastEthernet0/0S 19
9、2.168.12.0/24 1/0 via 192.168.23.2 1/0 via 172.16.23.2C 192.168.23.0/24 is directly connected, Serial0/1C 192.168.34.0/24 is directly connected, Serial0/0同样R3的路由表到达192.168.12.0/24网段的路由有两个下一跳。此时R1和R2到达192.168.12.0/24就实现了负载均衡。在packet tracer5.3中使用模拟模式可以看到负载均衡的实验现象。3,在全网全通的基础上配置R2和R3的浮动的静态路由。R2(config)#
10、no ip route 192.168.34.0 255.255.255.0 Serial0/1R2(config)#ip route 192.168.34.0 255.255.255.0 Serial0/1 5 /5为管理距离,小于默认。R2#sh ip rou 此时查看路由表,观察现象:Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA ext
11、ernal type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, 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 routeGateway of last resort is
12、not set 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.23.0 is directly connected, FastEthernet0/0C 192.168.12.0/24 is directly connected, Serial0/0C 192.168.23.0/24 is directly connected, Serial0/1S 192.168.34.0/24 is directly connected, FastEthernet0/0 /下一跳现在只有一个。原因是改写了下一跳为s0/1的路由的管理距离。导致管理距离低的路由没有
13、写进路由表。以下为R3的浮动静态路由配置。R3(config)#no ip route 192.168.12.0 255.255.255.0 192.168.23.2R3(config)#ip route 192.168.12.0 255.255.255.0 192.168.23.2 5R3#sh ip rou /查看路由表,192.168.12.0/24的路由也只有一跳。R3#sh ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP ex
14、ternal, 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, E - EGP i - IS-IS, 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 routeGateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.23.0 is directly connected, FastEthernet0/0S 192.168.12.0/24 1/0 via 172.16.23.2C 192.168.23.0/24 is directly connected, Serial0/1C 192.168.34.0/24 is directly connected, Serial0/0此时我们在R