华为设备,使用mpls 解决bgp路由黑洞问题,
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-bRC2zk2I-1617343115560)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20210402135330082.png)]
华为路由器默认不启用隧道又叠代功能,
****系统视图 route recursive-lookup tunnel
ar1
sys
sysna ar1
int lo 0
ip add 10.1.1.1 24
int lo 1
ip add 10.1.2.1 24
int lo 2
ip add 10.1.3.1 24
int g0/0/0
ip add 12.1.1.1 24
bgp 10
peer 12.1.1.2 as 20
net 10.1.0.0 16
==============ar2
sys
sysna ar2
mpls lsr-id 2.2.2.2
mpls
mpls ldp
int g0/0/0
ip add 12.1.1.2 24
int g0/0/1
ip add 23.1.1.2 24
mpls
mpls ldp
int lo 0
ip add 2.2.2.2 24
mpls
mpls ldp
qu
ospf
area 0
net 23.1.1.0 0.0.0.255
net 2.2.2.0 0.0.0.255
qu
qu
bgp 20
peer 12.1.1.1 as 10
peer 4.4.4.4 as 20
peer 4.4.4.4 connect-inter lo 0
peer 4.4.4.4 next-hop-loc
qu
==============
ar3
sys
mpls lsr-id 3.3.3.3
mpls
mpls ldp
int lo 0
ip add 3.3.3.3 24
mpls
mpls ldp
int g0/0/0
ip add 23.1.1.3 24
mpls
mpls ldp
int g0/0/1
ip add 34.1.1.3 24
mpls
mpls ldp
qu
ospf
area 0
net 3.3.3.0 0.0.0.255
net 23.1.1.0 0.0.0.255
net 34.1.1.0 0.0.0.255
qu
qu
mpls
lsp-trigger all
=============
sys
sysna ar4
mpls lsr-id 4.4.4.4
mpls
mpls ldp
int g0/0/0
ip add 34.1.1.4 24
int g0/0/1
ip add 45.1.1.4 24
mpls
mpls ldp
int lo 0
ip add 4.4.4.4 24
mpls
mpls ldp
qu
ospf
area 0
net 45.1.1.0 0.0.0.255
net 4.4.4.0 0.0.0.255
qu
qu
bgp 20
peer 45.1.1.5 as 30
peer 2.2.2.2 as 20
peer 2.2.2.2 connect-inter lo 0
peer 2.2.2.2 next-hop-local
qu
====ar5
sys
int lo 0
ip add 10.2.1.1 24
int lo 1
ip add 10.2.2.1 24
int lo 2
ip add 10.2.3.1 24
int g0/0/0
ip add 45.1.1.5 24
bgp 30
peer 45.1.1.4 as 20
net 10.2.1.0 24