在这里插入图片描述
r5上直接导入直连路由
r3和r2进行双点双向路由重分布

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

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

在这里插入图片描述

终极解决方案:

R2关键配置:

[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关键配置

[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上查看
在这里插入图片描述
在这里插入图片描述

原文地址:https://blog.csdn.net/ydaxia110/article/details/134669723

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_4931.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注