一、双点重发布
R2
[R2]ospf 1
[R2-ospf-1]import-route rip
[R2-ospf-1]q
[R2]rip 1
[R2-rip-1]import-route ospf 1
R4
[R4]ospf 1
[R4-ospf-1]import-route rip
[R4-ospf-1]q
[R4]rip 1
[R4-rip-1]import-route ospf 1
R1 ![](https://i-blog.csdnimg.cn/blog_migrate/6443dfef12fd34698c512fc56345862f.png)
R3
二、选路最佳
R1
[R1]ip ip-prefix a permit 34.1.1.0 24
[R1]ip ip-prefix b permit 4.4.4.4 32
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]rip metricout ip-prefix a 5
[R1-GigabitEthernet0/0/0]rip metricout ip-prefix b 5
[R4]ip ip-prefix c permit 23.1.1.0 24
[R4]int g 0/0/1
[R4-GigabitEthernet0/0/1]rip metricout ip-prefix c 5
R3
[R4]ip ip-prefix qq permit 14.1.1.0 24
[R4]route-policy huawei permit node 30
Info: New Sequence of this List.
[R4-route-policy]if-match ip-prefix dd
[R4-route-policy]apply cost-type type-1
[R4-route-policy]q
[R4]route-policy huawei permit node 50
Info: New Sequence of this List.
[R4]ospf
[R4-ospf-1]import-route rip 1 route-policy huawei