华为MPLS跨域C2方式RR场景(数据不经过RR)实验配置

目录

配置BGP邻居的建立

配置MPLS LDP

配置RR之间的MP-BGP邻居

配置通过ASBR学习PE路由并为PE分配标签(实现Vpnv4路由传递和数据传输)


MPLS隧道——带RR的跨域解决方案讲解(B、C1、C2方案)-CSDN博客

根据图配置接口的IP地址和IGP协议

配置BGP邻居的建立

PE1和RR1建立MP-IBGP邻居(RR1传给PE1的Vpnv4路由要求不更改下一跳)

ASBR1和ASBR2建立EBGP邻居

PE2和RR2建立MP-IBGP邻居(RR2传给PE2的Vpnv4路由要求不更改下一跳)

PE1和RR1建立MP-IBGP邻居

PE1
bgp 100
 peer 7.7.7.7 as-number 100
 peer 7.7.7.7 connect-interface LoopBack0

 ipv4-family unicast
  undo synchronization
  undo peer 7.7.7.7 enable

ipv4-family vpnv4
  policy vpn-target
  peer 7.7.7.7 enable


RR1
bgp 100
 peer 1.1.1.1 as-number 100
 peer 1.1.1.1 connect-interface LoopBack0

 ipv4-family unicast
  undo peer 1.1.1.1 enable

 ipv4-family vpnv4  
  undo policy vpn-target                     取消RT值检测
  peer 1.1.1.1 enable                        配置MP-BGP邻居
  peer 1.1.1.1 next-hop-invariable           配置向1.1.1.1传递vpnv4路由时不更改下一跳

ASBR1和ASBR2建立EBGP邻居

ASBR1
bgp 100
 peer 100.0.34.4 as-number 200
 ipv4-family unicast
  peer 100.0.34.4 enable

ASBR2
bgp 200
 peer 100.0.34.3 as-number 100
 ipv4-family unicast
  peer 100.0.34.3 enable

RR2和PE2建立MP-IBGP邻居

RR2
bgp 200
 peer 6.6.6.6 as-number 200
 peer 6.6.6.6 connect-interface LoopBack0

 ipv4-family unicast
  undo peer 6.6.6.6 enable

 ipv4-family vpnv4
  undo policy vpn-target
  peer 6.6.6.6 enable
  peer 6.6.6.6 next-hop-invariable


PE2
bgp 200
 peer 8.8.8.8 as-number 200
 peer 8.8.8.8 connect-interface LoopBack0

 ipv4-family unicast
  undo peer 8.8.8.8 enable

 ipv4-family vpnv4
  policy vpn-target
  peer 8.8.8.8 enable

配置MPLS LDP

除了ASBR之间相连的接口、PE与CE相连接口,RR设备上的接口,其余的接口都开启MPLS LDP

以PE1的配置为例(其余设备的配置同PE1)——ASBR之间的接口只开启MPLS

全局配置MPLS LDP信息
mpls lsr-id 1.1.1.1
mpls
mpls ldp

接口下开启MPLS LDP
interface GigabitEthernet0/0/1
 mpls
 mpls ldp

配置RR之间的MP-BGP邻居

RR1和RR2建立MP-EBGP邻居

(RR1传给RR2、RR2传给RR1的Vpnv4路由要求不更改下一跳)

在ASBR1上通过BGP邻居将RR1的路由传给ASBR2、在ASBR2上将RR1的路由引入到AS200区域内

ASBR1
bgp 100
 ipv4-family unicast
  network 7.7.7.7 255.255.255.255

ASBR2
isis 10
 import-route bgp

在ASBR2上通过BGP邻居将RR2的路由传给ASBR1、在ASBR1上将RR2的路由引入到AS100区域内

ASBR2
bgp 200
 ipv4-family unicast
  network 8.8.8.8 255.255.255.255

ASBR1
isis 10
 import-route bgp

配置RR之间的MP-EBGP邻居

RR1
bgp 100
 peer 8.8.8.8 as-number 200
 peer 8.8.8.8 ebgp-max-hop 10
 peer 8.8.8.8 connect-interface LoopBack0
 ipv4-family unicast
  undo peer 8.8.8.8 enable
 ipv4-family vpnv4
  undo policy vpn-target
  peer 8.8.8.8 enable
  peer 8.8.8.8 next-hop-invariable

RR2
bgp 200
 peer 7.7.7.7 as-number 100
 peer 7.7.7.7 ebgp-max-hop 10
 peer 7.7.7.7 connect-interface LoopBack0
 ipv4-family unicast
  undo peer 7.7.7.7 enable
 ipv4-family vpnv4
  undo policy vpn-target
  peer 7.7.7.7 enable
  peer 7.7.7.7 next-hop-invariable

配置完成后,不需要为RR分配标签,RR之间的Vpnv4邻居就可以建立成功

配置通过ASBR学习PE路由并为PE分配标签(实现Vpnv4路由传递和数据传输)

ASBR1和ASBR2的相连接口上开启MPLS标签转发

int g0/0/0
mpls

在ASBR1上通过BGP邻居将PE1的路由传给ASBR2、在ASBR2上将PE1的路由引入到AS200区域内

ASBR1
bgp 100
 ipv4-family unicast
  network 1.1.1.1 255.255.255.255

ASBR2
isis 10
 import-route bgp    之前已经引入了,此处就不需要再引入了

在ASBR2上通过BGP邻居将PE2的路由传给ASBR1、在ASBR1上将PE2的路由引入到AS100区域内

ASBR2
bgp 200
 ipv4-family unicast
  network 6.6.6.6 255.255.255.255

ASBR1
isis 10
 import-route bgp    之前已经引入了,此处就不需要再引入了

通过以上配置,此时RR可以将PE的Vpnv4路由传递给对端PE,但是在对端PE上的Vpnv4路由不生效,无法完成数据传输,此时就需要在ASBR通过LDP为PE分配标签

ASBR1
ip ip-prefix PE2 index 10 permit 6.6.6.6 32
mpls
 lsp-trigger bgp-label-route ip-prefix PE2

ASBR2
ip ip-prefix PE1 index 10 permit 4.4.4.4 32
mpls
 lsp-trigger bgp-label-route ip-prefix PE1

此时还需在ASBR上为对端ASBR手工分配针对PE的标签,来完成标签转发

ASBR1
ip ip-prefix PE1 index 10 permit 1.1.1.1 32
route-policy PE1 permit node 10               此路由策略的目的为匹配1.1.1.1路由,为其分配标签
 if-match ip-prefix PE1
 apply mpls-label
bgp 100
 ipv4-family unicast
 peer 100.0.34.4 route-policy PE1 export      向100.0.34.4的邻居应用此路由策略
 peer 100.0.34.4 label-route-capability       向100.0.34.4的邻居开启标签转发能力(可以向此邻居转发带标签的BGP路由)

ASBR2
ip ip-prefix PE2 index 20 permit 6.6.6.6 32    
route-policy PE2 permit node 10
 if-match ip-prefix PE2
 apply mpls-label
bgp 200
 ipv4-family unicast
  peer 100.0.34.3 route-policy PE2 export
  peer 100.0.34.3 label-route-capability

PE和CE之间的配置不做介绍,同非RR场景下的C2实验配置 

  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

静下心来敲木鱼

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值