华为ospf和isis双点双向路由重分布的次优路径和环路终极解决方案

r5上直接导入直连路由

r3和r2进行双点双向路由重分布

查看R3去往R5产生了次优路径:

因为是R2先互相引入的isis和ospf,所以R3会产生次优路径,如果是R3先相互引入ospf和isis,那就是R2去R5会产生次优路径,而R3本身不会。

通过终极解决方案:可以实现无论如何在R5上后来再发布什么路由都不会产生次优路径和环路产生了。

终极解决方案:

R2关键配置:

python 复制代码
[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 12 route-policy test  
 //改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关键配置:

python 复制代码
[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 12 route-policy test
  //改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

最终查看:

R2

R3上查看:

相关推荐
FungLeo1 天前
Flutter 接入 Alice 调试浮窗:一个顶层 final 抢跑,把 release 网络整没了
网络·flutter
abbgogo1 天前
堆叠、DHCP 与链路聚合总结
网络·网络协议
xiaoxiangsiyan1 天前
GitLab CI/CD 自托管(EE 企业版)+ Kubernetes Runner 集群 + ArgoCD(GitOps 部署)
运维·网络·ci/cd·容器·kubernetes·gitlab·argocd
HMS Core1 天前
基于人体骨骼点识别与跟踪,实现低时延体感游戏
游戏·华为·harmonyos
XR1234567881 天前
政府办公楼网络搭建方案对比:信锐、华为、华三选型指南
网络·华为
达子6661 天前
第23章_HarmonyOs开发图解之 WLAN
华为·harmonyos
星恒讯工业路由器1 天前
网络安全访问控制规则详解
网络·安全·智能路由器·访问控制·防火墙规则·工业网络安全
2601_949499941 天前
芯瑞科技400G VR4 QSFP-DD光模块:低功耗高密短距互联方案,赋能AI智算中心算力网络升级
大数据·运维·网络·人工智能·科技·光模块
神秘的MT1 天前
C# WinForm Socket 服务器 + 串口转发
服务器·网络·学习·c#
上海云盾-小余1 天前
混合网络攻击深度解析:WAF 流量清洗落地完整方案
网络