目录
在AR2上将OSPF引入ISIS,然后在AR3上将ISIS引入OSPF
在AR3上将OSPF引入ISIS,然后在AR2上将ISIS引入OSPF
路由底层搭建
AR1、AR2、AR3、AR5运行OSPF协议
AR1
ospf 1
area 0.0.0.0
interface Serial4/0/0
link-protocol ppp
ip address 15.0.0.1 255.255.255.0
ospf enable 1 area 0.0.0.0
interface GigabitEthernet0/0/0
ip address 12.0.0.1 255.255.255.0
ospf enable 1 area 0.0.0.0
interface GigabitEthernet0/0/1
ip address 13.0.0.1 255.255.255.0
ospf enable 1 area 0.0.0.0
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
ospf enable 1 area 0.0.0.0
AR2
ospf 1
area 0.0.0.0
interface GigabitEthernet0/0/0
ip address 12.0.0.2 255.255.255.0
ospf enable 1 area 0.0.0.0
AR3
ospf 1
area 0.0.0.0
interface GigabitEthernet0/0/1
ip address 13.0.0.3 255.255.255.0
ospf enable 1 area 0.0.0.0
AR5——在AR5上引入Loop0地址(为了方便观察,本次通过路由策略只引入5.5.5.5的路由)
ip ip-prefix loop0 index 10 permit 5.5.5.5 32
route-policy loop0 permit node 10
if-match ip-prefix loop0
ospf 1
import-route direct route-policy loop0
area 0.0.0.0
interface Serial4/0/0
link-protocol ppp
ip address 15.0.0.5 255.255.255.0
ospf enable 1 area 0.0.0.0
interface LoopBack0
ip address 5.5.5.5 255.255.255.255
AR2、AR3、AR4运行ISIS协议(level为2)
AR2
isis 1
is-level level-2
network-entity 49.0001.2222.2222.2222.00
interface GigabitEthernet0/0/1
ip address 24.0.0.2 255.255.255.0
isis enable 1
AR3
isis 1
is-level level-2
network-entity 49.0001.3333.3333.3333.00
interface GigabitEthernet0/0/0
ip address 34.0.0.3 255.255.255.0
isis enable 1
AR4
isis 1
is-level level-2
network-entity 49.0001.4444.4444.4444.00
interface GigabitEthernet0/0/0
ip address 34.0.0.4 255.255.255.0
isis enable 1
interface GigabitEthernet0/0/1
ip address 24.0.0.4 255.255.255.0
isis enable 1
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
isis enable 1
配置双点双向引入
在AR2上将OSPF引入ISIS,然后在AR3上将ISIS引入OSPF
故障现象
在AR2上将OSPF引入ISIS,会使得AR3产生次优路径
此时在AR3上将ISIS引入OSPF,AR1去往5.5.5.5的路由下一跳为AR3,此时产生环路
通过在AR3上配置5.5.5.5的优先级来解决(将从OSPF学来的优先级调到低于15)
配置前缀列表
ip ip-prefix modify_pre index 10 permit 5.5.5.5 32
配置路由策略修改优先级
route-policy modify_pre permit node 10
if-match ip-prefix modify_pre
apply preference 13
route-policy modify_pre permit node 20
在OSPF应用路由策略针对ase路由实现优先级的修改
ospf 1
preference ase route-policy modify_pre 150
此时AR3和AR1去往5.5.5.5的路由都回归正常
在AR3上将OSPF引入ISIS,然后在AR2上将ISIS引入OSPF
故障现象
在AR3上将OSPF引入ISIS,会使得AR2产生次优路径
此时在AR2上将ISIS引入OSPF,AR1去往5.5.5.5的路由下一跳为AR2,此时产生环路
并且此时,AR4关于去往5.5.5.5的路由只有一个下一跳(去往AR3-因为AR2上的5.5.5.5的路由此时走的是ISIS,在AR3无法从AR2上学习到5.5.5.5的路由)
通过在AR2上配置5.5.5.5的优先级来解决(将从ISIS学来的优先级调到高于150)
配置前缀列表
ip ip-prefix modify_pre index 10 permit 5.5.5.5 32
配置路由策略修改优先级
route-policy modify_pre permit node 10
if-match ip-prefix modify_pre
apply preference 151
route-policy modify_pre permit node 20
在ISIS应用路由策略实现优先级的修改
isis 1
is-level level-2
preference route-policy modify_pre
此时AR2和AR1去往5.5.5.5的路由都回归正常
此时AR4去往5.5.5.5的路由也有多条路径
通过标签来避免路由回馈
AR2在将OSPF引入ISIS中时,打上标签10,拒绝引入标签20
AR3在将ISIS引入OSPF中时,打上标签20,拒绝引入标签10
AR2在将ISIS引入OSPF中时,打上标签30,拒绝引入标签40
AR3在将OSPF引入ISIS中时,打上标签40,拒绝引入标签30
AR2
route-policy ospf2isis permit node 10
apply tag 10
route-policy ospf2isis deny node 20
if-match tag 20
isis 1
cost-style wide ISIS需要携带Tag时,要把开销方式配置为宽带方式,否则不传递标签属性(Tag传递依靠扩展TLV)
import-route ospf 1 route-policy ospf2isis
route-policy isis2ospf permit node 10
apply tag 30
route-policy isis2ospf deny node 20
if-match tag 40
ospf 1
import-route isis 1 route-policy isis2ospf
AR3
route-policy isis2ospf permit node 10
apply tag 20
route-policy isis2ospf deny node 20
if-match tag 10
ospf 1
import-route isis 1 route-policy isis2ospf
route-policy ospf2isis permit node 10
apply tag 40
route-policy ospf2isis deny node 20
if-match tag 30
isis 1
cost-style wide
import-route ospf 1 route-policy ospf2isis