实验要求:
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 ripR3:
[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 aR3:
[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 2R3:
[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 bbR3:
[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
八、测试
检查路由表,负载均衡已消除