浮动静态路由
拓扑图
如图,使一条静态路由成为两条负载均衡的RIP路由的浮动静态路由(也可以说成备份的路由)
给路由器设置地址
router 1的配置
Router>en
Router#conf t
Router(config)#int l0
Router(config-if)#ip addr 20.1.1.1 255.255.255.0
Router(config-if)#no shu
Router(config-if)#exit
Router(config)#int s0/3/0
Router(config-if)#ip addr 192.168.1.2 255.255.255.0
Router(config-if)#no shu
Router(config-if)#exit
Router(config)#int s0/3/1
Router(config-if)#clock rate 64000
Router(config-if)#ip addr 192.168.2.2 255.255.255.0
Router(config-if)#no shu
Router(config)#int f0/0
Router(config-if)#ip addr 192.168.10.2 255.255.255.0
Router(config-if)#no shu
router 2的配置
Router>en
Router#conf t
Router(config)#
Router(config)#int l0
Router(config-if)#ip addr 10.1.1.1 255.255.255.0
Router(config-if)#no shu
Router(config)#int s0/3/0
Router(config-if)#clock rate 64000
Router(config-if)#ip addr 192.168.1.1 255.255.255.0
Router(config-if)#no shu
Router(config-if)#exit
Router(config)#int s0/3/1
Router(config-if)#ip addr 192.168.2.1 255.255.255.0
Router(config-if)#no shu
Router(config)#int f0/0
Router(config-if)#ip addr 192.168.10.1 255.255.255.0
Router(config-if)#no shu
配置负载均衡的RIP路由
router 1的配置
Router(config)#route rip
Router(config-router)#ver 2
Router(config-router)#no auto-summary
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
Router(config-router)#network 20.1.1.0
Router(config-router)#exit
router 2的配置
Router(config)#
Router(config)#route rip
Router(config-router)#ver 2
Router(config-router)#no auto-summary
Router(config-router)#network 192.168.1.0
Router(config-router)#network 192.168.2.0
Router(config-router)#network 20.1.1.0
Router(config-router)#exit
查看路由表
查看router 1的路由表
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
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
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
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
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
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
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
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
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
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