当前位置:网站首页>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
边栏推荐
猜你喜欢

How to reinstall Win11?One-click method to reinstall Win11

磁盘与文件系统管理

扑克牌问题

22. The support vector machine (SVM), gaussian kernel function

IP核:FIFO

nodeJs--各种路径

已知中序遍历数组和先序遍历数组,返回后序遗历数组

一文概览最实用的 DeFi 工具

security CSRF Vulnerability Protection
![[21-Day Learning Challenge] A small summary of sequential search and binary search](/img/81/7339a33de3b9e3aec0474a15825a53.png)
[21-Day Learning Challenge] A small summary of sequential search and binary search
随机推荐
A simple file transfer tools
电机原理动图合集
460. LFU 缓存
基于超参数自动寻优的工控网络入侵检测
Industrial control network intrusion detection based on automatic optimization of hyperparameters
Simpson's paradox
When Netflix's NFTs Forget Web2 Business Security
[Three sons] C language implements simple three sons
06-SDRAM : SDRAM control module
不就是个TCC分布式事务,有那么难吗?
OpenCV DNN blogFromImage() detailed explanation
els strip deformation
els 方块边界变形处理
LeetCode_322_零钱兑换
基于编码策略的电网假数据注入攻击检测
如何设计循环队列?快进来学习~
构造方法,this关键字,方法的重载,局部变量与成员变量
【21天学习挑战赛】顺序查找和二分查找的小总结
单片机遥控开关系统设计(结构原理、电路、程序)
协作乐高 All In One:DAO工具大全