实验拓扑图
点击图片查看清晰大图,或者下载附件中的拓扑图源文件
实验要求:
为Router1和Router2之间做一条备份路由。
相关资料:
首先看一下Cisco 制定的各个路由协议的管理距离(AD):
1.直接相连:0
2.静态路由:1
3.EIGRP 汇总路由(summary route):5
4.外部BGP:20
5.内部EIGRP:90
6:IGRP:100
7.OSPF:110
8.IS-IS:115
9.RIP(v1,v2):120
10.外部EIGRP:170
11.内部BGP:200
2.静态路由:1
3.EIGRP 汇总路由(summary route):5
4.外部BGP:20
5.内部EIGRP:90
6:IGRP:100
7.OSPF:110
8.IS-IS:115
9.RIP(v1,v2):120
10.外部EIGRP:170
11.内部BGP:200
Floating Status Route
因为静态路由的AD 比一些动态路由协议的AD 高,假如你又想优先采用动态路由,而让静态路由作为备份路由的话,就可以在配置静态路由的时候指定一个AD 值,这个AD 值要比你采用的动态路由协议要高才行.所以一般当动态路由正常的时候,你在路由表里是看不到这条静态路由的;当动态路由出问题的时候,静态路由开始生效,于是出现在路由表里,这样的静态路由就叫做浮动静态路由(floating static route)。
实验步骤:
1、首先了解什么是浮动路由,通俗的理解就是一条备份线路
2、利用Visio画出拓扑图
3、规划IP地址
4、用Packet Tracer 5.0进行模拟实验。
具体实验步骤:
因为涉及到的设备比较少,我这里面就把模拟器中的配置全部复制出来
Router1
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
//配置IP地址
Router(config)#int s0/0/0
Router(config-if)#ip address 172.16.10.10 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#int s0/0/1
Router(config-if)#ip address 172.16.20.10 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut
Router(config-if)#exit
Router(config)#hostname Router1
Router1(config)#int f0/0
Router1(config-if)#ip address 192.168.10.254 255.255.255.0
Router1(config-if)#no shut
Router1(config-if)#exit
//配置RIP动态路由协议
Router1(config)#router rip
Router1(config-router)#version 2
Router1(config-router)#network 172.168.10.0
Router1(config-router)#network 172.168.20.0
Router1(config-router)#network 192.168.10.0
Router1(config-router)#exit
Router1(config)#end
//配置一条浮动路由
Router1(config)#ip route 192.168.20.0 255.255.255.0 172.16.20.20 125
Router2
Router>en
Router#conf t
Router(config)#hostname rouer2
//配置IP地址
rouer2(config)#int s0/0/0
rouer2(config-if)#ip address 172.16.10.20 255.255.255.0
rouer2(config-if)#no shut
rouer2(config-if)#exit
rouer2(config)#int s0/0/1
rouer2(config-if)#ip address 172.16.20.20 255.255.255.0
rouer2(config-if)#no shut
rouer2(config-if)#exit
rouer2(config)#int f0/0
rouer2(config-if)#ip address 192.168.20.254 255.255.255.0
rouer2(config-if)#no shut
rouer2(config-if)#exit
//配置RIP动态路由协议
rouer2(config)#router rip
rouer2(config-router)#version 2
rouer2(config-router)#network 192.168.20.0
rouer2(config-router)#network 172.16.10.0
rouer2(config-router)#network 172.16.20.0
rouer2(config-router)#exit
rouer2(config)#end
rouer2#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
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.10.0 is directly connected, Serial0/0/0
C 172.16.20.0 is directly connected, Serial0/0/1
R 192.168.10.0/24 [120/1] via 172.16.20.10, 00:00:17, Serial0/0/1
[120/1] via 172.16.10.10, 00:00:17, Serial0/0/0
C 192.168.20.0/24 is directly connected, FastEthernet0/0
Success rate is 100 percent (5/5), round-trip min/avg/max = 62/62/63 ms
rouer2#conf t
//配置一条浮动路由
rouer2(config)#ip route 192.168.10.0 255.255.255.0 172.16.20.10 125
rouer2(config)#end
rouer2#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
//这里我们看不到那条浮动路由,但是如果我们关闭Rip协议,也就是当Rip协议不能正常工作的时候,我们就会看到那条浮动路由
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.10.0 is directly connected, Serial0/0/0
C 172.16.20.0 is directly connected, Serial0/0/1
R 192.168.10.0/24 [120/1] via 172.16.20.10, 00:00:23, Serial0/0/1
[120/1] via 172.16.10.10, 00:00:23, Serial0/0/0
C 192.168.20.0/24 is directly connected, FastEthernet0/0
//关闭Rip协议,同样在router1上也关闭Rip,这里不再写出,与router2相同
rouer2#conf t
rouer2(config)#no router rip
rouer2#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
172.16.0.0/24 is subnetted, 2 subnets
C 172.16.10.0 is directly connected, Serial0/0/0
C 172.16.20.0 is directly connected, Serial0/0/1
S 192.168.10.0/24 [125/0] via 172.16.20.10
C 192.168.20.0/24 is directly connected, FastEthernet0/0
rouer2#
本文转自 Jhuster 51CTO博客,原文链接:http://blog.51cto.com/xwnet/114353,如需转载请自行联系原作者