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

相关推荐
苏-言23 分钟前
Linux环境下的Java项目部署技巧:安装 Mysql
linux·运维·mysql
lljss20201 小时前
在 WSL2 中重启 Ubuntu 实例
linux·运维·ubuntu
doubt。2 小时前
2.[网鼎杯 2020 朱雀组]phpweb
网络·安全·web安全·网络安全·php·代码复审
lingllllove2 小时前
使用 HTTP::Server::Simple 实现轻量级 HTTP 服务器
服务器·网络协议·http
Linux运维老纪2 小时前
K8s之Service详解(Detailed Explanation of K8s Service)
服务器·网络·云原生·容器·kubernetes·云计算·运维开发
一只码代码的章鱼3 小时前
计算机网络 笔记 传输层
网络·网络协议·tcp/ip·计算机网络
别致的影分身3 小时前
Linux网络 HTTP cookie 与 session
网络·网络协议·http
神秘剑客_CN3 小时前
使用windows笔记本让服务器上网
运维·服务器·windows
黑牛先生5 小时前
【Linux】动静态库
linux·运维·服务器
vortex55 小时前
Shell基础:中括号的使用
linux·运维·bash·shell