配置好接口IP和环回后,R1/R2/R3启用rip协议,R2/R3/R4/R5启用ospf协议
[r2]ospf 1
[r2-ospf-1]import-route rip
[r2-ospf-1]q
[r2]rip 1
[r2-rip-1]import-route ospf 1
[r3]ospf 1
[r3-ospf-1]import-route rip
[r3-ospf-1]q
[r3]rip 1
[r3-rip-1]import-route ospf 1
双点双向重发布
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 24.1.1.0 0.0.0.255
[r1-acl-basic-2000]rule permit source 2.2.2.2 0.0.0.0
[r1]i g0/0/1
[r1-GigabitEthernet0/0/1]rip metricin 2000 2
将路改烂
[r2]ip ip-prefix xx permit 3.3.3.3 32
[r2]ip ip-prefix xx permit 34.1.1.0 24
[r2]route-policy yy permit node 10
[r2-route-policy]if-match ip-prefix xx
[r2-route-policy]apply cost 3
[r2-route-policy]q
[r2]route-policy yy permit node 20
[r2]rip 1
[r2-rip-1]import-route ospf 1 route-policy yy
[r3]ip ip-prefix xx permit 12.1.1.0 24
[r3]route-policy nn deny node 10
[r3-route-policy]if-match ip-prefix xx
[r3-route-policy]q
[r3]route-policy nn permit node 20
[r3-route-policy]q
[r3-ospf-1]import-route rip route-policy nn
测试