当前位置:网站首页>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
最后进行测试

边栏推荐
猜你喜欢
随机推荐
HCIP 第八天
常用的云安全防护措施盘点
node(三) 模块化
理论问题与工程问题的差异在哪里?
mysql去除重复数据
有点奇怪!访问目的网址,主机能容器却不行
Conditional constructor ~wapper
prometheus监控mysql_galera集群
HCIP9_BGP增加实验
设置 height: auto 却无法触发 transition 动画的解决方案
MySQL-Execution Process + Cache + Storage Engine
WebRTC系列-SDP之编码信息收集
@Repository详解
HCIP第七天
离线部署通过tiup 配置好topology.yaml文件指定PD TV TIDBserver 是不是会自动在其他机器创建好对应得模块?
HCIP 第五天
MySQL优化之慢日志查询
AcWing 2811. 最长公共子串(后缀自动机 fa 指针的性质)
MySQL - Detailed Explanation of Database Transactions
PanGu-Coder:函数级的代码生成模型









