自学内容网 自学内容网

MPLS解决BGP路由黑洞问题

MPLS应用实验

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

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

在这里插入图片描述

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

实验配置

R1

sy
sy R1
dhcp enable
inter g0/0/0
ip add dh

R2

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

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

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

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

sy
sy R6
dhcp enable
inter g0/0/0
ip add dh

常用的查询命令

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


原文地址:https://blog.csdn.net/Jerry_BLOG/article/details/142793607

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!