当前位置:网站首页>重发布基础与配置
重发布基础与配置
2022-07-26 01:48:00 【想去小木屋的沉稳乌龙茶】
不同协议重发布后的种子度量值不同
默认RIP和OSPF协议若进行双点重发布,由于两者的优先级不同,故第一台ASBR设备重发布动作结束后,将影响其他ASBR设备的路由表。使得路由可能被回传到源协议当中,发生路由回馈。
路由回馈——A协议的路由重发布到B协议当中后,又被重新发布回A协议。路由回馈可能导致选路不佳甚至路由环路的出现
华为设备为了消除路由回馈现象,它将OSPF内部产生的路由优先级定义为10,而将域外导入的路由默认优先级定义为150(150的优先级大于所有华为体系下IGP协议的默认优先级),通过这种方式来消除路由回馈。
由于重发布技术的种子度量值问题将必然导致选路不佳,只能依赖路由策略来人为干涉选路。
控制层流量:路由协议传递路由信息产生的流量
数据层流量:设备访问目标网段时,产生的数据流量
路由策略:在控制层流量流动的过程中截取流量,之后修改流量再转发,或者不转发,最终实现影响路由器路由表生成,干涉选路的效果。
1.抓取流量
1)ACL列表:因为ACL列表本身设计是为了抓取数据层流量的。所以,因为通配符的存在它可以灵活地匹配数字特征,但是,没有办法匹配路由信息中的掩码特征。所以并不擅长控制层流量的抓取。
2)IP-prefix:前缀列表
[r1]ip ip-prefix aa (自定义前缀列表的名称) permit (允许和拒绝,仅抓取流量则可以选择permit) 192.168.1.0 24 (抓取
的控制层流量中目标网络的信息)
[r1]display ip ip-prefix aa #查看前缀列表信息
前缀列表的匹配规则:自上而下,逐一匹配,一旦匹配上则将按照对应的规则来执行动作,不再向下匹配。末尾隐含拒绝所有的规则。
前缀列表中的规则默认以10为步调自动添加序号,便于插入和删除规则。
[r1]ip ip-prefix aa index 15 permit 192.168.3.0 24 #根据序号插入规则
[r1]undo ip ip-prefix aa index 15 #删除前缀列表中的规则
[r1]ip ip-prefix aa permit 192.168.3.0 24 less-equal 28 #抓取掩码长度再24到28之间的
[r1]ip ip-prefix aa permit 192.168.4.0 24 greater-equal 28 #当前后矛盾时,将以后面的为主,前面的24变为前24为固定不变,匹配掩码长度大于等于28的路由信息。
[r1]ip ip-prefix aa permit 192.168.5.0 24 greater-equal 28 less-equal 30 #前24位固定,匹配掩码长度为28 - 30的网段信息
[r1]ip ip-prefix aa permit 192.168.6.0 24 greater-equal 28 less-equal 28 #前24位固定,匹配掩码长度为28位的网段信息
[r1]ip ip-prefix aa permit 0.0.0.0 0 greater-equal 32 #匹配所有主机路由
[r1]ip ip-prefix aa permit 0.0.0.0 0 #匹配缺省
[r1]ip ip-prefix aa permit 0.0.0.0 0 less-equal 32
2.路由策略
1)RIP的merticin和merticout ——偏移列表——只针对距离矢量型协议设计应用
1.抓取流量
[r1]ip ip-prefix aa permit 23.0.0.0 24
2.在接口上调用
[r1-GigabitEthernet0/0/1]rip metricin ip-prefix aa 10
2)filter-policy ——过滤策略
1.抓取流量
[r1]ip ip-prefix bb deny 34.0.0.0 24
[r1]ip ip-prefix bb permit 0.0.0.0 0 less-equal 32
2.在进程中调用
[r1-rip-1]filter-policy ip-prefix bb import GigabitEthernet 0/0/0
注意:过滤策略本身是可以在OSPF中使用的,但是,在OSPF区域内使用时,因为区域内部传递的是拓扑信息,所以,无法在出方向调用,只能在入方向调用,影响自己,也不是说将LSA信息过滤掉,只是在路由信息加表时过滤,不让其加表。在区域之间传递路由信息时可以出方向调用。
3.route-policy ——路由策略
1.抓取流量
[r2-acl-basic- 2000]rule permit source 1.1.1.0 0
[r2-acl-basic- 2001 ]rule permit source 2.2.2.0 0
[r2]ip ip-prefix a permit 3.3.3.0 24
[r2]ip ip-prefix bb permit 4.4.4.0 24
2.配置路由策略
[r2]route-policy aa deny node 10
Info: New Sequence of this List.
[r2-route-policy]
[r2-route-policy]if-match acl 2000
[r2]route-policy aa permit node 20
Info: New Sequence of this List.
[r2-route-policy]if-match acl 2001
[r2-route-policy]apply cost 10
[r2]route-policy aa permit node 30
[r2-route-policy]if-match ip-prefix a
[r2-route-policy]apply cost-type type-1
[r2]route-policy aa permit node 40
Info: New Sequence of this List.
[r2-route-policy]if-match ip-prefix bb
[r2-route- policy]apply cost-type type-1
[r2-route-policy]apply tag 666
注意:一条规则中,如果存在多个apply或者if-match,则这些需要同时满足,满足“与”关系。
[r2]route-policy aa permit node 50 ---允许所有
1)没有if-match —匹配所有
2)没有apply —只需要按照大动作来执行
3.在重发布过程中调用路由策略
[r2-ospf- 1]import-route rip route-policy aa
路由策略的匹配规则:自上而下,逐一匹配,一旦匹配上则将按照对应的规则来执行动作,不再向下匹配。末尾隐含拒绝所有的规则。
ROUTE-POLICY的配置指南
1.即便一个流量需要拒绝,在抓取流量的时候,也必须使用允许,之后在路由策略中进行拒绝。
2.在一条规则中,若没有流量匹配,则代表匹配所有;若没有APPLY (小动作),则只按照大动作来执行。因此,大动作为允许的空表代表允许所有。
边栏推荐
- 【独立站建设】shopify卖家:学会这几点,网上商店销量翻倍!
- ABC find 4-cycle (pigeon nest theorem)
- E2. escape the maze (hard version)
- Network layer 2 and layer 3 forwarding
- Stack Title: basic calculator
- 达梦数据库表导入导出按钮灰色,导入不了dmp文件
- Mysql_ Note2
- Zombie's treasure test (enumeration)
- Creation and management of MySQL database and table
- 【深入浅出玩转FPGA学习11----Testbench书写技巧2】
猜你喜欢

Analysis of zeromq

What is a test case? How to design?

zeromq浅析

Easyrecovery15 data recovery software with high recovery rate and high download volume

flutter 下 grpc list没有Setter 方法 ,如何使用相关属性

Big view +500 cases, software teams should improve R & D efficiency in this way

Network layer 2 and layer 3 forwarding

The sales volume has won the championship repeatedly. Is the secret of Wuling's success only low price?

C language enumeration types and unions

保护系统日志服务器和设备
随机推荐
Go operation excel library excel use
销量连连夺冠,五菱的成功秘诀只有低价吗?
Add an interceptor to resttemplate to record the request response, and you also need to solve the problem that the flow is read only once
2022 love analysis ― bank digitalization practice report
Prime Ring Problem
NFT access tool premint was hacked and lost more than 370000 US dollars
The SQL script generated by powerdispatcher model runs incorrectly
FFT is used to estimate the image resampling factor after interpolation
How to do Taobao live broadcast and how to do the anchor to drain and sell products
Dijkstra find the shortest path
How does Flink SQL configure to print the insert parameter log
Fiddler5+ lightning simulator 4.0 settings for app packet capturing
leetcode/只出现一次的数字
Silicon Valley classroom - official account cloud on demand Silicon Valley classroom microservice project practical notes
zeromq浅析
"Wei Lai Cup" 2022 Niuke summer multi school training camp 2 d.[link with game glitch] two point answer +spfa ring
AutoCAD -- Method of calculating area
餐饮连锁门店重塑增长背后的数字化转型
劳驾问一下各位老师 oracle 到pg cdc oracle 那边字段大写 pg 这边小写 同
[Unity] 二维洞穴地图随机生成