立即注册 登录
雏鹰部落 返回首页

子杰的个人空间 https://bbs.spoto.net/?131778 [收藏] [复制] [分享] [RSS]

日志

RIP的偏移列表配置案例

已有 183 次阅读2013-2-6 15:44 | 偏移列表、RIP

1     案例配置拓扑

       

2     IP地址规划

 

Fastethernet0/0

Fastethernet1/0

Loopback 0

R1

172.16.11.1/24

172.16.10.1/24

1.1.1.1/24

R2

172.16.11.2/24

172.16.12.2/24

N/A

R3

172.16.12.3/24

172.16.10.3/24

3.3.3.3/24

3     案例配置需求

l  R1R2R3运行RIP协议,实现全网互通。

l  使用rip偏移列表让R1访问R3走路径R1-R2-R3的路径,还回路径一致。

l  R1-R2-R3之间链路故障时,不影响R1R3之间的互访。

4     案例配置思路

1)     配置R1R2R3运行RIP协议,并开启R1R3的环回接口lp 0

2)     分别在R1R3上配置RIP偏移列表的命令,关键命令如下:     

(config)#router rip                     //运行rip协议//

(config-router)#version 2                    //rip版本为2//

(config-router)#offset-list 1 in 2 FastEthernet1/0   //偏移列表1 metric值为2,方向为in//

(config)#access-lists 1 permit x.x.x.x x.x.x.x   

5     案例检验结果

1)     查看R1去往R3的环回接口的路径:

             

2)     R1-R2-R3的链路断了,R1能否正常的访问R3,以及路径的条目

    

6     案例配置文件

R1:
enable
conf t
hostname R1
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 172.16.11.1 255.255.255.0
 no shutdown
 exit
!
interface FastEthernet1/0
 ip address 172.16.10.1 255.255.255.0
 no shutdown
 exit
!
router rip
 version 2
 offset-list 1 in 2 FastEthernet1/0
 network 1.0.0.0
 network 172.16.0.0
 no auto-summary
!
access-list 1 permit 3.3.3.0 0.0.0.255
!
end

R2:

enable
conf t
hostname R2
!
interface FastEthernet0/0
 ip address 172.16.11.2 255.255.255.0
 no shutdown
 exit
!
interface FastEthernet1/0
 ip address 172.16.12.2 255.255.255.0
 no shutdown
 exit
!
router rip
 version 2
 network 172.16.0.0
 no auto-summary
!
end

R3:

enable
conf t
hostname R3
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
 ip address 172.16.12.3 255.255.255.0
 no shutdown
 exit
!
interface FastEthernet1/0
 ip address 172.16.10.3 255.255.255.0
 no shutdown
 exit
!
router rip
 version 2
 offset-list 1 in 2 FastEthernet1/0
 network 3.0.0.0
 network 172.16.0.0
 no auto-summary
!
access-list 1 permit 1.1.1.0 0.0.0.255
!
end

7     案例总结及其它

1)     同一RIP协议时,metric值越小越好,默认为1

2)     offset-list 1 in 2 f1/0 表示此时走f1/0metric值为2。这样就会选择metric值为1的路径,即从f0/0口出去。

 

 

 

 

 

-----------------------------------------------------------------------------------------

SPOTO 我们共创未来

 

您的朋友 周俊杰(Jay)
 

Email:zhoujj@spoto.net

新浪微博:http://weibo.com/zhoujj0130

新浪博客:http://blog.sina.com.cn/zhoujj0130

持续付出不亚于任何人的努力

-----------------------------------------------------------------------------------------

 


路过

雷人

握手

鲜花

鸡蛋

评论 (0 个评论)

facelist

您需要登录后才可以评论 登录 | 立即注册

QQ|熊猫同学技术论坛|小黑屋| 网络工程师论坛 ( 沪ICP备09076391 )

GMT+8, 2024-5-7 20:45 , Processed in 0.055096 second(s), 18 queries , Gzip On.

返回顶部