Featured image of post 基于HCL实现MPLS L3VPN跨域Option C1 (RR)组网

基于HCL实现MPLS L3VPN跨域Option C1 (RR)组网

使用H3C Cloud Lab实现MPLS L3VPN跨域Option C1 (RR)组网

一、组网规划

组网拓扑图

如图所示:

  • 全局使用 ISIS 作为公网 IGP 协议

  • 全局使用 MPLS + LDP 处理标签分发与转发

  • ASBR 之间建立 eBGP 对等体,传递 RR Loopback 路由

  • RR 之间建立 Multi-Hop MP-eBGP对等体,传递 VPNv4 路由

  • RR 与 PE 之间建立 MP-iBGP 传递 VPNv4 路由

  • 相同 AS 域的 PE 与 CE 之间使用 ISIS 传递 VPNv4 路由

  • 跨越 AS 域的 PE 与 CE 之间使用 BGP 传递 VPNv4 路由


二、地址规划

地址分配原则如下(仅适用于此实验环境):

Loopback : AS.0.0.X/32

AS内部互联 : AS.0.AB.X/24

AS之间互联 : AS1.AS2.0.ASX/24

私网地址 : AS.1.1.X/32 | AS.2.2.X/32


  • LoopBack地址

    AS设备地址AS设备地址
    10RR110.0.0.1/3220RR220.0.0.1/32
    10ASBR110.0.0.2/3220ASBR220.0.0.2/32
    10P110.0.0.3/3220P220.0.0.3/32
    10PE110.0.0.4/3220PE320.0.0.4/32
    10PE210.0.0.5/3220PE420.0.0.5/32
    10CE1010.0.0.6/3220CE2020.0.0.6/32
    11CE1111.0.0.1/3222CE2222.0.0.1/32
  • AS10内部互联

    ASA端接口地址地址接口Z端
    10RR1GE0/0/010.0.13.1/2410.0.13.3/24GE0/0/0P1
    10ASBR1GE0/0/1010.0.23.2/2410.0.23.3/24GE0/0/10P1
    10P1GE0/0/110.0.34.3/2410.0.34.4/24GE0/0/1PE1
    10P1GE0/0/210.0.35.3/2410.0.35.5/24GE0/0/1PE2
    10PE2GE0/0/010.0.56.5./2410.0.56.6/24GE0/0/0CE10
  • AS20内部互联

    ASA端设备A端接口A端地址Z端地址Z端接口Z端设备
    20RR2GE0/0/020.0.13.1/2420.0.13.3/24GE0/0/0P2
    20ASBR2GE0/0/1020.0.23.2/2420.0.23.3/24GE0/0/10P2
    20P2GE0/0/120.0.34.3/2420.0.34.4/24GE0/0/1PE3
    20P2GE0/0/220.0.35.3/2420.0.35.5/24GE0/0/1PE4
    20PE4GE0/0/020.0.56.5/2420.0.56.6/24GE0/0/0CE20
  • AS之间互联

    A端ASA端设备A端接口A端地址Z端地址Z端接口Z端设备Z端AS
    10ASRB1GE0/0/010.20.0.10/2410.20.0.20/24GE0/0/0ASBR220
    10PE1GE0/0/010.11.0.10/2410.11.0.11/24GE0/0/0CE1111
    20PE3GE0/0/020.22.0.20/2420.22.0.22/24GE0/0/0CE2222
  • 私网地址

    AS设备接口VPN地址
    10PE2Loop101010.1.1.10/32
    10CE10Loop101010.1.1.1/32
    11PE1Loop111111.1.1.11/32
    11CE11Loop111111.1.1.1/32
    20PE4Loop202020.2.2.20/32
    20CE20Loop202020.2.2.2/32
    22PE3Loop222222.2.2.22/32
    22CE22Loop222222.2.2.2/32

三、VRF规划

ASNameRDExport-RTImport-RT
101010:110:2020:10
10、111111:111:2222:11
202020:120:1010:20
20、222222:122:1111:22

四、配置步骤

配置接口地址

略,参考【附录:完整配置文件】

配置全局IGP(IS-IS)

略,参考【附录:完整配置文件】

配置MPLS和LDP

略,参考【附录:完整配置文件】

同一AS内的RR和PE建立MP-iBGP对等体,RR和ASBR建立iBGP对等体

  • RR1

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    
    #
    bgp 10
     router-id 10.0.0.1
     group ASBR internal
     peer ASBR connect-interface LoopBack0
     group PE internal
     peer PE connect-interface LoopBack0
     peer 10.0.0.2 group ASBR
     peer 10.0.0.4 group PE
     peer 10.0.0.5 group PE
     #
     address-family ipv4 unicast
      peer ASBR enable
     #
     address-family vpnv4
      reflector cluster-id 10.0.0.1
      peer PE enable
      peer PE next-hop-local
      peer PE reflect-client
    #
    
  • ASBR1

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 10
     router-id 10.0.0.2
     group RR internal
     peer RR connect-interface LoopBack0
     peer 10.0.0.1 group RR
     #
     address-family ipv4 unicast
      peer RR enable
    #
    
  • PE1

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 10
     router-id 10.0.0.4
     group RR internal
     peer RR connect-interface LoopBack0
     peer 10.0.0.1 group RR
     #
     address-family vpnv4
      peer RR enable
    #
    
  • PE2

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 10
     router-id 10.0.0.5
     group RR internal
     peer RR connect-interface LoopBack0
     peer 10.0.0.1 group RR
     #
     address-family vpnv4
      peer RR enable
    #
    

  • RR2

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    
    #
    bgp 20
     router-id 20.0.0.1
     group ASBR internal
     peer ASBR connect-interface LoopBack0
     group PE internal
     peer PE connect-interface LoopBack0
     peer 20.0.0.2 group ASBR
     peer 20.0.0.4 group PE
     peer 20.0.0.5 group PE
     #
     address-family ipv4 unicast
      peer ASBR enable
     #
     address-family vpnv4
      reflector cluster-id 20.0.0.1
      peer PE enable
      peer PE next-hop-local
      peer PE reflect-client
    #
    
  • ASBR2

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 20
     router-id 20.0.0.2
     group RR internal
     peer RR connect-interface LoopBack0
     peer 20.0.0.1 group RR
     #
     address-family ipv4 unicast
      peer RR enable
    #
    
  • PE3

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 20
     router-id 20.0.0.4
     group RR internal
     peer RR connect-interface LoopBack0
     peer 20.0.0.1 group RR
     #
     address-family vpnv4
      peer RR enable
    #
    
  • PE4

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 20
     router-id 20.0.0.5
     group RR internal
     peer RR connect-interface LoopBack0
     peer 20.0.0.1 group RR
     #
     address-family vpnv4
      peer RR enable
    #
    

