当前位置:网站首页>Routing strategy
Routing strategy
2022-08-02 00:19:00 【Co_ml】

二、Do multipoint bidirectional redistribution、重发布直连
The environment should be completed firstR7Loopback reposts inOSPF环境,再在R2、R3上进行双向重发布;
此时在OSPF环境中,到R7The loopback route toR4will be issued separatelyR2、R3,At this time, the priority of the route is 150;
进入RIP环境中,The route priority becomes100,假设从R2进入从R3出来,再进入OSPF环境,此时R4You will learn two thingsR7环回的路由(R5,R3),他们的优先级都为150;
因为,R3Selected by priorityR1学习到的7.7.7.0/24(100)环回路由,will be refreshed byR4学习到的7.7.7.0/24(150)环回路由,Republish at this timeR4;
但是由R5传给R4The routing metric of is 3,所以R4会选择R3给他的R7环回的路由(度量为1),此时到R4到R7会形成环路;
when the route is routed byR4传给R5时,The route metric is 2(种子度量+1),R5通过OSPF学习到R7The measure of loopback is also2,and the priority is 150,此时R5到R7Loopback will load balance;
In this case, it is necessary to reasonably use routing policies to solve poor routing,and loop problems.
先将R7loopback for republishing
[r7-ospf-1]import-route direct
再将R3、R2双向重发布,此处列举R2的配置
[r2-ospf-1]import-route rip
[r2-rip-1]import-route ospf
三、路由回馈
由于由OSPF学习到的R3The loop routing its mask is32优先级为10,Access via repostRIP环境,R2Two things will be learnedR3环回的路由(一个掩码32,一个掩码24),但是由RIPThe priority of the learned route is 100,So it chooses to believe byOSPFthe learned route,再传给R1,结果是R1到R3Loop back will go12.1.1.0 网段,选路不佳.
解决办法:
1、将R3Change the network type of the loopback interface tobroadcast
2、Change the mask of the loopback interface to32
Choose a method here1,执行后R2Only in the routing tableR3环回OSPF的路由
[r3]int loop 0
[r3-LoopBack0]ospf network-type broadcast
3.3.3.0/24 OSPF 10 2 D 24.1.1.2 GigabitEthernet0/0/1
四、解决环路
The idea is how to deal with itRIPenvironment by republishingOSPF进来的7.7.7.0/24路由;
解决办法:
1、令R3Do not learn byR1传给它的7.7.7.0/24路由:
Use the prefix list inR3上拒绝7.7.7.0/24网段,但是若R3-R4The physical link fails and cannot be connected,R3cannot be reached7.7.7.0/24,There are no alternate routes.
2、令R3从R1学习到的7.7.7.0/24Routes take precedence over byR4学习到的7.7.7.0/24路由(150)
这样R3choose to believeR4传给它的7.7.7.0/24路由,Solve the loop,And there are backup lines
使用方法2:
[r3]ip ip-prefix hh permit 7.7.7.0 24
****Create a list of prefixes for crawling7.7.7.0/24网段
[r3]route-policy hh permit node 10
Info: New Sequence of this List.
****创建路由策略
[r3-route-policy]if-match ip-prefix hh
****Check the prefix list
[r3-route-policy]apply preference 151
****Change the priority of the routes captured by the prefix list to execute151
[r3-rip-1]preference route-policy hh
****在RIPThe routing strategy is called in
再来查看R3关于7.7.7.0/24的路由表
[r3-rip-1]dis ip ro
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 24 Routes : 24
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 RIP 2 1 D 13.1.1.1 GigabitEthernet0/0/1
2.2.2.0/24 RIP 2 2 D 13.1.1.1 GigabitEthernet0/0/1
3.3.3.0/24 Direct 0 0 D 3.3.3.3 LoopBack0
3.3.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0
3.3.3.255/32 Direct 0 0 D 127.0.0.1 LoopBack0
4.4.4.4/32 OSPF 10 1 D 34.1.1.2 GigabitEthernet0/0/2
5.5.5.5/32 OSPF 10 2 D 34.1.1.2 GigabitEthernet0/0/2
6.6.6.6/32 OSPF 10 3 D 34.1.1.2 GigabitEthernet0/0/2
7.7.7.0/24 O_ASE 150 1 D 34.1.1.2 GigabitEthernet0/0/2
环路问题解决
五、solution routing
此时查看R1的路由表,发现R1到OSPF都是负载均衡,显然不合理;
查看R4的路由表,同理此时R4到RIPAlso load balancing,不合理;
理想状态下:
在RIP中:
R1到R3环回和34.1.1.0/24应该是走13.1.1.0/24
R1到24.1.1.0/24应该是走12.1.1.0/24
R1To other network segments are load balancing
在OSPF中:
R4到R3环回和13.1.1.0/24应该走34.1.1.0/24
R4到12.1.1.0/24应该走24.1.1.0/24
R4到R1环回负载均衡
解决办法:
1、RIP中:
Use the offset list to change its metric
[r2]ip ip-prefix xx permit 3.3.3.0 24
[r2]ip ip-prefix xx permit 34.1.1.0 24
****抓取
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]rip metricout ip-prefix xx 2
****Enter the interface to call the prefix list,and measure it+2,This route will then become the alternate route
[r3]ip ip-prefix xx permit 24.1.1.0 24
[r3]int g0/0/1
[r3-GigabitEthernet0/0/1]rip metricout ip-prefix xx 2
2、OSPF中:
改变cost-type
[r2]ip ip-prefix haha permit 12.1.1.0 24
[r2]ip ip-prefix haha permit 2.2.2.0 24
****Crawl network segments using prefix lists
[r2]route-policy haha permit node 10
Info: New Sequence of this List.
****创建路由策略
[r2-route-policy]if-match ip-prefix haha
[r2-route-policy]apply cost-type type-1
****The route of the network segment will be selectedcost-type改为type-1
****Because of the default republished routecost-type为type-2
****type-1的优先级大于type-2
****所以OSPF会将type-2route as an alternate route
[r2-route-policy]q
[r2]route-policy haha permit node 20
Info: New Sequence of this List.
****创建一个空表,允许所有
[r2-ospf-1]import-route rip route-policy haha
****在ospfThe routing strategy is called in
[r3]ip ip-prefix haha permit 13.1.1.0 24
[r3]route-policy haha permit node 10
Info: New Sequence of this List.
[r3-route-policy]if-match ip-prefix haha
[r3-route-policy]apply cost-type type-1
[r3-route-policy]q
[r3]route-policy haha permit node 20
Info: New Sequence of this List.
[r3-ospf-1]import-route rip route-policy haha
边栏推荐
猜你喜欢

