题目
IP地址配置
R1:
R2:
R3:
R4:
双点重发布
R2:
rip 1
version 2
network 12.0.0.0
network 2.0.0.0
import-route ospf 1ospf 1
import-route rip 1 route-policy R2
area 0.0.0.0
network 23.1.1.0 0.0.0.255
R4:
rip 1
version 2
network 14.0.0.0
import-route ospf 1ospf 1 router-id 4.4.4.4
import-route rip 1 route-policy R4
area 0.0.0.0
network 4.4.4.0 0.0.0.255
network 34.1.1.0 0.0.0.255
路由策略(选路最佳)
R2:
Prefix-list r2
Permitted 2
Denied 16
index: 10 permit 34.1.1.0/24
index: 20 permit 4.4.4.0/24rip metricout ip-prefix r2 3
Prefix-list r22
Permitted 5
Denied 25
index: 10 permit 14.1.1.0/24Route-policy : R2
permit : 10 (matched counts: 5)
Match clauses :
if-match ip-prefix r22
Apply clauses :
apply cost 5
permit : 20 (matched counts: 25)
R4:
Prefix-list r4
Permitted 5
Denied 25
index: 10 permit 23.1.1.0/24
index: 20 permit 2.2.2.0/24rip metricout ip-prefix r4 3
Prefix-list r44
Permitted 4
Denied 4
index: 10 permit 12.1.1.0/24
index: 20 permit 2.2.2.0/24Route-policy : R4
permit : 10 (matched counts: 18)
Match clauses :
if-match ip-prefix r44
Apply clauses :
apply cost 5
permit : 20 (matched counts: 6)
结果
拓扑正常下,选路为最佳。当拓扑发生变化时,会自动使用备份路由,当拓扑恢复后,自动恢复最佳选路