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

相关推荐
多多*16 分钟前
OJ在线评测系统 微服务高级 Gateway网关接口路由和聚合文档 引入knife4j库集中查看管理并且调试网关项目
java·运维·微服务·云原生·容器·架构·gateway
zjsnh_Z1 小时前
Linux 操作系统中的 main 函数参数和环境变量
linux·服务器
南棱笑笑生2 小时前
20241005给荣品RD-RK3588-AHD开发板刷Rockchip原厂的Android12时使用iperf3测网速
linux·运维·网络
@haihi2 小时前
每天一道面试题5——Linux内核包含哪些部分?
java·linux·运维·服务器
小诸葛的博客2 小时前
docker compose入门1—概念介绍
运维·docker·容器
猪猪很Ok2 小时前
大数据开发--1.3 Linux的常用命令大全
linux·运维·服务器
天草二十六_简村人2 小时前
Jenkins新安装的插件ThinBackup,如何恢复之前的备份
运维·jenkins·devops
黑龙江亿林等保2 小时前
等保测评是什么?为什么要做等保测评?
运维·网络·数据库