ASBR之间建立eBGP对等体

  • ASBR1

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 10
     router-id 10.0.0.2
     group AS20 external
     peer AS20 as-number 20
     peer 10.20.0.20 group AS20
     #
     address-family ipv4 unicast
      peer AS20 enable
    #
    
  • ASBR2

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 20
     router-id 20.0.0.2
     group AS10 external
     peer AS10 as-number 10
     peer 10.20.0.10 group AS10
     #
     address-family ipv4 unicast
      peer AS10 enable
    #
    

本端ASBR向对端ASBR通告本端RR的Loopback接口路由

  • ASBR1

    1
    2
    3
    4
    5
    6
    7
    
    #
    bgp 10
     #
     address-family ipv4 unicast
      network 10.0.0.1 255.255.255.255
    #
    #
    
  • ASBR2

    1
    2
    3
    4
    5
    6
    
    #
    bgp 20
     #
     address-family ipv4 unicast
      network 20.0.0.1 255.255.255.255
    #
    

RR和ASBR之间启用label-route-capability功能

  • RR1

    1
    2
    3
    4
    5
    6
    
    #
    bgp 10
     #
     address-family ipv4 unicast
      peer ASBR label-route-capability
    #
    
  • ASBR1

    1
    2
    3
    4
    5
    6
    7
    
    #
    bgp 10
     #
     address-family ipv4 unicast
      peer AS20 label-route-capability
      peer RR label-route-capability
    #
    
  • RR2

    1
    2
    3
    4
    5
    6
    
    #
    bgp 20
     #
     address-family ipv4 unicast
      peer ASBR label-route-capability
    #
    
  • ASBR2

    1
    2
    3
    4
    5
    6
    7
    
    #
    bgp 20
     #
     address-family ipv4 unicast
      peer AS10 label-route-capability
      peer RR label-route-capability
    #
    

RR和ASBR之间使用路由策略分发MPLS标签

  • RR1

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    #
    bgp 10
     #
     address-family ipv4 unicast
      peer ASBR route-policy OUTGOING_LABEL export
    #
    route-policy OUTGOING_LABEL permit node 10
      apply mpls-label
    #
    
  • ASBR1

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 10
     #
     address-family ipv4 unicast
      peer AS20 route-policy OUTGOING_LABEL export
      peer RR route-policy OUTGOING_LABEL export
    #
    route-policy OUTGOING_LABEL permit node 10
      apply mpls-label
    #
    
  • RR2

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    #
    bgp 20
     #
     address-family ipv4 unicast
      peer ASBR route-policy OUTGOING_LABEL export
    #
    route-policy OUTGOING_LABEL permit node 10
      apply mpls-label
    #
    
  • ASBR2

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    
    #
    bgp 20
     #
     address-family ipv4 unicast
      peer AS10 route-policy OUTGOING_LABEL export
      peer RR route-policy OUTGOING_LABEL export
    #
    route-policy OUTGOING_LABEL permit node 10
      apply mpls-label
    #
    

RR之间建立Multi-Hop MP-eBGP对等体

  • RR1

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    
    #
    bgp 10
     group AS20 external
     peer AS20 as-number 20
     peer AS20 connect-interface LoopBack0
     peer AS20 ebgp-max-hop 10
     peer 20.0.0.1 group AS20
     #
     address-family vpnv4
      peer AS20 enable
    #
    
  • RR2

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    
    #
    bgp 20
     group AS10 external
     peer AS10 as-number 10
     peer AS10 connect-interface LoopBack0
     peer AS10 ebgp-max-hop 10
     peer 10.0.0.1 group AS10
     #
     address-family vpnv4
      peer AS10 enable
    #
    

在RR的VPNv4地址簇里undo policy vpn-target

  • RR1

    1
    2
    3
    4
    5
    6
    
    #
    bgp 10
     #
     address-family vpnv4
      undo policy vpn-target
    #
    
  • RR2

    1
    2
    3
    4
    5
    6
    
    #
    bgp 20
     #
     address-family vpnv4
      undo policy vpn-target
    #
    

