重发布实验

一、实验要求

1.两个协议间进行多点双向重发布

2.r7的环回没有宣告在ospf协议中,而是后期发布进入的

3.解决环路,所有路径选择最优,且存在备份

二、拓扑图

 三、实验思路

1.建立拓扑图并配置各接口的IP地址及各个路由器的环路IP地址

2.rip和ospf

3.使r7的环回地址发入,使环路出现

4.重发布

5.防环

四、实验步骤

1.rip协议及ospf配置

r1:

[r1]rip 1
[r1-rip-1]ver 2 
[r1-rip-1]network 1.0.0.0  
[r1-rip-1]network 12.0.0.0    
[r1-rip-1]network 13.0.0.0
 

r2:

[r2]rip 1
[r2-rip-1]ver 2
[r2-rip-1]network 12.0.0.0 
[r2-rip-1]network 2.2.2.2 
[r2-rip-1]q
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 0 
[r2-ospf-1-area-0.0.0.0]network 24.1.1.1 0.0.0.0

r3:

[r3]rip 1
[r3-rip-1]ver 2
[r3-rip-1]network 13.0.0.0
[r3-rip-1]q 
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0   
[r3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0

r4:

[r4]ospf 1 router-id 4.4.4.4

[r4-ospf-1]area 0  

[r4-ospf-1-area-0.0.0.0]network 24.1.1.2 0.0.0.0

[r4-ospf-1-area-0.0.0.0]network 34.1.1.2 0.0.0.0

[r4-ospf-1-area-0.0.0.0]network  4.4.4.4 0.0.0.0

[r4-ospf-1-area-0.0.0.0]network 45.1.1.1 0.0.0.0

r5:

[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 45.1.1.2 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 56.1.1.1 0.0.0.0
 

r6:

[r6]ospf 1 router-id 6.6.6.6   
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 6.6.6.6 0.0.0.0  
[r6-ospf-1-area-0.0.0.0]network 56.1.1.2 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 67.1.1.1 0.0.0.0

r7:

[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 67.1.1.2 0.0.0.0

2.添加r7的环回

[r7]ospf 1  
[r7-ospf-1]import-route direct 

3.重发布

r2:

[r2]rip 1  
[r2-rip-1]import-route ospf  1
[r2-rip-1]q  
[r2]ospf 1
[r2-ospf-1]import-route rip 1
 

r3:

[r3]rip 1
[r3-rip-1]import-route ospf 1
[r3-rip-1]q  
[r3]ospf 1
[r3-ospf-1]import-route rip 1

4.防环 修改优先级

r2:

[r2]ip ip-prefix b permit 7.7.7.0 24
[r2]route-policy b permit node 10 
[r2-route-policy]if-match ip-prefix b
[r2-route-policy]apply preference 151
[r2-route-policy]q
[r2]rip 1
[r2-rip-1]preference route-policy b

[r2]ip ip-prefix y permit 3.3.3.3 32
[r2]ip ip-prefix y permit 34.1.1.0 24
[r2]q
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]rip metricout ip-prefix y 2

[r2]ip ip-prefix c permit 12.1.1.0 24
[r2]ip ip-prefix c permit 2.2.2.0 24
[r2]route-policy cc permit node 10
[r2-route-policy]if-match ip-prefix c   
[r2-route-policy]apply cost-type type-1
[r2-route-policy]q
[r2]route-policy cc permit node 20
[r2-route-policy]q
[r2]ospf 1
[r2-ospf-1]import-route rip route-policy cc
 

r3:

([r3]ip ip-prefix a permit 7.7.7.0 24  
[r3]route-policy aa permit node 10  
[r3-route-policy]if-match ip-prefix a
[r3-route-policy]q
[r3]rip 1
[r3-rip-1]preference 151 route-policy aa)  不优 有缺点


[r3]ip ip-prefix b permit 7.7.7.0 24
[r3]route-policy bb permit node 10  
[r3-route-policy]if-match ip-prefix b   
[r3-route-policy]apply  preference 151

[r3]ip ip-prefix y permit 24.1.1.0 24
[r3]int g0/0/0  
[r3-GigabitEthernet0/0/0]rip metricout ip-prefix y 2
 

[r3]ip ip-prefix c permit 13.1.1.0 24 
[r3]route-policy cc permit node 10
[r3-route-policy]if-match ip-prefix c   
[r3-route-policy]apply cost-type  type-1
[r3-route-policy]q 
[r3]route-policy cc permit node 20
[r3-route-policy]q    
[r3]ospf 1
[r3-ospf-1]import-route rip route-policy cc

五、实验配置

r1:

r2:

r3:

r4:

r5:

r6:

r7:


 


 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值