赞
踩
R1除本身环回外,外加几条环回
172.16.1.0/24 deny
172.16.2.0/24 type 1
172.16.3.0/24 cost 6
172.16.4.0/24 type 1 cost 9
更改如上参数
按照上图进行IP配置
题目要求蓝色区域使用RIP,红色区域使用OSPF,R2的环回宣告在RIP,R4的环回宣告在OSPF
R1
[R1]rip 1
[R1-rip-1]version 2
[R1-rip-1]network 1.0.0.0
[R1-rip-1]network 172.16.0.0
[R1-rip-1]network 12.0.0.0
[R1-rip-1]network 14.0.0.0
R2
[R2]rip 1
[R2-rip-1]version 2
[R2-rip-1]network 12.0.0.0
[R2-rip-1]network 2.0.0.0
[R2-rip-1]q
[R2]ospf 1
[R2-ospf-1]area 0
[R2-ospf-1-area-0.0.0.0]network 23.1.1.1 0.0.0.0
R3
[R3]ospf 1
[R3-ospf-1]area 0
[R3-ospf-1-area-0.0.0.0]network 23.1.1.2 0.0.0.0[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.0]network 34.1.1.2 0.0.0.0
R4
[R4]ospf 1
[R4-ospf-1]area 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 34.1.1.1 0.0.0.0[R4-ospf-1-area-0.0.0.0]q
[R4-ospf-1]q
[R4]rip 1
[R4-rip-1]version 2
[R4-rip-1]network 14.0.0.0
在向OSPF中发布RIP是需要做路由策略,需要在两台ASBR进行配置
以R2为例
前缀列表的抓取
[R2]ip ip-prefix 1 permit 172.16.1.0 24
[R2]ip ip-prefix 2 permit 172.16.2.0 24
[R2]ip ip-prefix 3 permit 172.16.3.0 24
[R2]ip ip-prefix 4 permit 172.16.4.0 24
路由策略
[R2]route-policy huawei deny node 10
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix 1
[R2-route-policy]quit
[R2]route-policy huawei permit node 20
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix 2
[R2-route-policy]apply cost-type type-1
[R2-route-policy]quit
[R2]route-policy huawei permit node 30
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix 3
[R2-route-policy]apply cost 6
[R2-route-policy]quit
[R2]route-policy huawei permit node 40
Info: New Sequence of this List.
[R2-route-policy]if-match ip-prefix 4
[R2-route-policy]apply cost-type type-1
[R2-route-policy]apply cost 9
双向重发布及调用
[R2]ospf 1
[R2-ospf-1]import-route rip 1 route-policy huawei
[R2-ospf-1]q
[R2]rip 1
[R2-rip-1]import-route ospf 1
完成后可以在R4上查看路由表来检查
完成后同理完成R3上配置
查看R1的路由表
可以发现去R4的环回有两条路由,一条是通过R4直接去,另一条是通过R2绕一圈回到R4再去,明显选路不佳。
解决方案:1、环回接口配置32位掩码ip地址 2、修改环回接口的网络类型
1、
[R4]interface LoopBack 0
[R4-LoopBack0]ip add 4.4.4.4 32
2、
[R4]interface LoopBack 0
[R4-LoopBack0]ospf network-type broadcast
采取任意方案后,再次查看路由表
可以看到路由条目变为一条
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。