认识USB、Type-C、闪电、雷电接口

Graphical LeetCode - 1161. Maximum Sum of In-Layer Elements (Difficulty: Moderate)

Unity—四元数、欧拉角API+坐标系统

bgp 聚合 反射器 联邦实验

如何设计循环队列?快进来学习~

Task execution control in Ansible

An interesting project--Folder comparison tool (1)

如何优雅的消除系统重复代码

When Netflix's NFTs Forget Web2 Business Security

接地气讲解TCP协议和网络程序设计
随机推荐
在不完全恢复、控制文件被创建或还原后,必须使用 RESETLOGS 打开数据库,解释 RESETLOGS.
ROS 动态参数
构造方法,this关键字,方法的重载,局部变量与成员变量
IO流基础
GIF making - very simple one-click animation tool
Short video seo search optimization main content
06-SDRAM :SDRAM控制模块
els 方块变形判断。
中缀转后缀、前缀表达式快速解决办法
Simpson's paradox
如何发现新的潜力项目?工具推荐
基于相关性变量筛选偏最小二乘回归的多维相关时间序列建模方法
具有通信时延的多自主体系统时变参考输入的平均一致性跟踪
JSP Taglib指令具有什么功能呢?
Grid false data injection attacks detection based on coding strategy
JSP out.print()和out.write()方法的不同之处
微软电脑管家V2.1公测版正式发布
nodeJs--mime模块
Deliver cloud-native microservices applications with Zadig
C language Qixi is coming!It's time to show the romance of programmers!