方式一:PE和CE之间使用BGP传递VPNv4路由

  • PE1

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    
    #
    ip vpn-instance 11
     route-distinguisher 11:1
     vpn-target 22:11 import-extcommunity
     vpn-target 11:22 export-extcommunity
    #
    interface LoopBack11
     ip binding vpn-instance 11
     ip address 11.1.1.11 255.255.255.255
    #
    interface GigabitEthernet0/0/0
     port link-mode route
     description TO CE 11
     combo enable copper
     ip binding vpn-instance 11
     ip address 10.11.0.10 255.255.255.0
    #
    bgp 10
     #
     ip vpn-instance 11
      group AS11 external
      peer AS11 as-number 11
      peer 10.11.0.11 group AS11
      #
      address-family ipv4 unicast
       import-route direct
       peer AS11 enable
    #
    
  • CE11

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    
    #
    ip vpn-instance 11
     route-distinguisher 11:1
     vpn-target 22:11 import-extcommunity
     vpn-target 11:22 export-extcommunity
    #
    interface LoopBack11
     ip binding vpn-instance 11
     ip address 11.1.1.1 255.255.255.255
    #
    interface GigabitEthernet0/0/0
     port link-mode route
     description TO PE 1
     combo enable copper
     ip binding vpn-instance 11
     ip address 10.11.0.11 255.255.255.0
    #
    bgp 11
     router-id 11.0.0.1
     #
     ip vpn-instance 11
      group AS10 external
      peer AS10 as-number 10
      peer 10.11.0.10 group AS10
      #
      address-family ipv4 unicast
       import-route direct
       peer AS10 enable
    #
    
  • PE3

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    
    #
    ip vpn-instance 22
     route-distinguisher 22:1
     vpn-target 11:22 import-extcommunity
     vpn-target 22:11 export-extcommunity
    #
    interface LoopBack22
     ip binding vpn-instance 22
     ip address 22.2.2.22 255.255.255.255
    #
    interface GigabitEthernet0/0/0
     port link-mode route
     description TO CE 22
     combo enable copper
     ip binding vpn-instance 22
     ip address 20.22.0.20 255.255.255.0
    #
    bgp 20
     #
     ip vpn-instance 22
      group AS22 external
      peer AS22 as-number 22
      peer 20.22.0.22 group AS22
      #
      address-family ipv4 unicast
       import-route direct
       peer AS22 enable
    #
    
  • CE22

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    
    #
    ip vpn-instance 22
     route-distinguisher 22:1
     vpn-target 11:22 import-extcommunity
     vpn-target 22:11 export-extcommunity
    #
    interface LoopBack22
     ip binding vpn-instance 22
     ip address 22.2.2.2 255.255.255.255
    #
    interface GigabitEthernet0/0/0
     port link-mode route
     description TO PE 3
     combo enable copper
     ip binding vpn-instance 22
     ip address 20.22.0.22 255.255.255.0
    #
    bgp 22
     router-id 22.0.0.1
     #
     ip vpn-instance 22
      group AS20 external
      peer AS20 as-number 20
      peer 20.22.0.20 group AS20
      #
      address-family ipv4 unicast
       import-route direct
       peer AS20 enable
    #
    

方式二:PE和CE之间使用IGP传递VPNv4路由

  • PE2

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    
    #
    ip vpn-instance 10
     route-distinguisher 10:1
     vpn-target 20:10 import-extcommunity
     vpn-target 10:20 export-extcommunity
    #
    isis 10 vpn-instance 10
     is-level level-2
     cost-style wide
     network-entity 10.0010.0000.0005.00
     #
     address-family ipv4 unicast
      import-route bgp
    #
    interface LoopBack10
     ip binding vpn-instance 10
     ip address 10.1.1.10 255.255.255.255
     isis enable 10
    #
    interface GigabitEthernet0/0/0.10
     description TO CE 10 VPN 10
     ip binding vpn-instance 10
     ip address 10.10.56.5 255.255.255.0
     isis enable 10
     vlan-type dot1q vid 10
    #
    bgp 10
     #
     ip vpn-instance 10
      #
      address-family ipv4 unicast
       import-route direct
       import-route isis 10
    #
    
  • CE10

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    
    #
    ip vpn-instance 10
     route-distinguisher 10:1
     vpn-target 20:10 import-extcommunity
     vpn-target 10:20 export-extcommunity
    #
    isis 10 vpn-instance 10
     is-level level-2
     cost-style wide
     network-entity 10.0010.0000.0006.00
    #
    interface LoopBack10
     ip binding vpn-instance 10
     ip address 10.1.1.1 255.255.255.255
     isis enable 10
    #
    interface GigabitEthernet0/0/0.10
     description TO PE 2 VPN 10
     ip binding vpn-instance 10
     ip address 10.10.56.6 255.255.255.0
     isis enable 10
     vlan-type dot1q vid 10
    #
    
  • PE4

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    
    #
    ip vpn-instance 20
     route-distinguisher 20:1
     vpn-target 10:20 import-extcommunity
     vpn-target 20:10 export-extcommunity
    #
    isis 20 vpn-instance 20
     is-level level-2
     cost-style wide
     network-entity 20.0020.0000.0005.00
     #
     address-family ipv4 unicast
      import-route bgp
    #
    interface LoopBack20
     ip binding vpn-instance 20
     ip address 20.2.2.20 255.255.255.255
     isis enable 20
    #
    interface GigabitEthernet0/0/0.20
     description TO CE 20 VPN 20
     ip binding vpn-instance 20
     ip address 20.20.56.5 255.255.255.0
     isis enable 20
     vlan-type dot1q vid 20
    #
    bgp 20
     #
     ip vpn-instance 20
      #
      address-family ipv4 unicast
       import-route direct
       import-route isis 20
    #
    
  • CE20

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    
    #
    ip vpn-instance 20
     route-distinguisher 20:1
     vpn-target 10:20 import-extcommunity
     vpn-target 20:10 export-extcommunity
    #
    isis 20 vpn-instance 20
     is-level level-2
     cost-style wide
     network-entity 20.0020.0000.0006.00
    #
    interface LoopBack20
     ip binding vpn-instance 20
     ip address 20.2.2.2 255.255.255.255
     isis enable 20
    #
    interface GigabitEthernet0/0/0.20
     description TO PE 4 VPN 20
     ip binding vpn-instance 20
     ip address 20.20.56.6 255.255.255.0
     isis enable 20
     vlan-type dot1q vid 20
    #
    

五、验证结果

