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

相关推荐
*郑*6 分钟前
nginx配置反向代理支持CORS跨域请求
运维·nginx
Excuse_lighttime1 小时前
HTTP / HTTPS 协议
网络·网络协议·http·https
z人间防沉迷k1 小时前
TCP核心机制
网络·网络协议·tcp/ip·http
VirusVIP2 小时前
Windows CMD通过adb检查触摸屏Linux驱动是否被编译
linux·运维·adb
chennalC#c.h.JA Ptho2 小时前
ubuntu studio 系统详解
linux·运维·服务器·经验分享·ubuntu·系统安全
像风一样_3 小时前
TCP首部格式及三次握手四次挥手
网络·网络协议·tcp/ip
yt948326 小时前
Docker-基础(数据卷、自定义镜像、Compose)
运维·docker·容器
{{uname}}8 小时前
利用WebSocket实现实时通知
网络·spring boot·websocket·网络协议
水银嘻嘻8 小时前
web 自动化之 KDT 关键字驱动详解
运维·自动化
Vone_668 小时前
node.js 邮箱验证服务器搭建
运维·服务器·node.js