当前位置:网站首页>BGP solves routing black hole through MPLS
BGP solves routing black hole through MPLS
2022-08-02 08:22:00 【not very smart】
目录
The construction of the topology andIP地址的规划
实验要求:
The construction of the topology andIP地址的规划
First experiment requirementAS2Network segment address based on172.16.0.0/16划分,This segment is very big,We are free to draw,怎么舒服怎么来,But as far as possible to ensure the reasonable utilization,Reduce waste address.
According to the above complete topology structures, and the division of address
IGP配置
先在AS2内部使用OSPF使AS2内部互通,View the routing table after the completion of,Ensure internal cut up to
BGP配置
R1与R2、R5Built between adjacent,R2、R5、R7Between two adjacent building,R7与R8Build adjacent each other
Direct built adjacent
[R1]bgp 1
[R1-bgp] peer 12.1.1.2 as-number 2 (The other side of the physical interfaceIP及AS号)
环回接口建邻
[R2]bgp 2
[R2-bgp]peer 172.16.1.13 as-number 2
[R2-bgp]peer 172.16.1.13 connect-interface LoopBack 0
[R2-bgp]peer 172.16.1.13 next-hop-local
According to the above operation is completed after configuration,Can view the neighbor table
R1
R5
MPLS配置
通过mpls Solve the control plane can reach inaccessible data level
[r2]mpls lsr-id 172.16.0.1
(必须先定义mpls的router-id,要为本地设备的真实ip地址,且邻居可达)
[r2]mpls 再开启mpls协议
[r2]mpls ldp
[r2-mpls-ldp]q
之后需要在所有标签经过的接口上开启协议
[r2]interface GigabitEthernet 0/0/1
[r2-GigabitEthernet0/0/1]mpls 先开启MPLS
[r2-GigabitEthernet0/0/1]mpls ldp 再激活LDP协议
AS2Each of the router configuration according to the operating neighbor relationship
建立后可以通过“display mpls ldp peer”查看邻居表
BGPAnnouncement and routing
首先R1与R8Does not affect directly declare
[R1]bgp 1
[R1-bgp]ne
[R1-bgp]network 1.1.1.0 24
AS2The topic request:R1访问R2、3、4The user segment byR5,访问R5、6、7网段通过R1,So to do routing policy
此处可以借助BGPRouting rules to reduce the amount of configuration, 由于R2与R5之间为IBGP关系,且通过IBGPNeighbors routing in passed to learnEBGPNeighbors will erase properties,MEDValue will not show,In the routing table is equivalent to /0,So I can take this,只在R2上宣告2、3、4用户网段,R2传给R5再传给R1Routing will be better thanR2直接传给R1的,R1会将R5Add table,从而满足题目要求,同理在R5上宣告5、6、7用户网段.但是2与5The user segment withR1Was built directly connected neighbors,So they proclaimed routingMED值为0,与通过IBGPLearning is the same,So will compareRouter id,R5的大于R2所以5The road user segment to choose the right,只需修改2的用户网段
[R2]ip ip-prefix a permit 172.16.2.0 24 (抓取流量)
[R2]route-policy a permit node 10
[R2-route-policy]if-match ip-prefix med
[R2-route-policy]apply cost 1
[R2]route-policy a permit node 20 (建立空表)去BGP调用
[R2]bgp 2
[R2-bgp]peer 12.1.1.1 route-policy a export (出方向调用)
此时可以在R1上查看
Can see the requirements and existing backup
Can also add a summary to the backup
[R2-bgp]aggregate 172.16.0.0 16 detail-suppressed
再到R1上查看
You can see the summary
最后进行测试
边栏推荐
猜你喜欢
flutter 自己写一个组件
PanGu-Coder: A function-level code generation model
Aided by training and learning by battle | The new version of the Offensive and Defense World Platform is officially launched!
Introduction to Totem Pole and Push-Pull Circuits
5分钟搞懂MySQL - 行转列
如何开启mysql慢查询日志?
研发过程中的文档管理与工具
2022年防止网络攻击的15个网络安全实践,你学会了吗?
设置工作模式与环境(中):建造二级引导器
Visual Analysis of DeadLock
随机推荐
学习笔记(7)Funtion
牛客2022 暑期多校4 D Jobs (Easy Version)(递推优化策略)
Seleniu截图代码以及给图片赋值名字
血气方刚的年轻小伙竟去做家政小哥,是怎样成功逆袭转行的
redis高阶使用之Redisson分布式锁源码解析
小说里的编程 【连载之二十四】元宇宙里月亮弯弯
MGRE环境下的OSPF
Biotin hydrazide HCl|CAS:66640-86-6|生物素-酰肼盐酸盐
HCIP第三天
AcWing 2811. 最长公共子串(后缀自动机 fa 指针的性质)
flutter在导航栏处实现对两个列表的点击事件
uni.navigateBack 中的坑
Figure robot software digital twin station oil and gas pipelines, oil and gas transportation control platform
Visual Analysis of DeadLock
MGRE综合实验
研发过程中的文档管理与工具
小说里的编程 【连载之二十五】元宇宙里月亮弯弯
Aided by training and learning by battle | The new version of the Offensive and Defense World Platform is officially launched!
有点奇怪!访问目的网址,主机能容器却不行
prometheus监控mysql_galera集群