验证私网地址能否互通

  1. 从 CE10 依次 ping PE2、PE4、CE20

    设备接口VRF地址
    CE10Loop101010.1.1.1
    PE2Loop101010.1.1.10
    PE4Loop202020.2.2.20
    CE20Loop202020.2.2.2
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    
    <CE 10>ping -a 10.1.1.1 -vpn-instance 10 10.1.1.10
    Ping 10.1.1.10 (10.1.1.10) from 10.1.1.1: 56 data bytes, press CTRL+C to break
    56 bytes from 10.1.1.10: icmp_seq=0 ttl=255 time=0.411 ms
    56 bytes from 10.1.1.10: icmp_seq=1 ttl=255 time=0.843 ms
    56 bytes from 10.1.1.10: icmp_seq=2 ttl=255 time=1.251 ms
    56 bytes from 10.1.1.10: icmp_seq=3 ttl=255 time=0.915 ms
    56 bytes from 10.1.1.10: icmp_seq=4 ttl=255 time=0.466 ms
    
    --- Ping statistics for 10.1.1.10 in VPN instance 10 ---
    5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
    round-trip min/avg/max/std-dev = 0.411/0.777/1.251/0.309 ms
    <CE 10>%Oct 21 15:16:45:055 2025 CE 10 PING/6/PING_VPN_STATISTICS: Ping statistics for 10.1.1.10 in VPN instance 10: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.411/0.777/1.251/0.309 ms.
    
    <CE 10>ping -a 10.1.1.1 -vpn-instance 10 20.2.2.20
    Ping 20.2.2.20 (20.2.2.20) from 10.1.1.1: 56 data bytes, press CTRL+C to break
    56 bytes from 20.2.2.20: icmp_seq=0 ttl=254 time=4.559 ms
    56 bytes from 20.2.2.20: icmp_seq=1 ttl=254 time=2.867 ms
    56 bytes from 20.2.2.20: icmp_seq=2 ttl=254 time=3.107 ms
    56 bytes from 20.2.2.20: icmp_seq=3 ttl=254 time=5.779 ms
    56 bytes from 20.2.2.20: icmp_seq=4 ttl=254 time=6.567 ms
    
    --- Ping statistics for 20.2.2.20 in VPN instance 10 ---
    5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
    round-trip min/avg/max/std-dev = 2.867/4.576/6.567/1.448 ms
    <CE 10>%Oct 21 15:16:52:852 2025 CE 10 PING/6/PING_VPN_STATISTICS: Ping statistics for 20.2.2.20 in VPN instance 10: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 2.867/4.576/6.567/1.448 ms.
    
    <CE 10>ping -a 10.1.1.1 -vpn-instance 10 20.2.2.2
    Ping 20.2.2.2 (20.2.2.2) from 10.1.1.1: 56 data bytes, press CTRL+C to break
    56 bytes from 20.2.2.2: icmp_seq=0 ttl=253 time=4.091 ms
    56 bytes from 20.2.2.2: icmp_seq=1 ttl=253 time=4.212 ms
    56 bytes from 20.2.2.2: icmp_seq=2 ttl=253 time=2.737 ms
    56 bytes from 20.2.2.2: icmp_seq=3 ttl=253 time=2.766 ms
    56 bytes from 20.2.2.2: icmp_seq=4 ttl=253 time=3.869 ms
    
    --- Ping statistics for 20.2.2.2 in VPN instance 10 ---
    5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
    round-trip min/avg/max/std-dev = 2.737/3.535/4.212/0.649 ms
    <CE 10>%Oct 21 15:16:48:879 2025 CE 10 PING/6/PING_VPN_STATISTICS: Ping statistics for 20.2.2.2 in VPN instance 10: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 2.737/3.535/4.212/0.649 ms.
    
    <CE 10>
    
  2. 从 CE11 依次 ping PE1、PE3、CE22

    设备接口VRF地址
    CE11Loop111111.1.1.1
    PE1Loop111111.1.1.11
    PE3Loop222222.2.2.22
    CE22Loop222222.2.2.2
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    
    <CE 11>ping -a 11.1.1.1 -vpn-instance 11 11.1.1.11
    Ping 11.1.1.11 (11.1.1.11) from 11.1.1.1: 56 data bytes, press CTRL+C to break
    56 bytes from 11.1.1.11: icmp_seq=0 ttl=255 time=1.131 ms
    56 bytes from 11.1.1.11: icmp_seq=1 ttl=255 time=0.467 ms
    56 bytes from 11.1.1.11: icmp_seq=2 ttl=255 time=0.688 ms
    56 bytes from 11.1.1.11: icmp_seq=3 ttl=255 time=0.542 ms
    56 bytes from 11.1.1.11: icmp_seq=4 ttl=255 time=0.518 ms
    
    --- Ping statistics for 11.1.1.11 in VPN instance 11 ---
    5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
    round-trip min/avg/max/std-dev = 0.467/0.669/1.131/0.242 ms
    <CE 11>%Oct 21 15:11:18:688 2025 CE 11 PING/6/PING_VPN_STATISTICS: Ping statistics for 11.1.1.11 in VPN instance 11: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 0.467/0.669/1.131/0.242 ms.
    
    <CE 11>ping -a 11.1.1.1 -vpn-instance 11 22.2.2.22
    Ping 22.2.2.22 (22.2.2.22) from 11.1.1.1: 56 data bytes, press CTRL+C to break
    56 bytes from 22.2.2.22: icmp_seq=0 ttl=254 time=5.016 ms
    56 bytes from 22.2.2.22: icmp_seq=1 ttl=254 time=2.897 ms
    56 bytes from 22.2.2.22: icmp_seq=2 ttl=254 time=7.905 ms
    56 bytes from 22.2.2.22: icmp_seq=3 ttl=254 time=2.798 ms
    56 bytes from 22.2.2.22: icmp_seq=4 ttl=254 time=4.527 ms
    
    --- Ping statistics for 22.2.2.22 in VPN instance 11 ---
    5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
    round-trip min/avg/max/std-dev = 2.798/4.629/7.905/1.857 ms
    <CE 11>%Oct 21 15:11:28:608 2025 CE 11 PING/6/PING_VPN_STATISTICS: Ping statistics for 22.2.2.22 in VPN instance 11: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 2.798/4.629/7.905/1.857 ms.
    
    <CE 11>ping -a 11.1.1.1 -vpn-instance 11 22.2.2.2
    Ping 22.2.2.2 (22.2.2.2) from 11.1.1.1: 56 data bytes, press CTRL+C to break
    56 bytes from 22.2.2.2: icmp_seq=0 ttl=253 time=5.426 ms
    56 bytes from 22.2.2.2: icmp_seq=1 ttl=253 time=7.032 ms
    56 bytes from 22.2.2.2: icmp_seq=2 ttl=253 time=6.420 ms
    56 bytes from 22.2.2.2: icmp_seq=3 ttl=253 time=5.806 ms
    56 bytes from 22.2.2.2: icmp_seq=4 ttl=253 time=4.692 ms
    
    --- Ping statistics for 22.2.2.2 in VPN instance 11 ---
    5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss
    round-trip min/avg/max/std-dev = 4.692/5.875/7.032/0.805 ms
    <CE 11>%Oct 21 15:11:31:070 2025 CE 11 PING/6/PING_VPN_STATISTICS: Ping statistics for 22.2.2.2 in VPN instance 11: 5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss, round-trip min/avg/max/std-dev = 4.692/5.875/7.032/0.805 ms.
    
    <CE 11>
    

