Importieren Sie direkt verbundene Routen
r3 und r2 auf r5 für eine bidirektionale Zweipunkt-Routing-Umverteilung.
Überprüfen Sie, ob R3 zu R5 geht, um einen suboptimalen Pfad zu generieren:
Da R2 zuerst isis und ospf miteinander verbindet, generiert R3 einen suboptimalen Pfad. Wenn R3 zuerst ospf und isis miteinander verbindet, erzeugen R2 bis R5 einen suboptimalen Pfad . , und R3 selbst wird es nicht tun.
Durch die ultimative Lösung kann realisiert werden, dass unabhängig davon, welche Route später in R5 veröffentlicht wird, keine suboptimalen Pfade und Schleifen generiert werden.
Ultimative Lösung:
Konfiguration der R2-Taste:
[Huawei]dis route-policy //下面2条路由策略是用于解决环路的
Route-policy : ospf-to-isis
deny : 10 (matched counts: 0)
Match clauses :
if-match tag 100 //和R3对标,这边禁掉R3已打过标签的包
permit : 20 (matched counts: 0)
Apply clauses :
apply tag 200
Route-policy : isis-to-ospf
deny : 10 (matched counts: 0)
Match clauses :
if-match tag 300 //和R3对标,这边禁掉R3已打过标签的包
permit : 20 (matched counts: 0)
Apply clauses :
apply tag 400
route-policy test permit node 10 //这个策略是用于解决次优路径的
if-match tag 100
apply preference 150
ospf 1
import-route isis 1 route-policy isis-to-ospf //导入isis时加策略isis-to-ospf
preference ase route-policy test 12
//改ospf外部路由的协议优先级为12,改的时候顺便调用test策略把isis学到的打的tag 100 的协议优先级为150
area 0.0.0.0
isis 1
is-level level-2
cost-style wide //必须为宽度量才能打tag
network-entity 49.0001.0000.0000.0002.00
is-name R2
import-route ospf 1 level-2 route-policy ospf-to-isis //导入ospf时加策略ospf-to-isis
R3-Tastenkonfiguration:
[r3]dis route-policy //下面2条路由策略是用于解决环路的
Route-policy : isis-to-ospf
deny : 10 (matched counts: 0)
Match clauses :
if-match tag 200
permit : 20 (matched counts: 0)
Apply clauses :
apply tag 100
Route-policy : ospf-to-isis
deny : 10 (matched counts: 0)
Match clauses :
if-match tag 400
permit : 20 (matched counts: 0)
Apply clauses :
apply tag 300
route-policy test permit node 10 //这个策略是用于解决次优路径的
if-match tag 400
apply preference 150
ospf 1
import-route isis 1 route-policy isis-to-ospf //导入isis时加策略isis-to-ospf
preference ase route-policy test 12
//改ospf外部路由的协议优先级为12,改的时候顺便调用test策略把isis 学到的打了tag 400 的协议优先级为150
area 0.0.0.0
isis 1
is-level level-2
cost-style wide
network-entity 49.0001.0000.0000.0003.00
is-name R3
import-route ospf 1 levle-2 route-policy ospf-to-isis //导入ospf时加策略ospf-to-isis
Endgültige Ansicht:
R2
Ansicht auf R3: