要求:R1的环回并没有宣告进OSPF网络,需要通过重发布导入到OSPF网络。
保证全网可达,且没有路由回馈以及选路不佳。
实验配置:
[r1-ospf-1]import-route direct[r1]acl 2000
[r1-acl-basic-2000]rule per source 192.168.12.0 0
[r1-acl-basic-2000]acl 2001
[r1-acl-basic-2001]rule per source 192.168.13.0 0
[r1-acl-basic-2001]q[r1]route-policy huawei deny node 10
[r1-route-policy]if-match acl 2000
[r1-route-policy]q
[r1]route-policy huawei deny node 20
[r1-route-policy]if
[r1-route-policy]if-match acl 2001
[r1-route-policy]q
[r1]route-policy huawei permit node 30[r1]ospf 1
[r1-ospf-1]import-route direct route-policy huawei
[r3]ip ip-prefix aa permit 192.168.24.0 24
[r3]route-policy hcip permit node 10
Info: New Sequence of this List.
[r3-route-policy]if-match ip-prefix aa
[r3-route-policy]apply cost 5
[r3-route-policy]q
[r3]route-policy hcip 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 hcip