验证 BGP 状态

涉及 RR、ASBR、PE

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<RR 1>display bgp peer vpnv4

 BGP local router ID: 10.0.0.1
 Local AS number: 10
 Total number of peers: 3     Peers in established state: 3

 * - Dynamically created peer
 Peer                    AS  MsgRcvd  MsgSent OutQ  PrefRcv Up/Down  State

 10.0.0.4               10      271      274    0        3 03:54:14 Established
 10.0.0.5               10      273      280    0        3 03:52:33 Established
 20.0.0.1               20      215      248    0        6 03:11:47 Established
<RR 1>

<ASBR 1>display bgp peer ipv4

 BGP local router ID: 10.0.0.2
 Local AS number: 10
 Total number of peers: 1     Peers in established state: 1

 * - Dynamically created peer
 Peer                    AS  MsgRcvd  MsgSent OutQ  PrefRcv Up/Down  State

 10.20.0.20             20      231      222    0        1 03:20:28 Established
<ASBR 1>

<PE 1>display bgp peer ipv4 vpn-instance-all

 Local AS number: 10
 * - Dynamically created peer

 VPN instance: 11
 BGP local router ID: 10.0.0.4
 Total number of peers: 1     Peers in established state: 1

 Peer                    AS  MsgRcvd  MsgSent OutQ  PrefRcv Up/Down  State

 10.11.0.11              11      104       93    0        2 01:20:40 Established
<PE 1>

验证 ISIS 状态

涉及 P、RR、ASBR、PE

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<P 1>display isis peer

                         Peer information for IS-IS(1)
                         -----------------------------

 System ID: 0000.0000.0001
 Interface: GE0/0/0                 Circuit Id:  0000.0000.0001.01
 State: Up     HoldTime: 8s         Type: L2           PRI: 64

 System ID: 0000.0000.0004
 Interface: GE0/0/1                 Circuit Id:  0000.0000.0003.02
 State: Up     HoldTime: 28s        Type: L2           PRI: 64

 System ID: 0000.0000.0005
 Interface: GE0/0/2                 Circuit Id:  0000.0000.0005.02
 State: Up     HoldTime: 8s         Type: L2           PRI: 64

 System ID: 0000.0000.0002
 Interface: GE0/0/10                Circuit Id:  0000.0000.0002.01
 State: Up     HoldTime: 7s         Type: L2           PRI: 64
<P 1>

<PE 2>display isis peer

                         Peer information for IS-IS(1)
                         -----------------------------

 System ID: 0000.0000.0003
 Interface: GE0/0/1                 Circuit Id:  0000.0000.0005.02
 State: Up     HoldTime: 22s        Type: L2           PRI: 64

 System ID: 0000.0000.0006
 Interface: GE0/0/0                 Circuit Id:  0000.0000.0006.01
 State: Up     HoldTime: 7s         Type: L2           PRI: 64

                       Peer information for IS-IS(10-10)
                       ---------------------------------

 System ID: 0010.0000.0006
 Interface: GE0/0/0.10              Circuit Id:  0010.0000.0006.01
 State: Up     HoldTime: 6s         Type: L2           PRI: 64
<PE 2>

验证 MPLS LDP 状态

涉及 P、RR、ASBR、PE

1
2
3
4
5
6
7
8
9
<P 1>display mpls ldp peer
VPN instance: public instance
Total number of peers: 4
Peer LDP ID             State         Role     GR   AUT       KA Sent/Rcvd
10.0.0.4:0              Operational   Passive  Off  None      1180/1175
10.0.0.2:0              Operational   Active   Off  None      1216/1233
10.0.0.5:0              Operational   Passive  Off  None      1213/1244
10.0.0.1:0              Operational   Active   Off  None      1217/1224
<P 1>

查看 VPNv4 路由表

涉及 PE、CE

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<PE 1>display ip routing-table vpn-instance 11

Destinations : 10 Routes : 10

Destination/Mask   Proto   Pre Cost        NextHop         Interface
10.11.0.0/24       Direct  0   0           10.11.0.10      GE0/0/0
10.11.0.10/32      Direct  0   0           127.0.0.1       GE0/0/0
10.11.0.255/32     Direct  0   0           10.11.0.10      GE0/0/0
11.1.1.1/32        BGP     255 0           10.11.0.11      GE0/0/0
11.1.1.11/32       Direct  0   0           127.0.0.1       Loop11
20.22.0.0/24       BGP     255 0           10.0.0.1        GE0/0/1
22.2.2.2/32        BGP     255 0           10.0.0.1        GE0/0/1
22.2.2.22/32       BGP     255 0           10.0.0.1        GE0/0/1
127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
<PE 1>

