§§
 

公告

我的分类(专题)

日志更新

最新评论

留言板

搜索

链接

Blog信息




 

rip    修改度量
zhangxinwen 发表于 2007-8-23 14:03:10

实验目的:使用偏移列表offset-list修改metric值。使R3在正常情况下到网络1.0.0.0/8Serial2/1,只有当使用这跳串形链路失败时,才使用这条快速以太链路。只想把这条快速以太链路作为备份链路

基本配置

R1#show running-config

interface Loopback0

 ip address 1.1.1.1 255.255.255.0

interface FastEthernet0/0

 ip address 13.0.0.1 255.255.255.0

interface Serial2/1

 ip address 12.0.0.1 255.255.255.0

router rip

 network 12.0.0.0

 network 13.0.0.0

network 1.0.0.0

R2#show running-config

interface Serial2/1

 ip address 12.0.0.2 255.255.255.0

interface Serial2/2

 ip address 23.0.0.2 255.255.255.0

router rip

 network 12.0.0.0

 network 23.0.0.0

R3#show running-config

interface FastEthernet0/0

 ip address 13.0.0.3 255.255.255.0

interface Serial2/1

 ip address 23.0.0.3 255.255.255.0

router rip

 network 13.0.0.0

 network 23.0.0.0

------------------------------------------------------------------------------\

R3(config-router)# do sh ip rou

Gateway of last resort is not set

 

R    1.0.0.0/8 [120/1] via 13.0.0.1, 00:00:02, FastEthernet0/0

     23.0.0.0/24 is subnetted, 1 subnets

C       23.0.0.0 is directly connected, Serial2/1

R    12.0.0.0/8 [120/1] via 23.0.0.2, 00:00:12, Serial2/1

                [120/1] via 13.0.0.1, 00:00:02, FastEthernet0/0

     13.0.0.0/24 is subnetted, 1 subnets

C       13.0.0.0 is directly connected, FastEthernet0/0

查看R3路由表,看到有1条到10.0.0/8 的路由,etric 1.

R3(config-router)#int f0/0

R3(config-if)#shut

R3(config-if)#do sh ip rou

Gateway of last resort is not set

 

R    1.0.0.0/8 [120/2] via 23.0.0.2, 00:00:06, Serial2/1

     23.0.0.0/24 is subnetted, 1 subnets

C       23.0.0.0 is directly connected, Serial2/1

R    12.0.0.0/8 [120/1] via 23.0.0.2, 00:00:06, Serial2/1

R    13.0.0.0/8 [120/2] via 23.0.0.2, 00:00:06, Serial2/1

关闭f0/0接口后,此时路由表中到1.0.0./8的路由下一跳是R2Metric值是2

在正常情况下。依照rip 的特性,rip会选择跳数少的路径。在这不考滤链路带宽。

假设此题只想把这条快速以太链路作为备份链路,只有当经过R2失败时,才使用这条快速以太链路。

使用偏移列表,将R3经过F0/0到达1.0.0.0/8网络的Metric设为3跳。

R3(config)#access-list 1 permit 1.0.0.0  0.0.0.0

R3(config)#router rip

R3(config-router)#offset-list 1 in 3 f0/0

R3(config-if)#int f0/0

R3(config-if)#no shut

R3#debug ip rip

RIP protocol debugging is on

R3#

00:55:21: RIP: received v1 update from 13.0.0.1 on FastEthernet0/0

00:55:21:      1.0.0.0 in 4 hops

00:55:21:      12.0.0.0 in 1 hops

R3#

00:55:27: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (13.0.0.3)

00:55:27: RIP: build update entries

00:55:27:       network 1.0.0.0 metric 3

00:55:27:       network 23.0.0.0 metric 1

00:55:27: RIP: sending v1 update to 255.255.255.255 via Serial2/1 (23.0.0.3)

00:55:27: RIP: build update entries

00:55:27:       network 13.0.0.0 metric 1

R3#

00:55:40: RIP: received v1 update from 23.0.0.2 on Serial2/1

00:55:40:      1.0.0.0 in 2 hops

00:55:40:      12.0.0.0 in 1 hops

通过调试信息看到 R3接收的1.0.0.0的更新,从F0/0通告来的metric3

  S2/1通告来的metric2 说明偏移列表在起作用。

 

关闭s2/1接口,验证到网络1.0.0.0,在经过R2失败时,使用f0/0这条链路。

R3(config)#int s2/1

R3(config-if)#shut

R3#sh ip rou

Gateway of last resort is not set

 

R    1.0.0.0/8 [120/4] via 13.0.0.1, 00:00:08, FastEthernet0/0

R    12.0.0.0/8 [120/1] via 13.0.0.1, 00:00:08, FastEthernet0/0

     13.0.0.0/24 is subnetted, 1 subnets

C       13.0.0.0 is directly connected, FastEthernet0/0

实验成功。此时到网络1.0.0.0/8下一跳R1 Metric4



阅读全文 | 回复(0) | 引用通告 | 编辑
 


发表评论:

    昵称:
    密码:
    主页:
    标题:





© COPYRIGHT 2005 ALL RIGHTS RESERVED

 
Powered by Oblog.