浮动
本实验通过设置浮动静态路由,可以实现冗余备份。浮动静态路由即静态预定义运行代价(COST)。 备份思想是当主线路出现故障,高COST的静态路由开始起作用,产生一个ISDN呼叫,当主线路恢复时,将断开这条高Cost的路由,重新起用原线路。
要求
(1) 平时走专线(ISP---A),仅当其路线出现问题时再走拨号ADSL(ISP---B)
ISP—A和ISP—B基本配置省略
R1(config)#ip route 0.0.0.0 0.0.0.0 f0/0
R1(config)#exit
R1#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - , IA - 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 0.0.0.0 to network 0.0.0.0
C 172.16.0.0/16 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial1/1
S* 0.0.0.0/0 is directly connected, FastEthernet0/0
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 0.0.0.0 0.0.0.0 s1/1
R1(config)#exit
R1#show ip route
00:06:26: %SYS-5-CONFIG_I: Configured from console by console
R1#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 0.0.0.0 to network 0.0.0.0
C 172.16.0.0/16 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial1/1
S* 0.0.0.0/0 is directly connected, FastEthernet0/0
is directly connected, Serial1/1---------------------负载均衡
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 0.0.0.0 0.0.0.0 s1/1 ?
<1-255> Distance metric for this route
A.B.C.D Forwarding router's address
DHCP Default Gateway obtained from DHCP
name Specify name of the next hop
permanent permanent route
tag Set tag for this route
R1(config)#ip route 0.0.0.0 0.0.0.0 s1/1 50-------配置管理距离使其高于另一条默认路由
R1(config)#end
R1#
00:06:50: %SYS-5-CONFIG_I: Configured from console by console
R1#show ip rou
R1#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 0.0.0.0 to network 0.0.0.0
C 172.16.0.0/16 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial1/1
S* 0.0.0.0/0 is directly connected, FastEthernet0/0
R1#config t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#interface f0/0
R1(config-if)#shut-----------关闭F0/0
R1(config-if)#end
R1#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 0.0.0.0 to network 0.0.0.0
C 192.168.1.0/24 is directly connected, Serial1/1
S* 0.0.0.0/0 is directly connected, Serial1/1
R1#
R1#
R1#config t
R1(config)#interface f0/0
R1(config-if)#no shut
R1(config-if)#end
R1#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 0.0.0.0 to network 0.0.0.0
C 172.16.0.0/16 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, Serial1/1
S* 0.0.0.0/0 is directly connected, FastEthernet0/0