<CE 10>display ip routing-table vpn-instance 10

Destinations : 10 Routes : 10

Destination/Mask   Proto   Pre Cost        NextHop         Interface
10.1.1.1/32        Direct  0   0           127.0.0.1       Loop10
10.1.1.10/32       IS_L2   15  10          10.10.56.5      GE0/0/0.10
10.10.56.0/24      Direct  0   0           10.10.56.6      GE0/0/0.10
10.10.56.6/32      Direct  0   0           127.0.0.1       GE0/0/0.10
10.10.56.255/32    Direct  0   0           10.10.56.6      GE0/0/0.10
20.2.2.2/32        IS_L2   15  10          10.10.56.5      GE0/0/0.10
20.2.2.20/32       IS_L2   15  10          10.10.56.5      GE0/0/0.10
20.20.56.0/24      IS_L2   15  10          10.10.56.5      GE0/0/0.10
127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
<CE 10>

<CE 11>display ip routing-table vpn-instance 11

Destinations : 10 Routes : 10

Destination/Mask   Proto   Pre Cost        NextHop         Interface
10.11.0.0/24       Direct  0   0           10.11.0.11      GE0/0/0
10.11.0.11/32      Direct  0   0           127.0.0.1       GE0/0/0
10.11.0.255/32     Direct  0   0           10.11.0.11      GE0/0/0
11.1.1.1/32        Direct  0   0           127.0.0.1       Loop11
11.1.1.11/32       BGP     255 0           10.11.0.10      GE0/0/0
20.22.0.0/24       BGP     255 0           10.11.0.10      GE0/0/0
22.2.2.2/32        BGP     255 0           10.11.0.10      GE0/0/0
22.2.2.22/32       BGP     255 0           10.11.0.10      GE0/0/0
127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0
255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0
<CE 11>

附录:完整配置文件

AS 10

RR1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
 sysname RR 1
#
 router id 10.0.0.1
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 10.0000.0000.0001.00
#
 mpls lsr-id 10.0.0.1
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 10.0.0.1 255.255.255.255
 isis enable 1
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO P 1
 combo enable copper
 ip address 10.0.13.1 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
bgp 10
 router-id 10.0.0.1
 group AS20 external
 peer AS20 as-number 20
 peer AS20 connect-interface LoopBack0
 peer AS20 ebgp-max-hop 10
 group ASBR internal
 group ASBR connect-interface LoopBack0
 group PE internal
 peer PE connect-interface LoopBack0
 peer 10.0.0.2 group ASBR
 peer 10.0.0.4 group PE
 peer 10.0.0.5 group PE
 peer 20.0.0.1 group AS20
 #
 address-family ipv4 unicast
  peer ASBR enable
  peer ASBR route-policy OUTGOING_LABEL export
  peer ASBR label-route-capability
 #
 address-family vpnv4
  reflector cluster-id 10.0.0.1
  undo policy vpn-target
  peer AS20 enable
  peer PE enable
  peer PE next-hop-local
  peer PE reflect-client
#
route-policy OUTGOING_LABEL permit node 10
 apply mpls-label
#

ASBR1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#
 sysname ASBR 1
#
 router id 10.0.0.2
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 10.0000.0000.0002.00
#
 mpls lsr-id 10.0.0.2
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 10.0.0.2 255.255.255.255
 isis enable 1
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO ASBR 2
 combo enable copper
 ip address 10.20.0.10 255.255.255.0
 mpls enable
#
interface GigabitEthernet0/0/10
 port link-mode route
 description TO P 1
 combo enable copper
 ip address 10.0.23.2 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
bgp 10
 router-id 10.0.0.2
 group AS20 external
 peer AS20 as-number 20
 peer 10.20.0.20 group AS20
 group RR internal
 peer RR connect-interface LoopBack0
 peer 10.0.0.1 group RR
 #
 address-family ipv4 unicast
  network 10.0.0.1 255.255.255.255
  peer AS20 enable
  peer AS20 route-policy OUTGOING_LABEL export
  peer AS20 label-route-capability
  peer RR enable
  peer RR route-policy OUTGOING_LABEL export
  peer RR label-route-capability
  peer RR next-hop-local
#
route-policy INCOMING_LABEL permit node 10
 if-match mpls-label
 apply mpls-label
#
route-policy OUTGOING_LABEL permit node 10
 apply mpls-label
#

P1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
 sysname P 1
#
 router id 10.0.0.3
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 10.0000.0000.0003.00
#
 mpls lsr-id 10.0.0.3
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 10.0.0.3 255.255.255.255
 isis enable 1
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO RR 1
 combo enable copper
 ip address 10.0.13.3 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
interface GigabitEthernet0/0/1
 port link-mode route
 description TO PE 1
 combo enable copper
 ip address 10.0.34.3 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
interface GigabitEthernet0/0/2
 port link-mode route
 description TO PE 2
 combo enable copper
 ip address 10.0.35.3 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
interface GigabitEthernet0/0/10
 port link-mode route
 description TO ASBR 1
 combo enable copper
 ip address 10.0.23.3 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#

PE1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#
 sysname PE 1
#
ip vpn-instance 11
 route-distinguisher 11:1
 vpn-target 22:11 import-extcommunity
 vpn-target 11:22 export-extcommunity
#
 router id 10.0.0.4
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 10.0000.0000.0004.00
#
 mpls lsr-id 10.0.0.4
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 10.0.0.4 255.255.255.255
 isis enable 1
#
interface LoopBack11
 ip binding vpn-instance 11
 ip address 11.1.1.11 255.255.255.255
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO CE 11
 combo enable copper
 ip binding vpn-instance 11
 ip address 10.11.0.10 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-mode route
 description TO P 1
 combo enable copper
 ip address 10.0.34.4 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
