MPLS解决BGP路由黑洞问题

文章目录

MPLS应用实验

  • 实验目的:解决BGP中IBGP邻居之间存在的问题

MPLS解决BGP路由黑洞问题实验


配置完基本的MPLS和BGP操作之后,只有R2和R5上面有两个私网的路由,中间的设备没有私网路由,这时候默认还是走IP网络,此时是无法通信的,中间走路由肯定不行,虽然R3和R4没路由,但是配置MPLS之后,可以经过标签进行转发,这时候在两台LER上配置----路由迭代,让私网的包走LSP链路

实验配置

R1

bash 复制代码
sy
sy R1
dhcp enable
inter g0/0/0
ip add dh

R2

bash 复制代码
sy
sy R2
dhcp enable
inter g0/0/0
ip add 10.1.1.254 24
dhcp select inter

isis
net 49.222222222222.00
is-level level-2
is-name R2
inter g0/0/1
ip ad 23.1.1.2 24
isis en
inter loop0
ip add 2.2.2.2 32
isis en

mpls lsr-id 2.2.2.2
mpls
mpls ldp
inter g0/0/1
mpls
mpls ldp

bgp 100
router-id 2.2.2.2
peer 5.5.5.5 as 100
peer 5.5.5.5 con loo0
net 10.1.1.0 24

#配置路由迭代
route recursive-lookup tunnel    #路由递归到标签交换隧道中,只能在LER设备上进行配置,两端都需要配置
dis fib | in 2.0    #之后我们就能看见走路由标签交换了
dis tunnel-info tunnel-id 0x5    #查看Tunnel隧道信息

R3

bash 复制代码
sy
sy R3

isis
net 49.333333333333.00
is-level level-2
is-name R3
inter g0/0/1
ip ad 34.1.1.3 24
isis en
inter g0/0/0
ip ad 23.1.1.3 24
isis en
inter loop0
ip add 3.3.3.3 32
isis en

mpls lsr-id 3.3.3.3
mpls
mpls ldp
inter g0/0/1
mpls
mpls ldp
inter g0/0/0
mpls
mpls ldp

undo ttl expiration pop    //忽略TTL报错命令,让设备进行路由回显

R4

bash 复制代码
sy
sy R4

isis
net 49.444444444444.00
is-level level-2
is-name R4
inter g0/0/1
ip ad 45.1.1.4 24
isis en
inter g0/0/0
ip ad 34.1.1.4 24
isis en
inter loop0
ip add 4.4.4.4 32
isis en

mpls lsr-id 4.4.4.4
mpls
mpls ldp
inter g0/0/1
mpls
mpls ldp
inter g0/0/0
mpls
mpls ldp

undo ttl expiration pop    //忽略TTL报错命令,让设备进行路由回显

R5

bash 复制代码
sy
sy R5
dhcp enable
inter g0/0/1
ip add 10.1.2.254 24
dhcp select inter

isis    #配置IGP
net 49.555555555555.00
is-level level-2
is-name R5
inter g0/0/0
ip ad 45.1.1.5 24
isis en
inter loop0
ip add 5.5.5.5 32
isis en

mpls lsr-id 5.5.5.5    #配置MPLS
mpls
mpls ldp
inter g0/0/0
mpls
mpls ldp

bgp 100    #配置BGP
router-id 5.5.5.5
peer 2.2.2.2 as 100
peer 2.2.2.2 con loo0
net 10.1.2.0 24

#配置路由迭代
route recursive-lookup tunnel    #路由递归到标签交换隧道中,只能在LER设备上进行配置,两端都需要配置
dis fib | in 2.0    #之后我们就能看见走路由标签交换了
dis tunnel-info tunnel-id 0x5    #查看Tunnel隧道信息

R6

bash 复制代码
sy
sy R6
dhcp enable
inter g0/0/0
ip add dh

常用的查询命令

bash 复制代码
dis mpls lsp    #查看具体的标签分配情况(In是向上游传送,Out是下游出去的操作)
dis fib    #查看路由走IP转发还是标签转发(后面的TunnelID不为0就是走MPLS标签转发)
dis mpls ldp adjacency    #查看邻居关系,只能说明邻居关系建立成功,不能说明会话建立成功
dis mpls ldp session    #查看邻居会话关系

dis fib | in 2.0    #此时查看的2.0还是走IP网络,需要配置路由迭代让其走MPLS网络
  • ping 10.1.2.253 //R1对R6进行连通性测试
    Tracert -v 10.1.2.253 //R1上对R6进行路由追踪测试,但是会会发现进入MPLS网络之后的数据会用 * 号来显示
  • 之后在 LSR 设备上配置忽略TTL的报错命令
    undo ttl expiration pop //忽略TTL报错命令,让设备进行路由回显

Author:DC

相关推荐
玉树临风江流儿3 小时前
Linux驱动开发总结速记
linux·运维·驱动开发
七宝大爷3 小时前
GPU服务器深度解析:H100/H200的“机头”与“模组”架构详解
运维·服务器·架构·h100·h200
Hello.Reader3 小时前
Flink 受管状态的自定义序列化原理、实践与可演进设计
java·网络·flink
gd63213744 小时前
银河麒麟 aarch64 linux 里面的 qt 怎么安装kit
linux·服务器·qt
A-花开堪折4 小时前
Qemu 嵌入式Linux驱动开发
linux·运维·驱动开发
磊灬泽4 小时前
【Linux驱动开发】PWM子系统-servo
linux·运维·算法
郝学胜-神的一滴5 小时前
Linux系统函数stat和lstat详解
linux·运维·服务器·开发语言·c++·程序人生·软件工程
Mr.亮先生5 小时前
常用、高效、实用的 Linux 服务器监控与运维工具清单
linux·运维·服务器
王道长服务器 | 亚马逊云6 小时前
AWS CloudWatch Logs Insights:实时日志分析,让服务器问题无所遁形
服务器·云计算·aws
极客先躯6 小时前
高可用巡检脚本实战:一键掌握服务、网络、VIP、资源状态
运维·网络·金融