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

目录

配置BGP邻居的建立

配置MPLS LDP

配置RR之间的MP-BGP邻居

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


根据图配置接口的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)

全局开启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

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

Int g0/0/0

mpls

配置完成后,邻居就可以建立成功

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

在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

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

猜你喜欢

转载自blog.csdn.net/m0_49864110/article/details/130495601
rr