bgp 10
 router-id 10.0.0.4
 group RR internal
 peer RR connect-interface LoopBack0
 peer 10.0.0.1 group RR
 #
 address-family vpnv4
  peer RR enable
 #
 ip vpn-instance 11
  group AS11 external
  peer AS11 as-number 11
  peer 10.11.0.11 group AS11
  #
  address-family ipv4 unicast
   import-route direct
   peer AS11 enable
#

PE2

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
 sysname PE 2
#
ip vpn-instance 10
 route-distinguisher 10:1
 vpn-target 20:10 import-extcommunity
 vpn-target 10:20 export-extcommunity
#
 router id 10.0.0.5
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 10.0000.0000.0005.00
#
isis 10 vpn-instance 10
 is-level level-2
 cost-style wide
 network-entity 10.0010.0000.0005.00
 #
 address-family ipv4 unicast
  import-route bgp
#
 mpls lsr-id 10.0.0.5
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 10.0.0.5 255.255.255.255
 isis enable 1
#
interface LoopBack10
 ip binding vpn-instance 10
 ip address 10.1.1.10 255.255.255.255
 isis enable 10
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO CE 10
 combo enable copper
 ip address 10.0.56.5 255.255.255.0
 isis enable 1
#
interface GigabitEthernet0/0/0.10
 description TO CE 10 VPN 10
 ip binding vpn-instance 10
 ip address 10.10.56.5 255.255.255.0
 isis enable 10
 vlan-type dot1q vid 10
#
interface GigabitEthernet0/0/1
 port link-mode route
 description TO P 1
 combo enable copper
 ip address 10.0.35.5 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
bgp 10
 router-id 10.0.0.5
 group RR internal
 peer RR connect-interface LoopBack0
 peer 10.0.0.1 group RR
 #
 address-family vpnv4
  peer RR enable
 #
 ip vpn-instance 10
  #
  address-family ipv4 unicast
   import-route direct
   import-route isis 10
#

CE10

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
ip vpn-instance 10
 route-distinguisher 10:1
 vpn-target 20:10 import-extcommunity
 vpn-target 10:20 export-extcommunity
#
 router id 10.0.0.6
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 10.0000.0000.0006.00
#
isis 10 vpn-instance 10
 is-level level-2
 cost-style wide
 network-entity 10.0010.0000.0006.00
#
 lldp global enable
#
interface LoopBack0
 ip address 10.0.0.6 255.255.255.255
 isis enable 1
#
interface LoopBack10
 ip binding vpn-instance 10
 ip address 10.1.1.1 255.255.255.255
 isis enable 10
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO PE 2
 combo enable copper
 ip address 10.0.56.6 255.255.255.0
 isis enable 1
#
interface GigabitEthernet0/0/0.10
 description TO PE 2 VPN 10
 ip binding vpn-instance 10
 ip address 10.10.56.6 255.255.255.0
 isis enable 10
 vlan-type dot1q vid 10
#

CE11

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
 sysname CE 11
#
ip vpn-instance 11
 route-distinguisher 11:1
 vpn-target 22:11 import-extcommunity
 vpn-target 11:22 export-extcommunity
#
 router id 11.0.0.1
#
 lldp global enable
#
interface LoopBack0
 ip address 11.0.0.1 255.255.255.255
#
interface LoopBack11
 ip binding vpn-instance 11
 ip address 11.1.1.1 255.255.255.255
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO PE 1
 combo enable copper
 ip binding vpn-instance 11
 ip address 10.11.0.11 255.255.255.0
#
bgp 11
 router-id 11.0.0.1
 #
 ip vpn-instance 11
  group AS10 external
  peer AS10 as-number 10
  peer 10.11.0.10 group AS10
  #
  address-family ipv4 unicast
   import-route direct
   peer AS10 enable
#

AS 20

RR2

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#
 sysname RR 2
#
 router id 20.0.0.1
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 20.0000.0000.0001.00
#
 mpls lsr-id 20.0.0.1
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 20.0.0.1 255.255.255.255
 isis enable 1
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO P 2
 combo enable copper
 ip address 20.0.13.1 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
bgp 20
 router-id 20.0.0.1
 group AS10 external
 peer AS10 as-number 10
 peer AS10 connect-interface LoopBack0
 peer AS10 ebgp-max-hop 10
 group ASBR internal
 peer ASBR connect-interface LoopBack0
 group PE internal
 peer PE connect-interface LoopBack0
 peer 10.0.0.1 group AS10
 peer 20.0.0.2 group ASBR
 peer 20.0.0.4 group PE
 peer 20.0.0.5 group PE
 #
 address-family ipv4 unicast
  peer ASBR enable
  peer ASBR route-policy OUTGOING_LABEL export
  peer ASBR label-route-capability
 #
 address-family vpnv4
  reflector cluster-id 20.0.0.1
  undo policy vpn-target
  peer AS10 enable
  peer PE enable
  peer PE next-hop-local
  peer PE reflect-client
#
route-policy OUTGOING_LABEL permit node 10
 apply mpls-label
#

ASBR2

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#
 sysname ASBR 2
#
 router id 20.0.0.2
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 20.0000.0000.0002.00
#
 mpls lsr-id 20.0.0.2
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 20.0.0.2 255.255.255.255
 isis enable 1
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO ASBR 1
 combo enable copper
 ip address 10.20.0.20 255.255.255.0
 mpls enable
#
interface GigabitEthernet0/0/10
 port link-mode route
 description TO P 2
 combo enable copper
 ip address 20.0.23.2 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
bgp 20
 router-id 20.0.0.2
 group AS10 external
 peer AS10 as-number 10
 group RR internal
 peer RR connect-interface LoopBack0
 peer 10.20.0.10 group AS10
 peer 20.0.0.1 group RR
 #
 address-family ipv4 unicast
  network 20.0.0.1 255.255.255.255
  peer AS10 enable
  peer AS10 route-policy OUTGOING_LABEL export
  peer AS10 label-route-capability
  peer RR route-policy OUTGOING_LABEL export
  peer RR label-route-capability
  peer RR next-hop-local
