Linux添加浮动路由,浮动静态路由-linuxnet527-ChinaUnix博客

浮动 ,实在话,这个东东我也不清楚,也是看教程才了解到的:

浮动静态路由,可以实现ISDN拨号备份。浮动静态路由即静态预定义运行代价(COST)。备份思 想是当主线路出现故障,高COST的静态路由开始起作用,产生一个ISDN呼叫。当主线路恢复时,将断开这条高Cost的路由,重新起用原线路, 这是浮动静态路由的作用!

1.实验目的 通过本实验可以掌握浮动静态路由原理、配置以及备份应用。

2.拓扑结构 实验拓扑如图 4-6 所示。 fdjt.jpg

3.实验步骤 本实验通过修改静态路由的管理距离为 130,使得路由器选路的时候优先选择 RIP,而静态路由作为备份。

(1)步骤 1:配置路由器 R1

R1(config)#ip route 2.2.2.0 255.255.255.0 192.168.12.2 130 //将静态路由的管理距离设置为 130

R1(config)#router rip R1(config-router)#version 2 R1(config-router)#no

auto-summary R1(config-router)#network 1.0.0.0 R1(config-router)#network

192.168.21.0

(2)步骤 2:配置路由器 R2

R2(config)#ip route 1.1.1.0 255.255.255.0 192.168.12.1 130

R2(config)#router rip R2(config-router)#version 2

R2(config-router)#no auto-summary

R2(config-router)#network 192.168.21.0

R2(config-router)#network 2.0.0.0 4.

实验调试

(1)在 R1上查看路由表:

R1#sh ip rou 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- ia - IS-IS

inter area, * - candidate default, U - per-user static ro o - ODR, P -

periodic downloaded static route Gateway of last resort is not set

C 192.168.12.0/24 is directly connected, Serial1/1 1.0.0.0/24 is subnetted, 1 subnets

C 1.1.1.0 is directly connected, Loopback0 2.0.0.0/24 is subnetted, 1 subnets

S 2.2.2.0 [130/0] via 192.168.12.2

C 192.168.21.0/24 is directly connected, FastEthernet2/0

从以上输出可以看出, 路由器将 RIP的路由放入路由表中, 因为 RIP 的管理距离为 120,小于在静态路由中设定的 130,而静态路由处于备份的地位。

(2)在 R1上将 fa2/0 接口 shutdown,然后查看路由表:

R1(config)#interface fa2/0

R1(config-if)#shutdown

R1#sh ip rout 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- ia - IS-IS inter area, * -

candidate default, U - per-user static ro o - ODR, P - periodic

downloaded static route Gateway of last resort is not set

C 192.168.12.0/24 is directly connected, Serial1/1 1.0.0.0/24 is subnetted, 1 subnets

C 1.1.1.0 is directly connected, Loopback0 2.0.0.0/24 is subnetted, 1 subnets

S 2.2.2.0 [130/0] via 192.168.12.2

以上输出说明,当主路由中断后,备份的静态路由被放入到路由表中,也很好地解释了浮动静态路由作为备份的工作原理。

(3)在 R1上将 fa2/0 接口启动,然后查看路由表:

R1(config)#interface fa2/0

R1(config-if)#no shutdown

R1#sh ip rou 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 not set

C 192.168.12.0/24 is directly connected, Serial1/1 1.0.0.0/24 is subnetted, 1 subnets

C 1.1.1.0 is directly connected, Loopback0 2.0.0.0/24 is subnetted, 1 subnets

S 2.2.2.0 [130/0] via 192.168.12.2

C 192.168.21.0/24 is directly connected, FastEthernet2/0

以上输出表明当主路由恢复后,浮动静态路由又恢复到备份的地位。 在这之中我们可以ping一下试试,应该都是通的!

阅读(401) | 评论(0) | 转发(0) |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值