HCIP的重发布实验

 实验要求:

1 两个协议间进行多点双向重发布
2 R7的环回没有宣告在OSPF中而是后期发布进入的
3 解决环路,所有路径选择最优,且存在备份

一、IP配置

R1:

R2:

R3:

 R4:

 R5:

 R6:

  R7:

二、配置协议

 R1:

R2:

 

R3:

 

R4:

 

R5:

 

R6:

 

R7:

三、重发布

R7:

[R7-ospf-1]import-route direct 

R2:
[R2]rip 1
[R2-rip-1]import-route ospf 1
[R2-rip-1]q
[R2]ospf 1
[R2-ospf-1]import-route rip

R3:
[R3]rip 1
[R3-rip-1]im    
[R3-rip-1]import-route ospf 1
[R3-rip-1]q
[R3]ospf 1
[R3-ospf-1]import-route rip

 四、将R3环回工作方式修改未broadcast

[R3]int LoopBack 0

[R3-LoopBack0]ospf network-type broadcast

 五、修改R7在rip中学到的优先级,解决R7环回重发布产生的环路。 修改为151

R2:
[R2]ip ip-prefix a permit 7.7.7.0 24
[R2]route-policy a permit node 10
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix a
[R2-route-policy]apply preference 151
[R2]ospf 1
[R2-ospf-1]preference route-policy a

R3:
[R3]ip ip-prefix a permit 7.7.7.0 24
[R3]route-policy a permit node 10
Info: New Sequence of this List.    
[R3-route-policy]if-match ip-prefix a
[R3-route-policy]apply preference 151
[R3-route-policy]q
[R3]rip 1
[R3-rip-1]preference route-policy a

R3路由表: 

 

R1路由表:

查看R1路由表,R3环回、24网段和34网段为负载均衡,选路不佳

六、给R1的rip增加度量 

R2:
[R2]ip ip-prefix aa permit 3.3.3.0 24
[R2]ip ip-prefix aa permit 34.1.1.0 24
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]rip metricin ip-prefix aa 2

R3:
[R3]ip ip-prefix aa permit 24.1.1.0 24
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]rip metricin ip-prefix aa 2

查看R4路由表:

 

七、将R2环回、12网段和13网段改为类型1

R2:
[R2]ip ip-prefix qq permit 12.1.1.0 24
[R2]ip ip-prefix qq permit 2.2.2.0 24
[R2]route-policy bb permit node 10
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix qq
[R2-route-policy]apply cost-type type-1
[R2-route-policy]q
[R2]route-policy bb permit node 20
Info: New Sequence of this List.
[R2-route-policy]q
[R2]ospf 1
[R2-ospf-1]import-route rip 1 route-policy bb

R3:
[R3]ip ip-prefix aa permit 13.1.1.0 24
[R3]route-policy bb permit node 10
Info: New Sequence of this List.
[R3-route-policy]if-match ip-prefix aa
[R3-route-policy]apply cost-type type-1
[R3-route-policy]q
[R3]route-policy bb permit node 20
Info: New Sequence of this List.
[R3-route-policy]q
[R3]ospf 1
[R3-ospf-1]import-route rip 1 route-policy  bb

八、测试

检查路由表,负载均衡已消除

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值