拓扑图
如图,使一条静态路由成为两条负载均衡的RIP路由的浮动静态路由(也可以说成备份的路由)
给路由器设置地址
router 1的配置
Router>enRouter#conf tRouter(config)#int l0Router(config-if)#ip addr 20.1.1.1 255.255.255.0Router(config-if)#no shuRouter(config-if)#exitRouter(config)#int s0/3/0Router(config-if)#ip addr 192.168.1.2 255.255.255.0Router(config-if)#no shuRouter(config-if)#exitRouter(config)#int s0/3/1Router(config-if)#clock rate 64000Router(config-if)#ip addr 192.168.2.2 255.255.255.0Router(config-if)#no shuRouter(config)#int f0/0Router(config-if)#ip addr 192.168.10.2 255.255.255.0Router(config-if)#no shu
router 2的配置
Router>enRouter#conf tRouter(config)#Router(config)#int l0Router(config-if)#ip addr 10.1.1.1 255.255.255.0Router(config-if)#no shuRouter(config)#int s0/3/0Router(config-if)#clock rate 64000Router(config-if)#ip addr 192.168.1.1 255.255.255.0Router(config-if)#no shuRouter(config-if)#exitRouter(config)#int s0/3/1Router(config-if)#ip addr 192.168.2.1 255.255.255.0Router(config-if)#no shuRouter(config)#int f0/0Router(config-if)#ip addr 192.168.10.1 255.255.255.0Router(config-if)#no shu
配置负载均衡的RIP路由
router 1的配置
Router(config)#route ripRouter(config-router)#ver 2Router(config-router)#no auto-summary Router(config-router)#network 192.168.1.0Router(config-router)#network 192.168.2.0Router(config-router)#network 20.1.1.0Router(config-router)#exit
router 2的配置
Router(config)#Router(config)#route ripRouter(config-router)#ver 2Router(config-router)#no auto-summary Router(config-router)#network 192.168.1.0Router(config-router)#network 192.168.2.0Router(config-router)#network 20.1.1.0Router(config-router)#exit
查看路由表
查看router 1的路由表
Router#show ip route 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 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 route Gateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnets R 10.1.1.0 [120/1] via 192.168.1.1, 00:00:07, Serial0/3/0 [120/1] via 192.168.2.1, 00:00:07, Serial0/3/1 20.0.0.0/24 is subnetted, 1 subnets C 20.1.1.0 is directly connected, Loopback0 C 192.168.1.0/24 is directly connected, Serial0/3/0 C 192.168.2.0/24 is directly connected, Serial0/3/1 C 192.168.10.0/24 is directly connected, FastEthernet0/0 查看router 2的配置 Router#show ip route 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 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 route Gateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Loopback0 20.0.0.0/24 is subnetted, 1 subnets R 20.1.1.0 [120/1] via 192.168.1.2, 00:00:04, Serial0/3/0 [120/1] via 192.168.2.2, 00:00:04, Serial0/3/1 C 192.168.1.0/24 is directly connected, Serial0/3/0 C 192.168.2.0/24 is directly connected, Serial0/3/1 C 192.168.10.0/24 is directly connected, FastEthernet0/0 配置浮动静态路由 router 1 的配置 Router(config)#ip route 10.1.1.0 255.255.255.0 192.168.10.1 121 router 2 的配置 Router(config)#ip route 20.1.1.0 255.255.255.0 192.168.10.2 121 查看router 1的路由表 Router#show ip route 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 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 route Gateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnets R 10.1.1.0 [120/1] via 192.168.1.1, 00:00:07, Serial0/3/0 [120/1] via 192.168.2.1, 00:00:07, Serial0/3/1 20.0.0.0/24 is subnetted, 1 subnets C 20.1.1.0 is directly connected, Loopback0 C 192.168.1.0/24 is directly connected, Serial0/3/0 C 192.168.2.0/24 is directly connected, Serial0/3/1 C 192.168.10.0/24 is directly connected, FastEthernet0/0 断开RIP路由,在查看路由表 router 1的路由表 Router#show ip route 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 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 route Gateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnets S 10.1.1.0 [121/0] via 192.168.10.1 20.0.0.0/24 is subnetted, 1 subnets C 20.1.1.0 is directly connected, Loopback0 C 192.168.10.0/24 is directly connected, FastEthernet0/0 router 的路由表 Router#show ip route 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 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 route Gateway of last resort is not set 10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Loopback0 20.0.0.0/24 is subnetted, 1 subnets S 20.1.1.0 [121/0] via 192.168.10.2 C 192.168.10.0/24 is directly connected, FastEthernet0/0 实验完成转载于:https://www.cnblogs.com/knightysa/p/9214435.html
相关资源:各显卡算力对照表!