#
route-policy INCOMING_LABEL permit node 10
 if-match mpls-label
 apply mpls-label
#
route-policy OUTGOING_LABEL permit node 10
 apply mpls-label
#

P2

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
 sysname P 2
#
 router id 20.0.0.3
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 20.0000.0000.0003.00
#
 mpls lsr-id 20.0.0.3
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 20.0.0.3 255.255.255.255
 isis enable 1
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO RR 2
 combo enable copper
 ip address 20.0.13.3 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
interface GigabitEthernet0/0/1
 port link-mode route
 description TO PE 3
 combo enable copper
 ip address 20.0.34.3 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
interface GigabitEthernet0/0/2
 port link-mode route
 description TO PE 4
 combo enable copper
 ip address 20.0.35.3 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
interface GigabitEthernet0/0/10
 port link-mode route
 description TO ASRB 2
 combo enable copper
 ip address 20.0.23.3 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#

PE3

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#
 sysname PE 3
#
ip vpn-instance 22
 route-distinguisher 22:1
 vpn-target 11:22 import-extcommunity
 vpn-target 22:11 export-extcommunity
#
 router id 20.0.0.4
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 20.0000.0000.0004.00
#
 mpls lsr-id 20.0.0.4
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 20.0.0.4 255.255.255.255
 isis enable 1
#
interface LoopBack22
 ip binding vpn-instance 22
 ip address 22.2.2.22 255.255.255.255
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO CE 22
 combo enable copper
 ip binding vpn-instance 22
 ip address 20.22.0.20 255.255.255.0
#
interface GigabitEthernet0/0/1
 port link-mode route
 description TO P 2
 combo enable copper
 ip address 20.0.34.4 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
bgp 20
 router-id 20.0.0.4
 group RR internal
 peer RR connect-interface LoopBack0
 peer 20.0.0.1 group RR
 #
 address-family vpnv4
  peer RR enable
 #
 ip vpn-instance 22
  group AS22 external
  peer AS22 as-number 22
  peer 20.22.0.22 group AS22
  #
  address-family ipv4 unicast
   import-route direct
   peer AS22 enable
#

PE4

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
 sysname PE 4
#
ip vpn-instance 20
 route-distinguisher 20:1
 vpn-target 10:20 import-extcommunity
 vpn-target 20:10 export-extcommunity
#
 router id 20.0.0.5
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 20.0000.0000.0005.00
#
isis 20 vpn-instance 20
 is-level level-2
 cost-style wide
 network-entity 20.0020.0000.0005.00
 #
 address-family ipv4 unicast
  import-route bgp
#
 mpls lsr-id 20.0.0.5
#
 lldp global enable
#
mpls ldp
#
interface LoopBack0
 ip address 20.0.0.5 255.255.255.255
 isis enable 1
#
interface LoopBack20
 ip binding vpn-instance 20
 ip address 20.2.2.20 255.255.255.255
 isis enable 20
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO CE 20
 combo enable copper
 ip address 20.0.56.5 255.255.255.0
 isis enable 1
#
interface GigabitEthernet0/0/0.20
 description TO CE 20 VPN 20
 ip binding vpn-instance 20
 ip address 20.20.56.5 255.255.255.0
 isis enable 20
 vlan-type dot1q vid 20
#
interface GigabitEthernet0/0/1
 port link-mode route
 description TO P 2
 combo enable copper
 ip address 20.0.35.5 255.255.255.0
 isis enable 1
 mpls enable
 mpls ldp enable
#
bgp 20
 router-id 20.0.0.5
 group RR internal
 peer RR connect-interface LoopBack0
 peer 20.0.0.1 group RR
 #
 address-family vpnv4
  peer RR enable
 #
 ip vpn-instance 20
  #
  address-family ipv4 unicast
   import-route direct
   import-route isis 20
#

CE20

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
 sysname CE 20
#
ip vpn-instance 20
 route-distinguisher 20:1
 vpn-target 10:20 import-extcommunity
 vpn-target 20:10 export-extcommunity
#
 router id 20.0.0.6
#
isis 1
 is-level level-2
 cost-style wide
 network-entity 20.0000.0000.0006.00
#
isis 20 vpn-instance 20
 is-level level-2
 cost-style wide
 network-entity 20.0020.0000.0006.00
#
 lldp global enable
#
interface LoopBack0
 ip address 20.0.0.6 255.255.255.255
 isis enable 1
#
interface LoopBack20
 ip binding vpn-instance 20
 ip address 20.2.2.2 255.255.255.255
 isis enable 20
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO PE 3
 combo enable copper
 ip address 20.0.56.6 255.255.255.0
 isis enable 1
#
interface GigabitEthernet0/0/0.20
 description TO PE 4 VPN 20
 ip binding vpn-instance 20
 ip address 20.20.56.6 255.255.255.0
 isis enable 20
 vlan-type dot1q vid 20
#

CE22

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
 sysname CE 22
#
ip vpn-instance 22
 route-distinguisher 22:1
 vpn-target 11:22 import-extcommunity
 vpn-target 22:11 export-extcommunity
#
 router id 22.0.0.1
#
 lldp global enable
#
interface LoopBack0
 ip address 22.0.0.1 255.255.255.255
#
interface LoopBack22
 ip binding vpn-instance 22
 ip address 22.2.2.2 255.255.255.255
#
interface GigabitEthernet0/0/0
 port link-mode route
 description TO PE 3
 combo enable copper
 ip binding vpn-instance 22
 ip address 20.22.0.22 255.255.255.0
#
bgp 22
 router-id 22.0.0.1
 #
 ip vpn-instance 22
  group AS20 external
  peer AS20 as-number 20
  peer 20.22.0.20 group AS20
  #
  address-family ipv4 unicast
   import-route direct
   peer AS20 enable
#
持续学习,共同进步! 🚀
使用 Hugo 构建
主题 StackJimmy 设计