09-MPLS Configuration Guide

HomeSupportRoutersCR16000-M SeriesConfigure & DeployConfiguration GuidesH3C CR16000-M Routers Configuration Guides-R8630Pxx-6W10009-MPLS Configuration Guide
02-IPv6 MPLS L3VPN configuration examples
Title Size Download
02-IPv6 MPLS L3VPN configuration examples 1.05 MB

Configuring IPv6 MPLS L3VPN

IPv6 MPLS L3VPN configuration examples

Example: Configuring IPv6 MPLS L3VPNs

Network configuration

CE 1 and CE 3 belong to VPN 1. CE 2 and CE 4 belong to VPN 2.

VPN 1 uses route target attributes 111:1. VPN 2 uses route target attributes 222:2. Users of different VPNs cannot access each other.

Run EBGP between CEs and PEs to exchange VPN routing information.

PEs use OSPF to communicate with each other and use MP-IBGP to exchange VPN routing information.

Figure 1 Network diagram

 

Table 1 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface2

Ten-GigabitEthernet3/0/2

Interface4

Ten-GigabitEthernet3/0/4

Interface5

Ten-GigabitEthernet3/0/5

 

Table 2 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/0/1

2001:1::1/96

P

Loop0

2.2.2.9/32

 

PE 1

Loop0

1.1.1.9/32

 

XGE3/0/4

172.1.1.2/24

 

 

XGE3/0/1

2001:1::2/96

 

XGE3/0/5

172.2.1.1/24

 

 

XGE3/0/2

2001:2::2/96

PE 2

Loop0

3.3.3.9/32

 

 

XGE3/0/4

172.1.1.1/24

 

XGE3/0/1

2001:3::2/96

 

CE 2

XGE3/0/1

2001:2::1/96

 

XGE3/0/2

2001:4::2/96

 

CE 3

XGE3/0/1

2001:3::1/96

 

XGE3/0/4

172.2.1.2/24

 

CE 4

XGE3/0/1

2001:4::1/96

 

 

 

 

Procedure

1.     Configure OSPF on the MPLS backbone to ensure IP connectivity among the PEs and the P router:

# Configure PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.9 32

[PE1-LoopBack0] quit

[PE1] interface ten-gigabitethernet 3/0/4

[PE1-Ten-GigabitEthernet3/0/4] ip address 172.1.1.1 24

[PE1-Ten-GigabitEthernet3/0/4] quit

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] quit

[PE1-ospf-1] quit

# Configure the P router.

<Sysname> system-view

[Sysname] sysname P

[P] interface loopback 0

[P-LoopBack0] ip address 2.2.2.9 32

[P-LoopBack0] quit

[P] interface ten-gigabitethernet 3/0/4

[P-Ten-GigabitEthernet3/0/4] ip address 172.1.1.2 24

[P-Ten-GigabitEthernet3/0/4] quit

[P] interface ten-gigabitethernet 3/0/5

[P-Ten-GigabitEthernet3/0/5] ip address 172.2.1.1 24

[P-Ten-GigabitEthernet3/0/5] quit

[P] ospf

[P-ospf-1] area 0

[P-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0

[P-ospf-1-area-0.0.0.0] quit

[P-ospf-1] quit

# Configure PE 2.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 3.3.3.9 32

[PE2-LoopBack0] quit

[PE2] interface ten-gigabitethernet 3/0/4

[PE2-Ten-GigabitEthernet3/0/4] ip address 172.2.1.2 24

[PE2-Ten-GigabitEthernet3/0/4] quit

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] quit

[PE2-ospf-1] quit

# Execute the display ospf peer command to verify that OSPF adjacencies in Full state have been established between PE 1, P, and PE 2. Execute the display ip routing-table command to verify that the PEs have learned the routes to the loopback interfaces of each other. (Details not shown.)

2.     Configure basic MPLS and enable MPLS LDP on the MPLS backbone to establish LDP LSPs:

# Configure PE 1.

[PE1] mpls lsr-id 1.1.1.9

[PE1] mpls ldp

[PE1-ldp] quit

[PE1] interface ten-gigabitethernet 3/0/4

[PE1-Ten-GigabitEthernet3/0/4] mpls enable

[PE1-Ten-GigabitEthernet3/0/4] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/4] quit

# Configure the P router.

[P] mpls lsr-id 2.2.2.9

[P] mpls ldp

[P-ldp] quit

[P] interface ten-gigabitethernet 3/0/4

[P-Ten-GigabitEthernet3/0/4] mpls enable

[P-Ten-GigabitEthernet3/0/4] mpls ldp enable

[P-Ten-GigabitEthernet3/0/4] quit

[P] interface ten-gigabitethernet 3/0/5

[P-Ten-GigabitEthernet3/0/5] mpls enable

[P-Ten-GigabitEthernet3/0/5] mpls ldp enable

[P-Ten-GigabitEthernet3/0/5] quit

# Configure PE 2.

[PE2] mpls lsr-id 3.3.3.9

[PE2] mpls ldp

[PE2-ldp] quit

[PE2] interface ten-gigabitethernet 3/0/4

[PE2-Ten-GigabitEthernet3/0/4] mpls enable

[PE2-Ten-GigabitEthernet3/0/4] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/4] quit

# Execute the display mpls ldp peer command to verify that LDP sessions in Operational state have been established between PE 1, P, and PE 2. Execute the display mpls ldp lsp command to verify that the LSPs have been established by LDP. (Details not shown.)

3.     Configure IPv6 VPN instances on the PEs to allow CE access:

# Configure PE 1.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 100:1

[PE1-vpn-instance-vpn1] vpn-target 111:1

[PE1-vpn-instance-vpn1] quit

[PE1] ip vpn-instance vpn2

[PE1-vpn-instance-vpn2] route-distinguisher 100:2

[PE1-vpn-instance-vpn2] vpn-target 222:2

[PE1-vpn-instance-vpn2] quit

[PE1] interface ten-gigabitethernet 3/0/1

[PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::2 96

[PE1-Ten-GigabitEthernet3/0/1] quit

[PE1] interface ten-gigabitethernet 3/0/2

[PE1-Ten-GigabitEthernet3/0/2] ip binding vpn-instance vpn2

[PE1-Ten-GigabitEthernet3/0/2] ipv6 address 2001:2::2 96

[PE1-Ten-GigabitEthernet3/0/2] quit

# Configure PE 2.

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 200:1

[PE2-vpn-instance-vpn1] vpn-target 111:1

[PE2-vpn-instance-vpn1] quit

[PE2] ip vpn-instance vpn2

[PE2-vpn-instance-vpn2] route-distinguisher 200:2

[PE2-vpn-instance-vpn2] vpn-target 222:2

[PE2-vpn-instance-vpn2] quit

[PE2] interface ten-gigabitethernet 3/0/1

[PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/1] ipv6 address 2001:3::2 96

[PE2-Ten-GigabitEthernet3/0/1] quit

[PE2] interface ten-gigabitethernet 3/0/2

[PE2-Ten-GigabitEthernet3/0/2] ip binding vpn-instance vpn2

[PE2-Ten-GigabitEthernet3/0/2] ipv6 address 2001:4::2 96

[PE2-Ten-GigabitEthernet3/0/2] quit

# Configure CE 1.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::1 96

[CE1-Ten-GigabitEthernet3/0/1] quit

# Configure CE 2.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 2001:2::1 96

[CE2-Ten-GigabitEthernet3/0/1] quit

# Configure CE 3.

<Sysname> system-view

[Sysname] sysname CE3

[CE3] interface ten-gigabitethernet 3/0/1

[CE3-Ten-GigabitEthernet3/0/1] ipv6 address 2001:3::1 96

[CE3-Ten-GigabitEthernet3/0/1] quit

# Configure CE 4.

<Sysname> system-view

[Sysname] sysname CE4

[CE4] interface ten-gigabitethernet 3/0/1

[CE4-Ten-GigabitEthernet3/0/1] ipv6 address 2001:4::1 96

[CE4-Ten-GigabitEthernet3/0/1] quit

# Execute the display ip vpn-instance command on the PEs to display information about the VPN instances. Use the ping command on the PEs to verify that the PEs can ping their attached CEs. (Details not shown.)

4.     Establish EBGP peer relationships between the PEs and CEs to allow them to exchange VPN routes:

# Configure CE 1.

[CE1] bgp 65410

[CE1-bgp-default] router-id 4.4.4.4

[CE1-bgp-default] peer 2001:1::2 as-number 100

[CE1-bgp-default] address-family ipv6 unicast

[CE1-bgp-default-ipv6] peer 2001:1::2 enable

[CE1-bgp-default-ipv6] import-route direct

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

# Configure CE 2.

[CE2] bgp 65420

[CE2-bgp-default] router-id 5.5.5.5

[CE2-bgp-default] peer 2001:2::2 as-number 100

[CE2-bgp-default] address-family ipv6 unicast

[CE2-bgp-default-ipv6] peer 2001:2::2 enable

[CE2-bgp-default-ipv6] import-route direct

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

# Configure CE 3.

[CE3] bgp 65430

[CE3-bgp-default] router-id 6.6.6.6

[CE3-bgp-default] peer 2001:3::2 as-number 100

[CE3-bgp-default] address-family ipv6 unicast

[CE3-bgp-default-ipv6] peer 2001:3::2 enable

[CE3-bgp-default-ipv6] import-route direct

[CE3-bgp-default-ipv6] quit

[CE3-bgp-default] quit

# Configure CE 4.

[CE4] bgp 65440

[CE4-bgp-default] router-id 7.7.7.7

[CE4-bgp-default] peer 2001:4::2 as-number 100

[CE4-bgp-default] address-family ipv6 unicast

[CE4-bgp-default-ipv6] peer 2001:4::2 enable

[CE4-bgp-default-ipv6] import-route direct

[CE4-bgp-default-ipv6] quit

[CE4-bgp-default] quit

# Configure PE 1.

[PE1] bgp 100

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] peer 2001:1::1 as-number 65410

[PE1-bgp-default-vpn1] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn1] peer 2001:1::1 enable

[PE1-bgp-default-ipv6-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] ip vpn-instance vpn2

[PE1-bgp-default-vpn2] peer 2001:2::1 as-number 65420

[PE1-bgp-default-vpn2] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn2] peer 2001:2::1 enable

[PE1-bgp-default-ipv6-vpn2] quit

[PE1-bgp-default-vpn2] quit

[PE1-bgp-default] quit

# Configure PE 2.

[PE2] bgp 100

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] peer 2001:3::1 as-number 65430

[PE2-bgp-default-vpn1] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn1] peer 2001:3::1 enable

[PE2-bgp-default-ipv6-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] ip vpn-instance vpn2

[PE2-bgp-default-vpn2] peer 2001:4::1 as-number 65440

[PE2-bgp-default-vpn2] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn2] peer 2001:4::1 enable

[PE2-bgp-default-ipv6-vpn2] quit

[PE2-bgp-default-vpn2] quit

[PE2-bgp-default] quit

# Execute the display bgp peer ipv6 vpn-instance command on the PEs to verify that a BGP peer relationship in Established state has been established between a PE and a CE. (Details not shown.)

5.     Configure an MP-IBGP peer relationship between the PEs:

# Configure PE 1.

[PE1] bgp 100

[PE1-bgp-default] peer 3.3.3.9 as-number 100

[PE1-bgp-default] peer 3.3.3.9 connect-interface loopback 0

[PE1-bgp-default] address-family vpnv6

[PE1-bgp-default-vpnv6] peer 3.3.3.9 enable

[PE1-bgp-default-vpnv6] quit

[PE1-bgp-default] quit

# Configure PE 2.

[PE2] bgp 100

[PE2-bgp-default] peer 1.1.1.9 as-number 100

[PE2-bgp-default] peer 1.1.1.9 connect-interface loopback 0

[PE2-bgp-default] address-family vpnv6

[PE2-bgp-default-vpnv6] peer 1.1.1.9 enable

[PE2-bgp-default-vpnv6] quit

[PE2-bgp-default] quit

# Execute the display bgp peer vpnv6 command on the PEs to verify that a BGP peer relationship in Established state has been established between the PEs. (Details not shown.)

Verifying the configuration

# Execute the display ipv6 routing-table vpn-instance command on the PEs.

[PE1] display ipv6 routing-table vpn-instance vpn1

Destinations : 5        Routes : 5

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

Destination: 2001:1::/96                                 Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

Destination: 2001:1::2/128                               Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

Destination: 2001:3::/96                                 Protocol  : BGP4+

NextHop    : ::FFFF:3.3.3.9                              Preference: 255

Interface  : XGE3/0/4                                    Cost      : 0

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

[PE1] display ipv6 routing-table vpn-instance vpn2

Destinations : 5        Routes : 5

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

Destination: 2001:2::/96                                 Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/2                                    Cost      : 0

Destination: 2001:2::2/128                               Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/2                                    Cost      : 0

Destination: 2001:4::/96                                 Protocol  : BGP4+

NextHop    : ::FFFF:3.3.3.9                              Preference: 255

Interface  : XGE3/0/4                                    Cost      : 0

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

The output shows that PE 1 has routes to the remote CEs. Output on PE 2 is similar.

# Verify that CEs of the same VPN can ping each other, whereas those of different VPNs cannot. For example, CE 1 can ping CE 3 (2001:3::1), but cannot ping CE 4 (2001:4::1). (Details not shown.)

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 111:1 import-extcommunity

 vpn-target 111:1 export-extcommunity

#

ip vpn-instance vpn2

 route-distinguisher 100:2

 vpn-target 222:2 import-extcommunity

 vpn-target 222:2 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 1.1.1.9 0.0.0.0

  network 172.1.1.0 0.0.0.255

#

 mpls lsr-id 1.1.1.9

#

mpls ldp

#

interface LoopBack0

 ip address 1.1.1.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001:1::2/96

#

interface Ten-GigabitEthernet3/0/2

 ip binding vpn-instance vpn2

 ipv6 address 2001:2::2/96

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 3.3.3.9 as-number 100

 peer 3.3.3.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 3.3.3.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:1::1 as-number 65410

  #

  address-family ipv6 unicast

   peer 2001:1::1 enable

 #

 ip vpn-instance vpn2

  peer 2001:2::1 as-number 65420

  #

  address-family ipv6 unicast

   peer 2001:2::1 enable

#

return

·     P:

#

 sysname P

#

ospf 1

 area 0.0.0.0

  network 2.2.2.9 0.0.0.0

  network 172.1.1.0 0.0.0.255

  network 172.2.1.0 0.0.0.255

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/5

 ip address 172.2.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 200:1

 vpn-target 111:1 import-extcommunity

 vpn-target 111:1 export-extcommunity

#

ip vpn-instance vpn2

 route-distinguisher 200:2

 vpn-target 222:2 import-extcommunity

 vpn-target 222:2 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 3.3.3.9 0.0.0.0

  network 172.2.1.0 0.0.0.255

#

 mpls lsr-id 3.3.3.9

#

mpls ldp

#

interface LoopBack0

 ip address 3.3.3.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001:3::2/96

#

interface Ten-GigabitEthernet3/0/2

 ip binding vpn-instance vpn2

 ipv6 address 2001:4::2/96

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.2.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 1.1.1.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:3::1 as-number 65430

  #

  address-family ipv6 unicast

   peer 2001:3::1 enable

 #

 ip vpn-instance vpn2

  peer 2001:4::1 as-number 65440

  #

  address-family ipv6 unicast

   peer 2001:4::1 enable

#

return

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:1::1/96

#

bgp 65410

 router-id 4.4.4.4

 peer 2001:1::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:1::2 enable

#

return

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:2::1/96

#

bgp 65420

 router-id 5.5.5.5

 peer 2001:2::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:2::2 enable

#

return

·     CE 3:

#

 sysname CE3

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:3::1/96

#

bgp 65430

 router-id 6.6.6.6

 peer 2001:3::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:3::2 enable

#

return

·     CE 4:

#

 sysname CE4

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:4::1/96

#

bgp 65440

 router-id 7.7.7.7

 peer 2001:4::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:4::2 enable

#

return

Example: Configuring an IPv6 MPLS L3VPN over a GRE tunnel

Network configuration

CE 1 and CE 2 belong to VPN 1. The PEs support MPLS, while the P router does not support MPLS and provides only IP features.

On the backbone, use a GRE tunnel to encapsulate and forward packets for IPv6 MPLS L3VPN.

Configure tunnel policies on the PEs, and specify the tunnel type for VPN traffic as GRE.

Figure 2 Network diagram

Table 3 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface4

Ten-GigabitEthernet3/0/4

Interface5

Ten-GigabitEthernet3/0/5

 

Table 4 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/0/1

2001:1::1/96

P

XGE3/0/4

172.1.1.2/24

PE 1

Loop0

1.1.1.9/32

 

XGE3/0/5

172.2.1.1/24

 

XGE3/0/1

2001:1::2/96

PE 2

Loop0

2.2.2.9/32

 

XGE3/0/5

172.1.1.1/24

 

XGE3/0/1

2001:2::2/96

 

Tunnel0

20.1.1.1/24

 

XGE3/0/4

172.2.1.2/24

CE 2

XGE3/0/1

2001:2::1/96

 

Tunnel0

20.1.1.2/24

Procedure

1.     Configure an IGP on the MPLS backbone to ensure IP connectivity among the PEs and the P router.

# Configure PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.9 32

[PE1-LoopBack0] quit

[PE1] interface ten-gigabitethernet 3/0/5

[PE1-Ten-GigabitEthernet3/0/5] ip address 172.1.1.1 24

[PE1-Ten-GigabitEthernet3/0/5] quit

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] quit

[PE1-ospf-1] quit

# Configure the P router.

<Sysname> system-view

[Sysname] sysname P

[P] interface ten-gigabitethernet 3/0/4

[P-Ten-GigabitEthernet3/0/4] ip address 172.1.1.2 24

[P-Ten-GigabitEthernet3/0/4] quit

[P] interface ten-gigabitethernet 3/0/5

[P-Ten-GigabitEthernet3/0/5] ip address 172.2.1.1 24

[P-Ten-GigabitEthernet3/0/5] quit

[P] ospf

[P-ospf-1] area 0

[P-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] quit

[P-ospf-1] quit

# Configure PE 2.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 2.2.2.9 32

[PE2-LoopBack0] quit

[PE2] interface ten-gigabitethernet 3/0/4

[PE2-Ten-GigabitEthernet3/0/4] ip address 172.2.1.2 24

[PE2-Ten-GigabitEthernet3/0/4] quit

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] quit

[PE2-ospf-1] quit

# Execute the display ospf peer command to verify that OSPF adjacencies in Full state have been established between PE 1, P, and PE 2. Execute the display ip routing-table command to verify that the PEs have learned the routes to the loopback interfaces of each other. (Details not shown.)

2.     Configure basic MPLS on the PEs:

# Configure PE 1.

[PE1] mpls lsr-id 1.1.1.9

# Configure PE 2.

[PE2] mpls lsr-id 2.2.2.9

3.     Configure VPN instances on the PEs to allow CE access, and apply tunnel policies to the VPN instances to use a GRE tunnel for VPN packet forwarding:

# Configure PE 1.

[PE1] tunnel-policy gre1

[PE1-tunnel-policy-gre1] tunnel select-seq gre load-balance-number 1

[PE1-tunnel-policy-gre1] quit

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 100:1

[PE1-vpn-instance-vpn1] vpn-target 100:1 both

[PE1-vpn-instance-vpn1] tnl-policy gre1

[PE1-vpn-instance-vpn1] quit

[PE1] interface ten-gigabitethernet 3/0/1

[PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::2 96

[PE1-Ten-GigabitEthernet3/0/1] quit

# Configure PE 2.

[PE2] tunnel-policy gre1

[PE2-tunnel-policy-gre1] tunnel select-seq gre load-balance-number 1

[PE2-tunnel-policy-gre1] quit

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 100:2

[PE2-vpn-instance-vpn1] vpn-target 100:1 both

[PE2-vpn-instance-vpn1] tnl-policy gre1

[PE2-vpn-instance-vpn1] quit

[PE2] interface ten-gigabitethernet 3/0/1

[PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/1] ipv6 address 2001:2::2 96

[PE2-Ten-GigabitEthernet3/0/1] quit

# Configure CE 1.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::1 96

[CE1-Ten-GigabitEthernet3/0/1] quit

# Configure CE 2.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 2001:2::1 96

[CE2-Ten-GigabitEthernet3/0/1] quit

# Execute the display ip vpn-instance command on the PEs to display information about the VPN instance. Use the ping command on the PEs to verify that the PEs can ping their attached CEs. (Details not shown.)

4.     Establish EBGP peer relationships between PEs and CEs to allow them to exchange VPN routes:

# Configure CE 1.

[CE1] bgp 65410

[CE1-bgp-default] router-id 4.4.4.4

[CE1-bgp-default] peer 2001:1::2 as-number 100

[CE1-bgp-default] address-family ipv6 unicast

[CE1-bgp-default-ipv6] peer 2001:1::2 enable

[CE1-bgp-default-ipv6] import-route direct

[CE1-bgp-default-ipv6] quit

# Configure PE 1.

[PE1] bgp 100

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] peer 2001:1::1 as-number 65410

[PE1-bgp-default-vpn1] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn1] peer 2001:1::1 enable

[PE1-bgp-default-ipv6-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure CE 2.

[CE2] bgp 65420

[CE2-bgp-default] router-id 5.5.5.5

[CE2-bgp-default] peer 2001:2::2 as-number 100

[CE2-bgp-default] address-family ipv6 unicast

[CE2-bgp-default-ipv6] peer 2001:2::2 enable

[CE2-bgp-default-ipv6] import-route direct

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

# Configure PE 2.

[PE2] bgp 100

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] peer 2001:2::1 as-number 65420

[PE2-bgp-default-vpn1] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn1] peer 2001:2::1 enable

[PE2-bgp-default-ipv6-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Execute the display bgp peer ipv6 vpn-instance command on the PEs to verify that a BGP peer relationship in Established state has been established between a PE and a CE. (Details not shown.)

5.     Configure an MP-IBGP peer relationship between the PEs:

# Configure PE 1.

[PE1] bgp 100

[PE1-bgp-default] peer 2.2.2.9 as-number 100

[PE1-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[PE1-bgp-default] address-family vpnv6

[PE1-bgp-default-vpnv6] peer 2.2.2.9 enable

[PE1-bgp-default-vpnv6] quit

[PE1-bgp-default] quit

# Configure PE 2.

[PE2] bgp 100

[PE2-bgp-default] peer 1.1.1.9 as-number 100

[PE2-bgp-default] peer 1.1.1.9 connect-interface loopback 0

[PE2-bgp-default] address-family vpnv6

[PE2-bgp-default-vpnv6] peer 1.1.1.9 enable

[PE2-bgp-default-vpnv6] quit

[PE2-bgp-default] quit

# Execute the display bgp peer vpnv6 command on the PEs to verify that a BGP peer relationship in Established state has been established between the PEs. (Details not shown.)

6.     Configure a GRE tunnel:

# Configure PE 1.

[PE1] interface tunnel 0 mode gre

[PE1-Tunnel0] source loopback 0

[PE1-Tunnel0] destination 2.2.2.9

[PE1-Tunnel0] ip address 20.1.1.1 24

[PE1-Tunnel0] mpls enable

[PE1-Tunnel0] quit

# Configure PE 2.

[PE2] interface tunnel 0 mode gre

[PE2-Tunnel0] source loopback 0

[PE2-Tunnel0] destination 1.1.1.9

[PE2-Tunnel0] ip address 20.1.1.2 24

[PE2-Tunnel0] mpls enable

[PE2-Tunnel0] quit

Verifying the configuration

# Verify that the CEs have learned the route to each other and can ping each other. (Details not shown.)

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 tnl-policy gre1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 1.1.1.9 0.0.0.0

  network 172.1.1.0 0.0.0.255

#

 mpls lsr-id 1.1.1.9

#

tunnel-policy gre1

 select-seq gre load-balance-number 1

#

interface LoopBack0

 ip address 1.1.1.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001:1::2/96

#

interface Ten-GigabitEthernet3/0/5

 ip address 172.1.1.1 255.255.255.0

#

interface Tunnel0 mode gre

 ip address 20.1.1.1 255.255.255.0

 mpls enable

 source LoopBack0

 destination 2.2.2.9

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 2.2.2.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:1::1 as-number 65410

  #

  address-family ipv6 unicast

   peer 2001:1::1 enable

#

return

·     P:

#

 sysname P

#

ospf 1

 area 0.0.0.0

  network 172.1.1.0 0.0.0.255

  network 172.2.1.0 0.0.0.255

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/0/5

 ip address 172.2.1.1 255.255.255.0

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:2

 tnl-policy gre1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 2.2.2.9 0.0.0.0

  network 172.2.1.0 0.0.0.255

#

 mpls lsr-id 2.2.2.9

#

tunnel-policy gre1

 select-seq gre load-balance-number 1

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001:2::2/96

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.2.1.2 255.255.255.0

#

interface Tunnel0 mode gre

 ip address 20.1.1.2 255.255.255.0

 mpls enable

 source LoopBack0

 destination 1.1.1.9

#

bgp 100

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 1.1.1.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:2::1 as-number 65420

  #

  address-family ipv6 unicast

   peer 2001:2::1 enable

#

return

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:1::1/96

#

bgp 65410

 router-id 4.4.4.4

 peer 2001:1::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:1::2 enable

#

return

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:2::1/96

#

bgp 65420

 router-id 5.5.5.5

 peer 2001:2::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:2::2 enable

#

return

Example: Configuring a hub-spoke network

Network configuration

The Spoke-CEs cannot communicate directly. They can communicate only through the Hub-CE.

Configure EBGP between the Spoke-CEs and Spoke-PEs and between the Hub-CE and Hub-PE to exchange VPN routing information.

Configure OSPF between the Spoke-PEs and Hub-PE to implement communication between the PEs. Configure MP-IBGP between the Spoke-PEs and Hub-PE to exchange VPN routing information.

Figure 3 Network diagram

Table 5 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface2

Ten-GigabitEthernet3/0/2

Interface4

Ten-GigabitEthernet3/0/4

Interface5

Ten-GigabitEthernet3/0/5

 

Table 6 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

Spoke-CE 1

XGE3/0/1

11::1/64

Hub-CE

XGE3/0/1

13::1/64

Spoke-PE 1

Loop0

1.1.1.9/32

 

XGE3/0/2

14::1/64

 

XGE3/0/1

11::2/64

Hub-PE

Loop0

2.2.2.9/32

 

XGE3/0/4

172.1.1.1/24

 

XGE3/0/4

172.1.1.2/24

Spoke-CE 2

XGE3/0/1

12::1/64

 

XGE3/0/5

172.2.1.2/24

Spoke-PE 2

Loop0

3.3.3.9/32

 

XGE3/0/1

13::2/64

 

XGE3/0/1

12::2/64

 

XGE3/0/2

14::2/64

 

XGE3/0/4

172.2.1.1/24

 

 

 

Procedure

1.     Configure an IGP on the MPLS backbone to ensure IP connectivity within the backbone:

# Configure Spoke-PE 1.

<Sysname> system-view

[Sysname] sysname Spoke-PE1

[Spoke-PE1] interface loopback 0

[Spoke-PE1-LoopBack0] ip address 1.1.1.9 32

[Spoke-PE1-LoopBack0] quit

[Spoke-PE1] interface ten-gigabitethernet 3/0/4

[Spoke-PE1-Ten-GigabitEthernet3/0/4] ip address 172.1.1.1 24

[Spoke-PE1-Ten-GigabitEthernet3/0/4] quit

[Spoke-PE1] ospf

[Spoke-PE1-ospf-1] area 0

[Spoke-PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[Spoke-PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0

[Spoke-PE1-ospf-1-area-0.0.0.0] quit

[Spoke-PE1-ospf-1] quit

# Configure Spoke-PE 2.

<Sysname> system-view

[Sysname] sysname Spoke-PE2

[Spoke-PE2] interface loopback 0

[Spoke-PE2-LoopBack0] ip address 3.3.3.9 32

[Spoke-PE2-LoopBack0] quit

[Spoke-PE2] interface ten-gigabitethernet 3/0/4

[Spoke-PE2-Ten-GigabitEthernet3/0/4] ip address 172.2.1.1 24

[Spoke-PE2-Ten-GigabitEthernet3/0/4] quit

[Spoke-PE2] ospf

[Spoke-PE2-ospf-1] area 0

[Spoke-PE2-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255

[Spoke-PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0

[Spoke-PE2-ospf-1-area-0.0.0.0] quit

[Spoke-PE2-ospf-1] quit

# Configure Hub-PE.

<Sysname> system-view

[Sysname] sysname Hub-PE

[Hub-PE] interface loopback 0

[Hub-PE-LoopBack0] ip address 2.2.2.9 32

[Hub-PE-LoopBack0] quit

[Hub-PE] interface ten-gigabitethernet 3/0/4

[Hub-PE-Ten-GigabitEthernet3/0/4] ip address 172.1.1.2 24

[Hub-PE-Ten-GigabitEthernet3/0/4] quit

[Hub-PE] interface ten-gigabitethernet 3/0/5

[Hub-PE-Ten-GigabitEthernet3/0/5] ip address 172.2.1.2 24

[Hub-PE-Ten-GigabitEthernet3/0/5] quit

[Hub-PE] ospf

[Hub-PE-ospf-1] area 0

[Hub-PE-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[Hub-PE-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255

[Hub-PE-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0

[Hub-PE-ospf-1-area-0.0.0.0] quit

[Hub-PE-ospf-1] quit

# Execute the display ospf peer command on the PEs to verify that OSPF adjacencies in Full state have been established between the PEs. Execute the display ip routing-table command on the PEs to verify that the PEs have learned the routes to the loopback interfaces of each other. (Details not shown.)

2.     Configure basic MPLS and MPLS LDP on the MPLS backbone to establish LDP LSPs:

# Configure Spoke-PE 1.

[Spoke-PE1] mpls lsr-id 1.1.1.9

[Spoke-PE1] mpls ldp

[Spoke-PE1-ldp] quit

[Spoke-PE1] interface ten-gigabitethernet 3/0/4

[Spoke-PE1-Ten-GigabitEthernet3/0/4] mpls enable

[Spoke-PE1-Ten-GigabitEthernet3/0/4] mpls ldp enable

[Spoke-PE1-Ten-GigabitEthernet3/0/4] quit

# Configure Spoke-PE 2.

[Spoke-PE2] mpls lsr-id 3.3.3.9

[Spoke-PE2] mpls ldp

[Spoke-PE2-ldp] quit

[Spoke-PE2] interface ten-gigabitethernet 3/0/4

[Spoke-PE2-Ten-GigabitEthernet3/0/4] mpls enable

[Spoke-PE2-Ten-GigabitEthernet3/0/4] mpls ldp enable

[Spoke-PE2-Ten-GigabitEthernet3/0/4] quit

# Configure Hub-PE.

[Hub-PE] mpls lsr-id 2.2.2.9

[Hub-PE] mpls ldp

[Hub-PE-ldp] quit

[Hub-PE] interface ten-gigabitethernet 3/0/4

[Hub-PE-Ten-GigabitEthernet3/0/4] mpls enable

[Hub-PE-Ten-GigabitEthernet3/0/4] mpls ldp enable

[Hub-PE-Ten-GigabitEthernet3/0/4] quit

[Hub-PE] interface ten-gigabitethernet 3/0/5

[Hub-PE-Ten-GigabitEthernet3/0/5] mpls enable

[Hub-PE-Ten-GigabitEthernet3/0/5] mpls ldp enable

[Hub-PE-Ten-GigabitEthernet3/0/5] quit

# Execute the display mpls ldp peer command on the PEs to verify that LDP sessions in Operational state have been established between the PEs. Execute the display mpls ldp lsp command on the PEs to verify that the LSPs have been established by LDP. (Details not shown.)

3.     Configure VPN instances on the Spoke-PEs and Hub-PE:

# Configure Spoke-PE 1.

[Spoke-PE1] ip vpn-instance vpn1

[Spoke-PE1-vpn-instance-vpn1] route-distinguisher 100:1

[Spoke-PE1-vpn-instance-vpn1] vpn-target 111:1 import-extcommunity

[Spoke-PE1-vpn-instance-vpn1] vpn-target 222:2 export-extcommunity

[Spoke-PE1-vpn-instance-vpn1] quit

[Spoke-PE1] interface ten-gigabitethernet 3/0/1

[Spoke-PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[Spoke-PE1-Ten-GigabitEthernet3/0/1] ipv6 address 11::2 24

[Spoke-PE1-Ten-GigabitEthernet3/0/1] quit

# Configure Spoke-PE 2.

[Spoke-PE2] ip vpn-instance vpn1

[Spoke-PE2-vpn-instance-vpn1] route-distinguisher 100:2

[Spoke-PE2-vpn-instance-vpn1] vpn-target 111:1 import-extcommunity

[Spoke-PE2-vpn-instance-vpn1] vpn-target 222:2 export-extcommunity

[Spoke-PE2-vpn-instance-vpn1] quit

[Spoke-PE2] interface ten-gigabitethernet 3/0/1

[Spoke-PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[Spoke-PE2-Ten-GigabitEthernet3/0/1] ipv6 address 12::2 24

[Spoke-PE2-Ten-GigabitEthernet3/0/1] quit

# Configure Hub-PE.

[Hub-PE] ip vpn-instance vpn1-in

[Hub-PE-vpn-instance-vpn1-in] route-distinguisher 100:3

[Hub-PE-vpn-instance-vpn1-in] vpn-target 222:2 import-extcommunity

[Hub-PE-vpn-instance-vpn1-in] quit

[Hub-PE] ip vpn-instance vpn1-out

[Hub-PE-vpn-instance-vpn1-out] route-distinguisher 100:4

[Hub-PE-vpn-instance-vpn1-out] vpn-target 111:1 export-extcommunity

[Hub-PE-vpn-instance-vpn1-out] quit

[Hub-PE] interface ten-gigabitethernet 3/0/1

[Hub-PE-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1-in

[Hub-PE-Ten-GigabitEthernet3/0/1] ipv6 address 13::2 24

[Hub-PE-Ten-GigabitEthernet3/0/1] quit

[Hub-PE] interface ten-gigabitethernet 3/0/2

[Hub-PE-Ten-GigabitEthernet3/0/2] ip binding vpn-instance vpn1-out

[Hub-PE-Ten-GigabitEthernet3/0/2] ipv6 address 14::2 24

[Hub-PE-Ten-GigabitEthernet3/0/2] quit

# Configure Spoke-CE 1.

<Sysname> system-view

[Sysname] sysname Spoke-CE1

[Spoke-CE1] interface ten-gigabitethernet 3/0/1

[Spoke-CE1-Ten-GigabitEthernet3/0/1] ipv6 address 11::1 64

[Spoke-CE1-Ten-GigabitEthernet3/0/1] quit

# Configure Spoke-CE 2.

<Sysname> system-view

[Sysname] sysname Spoke-CE2

[Spoke-CE2] interface ten-gigabitethernet 3/0/1

[Spoke-CE2-Ten-GigabitEthernet3/0/1] ipv6 address 12::1 64

[Spoke-CE2-Ten-GigabitEthernet3/0/1] quit

# Configure Hub-CE.

<Sysname> system-view

[Sysname] sysname Hub-CE

[Hub-CE] interface ten-gigabitethernet 3/0/1

[Hub-CE-Ten-GigabitEthernet3/0/1] ipv6 address 13::1 64

[Hub-CE-Ten-GigabitEthernet3/0/1] quit

[Hub-CE] interface ten-gigabitethernet 3/0/2

[Hub-CE-Ten-GigabitEthernet3/0/2] ipv6 address 14::1 64

[Hub-CE-Ten-GigabitEthernet3/0/2] quit

# Execute the display ip vpn-instance command on the PEs to display the VPN instance configuration. Use the ping command on the PEs to verify that the PEs can ping their attached CEs. (Details not shown.)

4.     Establish EBGP peer relationships between the PEs and CEs, and redistribute VPN routes into BGP:

# Configure Spoke-CE 1.

[Spoke-CE1] bgp 65410

[Spoke-CE1-bgp-default] router-id 4.4.4.4

[Spoke-CE1-bgp-default] peer 11::2 as-number 100

[Spoke-CE1-bgp-default] address-family ipv6

[Spoke-CE1-bgp-default-ipv6] peer 11::2 enable

[Spoke-CE1-bgp-default-ipv6] import-route direct

[Spoke-CE1-bgp-default-ipv6] quit

[Spoke-CE1-bgp-default] quit

# Configure Spoke-CE 2.

[Spoke-CE2] bgp 65420

[Spoke-CE2-bgp-default] router-id 5.5.5.5

[Spoke-CE2-bgp-default] peer 12::2 as-number 100

[Spoke-CE2-bgp-default] address-family ipv6

[Spoke-CE2-bgp-default-ipv6] peer 12::2 enable

[Spoke-CE2-bgp-default-ipv6] import-route direct

[Spoke-CE2-bgp-default-ipv6] quit

[Spoke-CE2-bgp-default] quit

# Configure Hub-CE.

[Hub-CE] bgp 65430

[Hub-CE-bgp-default] router-id 6.6.6.6

[Hub-CE-bgp-default] peer 13::2 as-number 100

[Hub-CE-bgp-default] peer 14::2 as-number 100

[Hub-CE-bgp-default] address-family ipv6

[Hub-CE-bgp-default-ipv6] peer 13::2 enable

[Hub-CE-bgp-default-ipv6] peer 14::2 enable

[Hub-CE-bgp-default-ipv6] import-route direct

[Hub-CE-bgp-default-ipv6] quit

[Hub-CE-bgp-default] quit

# Configure Spoke-PE 1.

[Spoke-PE1] bgp 100

[Spoke-PE1-bgp-default] ip vpn-instance vpn1

[Spoke-PE1-bgp-default-vpn1] peer 11::1 as-number 65410

[Spoke-PE1-bgp-default-vpn1] address-family ipv6

[Spoke-PE1-bgp-default-ipv6-vpn1] peer 11::1 enable

[Spoke-PE1-bgp-default-ipv6-vpn1] quit

[Spoke-PE1-bgp-default-vpn1] quit

[Spoke-PE1-bgp-default] quit

# Configure Spoke-PE 2.

[Spoke-PE2] bgp 100

[Spoke-PE2-bgp-default] ip vpn-instance vpn1

[Spoke-PE2-bgp-default-vpn1] peer 12::1 as-number 65420

[Spoke-PE2-bgp-default-vpn1] address-family ipv6

[Spoke-PE2-bgp-default-ipv6-vpn1] peer 12::1 enable

[Spoke-PE2-bgp-default-ipv6-vpn1] quit

[Spoke-PE2-bgp-default-vpn1] quit

[Spoke-PE2-bgp-default] quit

# Configure Hub-PE.

[Hub-PE] bgp 100

[Hub-PE-bgp-default] ip vpn-instance vpn1-in

[Hub-PE-bgp-default-vpn1-in] peer 13::1 as-number 65430

[Hub-PE-bgp-default-vpn1-in] address-family ipv6

[Hub-PE-bgp-default-ipv6-vpn1-in] peer 13::1 enable

[Hub-PE-bgp-default-ipv6-vpn1-in] quit

[Hub-PE-bgp-default-vpn1-in] quit

[Hub-PE-bgp-default] ip vpn-instance vpn1-out

[Hub-PE-bgp-default-vpn1-out] peer 14::1 as-number 65430

[Hub-PE-bgp-default-vpn1-out] address-family ipv6

[Hub-PE-bgp-default-ipv6-vpn1-out] peer 14::1 enable

[Hub-PE-bgp-default-ipv6-vpn1-out] peer 14::1 allow-as-loop 2

[Hub-PE-bgp-default-ipv6-vpn1-out] quit

[Hub-PE-bgp-default-vpn1-out] quit

[Hub-PE-bgp-default] quit

# Execute the display bgp peer ipv6 vpn-instance command on the PEs to verify that a BGP peer relationship in Established state has been established between a PE and a CE. (Details not shown.)

5.     Establish an MP-IBGP peer relationship between the Spoke-PEs and Hub-PE:

# Configure Spoke-PE 1.

[Spoke-PE1] bgp 100

[Spoke-PE1-bgp-default] peer 2.2.2.9 as-number 100

[Spoke-PE1-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[Spoke-PE1-bgp-default] address-family vpnv6

[Spoke-PE1-bgp-default-vpnv6] peer 2.2.2.9 enable

[Spoke-PE1-bgp-default-vpnv6] quit

[Spoke-PE1-bgp-default] quit

# Configure Spoke-PE 2.

[Spoke-PE2] bgp 100

[Spoke-PE2-bgp-default] peer 2.2.2.9 as-number 100

[Spoke-PE2-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[Spoke-PE2-bgp-default] address-family vpnv6

[Spoke-PE2-bgp-default-vpnv6] peer 2.2.2.9 enable

[Spoke-PE2-bgp-default-vpnv6] quit

[Spoke-PE2-bgp-default] quit

# Configure Hub-PE.

[Hub-PE] bgp 100

[Hub-PE-bgp-default] peer 1.1.1.9 as-number 100

[Hub-PE-bgp-default] peer 1.1.1.9 connect-interface loopback 0

[Hub-PE-bgp-default] peer 3.3.3.9 as-number 100

[Hub-PE-bgp-default] peer 3.3.3.9 connect-interface loopback 0

[Hub-PE-bgp-default] address-family vpnv6

[Hub-PE-bgp-default-vpnv6] peer 1.1.1.9 enable

[Hub-PE-bgp-default-vpnv6] peer 3.3.3.9 enable

[Hub-PE-bgp-default-vpnv6] quit

[Hub-PE-bgp-default] quit

# Execute the display bgp peer vpnv6 command on the PEs to verify that a BGP peer relationship in Established state has been established between the PEs. (Details not shown.)

Verifying the configuration

# Verify that Spoke-CE 1 and Spoke-CE 2 can ping each other. The TTL value indicates that traffic from Spoke-CE 1 to Spoke-CE 2 passes six hops (64-59+1) and is forwarded through Hub-CE. This example uses Spoke-CE 1.

[Spoke-CE1] ping ipv6 12::1

Ping6(56 bytes) 11::1 --> 12::1, press CTRL_C to break

56 bytes from 12::1, icmp_seq=0 hlim=59 time=0.000 ms

56 bytes from 12::1, icmp_seq=1 hlim=59 time=1.000 ms

56 bytes from 12::1, icmp_seq=2 hlim=59 time=0.000 ms

56 bytes from 12::1, icmp_seq=3 hlim=59 time=1.000 ms

56 bytes from 12::1, icmp_seq=4 hlim=59 time=0.000 ms

 

--- Ping6 statistics for 12::1 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.000/0.400/1.000/0.490 ms

Configuration files

·     Spoke-PE 1:

#

 sysname Spoke-PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 111:1 import-extcommunity

 vpn-target 222:2 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 1.1.1.9 0.0.0.0

  network 172.1.1.0 0.0.0.255

#

 mpls lsr-id 1.1.1.9

#

mpls ldp

#

interface LoopBack0

 ip address 1.1.1.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 11::2/24

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 2.2.2.9 enable

 #

 ip vpn-instance vpn1

  peer 11::1 as-number 65410

  #

  address-family ipv6 unicast

   peer 11::1 enable

#

return

·     Spoke-PE 2:

#

 sysname Spoke-PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:2

 vpn-target 111:1 import-extcommunity

 vpn-target 222:2 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 3.3.3.9 0.0.0.0

  network 172.2.1.0 0.0.0.255

#

 mpls lsr-id 3.3.3.9

#

mpls ldp

#

interface LoopBack0

 ip address 3.3.3.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 12::2/24

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.2.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 2.2.2.9 enable

 #

 ip vpn-instance vpn1

  peer 12::1 as-number 65420

  #

  address-family ipv6 unicast

   peer 12::1 enable

#

return

·     Hub-PE:

#

 sysname Hub-PE

#

ip vpn-instance vpn1-in

 route-distinguisher 100:3

 vpn-target 222:2 import-extcommunity

#

ip vpn-instance vpn1-out

 route-distinguisher 100:4

 vpn-target 111:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 2.2.2.9 0.0.0.0

  network 172.1.1.0 0.0.0.255

  network 172.2.1.0 0.0.0.255

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1-in

 ipv6 address 13::2/24

#

interface Ten-GigabitEthernet3/0/2

 ip binding vpn-instance vpn1-out

 ipv6 address 14::2/24

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/5

 ip address 172.2.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 peer 3.3.3.9 as-number 100

 peer 3.3.3.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 1.1.1.9 enable

  peer 3.3.3.9 enable

 #

 ip vpn-instance vpn1-in

  peer 13::1 as-number 65430

  #

  address-family ipv6 unicast

   peer 13::1 enable

 #

 ip vpn-instance vpn1-out

  peer 14::1 as-number 65430

  #

  address-family ipv6 unicast

   peer 14::1 enable

   peer 14::1 allow-as-loop 2

#

return

·     Spoke-CE 1:

#

 sysname Spoke-CE1

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 11::1/64

#

bgp 65410

 router-id 4.4.4.4

 peer 11::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 11::2 enable

#

return

·     Spoke-CE 2:

#

 sysname Spoke-CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 12::1/64

#

bgp 65420

 router-id 5.5.5.5

 peer 12::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 12::2 enable

#

return

·     Hub-CE:

#

 sysname Hub-CE

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 13::1/64

#

interface Ten-GigabitEthernet3/0/2

 ipv6 address 14::1/64

#

bgp 65430

 router-id 6.6.6.6

 peer 13::2 as-number 100

 peer 14::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 13::2 enable

  peer 14::2 enable

#

return

Example: Configuring IPv6 MPLS L3VPN inter-AS option A

Network configuration

CE 1 and CE 2 belong to the same VPN. CE 1 accesses the network through PE 1 in AS 100 and CE 2 accesses the network through PE 2 in AS 200.

Configure IPv6 MPLS L3VPN inter-AS option A, and use VRF-to-VRF method to manage VPN routes.

Run OSPF on the MPLS backbone of each AS.

Figure 4 Network diagram

Table 7 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface4

Ten-GigabitEthernet3/0/4

Interface5

Ten-GigabitEthernet3/0/5

 

Table 8 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/0/1

2001:1::1/96

CE 2

XGE3/0/1

2001:2::1/96

PE 1

Loop0

1.1.1.9/32

PE 2

Loop0

4.4.4.9/32

 

XGE3/0/1

2001:1::2/96

 

XGE3/0/1

2001:2::2/96

 

XGE3/0/4

172.1.1.2/24

 

XGE3/0/4

162.1.1.2/24

ASBR-PE1

Loop0

2.2.2.9/32

ASBR-PE2

Loop0

3.3.3.9/32

 

XGE3/0/4

172.1.1.1/24

 

XGE3/0/4

162.1.1.1/24

 

XGE3/0/5

2002:1::1/96

 

XGE3/0/5

2002:1::2/96

Restrictions and guidelines

For the same VPN, the route targets for the VPN instance on the PE must match those for the VPN instance on the ASBR-PE in the same AS. This is not required for PEs in different ASs.

Procedure

1.     Configure an IGP on each MPLS backbone to ensure IP connectivity within the backbone.

# Configure PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.9 32

[PE1-LoopBack0] quit

[PE1] interface ten-gigabitethernet 3/0/4

[PE1-Ten-GigabitEthernet3/0/4] ip address 172.1.1.2 24

[PE1-Ten-GigabitEthernet3/0/4] quit

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] quit

[PE1-ospf-1] quit

# Configure ASBR-PE 1.

<Sysname> system-view

[Sysname] sysname ASBR-PE1

[ASBR-PE1] interface loopback 0

[ASBR-PE1-LoopBack0] ip address 2.2.2.9 32

[ASBR-PE1-LoopBack0] quit

[ASBR-PE1] interface ten-gigabitethernet 3/0/4

[ASBR-PE1-Ten-GigabitEthernet3/0/4] ip address 172.1.1.1 24

[ASBR-PE1-Ten-GigabitEthernet3/0/4] quit

[ASBR-PE1] ospf

[ASBR-PE1-ospf-1] area 0

[ASBR-PE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[ASBR-PE1-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0

[ASBR-PE1-ospf-1-area-0.0.0.0] quit

[ASBR-PE1-ospf-1] quit

# Configure ASBR-PE 2.

<Sysname> system-view

[Sysname] sysname ASBR-PE2

[ASBR-PE2] interface loopback 0

[ASBR-PE2-LoopBack0] ip address 3.3.3.9 32

[ASBR-PE2-LoopBack0] quit

[ASBR-PE2] interface ten-gigabitethernet 3/0/4

[ASBR-PE2-Ten-GigabitEthernet3/0/4] ip address 162.1.1.1 24

[ASBR-PE2-Ten-GigabitEthernet3/0/4] quit

[ASBR-PE2] ospf

[ASBR-PE2-ospf-1] area 0

[ASBR-PE2-ospf-1-area-0.0.0.0] network 162.1.1.0 0.0.0.255

[ASBR-PE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0

[ASBR-PE2-ospf-1-area-0.0.0.0] quit

[ASBR-PE2-ospf-1] quit

# Configure PE 2.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 4.4.4.9 32

[PE2-LoopBack0] quit

[PE2] interface ten-gigabitethernet 3/0/4

[PE2-Ten-GigabitEthernet3/0/4] ip address 162.1.1.2 24

[PE2-Ten-GigabitEthernet3/0/4] quit

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 162.1.1.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 4.4.4.9 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] quit

[PE2-ospf-1] quit

# Execute the display ospf peer command to verify that each ASBR-PE has established an OSPF adjacency in Full state with the PE in the same AS, and that the PEs and ASBR-PEs in the same AS have learned the routes to the loopback interfaces of each other. Execute the ping command to verify that the PEs and ASBR-PEs in the same AS can ping each other. (Details not shown.)

2.     Configure basic MPLS and enable MPLS LDP on each MPLS backbone to establish LDP LSPs:

# Configure basic MPLS on PE 1, and enable MPLS LDP for both PE 1 and the interface connected to ASBR-PE 1.

[PE1] mpls lsr-id 1.1.1.9

[PE1] mpls ldp

[PE1-ldp] quit

[PE1] interface ten-gigabitethernet 3/0/4

[PE1-Ten-GigabitEthernet3/0/4] mpls enable

[PE1-Ten-GigabitEthernet3/0/4] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/4] quit

# Configure basic MPLS on ASBR-PE 1, and enable MPLS LDP for both ASBR-PE 1 and the interface connected to PE 1.

[ASBR-PE1] mpls lsr-id 2.2.2.9

[ASBR-PE1] mpls ldp

[ASBR-PE1-ldp] quit

[ASBR-PE1] interface ten-gigabitethernet 3/0/4

[ASBR-PE1-Ten-GigabitEthernet3/0/4] mpls enable

[ASBR-PE1-Ten-GigabitEthernet3/0/4] mpls ldp enable

[ASBR-PE1-Ten-GigabitEthernet3/0/4] quit

# Configure basic MPLS on ASBR-PE 2, and enable MPLS LDP for both ASBR-PE 2 and the interface connected to PE 2.

[ASBR-PE2] mpls lsr-id 3.3.3.9

[ASBR-PE2] mpls ldp

[ASBR-PE2-ldp] quit

[ASBR-PE2] interface ten-gigabitethernet 3/0/4

[ASBR-PE2-Ten-GigabitEthernet3/0/4] mpls enable

[ASBR-PE2-Ten-GigabitEthernet3/0/4] mpls ldp enable

[ASBR-PE2-Ten-GigabitEthernet3/0/4] quit

# Configure basic MPLS on PE 2, and enable MPLS LDP for both PE 2 and the interface connected to ASBR-PE 2.

[PE2] mpls lsr-id 4.4.4.9

[PE2] mpls ldp

[PE2-ldp] quit

[PE2] interface ten-gigabitethernet 3/0/4

[PE2-Ten-GigabitEthernet3/0/4] mpls enable

[PE2-Ten-GigabitEthernet3/0/4] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/4] quit

# Execute the display mpls ldp session command on the routers to verify that the session status is Operational, and that each PE and the ASBR-PE in the same AS have established an LDP neighbor relationship. (Details not shown.)

3.     Configure a VPN instance on the PEs:

# Configure CE 1.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::1 96

[CE1-Ten-GigabitEthernet3/0/1] quit

# Configure PE 1.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 100:2

[PE1-vpn-instance-vpn1] vpn-target 100:1 both

[PE1-vpn-instance-vpn1] quit

[PE1] interface ten-gigabitethernet 3/0/1

[PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::2 96

[PE1-Ten-GigabitEthernet3/0/1] quit

# Configure CE 2.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 2001:2::1 96

[CE2-Ten-GigabitEthernet3/0/1] quit

# Configure PE 2.

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 200:1

[PE2-vpn-instance-vpn1] vpn-target 200:1 both

[PE2-vpn-instance-vpn1] quit

[PE2] interface ten-gigabitethernet 3/0/1

[PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/1] ipv6 address 2001:2::2 96

[PE2-Ten-GigabitEthernet3/0/1] quit

# On ASBR-PE 1, create a VPN instance, and bind the VPN instance to the interface connected to ASBR-PE 2. ASBR-PE 1 considers ASBR-PE 2 to be its attached CE.

[ASBR-PE1] ip vpn-instance vpn1

[ASBR-PE1-vpn-instance-vpn1] route-distinguisher 100:1

[ASBR-PE1-vpn-instance-vpn1] vpn-target 100:1 both

[ASBR-PE1-vpn-instance-vpn1] quit

[ASBR-PE1] interface ten-gigabitethernet 3/0/5

[ASBR-PE1-Ten-GigabitEthernet3/0/5] ip binding vpn-instance vpn1

[ASBR-PE1-Ten-GigabitEthernet3/0/5] ipv6 address 2002:1::1 96

[ASBR-PE1-Ten-GigabitEthernet3/0/5] quit

# On ASBR-PE 2, create a VPN instance, and bind the VPN instance to the interface connected to ASBR-PE 1. ASBR-PE 2 considers ASBR-PE 1 to be its attached CE.

[ASBR-PE2] ip vpn-instance vpn1

[ASBR-PE2-vpn-instance-vpn1] route-distinguisher 200:1

[ASBR-PE2-vpn-instance-vpn1] vpn-target 200:1 both

[ASBR-PE2-vpn-instance-vpn1] quit

[ASBR-PE2] interface ten-gigabitethernet 3/0/5

[ASBR-PE2-Ten-GigabitEthernet3/0/5] ip binding vpn-instance vpn1

[ASBR-PE2-Ten-GigabitEthernet3/0/5] ipv6 address 2002:1::2 96

[ASBR-PE2-Ten-GigabitEthernet3/0/5] quit

# Execute the display ip vpn-instance command to display VPN instance information. Verify that each PE can ping its attached CE, and that ASBR-PE 1 and ASBR-PE 2 can ping each other. (Details not shown.)

4.     Establish EBGP peer relationships between PEs and CEs to allow them to exchange VPN routes:

# Configure CE 1.

[CE1] bgp 65001

[CE1-bgp-default] router-id 5.5.5.5

[CE1-bgp-default] peer 2001:1::2 as-number 100

[CE1-bgp-default] address-family ipv6 unicast

[CE1-bgp-default-ipv6] peer 2001:1::2 enable

[CE1-bgp-default-ipv6] import-route direct

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

# Configure PE 1.

[PE1] bgp 100

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] peer 2001:1::1 as-number 65001

[PE1-bgp-default-vpn1] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn1] peer 2001:1::1 enable

[PE1-bgp-default-ipv6-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure CE 2.

[CE2] bgp 65002

[CE2-bgp-default] router-id 6.6.6.6

[CE2-bgp-default] peer 2001:2::2 as-number 200

[CE2-bgp-default] address-family ipv6

[CE2-bgp-default-ipv6] peer 2001:2::2 enable

[CE2-bgp-default-ipv6] import-route direct

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

# Configure PE 2.

[PE2] bgp 200

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] peer 2001:2::1 as-number 65002

[PE2-bgp-default-vpn1] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn1] peer 2001:2::1 enable

[PE2-bgp-default-ipv6-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

5.     Establish an IBGP peer relationship between each PE and the ASBR-PE in the same AS and an EBGP peer relationship between the ASBR-PEs:

# Configure PE 1.

[PE1] bgp 100

[PE1-bgp-default] peer 2.2.2.9 as-number 100

[PE1-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[PE1-bgp-default] address-family vpnv6

[PE1-bgp-default-vpnv6] peer 2.2.2.9 enable

[PE1-bgp-default-vpnv6] quit

[PE1-bgp-default] quit

# Configure ASBR-PE 1.

[ASBR-PE1] bgp 100

[ASBR-PE1-bgp-default] ip vpn-instance vpn1

[ASBR-PE1-bgp-default-vpn1] peer 2002:1::2 as-number 200

[ASBR-PE1-bgp-default-vpn1] address-family ipv6 unicast

[ASBR-PE1-bgp-default-ipv6-vpn1] peer 2002:1::2 enable

[ASBR-PE1-bgp-default-ipv6-vpn1] quit

[ASBR-PE1-bgp-default-vpn1] quit

[ASBR-PE1-bgp-default] peer 1.1.1.9 as-number 100

[ASBR-PE1-bgp-default] peer 1.1.1.9 connect-interface loopback 0

[ASBR-PE1-bgp-default] address-family vpnv6

[ASBR-PE1-bgp-default-vpnv6] peer 1.1.1.9 enable

[ASBR-PE1-bgp-default-vpnv6] quit

[ASBR-PE1-bgp-default] quit

# Configure ASBR-PE 2.

[ASBR-PE2] bgp 200

[ASBR-PE2-bgp-default] ip vpn-instance vpn1

[ASBR-PE2-bgp-default-vpn1] peer 2002:1::1 as-number 100

[ASBR-PE2-bgp-default-vpn1] address-family ipv6 unicast

[ASBR-PE2-bgp-default-ipv6-vpn1] peer 2002:1::1 enable

[ASBR-PE2-bgp-default-ipv6-vpn1] quit

[ASBR-PE2-bgp-default-vpn1] quit

[ASBR-PE2-bgp-default] peer 4.4.4.9 as-number 200

[ASBR-PE2-bgp-default] peer 4.4.4.9 connect-interface loopback 0

[ASBR-PE2-bgp-default] address-family vpnv6

[ASBR-PE2-bgp-default-vpnv6] peer 4.4.4.9 enable

[ASBR-PE2-bgp-default-vpnv6] quit

[ASBR-PE2-bgp-default] quit

# Configure PE 2.

[PE2] bgp 200

[PE2-bgp-default] peer 3.3.3.9 as-number 200

[PE2-bgp-default] peer 3.3.3.9 connect-interface loopback 0

[PE2-bgp-default] address-family vpnv6

[PE2-bgp-default-vpnv6] peer 3.3.3.9 enable

[PE2-bgp-default-vpnv6] quit

[PE2-bgp-default] quit

Verifying the configuration

# Verify that the CEs can learn the route to each other and can ping each other. (Details not shown.)

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:2

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 1.1.1.9 0.0.0.0

  network 172.1.1.0 0.0.0.255

#

 mpls lsr-id 1.1.1.9

#

mpls ldp

#

interface LoopBack0

 ip address 1.1.1.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001:1::2/96

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 2.2.2.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:1::1 as-number 65001

  #

  address-family ipv6 unicast

   peer 2001:1::1 enable

#

return

·     ASBR-PE 1:

#

 sysname ASBR-PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 2.2.2.9 0.0.0.0

  network 172.1.1.0 0.0.0.255

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/4

 ip address 172.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/5

 ip binding vpn-instance vpn1

 ipv6 address 2002:1::1/96

#

bgp 100

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 1.1.1.9 enable

 #

 ip vpn-instance vpn1

  peer 2002:1::2 as-number 200

  #

  address-family ipv6 unicast

   peer 2002:1::2 enable

#

return

·     ASBR-PE 2:

#

 sysname ASBR-PE2

#

ip vpn-instance vpn1

 route-distinguisher 200:1

 vpn-target 200:1 import-extcommunity

 vpn-target 200:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 3.3.3.9 0.0.0.0

  network 162.1.1.0 0.0.0.255

#

 mpls lsr-id 3.3.3.9

#

mpls ldp

#

interface LoopBack0

 ip address 3.3.3.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/4

 ip address 162.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/5

 ip binding vpn-instance vpn1

 ipv6 address 2002:1::2/96

#

bgp 200

 peer 4.4.4.9 as-number 200

 peer 4.4.4.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 4.4.4.9 enable

 #

 ip vpn-instance vpn1

  peer 2002:1::1 as-number 100

  #

  address-family ipv6 unicast

   peer 2002:1::1 enable

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 200:2

 vpn-target 200:1 import-extcommunity

 vpn-target 200:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 4.4.4.9 0.0.0.0

  network 162.1.1.0 0.0.0.255

#

 mpls lsr-id 4.4.4.9

#

mpls ldp

#

interface LoopBack0

 ip address 4.4.4.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001:2::2/96

#

interface Ten-GigabitEthernet3/0/4

 ip address 162.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 200

 peer 3.3.3.9 as-number 200

 peer 3.3.3.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 3.3.3.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:2::1 as-number 65002

  #

  address-family ipv6 unicast

   peer 2001:2::1 enable

#

return

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:1::1/96

#

bgp 65001

 router-id 5.5.5.5

 peer 2001:1::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:1::2 enable

#

return

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:2::1/96

#

bgp 65002

 router-id 6.6.6.6

 peer 2001:2::2 as-number 200

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:2::2 enable

#

return

Example: Configuring IPv6 MPLS L3VPN inter-AS option B

Network configuration

Site 1 and Site 2 belong to the same VPN. CE 1 of Site 1 accesses the network through PE 1 in AS 100, and CE 2 of Site 2 accesses the network through PE 2 in AS 600.

PEs in the same AS run IS-IS.

PE 1 and ASBR-PE 1 exchange VPNv6 routes through MP-IBGP. PE 2 and ASBR-PE 2 exchange VPNv6 routes through MP-IBGP. ASBR-PE 1 and ASBR-PE 2 exchange VPNv6 routes through MP-EBGP.

ASBRs do not perform route target filtering of received VPNv6 routes.

Figure 5 Network diagram

Table 9 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface4

Ten-GigabitEthernet3/0/4

Interface5

Ten-GigabitEthernet3/0/5

 

Table 10 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

PE 1

Loop0

2.2.2.9/32

PE 2

Loop0

5.5.5.9/32

 

XGE3/0/1

30::1/64

 

XGE3/0/1

20::1/64

 

XGE3/0/5

1.1.1.2/8

 

XGE3/0/5

9.1.1.2/8

ASBR-PE 1

Loop0

3.3.3.9/32

ASBR-PE 2

Loop0

4.4.4.9/32

 

XGE3/0/5

1.1.1.1/8

 

XGE3/0/5

9.1.1.1/8

 

XGE3/0/4

11.0.0.2/8

 

XGE3/0/4

11.0.0.1/8

CE 1

XGE3/0/1

30::2/64

CE 2

XGE3/0/1

20::2/64

Procedure

1.     Configure PE 1:

# Configure IS-IS on PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] network-entity 10.0000.0000.0000.0001.00

[PE1-isis-1] quit

# Configure LSR ID, and enable MPLS and LDP.

[PE1] mpls lsr-id 2.2.2.9

[PE1] mpls ldp

[PE1-ldp] quit

# Configure interface Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[PE1] interface ten-gigabitethernet 3/0/5

[PE1-Ten-GigabitEthernet3/0/5] ip address 1.1.1.2 255.0.0.0

[PE1-Ten-GigabitEthernet3/0/5] isis enable 1

[PE1-Ten-GigabitEthernet3/0/5] mpls enable

[PE1-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/5] quit

# Configure interface Loopback 0, and enable IS-IS on it.

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 2.2.2.9 32

[PE1-LoopBack0] isis enable 1

[PE1-LoopBack0] quit

# Create VPN instance vpn1, and configure the RD and route target attributes.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 11:11

[PE1-vpn-instance-vpn1] vpn-target 1:1 2:2 import-extcommunity

[PE1-vpn-instance-vpn1] vpn-target 1:1 export-extcommunity

[PE1-vpn-instance-vpn1] quit

# Bind the interface connected to CE 1 to the created VPN instance.

[PE1] interface ten-gigabitethernet 3/0/1

[PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/1] ipv6 address 30::1 64

[PE1-Ten-GigabitEthernet3/0/1] quit

# Enable BGP on PE 1.

[PE1] bgp 100

# Configure IBGP peer 3.3.3.9 as a VPNv6 peer.

[PE1-bgp-default] peer 3.3.3.9 as-number 100

[PE1-bgp-default] peer 3.3.3.9 connect-interface loopback 0

[PE1-bgp-default] address-family vpnv6

[PE1-bgp-default-vpnv6] peer 3.3.3.9 enable

[PE1-bgp-default-vpnv6] quit

# Establish an EBGP peer relationship between the PE and its attached CE.

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] peer 30::2 as-number 65001

[PE1-bgp-default-vpn1] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn1] peer 30::2 enable

[PE1-bgp-default-ipv6-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

2.     Configure ASBR-PE 1:

# Enable IS-IS on ASBR-PE 1.

<Sysname> system-view

[Sysname] sysname ASBR-PE1

[ASBR-PE1] isis 1

[ASBR-PE1-isis-1] network-entity 10.0000.0000.0000.0002.00

[ASBR-PE1-isis-1] quit

# Configure LSR ID, and enable MPLS and LDP.

[ASBR-PE1] mpls lsr-id 3.3.3.9

[ASBR-PE1] mpls ldp

[ASBR-PE1-ldp] quit

# Configure interface Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[ASBR-PE1] interface ten-gigabitethernet 3/0/5

[ASBR-PE1-Ten-GigabitEthernet3/0/5] ip address 1.1.1.1 255.0.0.0

[ASBR-PE1-Ten-GigabitEthernet3/0/5] isis enable 1

[ASBR-PE1-Ten-GigabitEthernet3/0/5] mpls enable

[ASBR-PE1-Ten-GigabitEthernet3/0/5] mpls ldp enable

[ASBR-PE1-Ten-GigabitEthernet3/0/5] quit

# Configure interface Ten-GigabitEthernet 3/0/4, and enable MPLS.

[ASBR-PE1] interface ten-gigabitethernet 3/0/4

[ASBR-PE1-Ten-GigabitEthernet3/0/4] ip address 11.0.0.2 255.0.0.0

[ASBR-PE1-Ten-GigabitEthernet3/0/4] mpls enable

[ASBR-PE1-Ten-GigabitEthernet3/0/4] quit

# Configure interface Loopback 0, and enable IS-IS on it.

[ASBR-PE1] interface loopback 0

[ASBR-PE1-LoopBack0] ip address 3.3.3.9 32

[ASBR-PE1-LoopBack0] isis enable 1

[ASBR-PE1-LoopBack0] quit

# Enable BGP on ASBR-PE 1.

[ASBR-PE1] bgp 100

[ASBR-PE1-bgp-default] peer 2.2.2.9 as-number 100

[ASBR-PE1-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[ASBR-PE1-bgp-default] peer 11.0.0.1 as-number 600

[ASBR-PE1-bgp-default] peer 11.0.0.1 connect-interface ten-gigabitethernet 3/0/4

# Disable route target based filtering of received VPNv6 routes.

[ASBR-PE1-bgp-default] address-family vpnv6

[ASBR-PE1-bgp-default-vpnv6] undo policy vpn-target

# Configure IBGP peer 2.2.2.9 and EBGP peer 11.0.0.1 as VPNv6 peers.

[ASBR-PE1-bgp-default-vpnv6] peer 11.0.0.1 enable

[ASBR-PE1-bgp-default-vpnv6] peer 2.2.2.9 enable

[ASBR-PE1-bgp-default-vpnv6] quit

3.     Configure ASBR-PE 2:

# Enable IS-IS on ASBR-PE 2.

<Sysname> system-view

[Sysname] sysname ASBR-PE2

[ASBR-PE2] isis 1

[ASBR-PE2-isis-1] network-entity 10.0000.0000.0000.0003.00

[ASBR-PE2-isis-1] quit

# Configure LSR ID, and enable MPLS and LDP.

[ASBR-PE2] mpls lsr-id 4.4.4.9

[ASBR-PE2] mpls ldp

[ASBR-PE2-ldp] quit

# Configure interface Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[ASBR-PE2] interface ten-gigabitethernet 3/0/5

[ASBR-PE2-Ten-GigabitEthernet3/0/5] ip address 9.1.1.1 255.0.0.0

[ASBR-PE2-Ten-GigabitEthernet3/0/5] isis enable 1

[ASBR-PE2-Ten-GigabitEthernet3/0/5] mpls enable

[ASBR-PE2-Ten-GigabitEthernet3/0/5] mpls ldp enable

[ASBR-PE2-Ten-GigabitEthernet3/0/5] quit

# Configure interface Ten-GigabitEthernet 3/0/4, and enable MPLS.

[ASBR-PE2] interface ten-gigabitethernet 3/0/4

[ASBR-PE2-Ten-GigabitEthernet3/0/4] ip address 11.0.0.1 255.0.0.0

[ASBR-PE2-Ten-GigabitEthernet3/0/4] mpls enable

[ASBR-PE2-Ten-GigabitEthernet3/0/4] quit

# Configure interface Loopback 0, and enable IS-IS on it.

[ASBR-PE2] interface loopback 0

[ASBR-PE2-LoopBack0] ip address 4.4.4.9 32

[ASBR-PE2-LoopBack0] isis enable 1

[ASBR-PE2-LoopBack0] quit

# Enable BGP on ASBR-PE 2.

[ASBR-PE2] bgp 600

[ASBR-PE2-bgp-default] peer 11.0.0.2 as-number 100

[ASBR-PE2-bgp-default] peer 11.0.0.2 connect-interface ten-gigabitethernet 3/0/4

[ASBR-PE2-bgp-default] peer 5.5.5.9 as-number 600

[ASBR-PE2-bgp-default] peer 5.5.5.9 connect-interface loopback 0

# Disable route target based filtering of received VPNv6 routes.

[ASBR-PE2-bgp-default] address-family vpnv6

[ASBR-PE2-bgp-default-vpnv6] undo policy vpn-target

# Configure IBGP peer 5.5.5.9 and EBGP peer 11.0.0.2 as VPNv6 peers.

[ASBR-PE2-bgp-default-vpnv6] peer 11.0.0.2 enable

[ASBR-PE2-bgp-default-vpnv6] peer 5.5.5.9 enable

[ASBR-PE2-bgp-default-vpnv6] quit

[ASBR-PE2-bgp-default] quit

4.     Configure PE 2:

# Enable IS-IS on PE 2.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] network-entity 10.0000.0000.0000.0004.00

[PE2-isis-1] quit

# Configure the LSR ID, and enable MPLS and LDP.

[PE2] mpls lsr-id 5.5.5.9

[PE2] mpls ldp

[PE2-ldp] quit

# Configure interface Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[PE2] interface ten-gigabitethernet 3/0/5

[PE2-Ten-GigabitEthernet3/0/5] ip address 9.1.1.2 255.0.0.0

[PE2-Ten-GigabitEthernet3/0/5] isis enable 1

[PE2-Ten-GigabitEthernet3/0/5] mpls enable

[PE2-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/5] quit

# Configure interface Loopback 0, and enable IS-IS on it.

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 5.5.5.9 32

[PE2-LoopBack0] isis enable 1

[PE2-LoopBack0] quit

# Create VPN instance vpn1, and configure the RD and route target attributes.

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 12:12

[PE2-vpn-instance-vpn1] vpn-target 1:1 2:2 import-extcommunity

[PE2-vpn-instance-vpn1] vpn-target 2:2 export-extcommunity

[PE2-vpn-instance-vpn1] quit

# Bind the interface connected to CE 1 to the created VPN instance.

[PE2] interface ten-gigabitethernet 3/0/1

[PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/1] ipv6 address 20::1 64

[PE2-Ten-GigabitEthernet3/0/1] quit

# Enable BGP on PE 2.

[PE2] bgp 600

# Configure IBGP peer 4.4.4.9 as a VPNv6 peer.

[PE2-bgp-default] peer 4.4.4.9 as-number 600

[PE2-bgp-default] peer 4.4.4.9 connect-interface loopback 0

[PE2-bgp-default] address-family vpnv6

[PE2-bgp-default-vpnv6] peer 4.4.4.9 enable

[PE2-bgp-default-vpnv6] quit

# Establish an EBGP peer relationship between the PE and its attached CE.

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] peer 20::2 as-number 65002

[PE2-bgp-default-vpn1] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn1] peer 20::2 enable

[PE2-bgp-default-ipv6-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

5.     Configure CE 1.

# Assign IP addresses to interfaces.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 30::2 64

[CE1-Ten-GigabitEthernet3/0/1] quit

# Establish an EBGP peer relationship between the CE and its connected PE and redistribute direct routes.

[CE1] bgp 65001

[CE1-bgp-default] router-id 6.6.6.6

[CE1-bgp-default] peer 30::1 as-number 100

[CE1-bgp-default] address-family ipv6 unicast

[CE1-bgp-default-ipv6] peer 30::1 enable

[CE1-bgp-default-ipv6] import-route direct

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

6.     Configure CE 2.

# Assign IP addresses to interfaces.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 20::2 64

[CE2-Ten-GigabitEthernet3/0/1] quit

# Establish an EBGP peer relationship between the CE and its connected PE and redistribute direct routes.

[CE2] bgp 65002

[CE2-bgp-default] router-id 7.7.7.7

[CE2-bgp-default] peer 20::1 as-number 600

[CE2-bgp-default] address-family ipv6 unicast

[CE2-bgp-default-ipv6] peer 20::1 enable

[CE2-bgp-default-ipv6] import-route direct

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

Verifying the configuration

# Verify that the CEs can learn each other's interface routes and can ping each other. (Details not shown.)

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 11:11

 vpn-target 1:1 2:2 import-extcommunity

 vpn-target 1:1 export-extcommunity

#

isis 1

 network-entity 10.0000.0000.0000.0001.00

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 30::1/64

#

interface Ten-GigabitEthernet3/0/5

 ip address 1.1.1.2 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 3.3.3.9 as-number 100

 peer 3.3.3.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 3.3.3.9 enable

 #

 ip vpn-instance vpn1

  peer 30::2 as-number 65001

  #

  address-family ipv6 unicast

   peer 30::2 enable

#

return

·     ASBR-PE 1:

#

 sysname ASBR-PE1

#

isis 1

 network-entity 10.0000.0000.0000.0002.00

#

 mpls lsr-id 3.3.3.9

#

mpls ldp

#

interface LoopBack0

 ip address 3.3.3.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/4

 ip address 11.0.0.2 255.0.0.0

 mpls enable

#

interface Ten-GigabitEthernet3/0/5

 ip address 1.1.1.1 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 peer 11.0.0.1 as-number 600

 peer 11.0.0.1 connect-interface Ten-GigabitEthernet3/0/4

 #

 address-family vpnv6

  undo policy vpn-target

  peer 2.2.2.9 enable

  peer 11.0.0.1 enable

#

return

·     ASBR-PE 2:

#

 sysname ASBR-PE2

#

isis 1

 network-entity 10.0000.0000.0000.0003.00

#

 mpls lsr-id 4.4.4.9

#

mpls ldp

#

interface LoopBack0

 ip address 4.4.4.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/4

 ip address 11.0.0.1 255.0.0.0

 mpls enable

#

interface Ten-GigabitEthernet3/0/5

 ip address 9.1.1.1 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 600

 peer 5.5.5.9 as-number 600

 peer 5.5.5.9 connect-interface LoopBack0

 peer 11.0.0.2 as-number 100

 peer 11.0.0.2 connect-interface Ten-GigabitEthernet3/0/4

 #

 address-family vpnv6

  undo policy vpn-target

  peer 5.5.5.9 enable

  peer 11.0.0.2 enable

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 12:12

 vpn-target 1:1 2:2 import-extcommunity

 vpn-target 2:2 export-extcommunity

#

isis 1

 network-entity 10.0000.0000.0000.0004.00

#

 mpls lsr-id 5.5.5.9

#

mpls ldp

#

interface LoopBack0

 ip address 5.5.5.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 20::1/64

#

interface Ten-GigabitEthernet3/0/5

 ip address 9.1.1.2 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 600

 peer 4.4.4.9 as-number 600

 peer 4.4.4.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 4.4.4.9 enable

 #

 ip vpn-instance vpn1

  peer 20::2 as-number 65002

  #

  address-family ipv6 unicast

   peer 20::2 enable

#

return

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 30::2/64

#

bgp 65001

 router-id 6.6.6.6

 peer 30::1 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 30::1 enable

#

return

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 20::2/64

#

bgp 65002

 router-id 7.7.7.7

 peer 20::1 as-number 600

 #

 address-family ipv6 unicast

  import-route direct

  peer 20::1 enable

#

returns

Example: Configuring IPv6 MPLS L3VPN inter-AS option C (method 1)

Network configuration

Site 1 and Site 2 belong to the same VPN. Site 1 accesses the network through PE 1 in AS 100. Site 2 accesses the network through PE 2 in AS 600. PEs in the same AS run IS-IS.

PE 1 and ASBR-PE 1 exchange labeled IPv4 routes by IBGP. PE 2 and ASBR-PE 2 exchange labeled IPv4 routes by IBGP. PE 1 and PE 2 are MP-EBGP peers to exchange VPNv6 routes.

ASBR-PE 1 and ASBR-PE 2 use their respective routing policies and label the routes received from each other.

ASBR-PE 1 and ASBR-PE 2 use EBGP to exchange labeled IPv4 routes.

Figure 6 Network diagram

 

Table 11 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface4

Ten-GigabitEthernet3/0/4

Interface5

Ten-GigabitEthernet3/0/5

 

Table 12 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

PE 1

Loop0

2.2.2.9/32

PE 2

Loop0

5.5.5.9/32

 

XGE3/0/1

2001::1/64

 

XGE3/0/1

2002::1/64

 

XGE3/0/5

1.1.1.2/8

 

XGE3/0/5

9.1.1.2/8

ASBR-PE 1

Loop0

3.3.3.9/32

ASBR-PE 2

Loop0

4.4.4.9/32

 

XGE3/0/5

1.1.1.1/8

 

XGE3/0/5

9.1.1.1/8

 

XGE3/0/4

11.0.0.2/8

 

XGE3/0/4

11.0.0.1/8

CE 1

XGE3/0/1

2001::2/64

CE 1

XGE3/0/1

2002::2/64

Procedure

1.     Configure CE 1:

# Configure an IPv6 address for Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001::2 64

[CE1-Ten-GigabitEthernet3/0/1] quit

# Establish an EBGP peer relationship with PE 1, and redistribute VPN routes.

[CE1] bgp 65001

[CE1-bgp-default] router-id 6.6.6.6

[CE1-bgp-default] peer 2001::1 as-number 100

[CE1-bgp-default] address-family ipv6 unicast

[CE1-bgp-default-ipv6] peer 2001::1 enable

[CE1-bgp-default-ipv6] import-route direct

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

2.     Configure PE 1:

# Configure IS-IS on PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] network-entity 10.0000.0000.0000.0001.00

[PE1-isis-1] quit

# Configure an LSR ID, and enable MPLS and LDP.

[PE1] mpls lsr-id 2.2.2.9

[PE1] mpls ldp

[PE1-ldp] quit

# Configure Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[PE1] interface ten-gigabitethernet 3/0/5

[PE1-Ten-GigabitEthernet3/0/5] ip address 1.1.1.2 255.0.0.0

[PE1-Ten-GigabitEthernet3/0/5] isis enable 1

[PE1-Ten-GigabitEthernet3/0/5] mpls enable

[PE1-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/5] quit

# Configure Loopback 0 and enable IS-IS on it.

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 2.2.2.9 32

[PE1-LoopBack0] isis enable 1

[PE1-LoopBack0] quit

# Create VPN instance vpn1, and configure the RD and route target attributes for it.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 11:11

[PE1-vpn-instance-vpn1] vpn-target 3:3 import-extcommunity

[PE1-vpn-instance-vpn1] vpn-target 3:3 export-extcommunity

[PE1-vpn-instance-vpn1] quit

# Associate Ten-GigabitEthernet 3/0/1 with VPN instance vpn1, and specify the IPv6 address for the interface.

[PE1] interface ten-gigabitethernet 3/0/1

[PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001::1 64

[PE1-Ten-GigabitEthernet3/0/1] quit

# Enable BGP on PE 1.

[PE1] bgp 100

# Enable the capability to advertise labeled routes to and receive labeled routes from IBGP peer 3.3.3.9.

[PE1-bgp-default] peer 3.3.3.9 as-number 100

[PE1-bgp-default] peer 3.3.3.9 connect-interface loopback 0

[PE1-bgp-default] address-family ipv4 unicast

[PE1-bgp-default-ipv4] peer 3.3.3.9 enable

[PE1-bgp-default-ipv4] peer 3.3.3.9 label-route-capability

[PE1-bgp-default-ipv4] quit

# Configure the maximum hop count from PE 1 to EBGP peer 5.5.5.9 as 10.

[PE1-bgp-default] peer 5.5.5.9 as-number 600

[PE1-bgp-default] peer 5.5.5.9 connect-interface loopback 0

[PE1-bgp-default] peer 5.5.5.9 ebgp-max-hop 10

# Configure peer 5.5.5.9 as a VPNv6 peer.

[PE1-bgp-default] address-family vpnv6

[PE1-bgp-default-af-vpnv6] peer 5.5.5.9 enable

[PE1-bgp-default-af-vpnv6] quit

# Establish an EBGP peer relationship with CE 1, and add the learned BGP routes to the routing table of VPN instance vpn1.

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] peer 2001::2 as-number 65001

[PE1-bgp-default-vpn1] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn1] peer 2001::2 enable

[PE1-bgp-default-ipv6-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

3.     Configure ASBR-PE 1:

# Enable IS-IS on ASBR-PE 1.

<Sysname> system-view

[Sysname] sysname ASBR-PE1

[ASBR-PE1] isis 1

[ASBR-PE1-isis-1] network-entity 10.0000.0000.0000.0002.00

[ASBR-PE1-isis-1] quit

# Configure an LSR ID, and enable MPLS and LDP.

[ASBR-PE1] mpls lsr-id 3.3.3.9

[ASBR-PE1] mpls ldp

[ASBR-PE1-ldp] quit

# Configure Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[ASBR-PE1] interface ten-gigabitethernet 3/0/5

[ASBR-PE1-Ten-GigabitEthernet3/0/5] ip address 1.1.1.1 255.0.0.0

[ASBR-PE1-Ten-GigabitEthernet3/0/5] isis enable 1

[ASBR-PE1-Ten-GigabitEthernet3/0/5] mpls enable

[ASBR-PE1-Ten-GigabitEthernet3/0/5] mpls ldp enable

[ASBR-PE1-Ten-GigabitEthernet3/0/5] quit

# Configure Ten-GigabitEthernet 3/0/4, and enable MPLS on it.

[ASBR-PE1] interface ten-gigabitethernet 3/0/4

[ASBR-PE1-Ten-GigabitEthernet3/0/4] ip address 11.0.0.2 255.0.0.0

[ASBR-PE1-Ten-GigabitEthernet3/0/4] mpls enable

[ASBR-PE1-Ten-GigabitEthernet3/0/4] quit

# Configure Loopback 0, and enable IS-IS on it.

[ASBR-PE1] interface loopback 0

[ASBR-PE1-LoopBack0] ip address 3.3.3.9 32

[ASBR-PE1-LoopBack0] isis enable 1

[ASBR-PE1-LoopBack0] quit

# Create routing policies.

[ASBR-PE1] route-policy policy1 permit node 1

[ASBR-PE1-route-policy-policy1-1] apply mpls-label

[ASBR-PE1-route-policy-policy1-1] quit

[ASBR-PE1] route-policy policy2 permit node 1

[ASBR-PE1-route-policy-policy2-1] if-match mpls-label

[ASBR-PE1-route-policy-policy2-1] apply mpls-label

[ASBR-PE1-route-policy-policy2-1] quit

# Enable BGP on ASBR-PE 1, and apply routing policy policy2 to routes advertised to IBGP peer 2.2.2.9.

[ASBR-PE1] bgp 100

[ASBR-PE1-bgp-default] peer 2.2.2.9 as-number 100

[ASBR-PE1-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[ASBR-PE1-bgp-default] address-family ipv4 unicast

[ASBR-PE1-bgp-default-ipv4] peer 2.2.2.9 enable

[ASBR-PE1-bgp-default-ipv4] peer 2.2.2.9 route-policy policy2 export

# Enable the capability to advertise labeled routes to and receive labeled routes from IBGP peer 2.2.2.9.

[ASBR-PE1-bgp-default-ipv4] peer 2.2.2.9 label-route-capability

# Redistribute routes from IS-IS process 1

[ASBR-PE1-bgp-default-ipv4] import-route isis 1

[ASBR-PE1-bgp-default-ipv4] quit

# Apply routing policy policy1 to routes advertised to EBGP peer 11.0.0.1.

[ASBR-PE1-bgp-default] peer 11.0.0.1 as-number 600

[ASBR-PE1-bgp-default] address-family ipv4 unicast

[ASBR-PE1-bgp-default-ipv4] peer 11.0.0.1 enable

[ASBR-PE1-bgp-default-ipv4] peer 11.0.0.1 route-policy policy1 export

# Enable the capability to advertise labeled routes to and receive labeled routes from EBGP peer 11.0.0.1.

[ASBR-PE1-bgp-default-ipv4] peer 11.0.0.1 label-route-capability

[ASBR-PE1-bgp-default-ipv4] quit

[ASBR-PE1-bgp-default] quit

4.     Configure ASBR-PE 2:

# Enable IS-IS on ASBR-PE 2.

<Sysname> system-view

[Sysname] sysname ASBR-PE2

[ASBR-PE2] isis 1

[ASBR-PE2-isis-1] network-entity 10.0000.0000.0000.0003.00

[ASBR-PE2-isis-1] quit

# Configure an LSR ID, and enable MPLS and LDP.

[ASBR-PE2] mpls lsr-id 4.4.4.9

[ASBR-PE2] mpls ldp

[ASBR-PE2-ldp] quit

# Configure Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[ASBR-PE2] interface ten-gigabitethernet 3/0/5

[ASBR-PE2-Ten-GigabitEthernet3/0/5] ip address 9.1.1.1 255.0.0.0

[ASBR-PE2-Ten-GigabitEthernet3/0/5] isis enable 1

[ASBR-PE2-Ten-GigabitEthernet3/0/5] mpls enable

[ASBR-PE2-Ten-GigabitEthernet3/0/5] mpls ldp enable

[ASBR-PE2-Ten-GigabitEthernet3/0/5] quit

# Configure Loopback 0, and enable IS-IS on it.

[ASBR-PE2] interface loopback 0

[ASBR-PE2-LoopBack0] ip address 4.4.4.9 32

[ASBR-PE2-LoopBack0] isis enable 1

[ASBR-PE2-LoopBack0] quit

# Configure Ten-GigabitEthernet 3/0/4, and enable MPLS on it.

[ASBR-PE2] interface ten-gigabitethernet 3/0/4

[ASBR-PE2-Ten-GigabitEthernet3/0/4] ip address 11.0.0.1 255.0.0.0

[ASBR-PE2-Ten-GigabitEthernet3/0/4] mpls enable

[ASBR-PE2-Ten-GigabitEthernet3/0/4] quit

# Create routing policies.

[ASBR-PE2] route-policy policy1 permit node 1

[ASBR-PE2-route-policy-policy1-1] apply mpls-label

[ASBR-PE2-route-policy-policy1-1] quit

[ASBR-PE2] route-policy policy2 permit node 1

[ASBR-PE2-route-policy-policy2-1] if-match mpls-label

[ASBR-PE2-route-policy-policy2-1] apply mpls-label

[ASBR-PE2-route-policy-policy2-1] quit

# Enable BGP on ASBR-PE 2, and enable the capability to advertise labeled routes to and receive labeled routes from IBGP peer 5.5.5.9.

[ASBR-PE2] bgp 600

[ASBR-PE2-bgp-default] peer 5.5.5.9 as-number 600

[ASBR-PE2-bgp-default] peer 5.5.5.9 connect-interface loopback 0

[ASBR-PE2-bgp-default] address-family ipv4 unicast

[ASBR-PE2-bgp-default-ipv4] peer 5.5.5.9 enable

[ASBR-PE2-bgp-default-ipv4] peer 5.5.5.9 label-route-capability

# Apply routing policy policy2 to routes advertised to IBGP peer 5.5.5.9.

[ASBR-PE2-bgp-default-ipv4] peer 5.5.5.9 route-policy policy2 export

# Redistribute routes from IS-IS process 1.

[ASBR-PE2-bgp-default-ipv4] import-route isis 1

[ASBR-PE2-bgp-default-ipv4] quit

# Apply routing policy policy1 to routes advertised to EBGP peer 11.0.0.2.

[ASBR-PE2-bgp-default] peer 11.0.0.2 as-number 100

[ASBR-PE2-bgp-default] address-family ipv4 unicast

[ASBR-PE2-bgp-default-ipv4] peer 11.0.0.2 enable

[ASBR-PE2-bgp-default-ipv4] peer 11.0.0.2 route-policy policy1 export

# Enable the capability to advertise labeled routes to and receive labeled routes from EBGP peer 11.0.0.2.

[ASBR-PE2-bgp-default-ipv4] peer 11.0.0.2 label-route-capability

[ASBR-PE2-bgp-default-ipv4] quit

[ASBR-PE2-bgp-default] quit

5.     Configure PE 2:

# Enable IS-IS on PE 2.

<Sysname> system-view

[Sysname] sysname PE2[PE2] isis 1

[PE2-isis-1] network-entity 10.0000.0000.0000.0004.00

[PE2-isis-1] quit

# Configure an LSR ID, and enable MPLS and LDP.

[PE2] mpls lsr-id 5.5.5.9

[PE2] mpls ldp

[PE2-ldp] quit

# Configure Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[PE2] interface ten-gigabitethernet 3/0/5

[PE2-Ten-GigabitEthernet3/0/5] ip address 9.1.1.2 255.0.0.0

[PE2-Ten-GigabitEthernet3/0/5] isis enable 1

[PE2-Ten-GigabitEthernet3/0/5] mpls enable

[PE2-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/5] quit

# Configure Loopback 0, and enable IS-IS on it.

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 5.5.5.9 32

[PE2-LoopBack0] isis enable 1

[PE2-LoopBack0] quit

# Create VPN instance vpn1, and configure the RD and route target attributes for it.

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 11:11

[PE2-vpn-instance-vpn1] vpn-target 3:3 import-extcommunity

[PE2-vpn-instance-vpn1] vpn-target 3:3 export-extcommunity

[PE2-vpn-instance-vpn1] quit

# Associate Ten-GigabitEthernet 3/0/1 with VPN instance vpn1, and specify the IPv6 address for the interface.

[PE2] interface ten-gigabitethernet 3/0/1

[PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/1] ipv6 address 2002::1 64

[PE2-Ten-GigabitEthernet3/0/1] quit

# Enable BGP.

[PE2] bgp 600

# Enable the capability to advertise labeled routes to and receive labeled routes from IBGP peer 4.4.4.9.

[PE2-bgp-default] peer 4.4.4.9 as-number 600

[PE2-bgp-default] peer 4.4.4.9 connect-interface loopback 0

[PE2-bgp-default] address-family ipv4 unicast

[PE2-bgp-default-ipv4] peer 4.4.4.9 enable

[PE2-bgp-default-ipv4] peer 4.4.4.9 label-route-capability

[PE2-bgp-default-ipv4] quit

# Configure the maximum hop count from PE 2 to EBGP peer 2.2.2.9 as 10.

[PE2-bgp-default] peer 2.2.2.9 as-number 100

[PE2-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[PE2-bgp-default] peer 2.2.2.9 ebgp-max-hop 10

# Configure peer 2.2.2.9 as a VPNv6 peer.

[PE2-bgp-default] address-family vpnv6

[PE2-bgp-default-af-vpnv6] peer 2.2.2.9 enable

[PE2-bgp-default-af-vpnv6] quit

# Establish an EBGP peer relationship with CE 2, and add the learned BGP routes to the routing table of VPN instance vpn1.

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] peer 2002::2 as-number 65002

[PE2-bgp-default-vpn1] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn1] peer 2002::2 enable

[PE2-bgp-default-ipv6-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

6.     Configure CE 2:

# Configure an IPv6 address for Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 2002::2 64

[CE2-Ten-GigabitEthernet3/0/1] quit

# Establish an EBGP peer relationship with PE 2, and redistribute VPN routes.

[CE2] bgp 65002

[CE2-bgp-default] router-id 7.7.7.7

[CE2-bgp-default] peer 2002::1 as-number 600

[CE2-bgp-default] address-family ipv6 unicast

[CE2-bgp-default-ipv6] peer 2002::1 enable

[CE2-bgp-default-ipv6] import-route direct

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

 Verifying the configuration

# Execute the display ipv6 routing table command on CE 1 and CE 2 to verify that CE 1 and CE 2 have a route to each other. Verify that CE 1 and CE 2 can ping each other. (Details not shown.)

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 11:11

 vpn-target 3:3 import-extcommunity

 vpn-target 3:3 export-extcommunity

#

isis 1

 network-entity 10.0000.0000.0000.0001.00

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001::1/64

#

interface Ten-GigabitEthernet3/0/5

 ip address 1.1.1.2 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 3.3.3.9 as-number 100

 peer 3.3.3.9 connect-interface LoopBack0

 peer 5.5.5.9 as-number 600

 peer 5.5.5.9 connect-interface LoopBack0

 peer 5.5.5.9 ebgp-max-hop 10

 #

 address-family ipv4 unicast

  peer 3.3.3.9 enable

  peer 3.3.3.9 label-route-capability

 #

 address-family vpnv6

  peer 5.5.5.9 enable

 #

 ip vpn-instance vpn1

  peer 2001::2 as-number 65001

  #

  address-family ipv6 unicast

   peer 2001::2 enable

#

return

·     ASBR-PE 1:

#

 sysname ASBR-PE1

#

isis 1

 network-entity 10.0000.0000.0000.0002.00

#

 mpls lsr-id 3.3.3.9

#

mpls ldp

#

interface LoopBack0

 ip address 3.3.3.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/4

 ip address 11.0.0.2 255.0.0.0

 mpls enable

#

interface Ten-GigabitEthernet3/0/5

 ip address 1.1.1.1 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 peer 11.0.0.1 as-number 600

 #

 address-family ipv4 unicast

  import-route isis 1

  peer 2.2.2.9 enable

  peer 2.2.2.9 route-policy policy2 export

  peer 2.2.2.9 label-route-capability

  peer 11.0.0.1 enable

  peer 11.0.0.1 route-policy policy1 export

  peer 11.0.0.1 label-route-capability

#

route-policy policy1 permit node 1

 apply mpls-label

#

route-policy policy2 permit node 1

 if-match mpls-label

 apply mpls-label

#

return

·     ASBR-PE 2:

#

 sysname ASBR-PE2

#

isis 1

 network-entity 10.0000.0000.0000.0003.00

#

 mpls lsr-id 4.4.4.9

#

mpls ldp

#

interface LoopBack0

 ip address 4.4.4.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/4

 ip address 11.0.0.1 255.0.0.0

 mpls enable

#

interface Ten-GigabitEthernet3/0/5

 ip address 9.1.1.1 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 600

 peer 5.5.5.9 as-number 600

 peer 5.5.5.9 connect-interface LoopBack0

 peer 11.0.0.2 as-number 100

 #

 address-family ipv4 unicast

  import-route isis 1

  peer 5.5.5.9 enable

  peer 5.5.5.9 route-policy policy2 export

  peer 5.5.5.9 label-route-capability

  peer 11.0.0.2 enable

  peer 11.0.0.2 route-policy policy1 export

  peer 11.0.0.2 label-route-capability

#

route-policy policy1 permit node 1

 apply mpls-label

#

route-policy policy2 permit node 1

 if-match mpls-label

 apply mpls-label

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 11:11

 vpn-target 3:3 import-extcommunity

 vpn-target 3:3 export-extcommunity

#

isis 1

 network-entity 10.0000.0000.0000.0004.00

#

 mpls lsr-id 5.5.5.9

#

mpls ldp

#

interface LoopBack0

 ip address 5.5.5.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2002::1/64

#

interface Ten-GigabitEthernet3/0/5

 ip address 9.1.1.2 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 600

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 peer 2.2.2.9 ebgp-max-hop 10

 peer 4.4.4.9 as-number 600

 peer 4.4.4.9 connect-interface LoopBack0

 #

 address-family ipv4 unicast

  peer 4.4.4.9 enable

  peer 4.4.4.9 label-route-capability

 #

 address-family vpnv6

  peer 2.2.2.9 enable

 #

 ip vpn-instance vpn1

  peer 2002::2 as-number 65002

  #

  address-family ipv6 unicast

   peer 2002::2 enable

#

return

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001::2/64

#

bgp 65001

 router-id 6.6.6.6

 peer 2001::1 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001::1 enable

#

return

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2002::2/64

#

bgp 65002

 router-id 7.7.7.7

 peer 2002::1 as-number 600

 #

 address-family ipv6 unicast

  import-route direct

  peer 2002::1 enable

#

return

Example: Configuring IPv6 MPLS L3VPN inter-AS option C (method 2)

Network configuration

Site 1 and Site 2 belong to the same VPN. Site 1 accesses the network through PE 1 in AS 100, and Site 2 accesses the network through PE 2 in AS 600. PEs in the same AS run IS-IS.

PE 1 and PE 2 are MP-EBGP peers and exchange VPNv6 routes.

ASBR-PE 1 and ASBR-PE 2 label the routes received from each other, use EBGP to exchange labeled IPv4 routes, and redistribute IGP and BGP routes from each other.

Figure 7 Network diagram

 

Table 13 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface4

Ten-GigabitEthernet3/0/4

Interface5

Ten-GigabitEthernet3/0/5

 

Table 14 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

PE 1

Loop0

2.2.2.9/32

PE 2

Loop0

5.5.5.9/32

 

XGE3/0/1

2001::1/64

 

XGE3/0/1

2002::1/64

 

XGE3/0/5

1.1.1.2/8

 

XGE3/0/5

9.1.1.2/8

ASBR-PE 1

Loop0

3.3.3.9/32

ASBR-PE 2

Loop0

4.4.4.9/32

 

XGE3/0/5

1.1.1.1/8

 

XGE3/0/5

9.1.1.1/8

 

XGE3/0/4

11.0.0.2/8

 

XGE3/0/4

11.0.0.1/8

CE 1

XGE3/0/1

2001::2/64

CE 1

XGE3/0/1

2002::2/64

Procedure

1.     Configure CE 1:

# Configure an IPv6 address for Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001::2 64

[CE1-Ten-GigabitEthernet3/0/1] quit

# Establish an EBGP peer relationship with PE 1, and redistribute VPN routes.

[CE1] bgp 65001

[CE1-bgp-default] router-id 6.6.6.6

[CE1-bgp-default] peer 2001::1 as-number 100

[CE1-bgp-default] address-family ipv6 unicast

[CE1-bgp-default-ipv6] peer 2001::1 enable

[CE1-bgp-default-ipv6] import-route direct

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

2.     Configure PE 1:

# Configure IS-IS on PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] network-entity 10.0000.0000.0000.0001.00

[PE1-isis-1] quit

# Configure an LSR ID, and enable MPLS and LDP.

[PE1] mpls lsr-id 2.2.2.9

[PE1] mpls ldp

[PE1-ldp] quit

# Configure Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[PE1] interface ten-gigabitethernet 3/0/5

[PE1-Ten-GigabitEthernet3/0/5] ip address 1.1.1.2 255.0.0.0

[PE1-Ten-GigabitEthernet3/0/5] isis enable 1

[PE1-Ten-GigabitEthernet3/0/5] mpls enable

[PE1-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/5] quit

# Configure interface Loopback 0 and enable IS-IS on it.

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 2.2.2.9 32

[PE1-LoopBack0] isis enable 1

[PE1-LoopBack0] quit

# Create VPN instance vpn1, and configure the RD and route target attributes.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 11:11

[PE1-vpn-instance-vpn1] vpn-target 3:3 import-extcommunity

[PE1-vpn-instance-vpn1] vpn-target 3:3 export-extcommunity

[PE1-vpn-instance-vpn1] quit

# Associate Ten-GigabitEthernet 3/0/1 with VPN instance vpn1, and specify an IPv6 address for the interface.

[PE1] interface ten-gigabitethernet 3/0/1

[PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001::1 64

[PE1-Ten-GigabitEthernet3/0/1] quit

# Enable BGP on PE 1.

[PE1] bgp 100

# Configure the maximum hop count from PE 1 to EBGP peer 5.5.5.9 as 10.

[PE1-bgp-default] peer 5.5.5.9 as-number 600

[PE1-bgp-default] peer 5.5.5.9 connect-interface loopback 0

[PE1-bgp-default] peer 5.5.5.9 ebgp-max-hop 10

# Configure peer 5.5.5.9 as a VPNv6 peer.

[PE1-bgp-default] address-family vpnv6

[PE1-bgp-default-vpnv6] peer 5.5.5.9 enable

[PE1-bgp-default-vpnv6] quit

# Establish an EBGP peer relationship with CE 1, and add the learned BGP routes to the routing table of VPN instance vpn1.

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] peer 2001::2 as-number 65001

[PE1-bgp-default-vpn1] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn1] peer 2001::2 enable

[PE1-bgp-default-ipv6-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

3.     Configure ASBR-PE 1:

# Enable IS-IS on ASBR-PE 1.

<Sysname> system-view

[Sysname] sysname ASBR-PE1

[ASBR-PE1] isis 1

[ASBR-PE1-isis-1] network-entity 10.0000.0000.0000.0002.00

# Redistribute BGP routes.

[ASBR-PE1-isis-1] address-family ipv4 unicast

[ASBR-PE1-isis-1-ipv4] import-route bgp

[ASBR-PE1-isis-1-ipv4] quit

[ASBR-PE1-isis-1] quit

# Configure an LSR ID, and enable MPLS and LDP.

[ASBR-PE1] mpls lsr-id 3.3.3.9

[ASBR-PE1] mpls ldp

[ASBR-PE1-ldp] quit

# Configure Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[ASBR-PE1] interface ten-gigabitethernet 3/0/5

[ASBR-PE1-Ten-GigabitEthernet3/0/5] ip address 1.1.1.1 255.0.0.0

[ASBR-PE1-Ten-GigabitEthernet3/0/5] isis enable 1

[ASBR-PE1-Ten-GigabitEthernet3/0/5] mpls enable

[ASBR-PE1-Ten-GigabitEthernet3/0/5] mpls ldp enable

[ASBR-PE1-Ten-GigabitEthernet3/0/5] quit

# Configure Ten-GigabitEthernet 3/0/4, and enable MPLS on it.

[ASBR-PE1] interface ten-gigabitethernet 3/0/4

[ASBR-PE1-Ten-GigabitEthernet3/0/4] ip address 11.0.0.2 255.0.0.0

[ASBR-PE1-Ten-GigabitEthernet3/0/4] mpls enable

[ASBR-PE1-Ten-GigabitEthernet3/0/4] quit

# Configure interface Loopback 0, and enable IS-IS on it.

[ASBR-PE1] interface loopback 0

[ASBR-PE1-LoopBack0] ip address 3.3.3.9 32

[ASBR-PE1-LoopBack0] isis enable 1

[ASBR-PE1-LoopBack0] quit

# Create routing policy policy1.

[ASBR-PE1] route-policy policy1 permit node 1

[ASBR-PE1-route-policy-policy1-1] apply mpls-label

[ASBR-PE1-route-policy-policy1-1] quit

# Enable BGP on ASBR-PE 1, and redistribute routes from IS-IS process 1.

[ASBR-PE1] bgp 100

[ASBR-PE1-bgp-default] address-family ipv4 unicast

[ASBR-PE1-bgp-default-ipv4] import-route isis 1

[ASBR-PE1-bgp-default-ipv4] quit

# Apply routing policy policy1 to routes advertised to EBGP peer 11.0.0.1.

[ASBR-PE1-bgp-default] peer 11.0.0.1 as-number 600

[ASBR-PE1-bgp-default] address-family ipv4 unicast

[ASBR-PE1-bgp-default-ipv4] peer 11.0.0.1 enable

[ASBR-PE1-bgp-default-ipv4] peer 11.0.0.1 route-policy policy1 export

# Enable the capability to advertise labeled routes to and receive labeled routes from EBGP peer 11.0.0.1.

[ASBR-PE1-bgp-default-ipv4] peer 11.0.0.1 label-route-capability

[ASBR-PE1-bgp-default-ipv4] quit

[ASBR-PE1-bgp-default] quit

4.     Configure ASBR-PE 2:

# Enable IS-IS on ASBR-PE 2.

<Sysname> system-view

[Sysname] sysname ASBR-PE2

[ASBR-PE2] isis 1

[ASBR-PE2-isis-1] network-entity 10.0000.0000.0000.0003.00

# Redistribute BGP routes.

[ASBR-PE2-isis-1] address-family ipv4 unicast

[ASBR-PE2-isis-1-ipv4] import-route bgp

[ASBR-PE2-isis-1-ipv4] quit

[ASBR-PE2-isis-1] quit

# Configure an LSR ID, and enable MPLS and LDP.

[ASBR-PE2] mpls lsr-id 4.4.4.9

[ASBR-PE2] mpls ldp

[ASBR-PE2-ldp] quit

# Configure Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[ASBR-PE2] interface ten-gigabitethernet 3/0/5

[ASBR-PE2-Ten-GigabitEthernet3/0/5] ip address 9.1.1.1 255.0.0.0

[ASBR-PE2-Ten-GigabitEthernet3/0/5] isis enable 1

[ASBR-PE2-Ten-GigabitEthernet3/0/5] mpls enable

[ASBR-PE2-Ten-GigabitEthernet3/0/5] mpls ldp enable

[ASBR-PE2-Ten-GigabitEthernet3/0/5] quit

# Configure interface Loopback 0, and enable IS-IS on it.

[ASBR-PE2] interface loopback 0

[ASBR-PE2-LoopBack0] ip address 4.4.4.9 32

[ASBR-PE2-LoopBack0] isis enable 1

[ASBR-PE2-LoopBack0] quit

# Configure Ten-GigabitEthernet 3/0/4, and enable MPLS on it.

[ASBR-PE2] interface ten-gigabitethernet 3/0/4

[ASBR-PE2-Ten-GigabitEthernet3/0/4] ip address 11.0.0.1 255.0.0.0

[ASBR-PE2-Ten-GigabitEthernet3/0/4] mpls enable

[ASBR-PE2-Ten-GigabitEthernet3/0/4] quit

# Create routing policy policy1.

[ASBR-PE1] route-policy policy1 permit node 1

[ASBR-PE1-route-policy-policy1-1] apply mpls-label

[ASBR-PE1-route-policy-policy1-1] quit

# Enable BGP on ASBR-PE 2, and redistribute routes from IS-IS process 1.

[ASBR-PE2] bgp 600

[ASBR-PE2-bgp-default] address-family ipv4 unicast

[ASBR-PE2-bgp-default-ipv4] import-route isis 1

[ASBR-PE2-bgp-default-ipv4] quit

# Apply routing policy policy1 to routes advertised to EBGP peer 11.0.0.2.

[ASBR-PE2-bgp-default] peer 11.0.0.2 as-number 100

[ASBR-PE2-bgp-default] address-family ipv4 unicast

[ASBR-PE2-bgp-default-ipv4] peer 11.0.0.2 enable

[ASBR-PE2-bgp-default-ipv4] peer 11.0.0.2 route-policy policy1 export

# Enable the capability to advertise labeled routes to and receive labeled routes from EBGP peer 11.0.0.2.

[ASBR-PE2-bgp-default-ipv4] peer 11.0.0.2 label-route-capability

[ASBR-PE2-bgp-default-ipv4] quit

[ASBR-PE2-bgp-default] quit

5.     Configure PE 2:

# Enable IS-IS on PE 2.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] network-entity 10.0000.0000.0000.0004.00

[PE2-isis-1] quit

# Configure an LSR ID, and enable MPLS and LDP.

[PE2] mpls lsr-id 5.5.5.9

[PE2] mpls ldp

[PE2-ldp] quit

# Configure Ten-GigabitEthernet 3/0/5, and enable IS-IS, MPLS, and LDP on the interface.

[PE2] interface ten-gigabitethernet 3/0/5

[PE2-Ten-GigabitEthernet3/0/5] ip address 9.1.1.2 255.0.0.0

[PE2-Ten-GigabitEthernet3/0/5] isis enable 1

[PE2-Ten-GigabitEthernet3/0/5] mpls enable

[PE2-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/5] quit

# Configure interface Loopback 0, and enable IS-IS on it.

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 5.5.5.9 32

[PE2-LoopBack0] isis enable 1

[PE2-LoopBack0] quit

# Create VPN instance vpn1, and configure the RD and route target attributes.

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 11:11

[PE2-vpn-instance-vpn1] vpn-target 3:3 import-extcommunity

[PE2-vpn-instance-vpn1] vpn-target 3:3 export-extcommunity

[PE2-vpn-instance-vpn1] quit

# Associate Ten-GigabitEthernet 3/0/1 with VPN instance vpn1, and specify an IPv6 address for the interface.

[PE2] interface ten-gigabitethernet 3/0/1

[PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/1] ipv6 address 2002::1 64

[PE2-Ten-GigabitEthernet3/0/1] quit

# Enable BGP on PE 2.

[PE2] bgp 600

# Configure the maximum hop count from PE 2 to EBGP peer 2.2.2.9 as 10.

[PE2-bgp-default] peer 2.2.2.9 as-number 100

[PE2-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[PE2-bgp-default] peer 2.2.2.9 ebgp-max-hop 10

# Configure peer 2.2.2.9 as a VPNv6 peer.

[PE2-bgp-default] address-family vpnv6

[PE2-bgp-default-vpnv6] peer 2.2.2.9 enable

[PE2-bgp-default-vpnv6] quit

# Establish an EBGP peer relationship with CE 2, and add the learned BGP routes to the routing table of VPN instance vpn1.

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] peer 2002::2 as-number 65002

[PE2-bgp-default-vpn1] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn1] peer 2002::2 enable

[PE2-bgp-default-ipv6-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

6.     Configure CE 2:

# Configure an IPv6 address for Ten-GigabitEthernet 3/0/1.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 2002::2 64

[CE2-Ten-GigabitEthernet3/0/1] quit

# Establish an EBGP peer relationship with PE 2, and redistribute VPN routes.

[CE2] bgp 65002

[CE2-bgp-default] router-id 7.7.7.7

[CE2-bgp-default] peer 2002::1 as-number 600

[CE2-bgp-default] address-family ipv6 unicast

[CE2-bgp-default-ipv6] peer 2002::1 enable

[CE2-bgp-default-ipv6] import-route direct

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

Verifying the configuration

# Execute the display ipv6 routing table command on CE 1 and CE 2 to verify that CE 1 and CE 2 have a route to each other. Verify that CE 1 and CE 2 can ping each other. (Details not shown.)

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 11:11

 vpn-target 3:3 import-extcommunity

 vpn-target 3:3 export-extcommunity

#

isis 1

 network-entity 10.0000.0000.0000.0001.00

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001::1/64

#

interface Ten-GigabitEthernet3/0/5

 ip address 1.1.1.2 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

#

bgp 100

 peer 5.5.5.9 as-number 600

 peer 5.5.5.9 connect-interface LoopBack0

 peer 5.5.5.9 ebgp-max-hop 10

 #

 address-family vpnv6

  peer 5.5.5.9 enable

 #

 ip vpn-instance vpn1

  peer 2001::2 as-number 65001

  #

  address-family ipv6 unicast

   peer 2001::2 enable

#

return

·     ASBR-PE 1:

#

 sysname ASBR-PE1

#

isis 1

 network-entity 10.0000.0000.0000.0002.00

 #

 address-family ipv4 unicast

  import-route bgp

#

 mpls lsr-id 3.3.3.9

#

mpls ldp

#

interface LoopBack0

 ip address 3.3.3.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/4

 ip address 11.0.0.2 255.0.0.0

 mpls enable

#

interface Ten-GigabitEthernet3/0/5

 ip address 1.1.1.1 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 11.0.0.1 as-number 600

 #

 address-family ipv4 unicast

  import-route isis 1

  peer 11.0.0.1 enable

  peer 11.0.0.1 route-policy policy1 export

  peer 11.0.0.1 label-route-capability

#

route-policy policy1 permit node 1

 apply mpls-label

#

return

·     ASBR-PE 2:

#

 sysname ASBR-PE2

#

isis 1

 network-entity 10.0000.0000.0000.0003.00

 #

 address-family ipv4 unicast

  import-route bgp

#

 mpls lsr-id 4.4.4.9

#

mpls ldp

#

interface LoopBack0

 ip address 4.4.4.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/4

 ip address 11.0.0.1 255.0.0.0

 mpls enable

#

interface Ten-GigabitEthernet3/0/5

 ip address 9.1.1.1 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 600

 peer 11.0.0.2 as-number 100

 #

 address-family ipv4 unicast

  import-route isis 1

  peer 11.0.0.2 enable

  peer 11.0.0.2 route-policy policy1 export

  peer 11.0.0.2 label-route-capability

#

route-policy policy1 permit node 1

 apply mpls-label

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 11:11

 vpn-target 3:3 import-extcommunity

 vpn-target 3:3 export-extcommunity

#

isis 1

 network-entity 10.0000.0000.0000.0004.00

#

 mpls lsr-id 5.5.5.9

#

mpls ldp

#

interface LoopBack0

 ip address 5.5.5.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2002::1/64

#

interface Ten-GigabitEthernet3/0/5

 ip address 9.1.1.2 255.0.0.0

 isis enable 1

 mpls enable

 mpls ldp enable

#

bgp 600

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 peer 2.2.2.9 ebgp-max-hop 10

 #

 address-family vpnv6

  peer 2.2.2.9 enable

 #

 ip vpn-instance vpn1

  peer 2002::2 as-number 65002

  #

  address-family ipv6 unicast

   peer 2002::2 enable

#

return

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001::2/64

#

bgp 65001

 router-id 6.6.6.6

 peer 2001::1 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001::1 enable

#

return

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2002::2/64

#

bgp 65002

 router-id 7.7.7.7

 peer 2002::1 as-number 600

 #

 address-family ipv6 unicast

  import-route direct

  peer 2002::1 enable

#

return

Example: Configuring IPv6 MPLS L3VPN carrier's carrier in the same AS

Network configuration

Configure carrier's carrier for the scenario shown in Figure 8. In this scenario:

·     PE 1 and PE 2 are the provider carrier's PE routers. They provide VPN services to the customer carrier.

·     CE 1 and CE 2 are the customer carrier's routers. They are connected to the provider carrier's backbone as CE routers.

·     PE 3 and PE 4 are the customer carrier's PE routers. They provide IPv6 MPLS L3VPN services to end customers.

·     CE 3 and CE 4 are customers of the customer carrier.

·     The customer carrier and the provider carrier reside in the same AS.

The key to the carrier's carrier deployment is to configure exchange of two kinds of routes:

·     Exchange of the customer carrier's internal routes on the provider carrier's backbone.

·     Exchange of the end customers' internal routes between PE 3 and PE 4, the PEs of the customer carrier. In this process, an MP-IBGP peer relationship must be established between PE 3 and PE 4.

Figure 8 Network diagram

 

Table 15 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface4

Ten-GigabitEthernet3/0/4

Interface5

Ten-GigabitEthernet3/0/5

 

Table 16 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 3

XGE3/0/1

2001:1::1/96

CE 4

XGE3/0/1

2001:2::1/96

PE 3

Loop0

1.1.1.9/32

PE 4

Loop0

6.6.6.9/32

 

XGE3/0/1

2001:1::2/96

 

XGE3/0/1

2001:2::2/96

 

XGE3/0/5

10.1.1.1/24

 

XGE3/0/5

20.1.1.2/24

CE 1

Loop0

2.2.2.9/32

CE 2

Loop0

5.5.5.9/32

 

XGE3/0/4

10.1.1.2/24

 

XGE3/0/4

21.1.1.2/24

 

XGE3/0/5

11.1.1.1/24

 

XGE3/0/5

20.1.1.1/24

PE 1

Loop0

3.3.3.9/32

PE 2

Loop0

4.4.4.9/32

 

XGE3/0/4

11.1.1.2/24

 

XGE3/0/4

30.1.1.2/24

 

XGE3/0/5

30.1.1.1/24

 

XGE3/0/5

21.1.1.1/24

Procedure

1.     Configure MPLS L3VPN on the provider carrier backbone. Configure IS-IS as the IGP, enable LDP on PE 1 and PE 2, and establish an MP-IBGP peer relationship between the PEs:

# Configure PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 3.3.3.9 32

[PE1-LoopBack0] quit

[PE1] mpls lsr-id 3.3.3.9

[PE1] mpls ldp

[PE1-ldp] quit

[PE1] isis 1

[PE1-isis-1] network-entity 10.0000.0000.0000.0004.00

[PE1-isis-1] quit

[PE1] interface loopback 0

[PE1-LoopBack0] isis enable 1

[PE1-LoopBack0] quit

[PE1] interface ten-gigabitethernet 3/0/5

[PE1-Ten-GigabitEthernet3/0/5] ip address 30.1.1.1 24

[PE1-Ten-GigabitEthernet3/0/5] isis enable 1

[PE1-Ten-GigabitEthernet3/0/5] mpls enable

[PE1-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/5] mpls ldp transport-address interface

[PE1-Ten-GigabitEthernet3/0/5] quit

[PE1] bgp 100

[PE1-bgp-default] peer 4.4.4.9 as-number 100

[PE1-bgp-default] peer 4.4.4.9 connect-interface loopback 0

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 4.4.4.9 enable

[PE1-bgp-default-vpnv4] quit

[PE1-bgp-default] quit

# Configure PE 2.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 4.4.4.9 32

[PE2-LoopBack0] quit

[PE2] mpls lsr-id 4.4.4.9

[PE2] mpls ldp

[PE2-ldp] quit

[PE2] isis 1

[PE2-isis-1] network-entity 10.0000.0000.0000.0005.00

[PE2-isis-1] quit

[PE2] interface loopback 0

[PE2-LoopBack0] isis enable 1

[PE2-LoopBack0] quit

[PE2] interface ten-gigabitethernet 3/0/4

[PE2-Ten-GigabitEthernet3/0/4] ip address 30.1.1.2 24

[PE2-Ten-GigabitEthernet3/0/4] isis enable 1

[PE2-Ten-GigabitEthernet3/0/4] mpls enable

[PE2-Ten-GigabitEthernet3/0/4] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/4] mpls ldp transport-address interface

[PE2-Ten-GigabitEthernet3/0/4] quit

[PE2] bgp 100

[PE2-bgp-default] peer 3.3.3.9 as-number 100

[PE2-bgp-default] peer 3.3.3.9 connect-interface loopback 0

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 3.3.3.9 enable

[PE2-bgp-default-vpnv4] quit

[PE2-bgp-default] quit

# On PE 1 or PE 2, execute the following commands:

¡     Execute the display mpls ldp peer command to verify that an LDP session in Operational state has been established between PE 1 and PE 2. (Details not shown.)

¡     Execute the display bgp peer vpnv4 command to verify that a BGP peer relationship in Established state has been established between PE 1 and PE 2. (Details not shown.)

¡     Execute the display isis peer command to verify that the IS-IS neighbor relationship has been established between PE 1 and PE 2. (Details not shown.)

2.     Configure the customer carrier network. Configure IS-IS as the IGP, and enable LDP between PE 3 and CE 1, and between PE 4 and CE 2:

# Configure PE 3.

<Sysname> system-view

[Sysname] sysname PE3

[PE3] interface loopback 0

[PE3-LoopBack0] ip address 1.1.1.9 32

[PE3-LoopBack0] quit

[PE3] mpls lsr-id 1.1.1.9

[PE3] mpls ldp

[PE3-ldp] quit

[PE3] isis 2

[PE3-isis-2] network-entity 10.0000.0000.0000.0001.00

[PE3-isis-2] quit

[PE3] interface loopback 0

[PE3-LoopBack0] import-route isis 2

[PE3-LoopBack0] quit

[PE3] interface ten-gigabitethernet 3/0/5

[PE3-Ten-GigabitEthernet3/0/5] ip address 10.1.1.1 24

[PE3-Ten-GigabitEthernet3/0/5] isis enable 2

[PE3-Ten-GigabitEthernet3/0/5] mpls enable

[PE3-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE3-Ten-GigabitEthernet3/0/5] mpls ldp transport-address interface

[PE3-Ten-GigabitEthernet3/0/5] quit

# Configure CE 1.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface loopback 0

[CE1-LoopBack0] ip address 2.2.2.9 32

[CE1-LoopBack0] quit

[CE1] mpls lsr-id 2.2.2.9

[CE1] mpls ldp

[CE1-ldp] quit

[CE1] isis 2

[CE1-isis-2] network-entity 10.0000.0000.0000.0002.00

[CE1-isis-2] quit

[CE1] interface loopback 0

[CE1-LoopBack0] isis enable 2

[CE1-LoopBack0] quit

[CE1] interface ten-gigabitethernet 3/0/4

[CE1-Ten-GigabitEthernet3/0/4] ip address 10.1.1.2 24

[CE1-Ten-GigabitEthernet3/0/4] isis enable 2

[CE1-Ten-GigabitEthernet3/0/4] mpls enable

[CE1-Ten-GigabitEthernet3/0/4] mpls ldp enable

[CE1-Ten-GigabitEthernet3/0/4] mpls ldp transport-address interface

[CE1-Ten-GigabitEthernet3/0/4] quit

# Configure PE 4.

<Sysname> system-view

[Sysname] sysname PE4

[PE4] interface loopback 0

[PE4-LoopBack0] ip address 6.6.6.9 32

[PE4-LoopBack0] quit

[PE4] mpls lsr-id 6.6.6.9

[PE4] mpls ldp

[PE4-ldp] quit

[PE4] isis 2

[PE4-isis-2] network-entity 10.0000.0000.0000.0003.00

[PE4-isis-2] quit

[PE4] interface loopback 0

[PE4-LoopBack0] isis enable 2

[PE4-LoopBack0] quit

[PE4] interface ten-gigabitethernet 3/0/5

[PE4-Ten-GigabitEthernet3/0/5] ip address 20.1.1.2 24

[PE4-Ten-GigabitEthernet3/0/5] isis enable 2

[PE4-Ten-GigabitEthernet3/0/5] mpls enable

[PE4-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE4-Ten-GigabitEthernet3/0/5] mpls ldp transport-address interface

[PE4-Ten-GigabitEthernet3/0/5] quit

# Configure CE 2.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface loopback 0

[CE2-LoopBack0] ip address 5.5.5.9 32

[CE2-LoopBack0] quit

[CE2] mpls lsr-id 5.5.5.9

[CE2] mpls ldp

[CE2-ldp] quit

[CE2] isis 2

[CE2-isis-2] network-entity 10.0000.0000.0000.0004.00

[CE2-isis-2] quit

[CE2] interface loopback 0

[CE2-LoopBack0] isis enable 2

[CE2-LoopBack0] quit

[CE2] interface ten-gigabitethernet 3/0/5

[CE2-Ten-GigabitEthernet3/0/5] ip address 20.1.1.1 24

[CE2-Ten-GigabitEthernet3/0/5] isis enable 2

[CE2-Ten-GigabitEthernet3/0/5] mpls enable

[CE2-Ten-GigabitEthernet3/0/5] mpls ldp enable

[CE2-Ten-GigabitEthernet3/0/5] mpls ldp transport-address interface

[CE2-Ten-GigabitEthernet3/0/5] quit

PE 3 and CE 1 can establish an LDP session and IS-IS neighbor relationship between them. PE 4 and CE 2 can establish an LDP session and IS-IS neighbor relationship between them.

3.     Connect the customer carrier and the provider carrier:

# Configure PE 1.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 200:1

[PE1-vpn-instance-vpn1] vpn-target 1:1

[PE1-vpn-instance-vpn1] quit

[PE1] mpls ldp

[PE1-ldp] vpn-instance vpn1

[PE1-ldp-vpn-instance-vpn1] quit

[PE1-ldp] quit

[PE1] isis 2 vpn-instance vpn1

[PE1-isis-2] network-entity 10.0000.0000.0000.0003.00

[PE1-isis-2] address-family ipv4

[PE1-isis-2-ipv4] import-route bgp allow-ibgp

[PE1-isis-2-ipv4] quit

[PE1-isis-2] quit

[PE1] interface ten-gigabitethernet 3/0/4

[PE1-Ten-GigabitEthernet3/0/4] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/4] ip address 11.1.1.2 24

[PE1-Ten-GigabitEthernet3/0/4] isis enable 2

[PE1-Ten-GigabitEthernet3/0/4] mpls enable

[PE1-Ten-GigabitEthernet3/0/4] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/4] mpls ldp transport-address interface

[PE1-Ten-GigabitEthernet3/0/4] quit

[PE1] bgp 100

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] address-family ipv4 unicast

[PE1-bgp-default-ipv4-vpn1] import-route isis 2

[PE1-bgp-default-ipv4-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure CE 1.

[CE1] interface ten-gigabitethernet 3/0/5

[CE1-Ten-GigabitEthernet3/0/5] ip address 11.1.1.1 24

[CE1-Ten-GigabitEthernet3/0/5] isis enable 2

[CE1-Ten-GigabitEthernet3/0/5] mpls enable

[CE1-Ten-GigabitEthernet3/0/5] mpls ldp enable

[CE1-Ten-GigabitEthernet3/0/5] mpls ldp transport-address interface

[CE1-Ten-GigabitEthernet3/0/5] quit

# Configure PE 2.

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 200:2

[PE2-vpn-instance-vpn1] vpn-target 1:1

[PE2-vpn-instance-vpn1] quit

[PE2] mpls ldp

[PE2-ldp] vpn-instance vpn1

[PE2-ldp-vpn-instance-vpn1] quit

[PE2-ldp] quit

[PE2] isis 2 vpn-instance vpn1

[PE2-isis-2] network-entity 10.0000.0000.0000.0006.00

[PE2-isis-2] address-family ipv4

[PE2-isis-2-ipv4] import-route bgp

[PE2-isis-2-ipv4] quit

[PE2-isis-2] quit

[PE2] interface ten-gigabitethernet 3/0/5

[PE2-Ten-GigabitEthernet3/0/5] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/5] ip address 21.1.1.1 24

[PE2-Ten-GigabitEthernet3/0/5] isis enable 2

[PE2-Ten-GigabitEthernet3/0/5] mpls enable

[PE2-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/5] mpls ldp transport-address interface

[PE2-Ten-GigabitEthernet3/0/5] quit

[PE2] bgp 100

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] address-family ipv4 unicast

[PE2-bgp-default-ipv4-vpn1] import-route isis 2

[PE2-bgp-default-ipv4-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Configure CE 2.

[CE2] interface ten-gigabitethernet 3/0/4

[CE2-Ten-GigabitEthernet3/0/4] ip address 21.1.1.2 24

[CE2-Ten-GigabitEthernet3/0/4] isis enable 2

[CE2-Ten-GigabitEthernet3/0/4] mpls enable

[CE2-Ten-GigabitEthernet3/0/4] mpls ldp enable

[CE2-Ten-GigabitEthernet3/0/4] mpls ldp transport-address interface

[CE2-Ten-GigabitEthernet3/0/4] quit

PE 1 and CE 1 can establish an LDP session and IS-IS neighbor relationship between them. PE 2 and CE 2 can establish an LDP session and IS-IS neighbor relationship between them.

4.     Connect end customers and the customer carrier:

# Configure CE 3.

<Sysname> system-view

[Sysname] sysname CE3

[CE3] interface ten-gigabitethernet 3/0/1

[CE3-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::1 96

[CE3-Ten-GigabitEthernet3/0/1] quit

[CE3] bgp 65410

[CE3-bgp-default] router-id 7.7.7.7

[CE3-bgp-default] peer 2001:1::2 as-number 100

[CE3-bgp-default] address-family ipv6

[CE3-bgp-default-ipv6] peer 2001:1::2 enable

[CE3-bgp-default-ipv6] import-route direct

[CE3-bgp-default-ipv6] quit

[CE3-bgp-default] quit

# Configure PE 3.

[PE3] ip vpn-instance vpn1

[PE3-vpn-instance-vpn1] route-distinguisher 100:1

[PE3-vpn-instance-vpn1] vpn-target 1:1

[PE3-vpn-instance-vpn1] quit

[PE3] interface ten-gigabitethernet 3/0/1

[PE3-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE3-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::2 96

[PE3-Ten-GigabitEthernet3/0/1] quit

[PE3] bgp 100

[PE3-bgp-default] ip vpn-instance vpn1

[PE3-bgp-default-vpn1] peer 2001:1::1 as-number 65410

[PE3-bgp-default-vpn1] address-family ipv6 unicast

[PE3-bgp-default-ipv6-vpn1] peer 2001:1::1 enable

[PE3-bgp-default-ipv6-vpn1] quit

[PE3-bgp-default-vpn1] quit

[PE3-bgp-default] quit

# Configure CE 4.

<Sysname> system-view

[Sysname] sysname CE4

[CE4] interface ten-gigabitethernet 3/0/1

[CE4-Ten-GigabitEthernet3/0/1] ipv6 address 2001:2::1 96

[CE4-Ten-GigabitEthernet3/0/1] quit

[CE4] bgp 65420

[CE4-bgp-default] router-id 8.8.8.8

[CE4-bgp-default] peer 2001:2::2 as-number 100

[CE4-bgp-default] address-family ipv6 unicast

[CE4-bgp-default-ipv6] peer 2001:2::2 enable

[CE4-bgp-default-ipv6] import-route direct

[CE4-bgp-default-ipv6] quit

[CE4-bgp-default] quit

# Configure PE 4.

[PE4] ip vpn-instance vpn1

[PE4-vpn-instance-vpn1] route-distinguisher 100:2

[PE4-vpn-instance-vpn1] vpn-target 1:1

[PE4-vpn-instance-vpn1] quit

[PE4] interface ten-gigabitethernet 3/0/1

[PE4-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE4-Ten-GigabitEthernet3/0/1] ipv6 address 2001:2::2 96

[PE4-Ten-GigabitEthernet3/0/1] quit

[PE4] bgp 100

[PE4-bgp-default] ip vpn-instance vpn1

[PE4-bgp-default-vpn1] peer 2001:2::1 as-number 65420

[PE4-bgp-default-vpn1] address-family ipv6 unicast

[PE4-bgp-default-ipv6-vpn1] peer 2001:2::1 enable

[PE4-bgp-default-ipv6-vpn1] quit

[PE4-bgp-default-vpn1] quit

[PE4-bgp-default] quit

5.     Configure an MP-IBGP peer relationship between the PEs of the customer carrier to exchange the VPN routes of the end customers:

# Configure PE 3.

[PE3] bgp 100

[PE3-bgp-default] peer 6.6.6.9 as-number 100

[PE3-bgp-default] peer 6.6.6.9 connect-interface loopback 0

[PE3-bgp-default] address-family vpnv6

[PE3-bgp-default-af-vpnv6] peer 6.6.6.9 enable

[PE3-bgp-default-af-vpnv6] quit

[PE3-bgp-default] quit

# Configure PE 4.

[PE4] bgp 100

[PE4-bgp-default] peer 1.1.1.9 as-number 100

[PE4-bgp-default] peer 1.1.1.9 connect-interface loopback 0

[PE4-bgp-default] address-family vpnv6

[PE4-bgp-default-vpnv6] peer 1.1.1.9 enable

[PE4-bgp-default-vpnv6] quit

[PE4-bgp-default] quit

Verifying the configuration

1.     Display the public network routing table and VPN routing table on the provider carrier PEs, for example, on PE 1:

# Verify that the public network routing table contains only routes of the provider carrier network.

[PE1] display ip routing-table

 

Destinations : 9        Routes : 9

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

3.3.3.9/32         Direct  0   0           127.0.0.1       Loop0

4.4.4.9/32         IS_L1   15  10          30.1.1.2        XGE3/0/5

30.1.1.0/24        Direct  0   0           30.1.1.1        XGE3/0/5

30.1.1.1/32        Direct  0   0           127.0.0.1       XGE3/0/5

30.1.1.255/32      Direct  0   0           30.1.1.1        XGE3/0/5

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0

127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0

255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0

# Verify that the VPN routing table contains the internal routes of the customer carrier network.

[PE1] display ip routing-table vpn-instance vpn1

Destinations : 11       Routes : 11

Destination/Mask   Proto   Pre Cost        NextHop         Interface

1.1.1.9/32         IS_L1   15  20          11.1.1.1        XGE3/0/4

2.2.2.9/32         IS_L1   15  10          11.1.1.1        XGE3/0/4

5.5.5.9/32         BGP     255 10          4.4.4.9         XGE3/0/5

6.6.6.9/32         BGP     255 20          4.4.4.9         XGE3/0/5

10.1.1.0/24        IS_L1   15  20          11.1.1.1        XGE3/0/4

11.1.1.0/24        Direct  0   0           11.1.1.2        XGE3/0/4

11.1.1.2/32        Direct  0   0           127.0.0.1       XGE3/0/4

11.1.1.255/32      Direct  0   0           11.1.1.2        XGE3/0/4

20.1.1.0/24        BGP     255 20          4.4.4.9         XGE3/0/5

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

2.     Display the routing table on the customer carrier CEs, for example, on CE 1:

# Verify that the routing table contains the internal routes of the customer carrier network.

[CE1] display ip routing-table

Destinations : 15       Routes : 15

Destination/Mask   Proto   Pre Cost        NextHop         Interface

1.1.1.9/32         IS_L1   15  10          10.1.1.1        XGE3/0/4

2.2.2.9/32         Direct  0   0           127.0.0.1       Loop0

5.5.5.9/32         IS_L2   15  74          11.1.1.2        XGE3/0/5

6.6.6.9/32         IS_L2   15  74          11.1.1.2        XGE3/0/5

10.1.1.0/24        Direct  0   0           10.1.1.2        XGE3/0/4

10.1.1.2/32        Direct  0   0           127.0.0.1       XGE3/0/4

10.1.1.255/32      Direct  0   0           10.1.1.2        XGE3/0/4

11.1.1.0/24        Direct  0   0           11.1.1.1        XGE3/0/5

11.1.1.1/32        Direct  0   0           127.0.0.1       XGE3/0/5

11.1.1.255/32      Direct  0   0           11.1.1.1        XGE3/0/5

20.1.1.0/24        IS_L2   15  74          11.1.1.2        XGE3/0/5

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0

127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0

255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0

3.     Display the public network routing table and VPN routing table on the customer carrier PEs, for example, on PE 3:

# Verify that the public network routing table contains the internal routes of the customer carrier network.

[PE3] display ip routing-table

Destinations : 13       Routes : 13

Destination/Mask   Proto   Pre Cost        NextHop         Interface

1.1.1.9/32         Direct  0   0           127.0.0.1       Loop0

2.2.2.9/32         IS_L1   15  10          10.1.1.2        XGE3/0/5

5.5.5.9/32         IS_L2   15  84          10.1.1.2        XGE3/0/5

6.6.6.9/32         IS_L2   15  84          10.1.1.2        XGE3/0/5

10.1.1.0/24        Direct  0   0           10.1.1.1        XGE3/0/5

10.1.1.1/32        Direct  0   0           127.0.0.1       XGE3/0/5

10.1.1.255/32      Direct  0   0           10.1.1.1        XGE3/0/5

11.1.1.0/24        IS_L1   15  20          10.1.1.2        XGE3/0/5

20.1.1.0/24        IS_L2   15  84          10.1.1.2        XGE3/0/5

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.1/32       Direct  0   0           127.0.0.1       InLoop0

127.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0

255.255.255.255/32 Direct  0   0           127.0.0.1       InLoop0

# Verify that the VPN routing table has the remote VPN route.

[PE3] display ipv6 routing-table vpn-instance vpn1

Destinations : 5        Routes : 5

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

Destination: 2001:1::/96                                 Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

Destination: 2001:1::2/128                               Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

Destination: 2001:2::/96                                 Protocol  : BGP4+

NextHop    : ::FFFF:6.6.6.9                              Preference: 255

Interface  : XGE3/0/5                                    Cost      : 0

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

4.     Verify that PE 3 and PE 4 can ping each other. (Details not shown.)

5.     Verify that CE 3 and CE 4 can ping each other. (Details not shown.)

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 200:1

 vpn-target 1:1 import-extcommunity

 vpn-target 1:1 export-extcommunity

#

isis 1

 network-entity 10.0000.0000.0000.0004.00

#

isis 2 vpn-instance vpn1

 network-entity 10.0000.0000.0000.0003.00

 #

 address-family ipv4 unicast

  import-route bgp allow-ibgp

#

 mpls lsr-id 3.3.3.9

#

mpls ldp

 vpn-instance vpn1

#

interface LoopBack0

 ip address 3.3.3.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/4

 ip binding vpn-instance vpn1

 ip address 11.1.1.2 255.255.255.0

 isis enable 2

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

interface Ten-GigabitEthernet3/0/5

 ip address 30.1.1.1 255.255.255.0

 isis enable 1

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

bgp 100

 peer 4.4.4.9 as-number 100

 peer 4.4.4.9 connect-interface LoopBack0

 #

 address-family vpnv4

  peer 4.4.4.9 enable

 #

 ip vpn-instance vpn1

  #

  address-family ipv4 unicast

   import-route isis 2

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 200:2

 vpn-target 1:1 import-extcommunity

 vpn-target 1:1 export-extcommunity

#

isis 1

 network-entity 10.0000.0000.0000.0005.00

#

isis 2 vpn-instance vpn1

 network-entity 10.0000.0000.0000.0006.00

 #

 address-family ipv4 unicast

  import-route bgp

#

 mpls lsr-id 4.4.4.9

#

mpls ldp

 vpn-instance vpn1

#

interface LoopBack0

 ip address 4.4.4.9 255.255.255.255

 isis enable 1

#

interface Ten-GigabitEthernet3/0/4

 ip address 30.1.1.2 255.255.255.0

 isis enable 1

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

interface Ten-GigabitEthernet3/0/5

 ip binding vpn-instance vpn1

 ip address 21.1.1.1 255.255.255.0

 isis enable 2

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

bgp 100

 peer 3.3.3.9 as-number 100

 peer 3.3.3.9 connect-interface LoopBack0

 #

 address-family vpnv4

  peer 3.3.3.9 enable

 #

 ip vpn-instance vpn1

  #

  address-family ipv4 unicast

   import-route isis 2

#

return

·     CE 1:

#

 sysname CE1

#

isis 2

 network-entity 10.0000.0000.0000.0002.00

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

 isis enable 2

#

interface Ten-GigabitEthernet3/0/4

 ip address 10.1.1.2 255.255.255.0

 isis enable 2

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

interface Ten-GigabitEthernet3/0/5

 ip address 11.1.1.1 255.255.255.0

 isis enable 2

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

return

·     CE 2:

#

 sysname CE2

#

isis 2

 network-entity 10.0000.0000.0000.0004.00

#

 mpls lsr-id 5.5.5.9

#

mpls ldp

#

interface LoopBack0

 ip address 5.5.5.9 255.255.255.255

 isis enable 2

#

interface Ten-GigabitEthernet3/0/4

 ip address 21.1.1.2 255.255.255.0

 isis enable 2

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

interface Ten-GigabitEthernet3/0/5

 ip address 20.1.1.1 255.255.255.0

 isis enable 2

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

return

·     PE 3:

#

 sysname PE3

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 1:1 import-extcommunity

 vpn-target 1:1 export-extcommunity

#

isis 2

 network-entity 10.0000.0000.0000.0001.00

#

 mpls lsr-id 1.1.1.9

#

mpls ldp

#

interface LoopBack0

 ip address 1.1.1.9 255.255.255.255

 isis enable 2

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001:1::2/96

#

interface Ten-GigabitEthernet3/0/5

 ip address 10.1.1.1 255.255.255.0

 isis enable 2

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

bgp 100

 peer 6.6.6.9 as-number 100

 peer 6.6.6.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 6.6.6.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:1::1 as-number 65410

  #

  address-family ipv6 unicast

   peer 2001:1::1 enable

#

return

·     PE 4:

#

 sysname PE4

#

ip vpn-instance vpn1

 route-distinguisher 100:2

 vpn-target 1:1 import-extcommunity

 vpn-target 1:1 export-extcommunity

#

isis 2

 network-entity 10.0000.0000.0000.0003.00

#

 mpls lsr-id 6.6.6.9

#

mpls ldp

#

interface LoopBack0

 ip address 6.6.6.9 255.255.255.255

 isis enable 2

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001:2::2/96

#

interface Ten-GigabitEthernet3/0/5

 ip address 20.1.1.2 255.255.255.0

 isis enable 2

 mpls enable

 mpls ldp enable

 mpls ldp transport-address interface

#

bgp 100

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 1.1.1.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:2::1 as-number 65420

  #

  address-family ipv6 unicast

   peer 2001:2::1 enable

#

return

·     CE 3:

#

 sysname CE3

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:1::1/96

#

bgp 65410

 router-id 7.7.7.7

 peer 2001:1::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:1::2 enable

#

return

·     CE 4:

#

 sysname CE4

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:2::1/96

#

bgp 65420

 router-id 8.8.8.8

 peer 2001:2::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:2::2 enable

#

return

Example: Configuring HoVPN

Network configuration

There are two levels of networks, the backbone and the MPLS VPN networks, as shown in Figure 9.

·     SPEs act as PEs to allow MPLS VPNs to access the backbone.

·     UPEs act as PEs of the MPLS VPNs to allow end users to access the VPNs.

·     Performance requirements for the UPEs are lower than those for the SPEs.

·     SPEs advertise routes permitted by the routing policies to UPEs, permitting CE 1 and CE 3 in VPN 1 to communicate with each other, and forbidding CE 2 and CE 4 in VPN 2 from communicating with each other.

Figure 9 Network diagram

Table 17 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface2

Ten-GigabitEthernet3/0/2

Interface3

Ten-GigabitEthernet3/0/3

 

Table 18 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/0/1

2001:1::1/96

CE 3

XGE3/0/1

2001:3::1/96

CE 2

XGE3/0/1

2001:2::1/96

CE 4

XGE3/0/1

2001:4::1/96

UPE 1

Loop0

1.1.1.9/32

UPE 2

Loop0

4.4.4.9/32

 

XGE3/0/1

2001:1::2/96

 

XGE3/0/1

172.2.1.1/24

 

XGE3/0/2

2001:2::2/96

 

XGE3/0/2

2001:3::2/96

 

XGE3/0/3

172.1.1.1/24

 

XGE3/0/3

2001:4::2/96

SPE 1

Loop0

2.2.2.9/32

SPE 2

Loop0

3.3.3.9/32

 

XGE3/0/1

172.1.1.2/24

 

XGE3/0/1

180.1.1.2/24

 

XGE3/0/2

180.1.1.1/24

 

XGE3/0/2

172.2.1.2/24

Procedure

1.     Configure UPE 1:

# Configure basic MPLS and MPLS LDP to establish LDP LSPs.

<Sysname> system-view

[Sysname] sysname UPE1

[UPE1] interface loopback 0

[UPE1-LoopBack0] ip address 1.1.1.9 32

[UPE1-LoopBack0] quit

[UPE1] mpls lsr-id 1.1.1.9

[UPE1] mpls ldp

[UPE1-ldp] quit

[UPE1] interface ten-gigabitethernet 3/0/3

[UPE1-Ten-GigabitEthernet3/0/3] ip address 172.1.1.1 24

[UPE1-Ten-GigabitEthernet3/0/3] mpls enable

[UPE1-Ten-GigabitEthernet3/0/3] mpls ldp enable

[UPE1-Ten-GigabitEthernet3/0/3] quit

# Configure the IGP protocol (OSPF, in this example).

[UPE1] ospf

[UPE1-ospf-1] area 0

[UPE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[UPE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0

[UPE1-ospf-1-area-0.0.0.0] quit

[UPE1-ospf-1] quit

# Configure VPN instances vpn1 and vpn2, allowing CE 1 and CE 2 to access UPE 1.

[UPE1] ip vpn-instance vpn1

[UPE1-vpn-instance-vpn1] route-distinguisher 100:1

[UPE1-vpn-instance-vpn1] vpn-target 100:1 both

[UPE1-vpn-instance-vpn1] quit

[UPE1] ip vpn-instance vpn2

[UPE1-vpn-instance-vpn2] route-distinguisher 100:2

[UPE1-vpn-instance-vpn2] vpn-target 100:2 both

[UPE1-vpn-instance-vpn2] quit

[UPE1] interface ten-gigabitethernet 3/0/1

[UPE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[UPE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::2 96

[UPE1-Ten-GigabitEthernet3/0/1] quit

[UPE1] interface ten-gigabitethernet 3/0/2

[UPE1-Ten-GigabitEthernet3/0/2] ip binding vpn-instance vpn2

[UPE1-Ten-GigabitEthernet3/0/2] ipv6 address 2001:2::2 96

[UPE1-Ten-GigabitEthernet3/0/2] quit

# Establish an MP-IBGP peer relationship with SPE 1.

[UPE1] bgp 100

[UPE1-bgp-default] peer 2.2.2.9 as-number 100

[UPE1-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[UPE1-bgp-default] address-family vpnv6

[UPE1-bgp-default-vpnv6] peer 2.2.2.9 enable

[UPE1-bgp-default-vpnv6] quit

# Establish an EBGP peer relationship with CE 1.

[UPE1-bgp-default] ip vpn-instance vpn1

[UPE1-bgp-default-vpn1] peer 2001:1::1 as-number 65410

[UPE1-bgp-default-vpn1] address-family ipv6 unicast

[UPE1-bgp-default-ipv6-vpn1] peer 2001:1::1 enable

[UPE1-bgp-default-ipv6-vpn1] quit

[UPE1-bgp-default-vpn1] quit

# Establish an EBGP peer relationship with CE 2.

[UPE1-bgp-default] ip vpn-instance vpn2

[UPE1-bgp-default-vpn2] peer 2001:2::1 as-number 65420

[UPE1-bgp-default-vpn2] address-family ipv6 unicast

[UPE1-bgp-default-ipv6-vpn2] peer 2001:2::1 enable

[UPE1-bgp-default-ipv6-vpn2] quit

[UPE1-bgp-default-vpn2] quit

[UPE1-bgp-default] quit

2.     Configure CE 1.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 2001:1::1 96

[CE1-Ten-GigabitEthernet3/0/1] quit

[CE1] bgp 65410

[CE1-bgp-default] router-id 5.5.5.5

[CE1-bgp-default] address-family ipv6 unicast

[CE1-bgp-default-ipv6] peer 2001:1::2 enable

[CE1-bgp-default-ipv6] import-route direct

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

3.     Configure CE 2.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 2001:2::1 96

[CE2-Ten-GigabitEthernet3/0/1] quit

[CE2] bgp 65420

[CE2-bgp-default] router-id 6.6.6.6

[CE2-bgp-default] peer 2001:2::2 as-number 100

[CE2-bgp-default] address-family ipv6 unicast

[CE2-bgp-default-ipv6] peer 2001:2::2 enable

[CE2-bgp-default-ipv6] import-route direct

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

4.     Configure UPE 2:

# Configure basic MPLS and MPLS LDP to establish LDP LSPs.

<Sysname> system-view

[Sysname] sysname UPE2

[UPE2] interface loopback 0

[UPE2-LoopBack0] ip address 4.4.4.9 32

[UPE2-LoopBack0] quit

[UPE2] mpls lsr-id 4.4.4.9

[UPE2] mpls ldp

[UPE2-ldp] quit

[UPE2] interface ten-gigabitethernet 3/0/1

[UPE2-Ten-GigabitEthernet3/0/1] ip address 172.2.1.1 24

[UPE2-Ten-GigabitEthernet3/0/1] mpls enable

[UPE2-Ten-GigabitEthernet3/0/1] mpls ldp enable

[UPE2-Ten-GigabitEthernet3/0/1] quit

# Configure the IGP protocol (OSPF, in this example).

[UPE2] ospf

[UPE2-ospf-1] area 0

[UPE2-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255

[UPE2-ospf-1-area-0.0.0.0] network 4.4.4.9 0.0.0.0

[UPE2-ospf-1-area-0.0.0.0] quit

[UPE2-ospf-1] quit

# Configure VPN instances vpn1 and vpn2, allowing CE 3 and CE 4 to access UPE 2.

[UPE2] ip vpn-instance vpn1

[UPE2-vpn-instance-vpn1] route-distinguisher 300:1

[UPE2-vpn-instance-vpn1] vpn-target 100:1 both

[UPE2-vpn-instance-vpn1] quit

[UPE2] ip vpn-instance vpn2

[UPE2-vpn-instance-vpn2] route-distinguisher 400:2

[UPE2-vpn-instance-vpn2] vpn-target 100:2 both

[UPE2-vpn-instance-vpn2] quit

[UPE2] interface ten-gigabitethernet 3/0/2

[UPE2-Ten-GigabitEthernet3/0/2] ip binding vpn-instance vpn1

[UPE2-Ten-GigabitEthernet3/0/2] ipv6 address 2001:3::2 96

[UPE2-Ten-GigabitEthernet3/0/2] quit

[UPE2] interface ten-gigabitethernet 3/0/3

[UPE2-Ten-GigabitEthernet3/0/3] ip binding vpn-instance vpn2

[UPE2-Ten-GigabitEthernet3/0/3] ipv6 address 2001:4::2 96

[UPE2-Ten-GigabitEthernet3/0/3] quit

# Establish an MP-IBGP peer relationship with SPE 2.

[UPE2] bgp 100

[UPE2-bgp-default] peer 3.3.3.9 as-number 100

[UPE2-bgp-default] peer 3.3.3.9 connect-interface loopback 0

[UPE2-bgp-default] address-family vpnv6

[UPE2-bgp-default-vpnv6] peer 3.3.3.9 enable

[UPE2-bgp-default-vpnv6] quit

# Establish an EBGP peer relationship with CE 3.

[UPE2-bgp-default] ip vpn-instance vpn1

[UPE2-bgp-default-vpn1] peer 2001:3::1 as-number 65430

[UPE2-bgp-default-vpn1] address-family ipv6 unicast

[UPE2-bgp-default-ipv6-vpn1] peer 2001:3::1 enable

[UPE2-bgp-default-ipv6-vpn1] quit

[UPE2-bgp-default-vpn1] quit

# Establish an EBGP peer relationship with CE 4.

[UPE2-bgp-default] ip vpn-instance vpn2

[UPE2-bgp-default-vpn2] peer 2001:4::1 as-number 65440

[UPE2-bgp-default-vpn2] address-family ipv6 unicast

[UPE2-bgp-default-ipv6-vpn2] peer 2001:4::1 enable

[UPE2-bgp-default-ipv6-vpn2] quit

[UPE2-bgp-default-vpn2] quit

[UPE2-bgp-default] quit

5.     Configure CE 3.

<Sysname> system-view

[Sysname] sysname CE3

[CE3] interface ten-gigabitethernet 3/0/1

[CE3-Ten-GigabitEthernet3/0/1] ipv6 address 2001:3::1 96

[CE3-Ten-GigabitEthernet3/0/1] quit

[CE3] bgp 65430

[CE3-bgp-default] router-id 7.7.7.7

[CE3-bgp-default] peer 2001:3::2 as-number 100

[CE3-bgp-default] address-family ipv6 unicast

[CE3-bgp-default-ipv6] peer 2001:3::2 enable

[CE3-bgp-default-ipv6] import-route direct

[CE3-bgp-default-ipv6] quit

[CE3-bgp-default] quit

6.     Configure CE 4.

<Sysname> system-view

[Sysname] sysname CE4

[CE4] interface ten-gigabitethernet 3/0/1

[CE4-Ten-GigabitEthernet3/0/1] ipv6 address 2001:4::1 96

[CE4-Ten-GigabitEthernet3/0/1] quit

[CE4] bgp 65440

[CE4-bgp-default] router-id 8.8.8.8

[CE4-bgp-default] peer 2001:4::2 as-number 100

[CE4-bgp-default] address-family ipv6 unicast

[CE4-bgp-default-ipv6] peer 2001:4::2 enable

[CE4-bgp-default-ipv6] import-route direct

[CE4-bgp-default-ipv6] quit

[CE4-bgp-default] quit

7.     Configure SPE 1:

# Configure basic MPLS and MPLS LDP to establish LDP LSPs.

<Sysname> system-view

[Sysname] sysname SPE1

[SPE1] interface loopback 0

[SPE1-LoopBack0] ip address 2.2.2.9 32

[SPE1-LoopBack0] quit

[SPE1] mpls lsr-id 2.2.2.9

[SPE1] mpls ldp

[SPE1-ldp] quit

[SPE1] interface ten-gigabitethernet 3/0/1

[SPE1-Ten-GigabitEthernet3/0/1] ip address 172.1.1.2 24

[SPE1-Ten-GigabitEthernet3/0/1] mpls enable

[SPE1-Ten-GigabitEthernet3/0/1] mpls ldp enable

[SPE1-Ten-GigabitEthernet3/0/1] quit

[SPE1] interface ten-gigabitethernet 3/0/2

[SPE1-Ten-GigabitEthernet3/0/2] ip address 180.1.1.1 24

[SPE1-Ten-GigabitEthernet3/0/2] mpls enable

[SPE1-Ten-GigabitEthernet3/0/2] mpls ldp enable

[SPE1-Ten-GigabitEthernet3/0/2] quit

# Configure the IGP protocol (OSPF, in this example).

[SPE1] ospf

[SPE1-ospf-1] area 0

[SPE1-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0

[SPE1-ospf-1-area-0.0.0.0] network 172.1.1.0 0.0.0.255

[SPE1-ospf-1-area-0.0.0.0] network 180.1.1.0 0.0.0.255

[SPE1-ospf-1-area-0.0.0.0] quit

[SPE1-ospf-1] quit

# Configure VPN instances vpn1 and vpn2.

[SPE1] ip vpn-instance vpn1

[SPE1-vpn-instance-vpn1] route-distinguisher 500:1

[SPE1-vpn-instance-vpn1] vpn-target 100:1 both

[SPE1-vpn-instance-vpn1] quit

[SPE1] ip vpn-instance vpn2

[SPE1-vpn-instance-vpn2] route-distinguisher 700:1

[SPE1-vpn-instance-vpn2] vpn-target 100:2 both

[SPE1-vpn-instance-vpn2] quit

# Establish MP-IBGP peer relationships with SPE 2 and UPE 1, and specify UPE 1 as a UPE.

[SPE1] bgp 100

[SPE1-bgp-default] peer 1.1.1.9 as-number 100

[SPE1-bgp-default] peer 1.1.1.9 connect-interface loopback 0

[SPE1-bgp-default] peer 3.3.3.9 as-number 100

[SPE1-bgp-default] peer 3.3.3.9 connect-interface loopback 0

[SPE1-bgp-default] address-family vpnv6

[SPE1-bgp-default-vpnv6] peer 3.3.3.9 enable

[SPE1-bgp-default-vpnv6] peer 1.1.1.9 enable

[SPE1-bgp-default-vpnv6] peer 1.1.1.9 upe

[SPE1-bgp-default-vpnv6] peer 1.1.1.9 next-hop-local

[SPE1-bgp-default-vpnv6] quit

# Create BGP-VPN instances for VPN instances vpn1 and vpn2, so the VPNv6 routes learned according to the RT attributes can be added into the BGP routing tables of the corresponding VPN instances.

[SPE1-bgp-default] ip vpn-instance vpn1

[SPE1-bgp-default-vpn1] quit

[SPE1-bgp-default] ip vpn-instance vpn2

[SPE1-bgp-default-vpn2] quit

[SPE1-bgp-default] quit

# Advertise to UPE 1 the routes permitted by a routing policy (the routes of CE 3).

[SPE1] ipv6 prefix-list hope index 10 permit 2001:3::1 96

[SPE1] route-policy hope permit node 0

[SPE1-route-policy-hope-0] if-match ipv6 address prefix-list hope

[SPE1-route-policy-hope-0] quit

[SPE1] bgp 100

[SPE1-bgp-default] address-family vpnv6

[SPE1-bgp-default-vpnv6] peer 1.1.1.9 upe route-policy hope export

8.     Configure SPE 2:

# Configure basic MPLS and MPLS LDP to establish LDP LSPs.

<Sysname> system-view

[Sysname] sysname SPE2

[SPE2] interface loopback 0

[SPE2-LoopBack0] ip address 3.3.3.9 32

[SPE2-LoopBack0] quit

[SPE2] mpls lsr-id 3.3.3.9

[SPE2] mpls ldp

[SPE2-ldp] quit

[SPE2] interface ten-gigabitethernet 3/0/1

[SPE2-Ten-GigabitEthernet3/0/1] ip address 180.1.1.2 24

[SPE2-Ten-GigabitEthernet3/0/1] mpls enable

[SPE2-Ten-GigabitEthernet3/0/1] mpls ldp enable

[SPE2-Ten-GigabitEthernet3/0/1] quit

[SPE2] interface ten-gigabitethernet 3/0/2

[SPE2-Ten-GigabitEthernet3/0/2] ip address 172.2.1.2 24

[SPE2-Ten-GigabitEthernet3/0/2] mpls enable

[SPE2-Ten-GigabitEthernet3/0/2] mpls ldp enable

[SPE2-Ten-GigabitEthernet3/0/2] quit

# Configure the IGP protocol (OSPF, in this example).

[SPE2] ospf

[SPE2-ospf-1] area 0

[SPE2-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0

[SPE2-ospf-1-area-0.0.0.0] network 172.2.1.0 0.0.0.255

[SPE2-ospf-1-area-0.0.0.0] network 180.1.1.0 0.0.0.255

[SPE2-ospf-1-area-0.0.0.0] quit

[SPE2-ospf-1] quit

# Configure VPN instances vpn1 and vpn2.

[SPE2] ip vpn-instance vpn1

[SPE2-vpn-instance-vpn1] route-distinguisher 600:1

[SPE2-vpn-instance-vpn1] vpn-target 100:1 both

[SPE2-vpn-instance-vpn1] quit

[SPE2] ip vpn-instance vpn2

[SPE2-vpn-instance-vpn2] route-distinguisher 800:1

[SPE2-vpn-instance-vpn2] vpn-target 100:2 both

[SPE2-vpn-instance-vpn2] quit

# Establish MP-IBGP peer relationships with SPE 1 and UPE 2, and specify UPE 2 as a UPE.

[SPE2] bgp 100

[SPE2-bgp-default] peer 4.4.4.9 as-number 100

[SPE2-bgp-default] peer 4.4.4.9 connect-interface loopback 0

[SPE2-bgp-default] peer 2.2.2.9 as-number 100

[SPE2-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[SPE2-bgp-default] address-family vpnv6

[SPE2-bgp-default-vpnv6] peer 2.2.2.9 enable

[SPE2-bgp-default-vpnv6] peer 4.4.4.9 enable

[SPE2-bgp-default-vpnv6] peer 4.4.4.9 upe

[SPE2-bgp-default-vpnv6] peer 4.4.4.9 next-hop-local

[SPE2-bgp-default-vpnv6] quit

# Create BGP-VPN instances for VPN instances vpn1 and vpn2, so the VPNv6 routes learned according to the RT attributes can be added into the BGP routing tables of the corresponding VPN instances.

[SPE2-bgp-default] ip vpn-instance vpn1

[SPE2-bgp-default-vpn1] quit

[SPE2-bgp-default] ip vpn-instance vpn2

[SPE2-bgp-default-vpn2] quit

[SPE2-bgp-default] quit

# Advertise to UPE 2 the routes permitted by a routing policy (the routes of CE 1).

[SPE2] ipv6 prefix-list hope index 10 permit 2001:1::1 96

[SPE2] route-policy hope permit node 0

[SPE2-route-policy-hope-0] if-match ipv6 address prefix-list hope

[SPE2-route-policy-hope-0] quit

[SPE2] bgp 100

[SPE2-bgp-default] address-family vpnv6

[SPE2-bgp-default-vpnv6] peer 4.4.4.9 upe route-policy hope export

Verifying the configuration

# Verify that CE 1 and CE3 can learn each other's interface routes and can ping each other. CE 2 and CE 4 cannot learn each other's interface routes and cannot ping each other. (Details not shown.)

Configuration files

·     UPE 1:

#

 sysname UPE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

ip vpn-instance vpn2

 route-distinguisher 100:2

 vpn-target 100:2 import-extcommunity

 vpn-target 100:2 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 1.1.1.9 0.0.0.0

  network 172.1.1.0 0.0.0.255

#

 mpls lsr-id 1.1.1.9

#

mpls ldp

#

interface LoopBack0

 ip address 1.1.1.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 2001:1::2/96

#

interface Ten-GigabitEthernet3/0/2

 ip binding vpn-instance vpn2

 ipv6 address 2001:2::2/96

#

interface Ten-GigabitEthernet3/0/3

 ip address 172.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 2.2.2.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:1::1 as-number 65410

  #

  address-family ipv6 unicast

   peer 2001:1::1 enable

 #

 ip vpn-instance vpn2

  peer 2001:2::1 as-number 65420

  #

  address-family ipv6 unicast

   peer 2001:2::1 enable

#

return

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:1::1/96

#

bgp 65410

 router-id 5.5.5.5

 peer 2001:1::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:1::2 enable

#

return

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:2::1/96

#

bgp 65420

 router-id 6.6.6.6

 peer 2001:2::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:2::2 enable

#

return

·     UPE 2:

#

 sysname UPE2

#

ip vpn-instance vpn1

 route-distinguisher 300:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

ip vpn-instance vpn2

 route-distinguisher 400:2

 vpn-target 100:2 import-extcommunity

 vpn-target 100:2 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 4.4.4.9 0.0.0.0

  network 172.2.1.0 0.0.0.255

#

 mpls lsr-id 4.4.4.9

#

mpls ldp

#

interface LoopBack0

 ip address 4.4.4.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip address 172.2.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/2

 ip binding vpn-instance vpn1

 ipv6 address 2001:3::2/96

#

interface Ten-GigabitEthernet3/0/3

 ip binding vpn-instance vpn2

 ipv6 address 2001:4::2/96

#

bgp 100

 peer 3.3.3.9 as-number 100

 peer 3.3.3.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 3.3.3.9 enable

 #

 ip vpn-instance vpn1

  peer 2001:3::1 as-number 65430

  #

  address-family ipv6 unicast

   peer 2001:3::1 enable

 #

 ip vpn-instance vpn2

  peer 2001:4::1 as-number 65440

  #

  address-family ipv6 unicast

   peer 2001:4::1 enable

#

return

·     CE 3:

#

 sysname CE3

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:3::1/96

#

bgp 65430

 router-id 7.7.7.7

 peer 2001:3::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:3::2 enable

#

return

·     CE 4:

#

 sysname CE4

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 2001:4::1/96

#

bgp 65440

 router-id 8.8.8.8

 peer 2001:4::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2001:4::2 enable

#

return

·     SPE 1:

#

 sysname SPE1

#

ip vpn-instance vpn1

 route-distinguisher 500:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

ip vpn-instance vpn2

 route-distinguisher 700:1

 vpn-target 100:2 import-extcommunity

 vpn-target 100:2 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 2.2.2.9 0.0.0.0

  network 172.1.1.0 0.0.0.255

  network 180.1.1.0 0.0.0.255

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip address 172.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/2

 ip address 180.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 peer 3.3.3.9 as-number 100

 peer 3.3.3.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 1.1.1.9 enable

  peer 1.1.1.9 next-hop-local

  peer 1.1.1.9 upe

  peer 1.1.1.9 upe route-policy hope export

  peer 3.3.3.9 enable

 #

 ip vpn-instance vpn1

 #

 ip vpn-instance vpn2

#

route-policy hope permit node 0

 if-match ipv6 address prefix-list hope

#

 ipv6 prefix-list hope index 10 permit 2001:3:: 96

#

return

·     SPE 2:

#

 sysname SPE2

#

ip vpn-instance vpn1

 route-distinguisher 600:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

ip vpn-instance vpn2

 route-distinguisher 800:1

 vpn-target 100:2 import-extcommunity

 vpn-target 100:2 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 3.3.3.9 0.0.0.0

  network 172.2.1.0 0.0.0.255

  network 180.1.1.0 0.0.0.255

#

 mpls lsr-id 3.3.3.9

#

mpls ldp

#

interface LoopBack0

 ip address 3.3.3.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip address 180.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/2

 ip address 172.2.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 peer 4.4.4.9 as-number 100

 peer 4.4.4.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 2.2.2.9 enable

  peer 4.4.4.9 enable

  peer 4.4.4.9 next-hop-local

  peer 4.4.4.9 upe

  peer 4.4.4.9 upe route-policy hope export

 #

 ip vpn-instance vpn1

 #

 ip vpn-instance vpn2

#

route-policy hope permit node 0

 if-match ipv6 address prefix-list hope

#

 ipv6 prefix-list hope index 10 permit 2001:1:: 96

#

return

Example: Configuring an OSPFv3 sham link

Network configuration

As shown in Figure 10, CE 1 and CE 2 belong to VPN 1. Configure an OSPFv3 sham link between PE 1 and PE 2 so traffic between the CEs is forwarded through the MPLS backbone instead of the backdoor link.

Figure 10 Network diagram

 

Table 19 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface4

Ten-GigabitEthernet3/0/4

Interface5

Ten-GigabitEthernet3/0/5

 

Table 20 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/0/1

100::1/64

CE 2

XGE3/0/1

120::1/64

 

XGE3/0/4

20::1/64

 

XGE3/0/4

30::2/64

PE 1

Loop0

1.1.1.9/32

PE 2

Loop0

2.2.2.9/32

 

Loop1

3::3/128

 

Loop1

5::5/128

 

XGE3/0/1

100::2/64

 

XGE3/0/1

120::2/64

 

XGE3/0/4

10.1.1.1/24

 

XGE3/0/5

10.1.1.2/24

Router A

XGE3/0/5

30::1/64

 

 

 

 

XGE3/0/4

20::2/64

 

 

 

Procedure

1.     Configure OSPFv3 on the customer networks:

# Configure OSPFv3 on CE 1 and set the cost of the link between CE 1 and Router A to 2.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] ospfv3

[CE1-ospfv3-1] router-id 6.6.6.6

[CE1-ospfv3-1] area 1

[CE1-ospfv3-1-area-0.0.0.1] quit

[CE1-ospfv3-1] quit

[CE1]interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 100::1 64

[CE1-Ten-GigabitEthernet3/0/1] ospfv3 1 area 1

[CE1-Ten-GigabitEthernet3/0/1] quit

[CE1] interface ten-gigabitethernet 3/0/4

[CE1-Ten-GigabitEthernet3/0/4] ipv6 address 20::1 64

[CE1-Ten-GigabitEthernet3/0/4] ospfv3 cost 2

[CE1-Ten-GigabitEthernet3/0/4] ospfv3 1 area 1

[CE1-Ten-GigabitEthernet3/0/4] quit

[CE1] commit

# Configure OSPFv3 on CE 2 and set the cost of the link between CE 2 and Router A to 2.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] ospfv3

[CE2-ospfv3-1] router-id 8.8.8.8

[CE2-ospfv3-1] area 1

[CE2-ospfv3-1-area-0.0.0.1] quit

[CE2-ospfv3-1] quit

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 120::1 64

[CE2-Ten-GigabitEthernet3/0/1] ospfv3 1 area 1

[CE2-Ten-GigabitEthernet3/0/1] quit

[CE2] interface ten-gigabitethernet 3/0/4

[CE2-Ten-GigabitEthernet3/0/4] ipv6 address 30::2 64

[CE2-Ten-GigabitEthernet3/0/4] ospfv3 cost 2

[CE2-Ten-GigabitEthernet3/0/4] ospfv3 1 area 1

[CE2-Ten-GigabitEthernet3/0/4] quit

[CE2] commit

# Configure OSPFv3 on Router A.

<Sysname> system-view

[Sysname] sysname RouterA

[RouterA] ospfv3

[RouterA-ospfv3-1] router-id 7.7.7.7

[RouterA-ospfv3-1] area 1

[RouterA-ospfv3-1-area-0.0.0.1] quit

[RouterA-ospfv3-1] quit

[RouterA] interface ten-gigabitethernet 3/0/4

[RouterA-Ten-GigabitEthernet3/0/4] ipv6 address 20::2 64

[RouterA-Ten-GigabitEthernet3/0/4] ospfv3 1 area 1

[RouterA-Ten-GigabitEthernet3/0/4] quit

[RouterA] interface ten-gigabitethernet 3/0/5

[RouterA-Ten-GigabitEthernet3/0/5] ipv6 address 30::1 64

[RouterA-Ten-GigabitEthernet3/0/5] ospfv3 1 area 1

[RouterA-Ten-GigabitEthernet3/0/5] quit

[RouterA] commit

# Execute the display ipv6 routing-table command to verify that CE 1 and CE 2 have learned the route to each other. (Details not shown.)

2.     Configure IPv6 MPLS L3VPN on the backbone:

# Configure basic MPLS and MPLS LDP on PE 1 to establish LDP LSPs.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.9 32

[PE1-LoopBack0] quit

[PE1] mpls lsr-id 1.1.1.9

[PE1] mpls ldp

[PE1-ldp] quit

[PE1] interface ten-gigabitethernet 3/0/4

[PE1-Ten-GigabitEthernet3/0/4] ip address 10.1.1.1 24

[PE1-Ten-GigabitEthernet3/0/4] mpls enable

[PE1-Ten-GigabitEthernet3/0/4] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/4] quit

# Configure PE 1 to take PE 2 as an MP-IBGP peer.

[PE1] bgp 100

[PE1-bgp-default] peer 2.2.2.9 as-number 100

[PE1-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[PE1-bgp-default] address-family vpnv6

[PE1-bgp-default-vpnv6] peer 2.2.2.9 enable

[PE1-bgp-default-vpnv6] quit

[PE1-bgp-default] quit

# Configure OSPF on PE 1.

[PE1] ospf 1

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] quit

[PE1-ospf-1] quit

# Configure basic MPLS and MPLS LDP on PE 2 to establish LDP LSPs.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 2.2.2.9 32

[PE2-LoopBack0] quit

[PE2] mpls lsr-id 2.2.2.9

[PE2] mpls ldp

[PE2-ldp] quit

[PE2] interface ten-gigabitethernet 3/0/5

[PE2-Ten-GigabitEthernet3/0/5] ip address 10.1.1.2 24

[PE2-Ten-GigabitEthernet3/0/5] mpls enable

[PE2-Ten-GigabitEthernet3/0/5] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/5] quit

# Configure PE 2 to take PE 1 as an MP-IBGP peer.

[PE2] bgp 100

[PE2-bgp-default] peer 1.1.1.9 as-number 100

[PE2-bgp-default] peer 1.1.1.9 connect-interface loopback 0

[PE2-bgp-default] address-family vpnv6

[PE2-bgp-default-vpnv6] peer 1.1.1.9 enable

[PE2-bgp-default-vpnv6] quit

[PE2-bgp-default] quit

# Configure OSPF on PE 2.

[PE2] ospf 1

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] quit

[PE2-ospf-1] quit

3.     Configure PEs to allow CE access:

# Configure PE 1.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 100:1

[PE1-vpn-instance-vpn1] vpn-target 1:1

[PE1-vpn-instance-vpn1] quit

[PE1] interface ten-gigabitethernet 3/0/1

[PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/1] ipv6 address 100::2 64

[PE1-Ten-GigabitEthernet3/0/1] ospfv3 100 area 1

[PE1-Ten-GigabitEthernet3/0/1] quit

[PE1] ospfv3 100

[PE1-ospfv3-100] router-id 100.1.1.1

[PE1-ospfv3-100] domain-id 10

[PE1-ospfv3-100] quit

[PE1] bgp 100

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn1] import-route ospfv3 100

[PE1-bgp-default-ipv6-vpn1] import-route direct

[PE1-bgp-default-ipv6-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure PE 2.

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 100:2

[PE2-vpn-instance-vpn1] vpn-target 1:1

[PE2-vpn-instance-vpn1] quit

[PE2] interface ten-gigabitethernet 3/0/1

[PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/1] ipv6 address 120::2 64

[PE2-Ten-GigabitEthernet3/0/1] ospfv3 100 area 1

[PE2-Ten-GigabitEthernet3/0/1] quit

[PE2] ospfv3 100

[PE2-ospfv3-100] router-id 120.1.1.1

[PE2-ospfv3-100] domain-id 10

[PE2-ospfv3-100] quit

[PE2] bgp 100

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn1] import-route ospfv3 100

[PE2-bgp-default-ipv6-vpn1] import-route direct

[PE2-bgp-default-ipv6-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Execute the display ipv6 routing-table vpn-instance command on the PEs. Verify that the path to the peer CE is along the OSPFv3 route across the customer networks, instead of the IPv6 BGP route across the backbone. (Details not shown.)

4.     Configure a sham link:

# Configure PE 1.

[PE1] interface loopback 1

[PE1-LoopBack1] ip binding vpn-instance vpn1

[PE1-LoopBack1] ipv6 address 3::3 128

[PE1-LoopBack1] quit

[PE1] ospfv3 100

[PE1-ospfv3-100] area 1

[PE1-ospfv3-100-area-0.0.0.1] sham-link 3::3 5::5

[PE1-ospfv3-100-area-0.0.0.1] quit

[PE1-ospfv3-100] quit

# Configure PE 2.

[PE2] interface loopback 1

[PE2-LoopBack1] ip binding vpn-instance vpn1

[PE2-LoopBack1] ipv6 address 5::5 128

[PE2-LoopBack1] quit

[PE2] ospfv3 100

[PE2-ospfv3-100] area 1

[PE2-ospfv3-100-area-0.0.0.1] sham-link 5::5 3::3

[PE2-ospfv3-100-area-0.0.0.1] quit

[PE2-ospfv3-100] quit

Verifying the configuration

# Execute the display ipv6 routing-table vpn-instance command on the PEs to verify the following results (details not shown):

·     The path to the peer CE is now along the IPv6 BGP route across the backbone.

·     A route to the sham link destination address exists.

The following is the sample output from the command on PE 1:

[PE1] display ipv6 routing-table vpn-instance vpn1

 

Destinations : 9        Routes : 9

 

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 3::3/128                                    Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : Loop1                                       Cost      : 0

 

Destination: 5::5/128                                    Protocol  : BGP4+

NextHop    : ::FFFF:2.2.2.9                              Preference: 255

Interface  : XGE3/0/4                                    Cost      : 0

 

Destination: 20::/64                                     Protocol  : O_INTRA

NextHop    : FE80::8824:DAFF:FEF0:306                    Preference: 10

Interface  : XGE3/0/1                                    Cost      : 3

 

Destination: 30::/64                                     Protocol  : O_INTRA

NextHop    : FE80::8824:DAFF:FEF0:306                    Preference: 10

Interface  : XGE3/0/1                                    Cost      : 4

 

Destination: 100::/64                                    Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 100::2/128                                  Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 120::/64                                    Protocol  : BGP4+

NextHop    : ::FFFF:2.2.2.9                              Preference: 255

Interface  : XGE3/0/4                                    Cost      : 0

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

# Execute the display ipv6 routing-table command on the CEs. Verify that the next hop of the OSPFv3 route to the peer CE is the interface connected to the PE (Ten-GigabitEthernet 3/0/1). This means that the VPN traffic to the peer CE is forwarded over the backbone.

[CE1] display ipv6 routing-table

 

Destinations : 8        Routes : 8

 

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 20::/64                                     Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/4                                    Cost      : 0

 

Destination: 20::1/128                                   Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/4                                    Cost      : 0

 

Destination: 30::/64                                     Protocol  : O_INTRA

NextHop    : FE80::8824:DDFF:FE48:409                    Preference: 10

Interface  : XGE3/0/4                                    Cost      : 3

 

Destination: 100::/64                                    Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 100::1/128                                  Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 120::/64                                    Protocol  : O_INTRA

NextHop    : FE80::8816:C4FF:FE9D:106                    Preference: 10

Interface  : XGE3/0/1                                    Cost      : 3

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

# Verify that a sham link has been established on PEs, for example, on PE 1.

[PE1] display ospfv3 sham-link

 

               OSPFv3 Process 100 with Router ID 100.1.1.1

 

 Sham-link (Area: 0.0.0.1)

 Neighbor ID      State  Instance ID  Destination address

 120.1.1.1        P-2-P  0            5::5

# Verify that the peer state is Full on PE 1.

[PE1] display ospfv3 sham-link verbose

 

               OSPFv3 Process 100 with Router ID 100.1.1.1

 

 Sham-link (Area: 0.0.0.1)

 

 Source      : 3::3

 Destination : 5::5

 Interface ID: 2147483649

 Neighbor ID : 120.1.1.1, Neighbor state: Full

 Cost: 1  State: P-2-P  Type: Sham  Instance ID: 0

 Timers: Hello 10, Dead 40, Retransmit 5, Transmit delay 1

 Request list: 0  Retransmit list: 0

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 1:1 import-extcommunity

 vpn-target 1:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 1.1.1.9 0.0.0.0

  network 10.1.1.0 0.0.0.255

#

ospfv3 100 vpn-instance vpn1

 router-id 100.1.1.1

 domain-id 0.0.0.10

 area 0.0.0.1

  sham-link 3::3 5::5

#

 mpls lsr-id 1.1.1.9

#

mpls ldp

#

interface LoopBack0

 ip address 1.1.1.9 255.255.255.255

#

interface LoopBack1

 ip binding vpn-instance vpn1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ospfv3 100 area 0.0.0.1

 ipv6 address 100::2/64

#

interface Ten-GigabitEthernet3/0/4

 ip address 10.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 2.2.2.9 enable

 #

 ip vpn-instance vpn1

  #

  address-family ipv6 unicast

   import-route direct

   import-route ospfv3 100

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:2

 vpn-target 1:1 import-extcommunity

 vpn-target 1:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 2.2.2.9 0.0.0.0

  network 10.1.1.0 0.0.0.255

#

ospfv3 100 vpn-instance vpn1

 router-id 120.1.1.1

 domain-id 0.0.0.10

 area 0.0.0.1

  sham-link 5::5 3::3

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

#

interface LoopBack1

 ip binding vpn-instance vpn1

 ipv6 address 5::5/128

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ospfv3 100 area 0.0.0.1

 ipv6 address 120::2/64

#

interface Ten-GigabitEthernet3/0/5

 ip address 10.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 1.1.1.9 enable

 #

 ip vpn-instance vpn1

  #

  address-family ipv6 unicast

   import-route direct

   import-route ospfv3 100

#

return

·     CE 1:

#

 sysname CE1

#

ospfv3 1

 router-id 6.6.6.6

 area 0.0.0.1

#

interface Ten-GigabitEthernet3/0/1

 ospfv3 1 area 0.0.0.1

 ipv6 address 100::1/64

#

interface Ten-GigabitEthernet3/0/4

 ospfv3 1 area 0.0.0.1

 ospfv3 cost 2

 ipv6 address 20::1/64

#

return

·     CE 2:

#

 sysname CE2

#

ospfv3 1

 router-id 8.8.8.8

 area 0.0.0.1

#

interface Ten-GigabitEthernet3/0/1

 ospfv3 1 area 0.0.0.1

 ipv6 address 120::1/64

#

interface Ten-GigabitEthernet3/0/4

 ospfv3 1 area 0.0.0.1

 ospfv3 cost 2

 ipv6 address 30::2/64

#

return

·     Router A:

#

 sysname RouterA

#

ospfv3 1

 router-id 7.7.7.7

 area 0.0.0.1

#

interface Ten-GigabitEthernet3/0/4

 ospfv3 1 area 0.0.0.1

 ipv6 address 20::2/64

#

interface Ten-GigabitEthernet3/0/5

 ospfv3 1 area 0.0.0.1

 ipv6 address 30::1/64

#

return

Example: Configuring BGP AS number substitution

Network configuration

As shown in Figure 11, CE 1 and CE 2 belong to VPN 1, and are connected to PE 1 and PE 2. The two CEs have the same AS number, 600. Configure BGP AS number substitution on the PEs to avoid route loss.

Figure 11 Network diagram

 

Table 21 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface2

Ten-GigabitEthernet3/0/2

 

Table 22 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/0/1

10:1::2/96

P

Loop0

2.2.2.9/32

 

XGE3/0/2

100::1/96

 

XGE3/0/1

20.1.1.2/24

PE 1

Loop0

10.1.1.1/32

 

XGE3/0/2

30.1.1.1/24

 

XGE3/0/1

10:1::1/96

PE 2

Loop0

10.1.1.2/32

 

XGE3/0/2

20.1.1.1/24

 

XGE3/0/1

10:2::1/96

CE 2

XGE3/0/1

10:2::2/96

 

XGE3/0/2

30.1.1.2/24

 

XGE3/0/2

200::1/96

 

 

 

Procedure

1.     Configure an IGP (OSPF in this example) on the MPLS backbone to establish connectivity between the PEs and the P device.

# Configure PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 10.1.1.1 32

[PE1-LoopBack0] quit

[PE1] interface ten-gigabitethernet 3/0/2

[PE1-Ten-GigabitEthernet3/0/2] ip address 20.1.1.1 24

[PE1-Ten-GigabitEthernet3/0/2] quit

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 10.1.1.1 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] quit

[PE1-ospf-1] quit

# Configure the P device.

<Sysname> system-view

[Sysname] sysname P

[P] interface loopback 0

[P-LoopBack0] ip address 2.2.2.9 32

[P-LoopBack0] quit

[P] interface ten-gigabitethernet 3/0/1

[P-Ten-GigabitEthernet3/0/1] ip address 20.1.1.2 24

[P-Ten-GigabitEthernet3/0/1] quit

[P] interface ten-gigabitethernet 3/0/2

[P-Ten-GigabitEthernet3/0/2] ip address 30.1.1.1 24

[P-Ten-GigabitEthernet3/0/2] quit

[P] ospf

[P-ospf-1] area 0

[P-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0

[P-ospf-1-area-0.0.0.0] quit

[P-ospf-1] quit

# Configure PE 2.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 10.1.1.2 32

[PE2-LoopBack0] quit

[PE2] interface ten-gigabitethernet 3/0/2

[PE2-Ten-GigabitEthernet3/0/2] ip address 30.1.1.2 24

[PE2-Ten-GigabitEthernet3/0/2] quit

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 10.1.1.2 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] quit

[PE2-ospf-1] quit

# Verify that OSPF neighbor relationships can be established between PE 1, the P device, and PE 2:

¡     Execute the display ospf peer command on each device to verify that their OSPF neighbors have reached the FULL state.

¡     Execute the display ip routing-table command to verify that the PEs can learn the routes to the Loopback interfaces on the remote PEs.

2.     Configure basic MPLS and MPLS LDP on the MPLS backbone to establish LDP LSPs:

# Configure PE 1.

[PE1] mpls lsr-id 10.1.1.1

[PE1] mpls ldp

[PE1-ldp] quit

[PE1] interface ten-gigabitethernet 3/0/2

[PE1-Ten-GigabitEthernet3/0/2] mpls enable

[PE1-Ten-GigabitEthernet3/0/2] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/2] quit

# Configure the P device.

[P] mpls lsr-id 2.2.2.9

[P] mpls ldp

[P-ldp] quit

[P] interface ten-gigabitethernet 3/0/1

[P-Ten-GigabitEthernet3/0/1] mpls enable

[P-Ten-GigabitEthernet3/0/1] mpls ldp enable

[P-Ten-GigabitEthernet3/0/1] quit

[P] interface ten-gigabitethernet 3/0/2

[P-Ten-GigabitEthernet3/0/2] mpls enable

[P-Ten-GigabitEthernet3/0/2] mpls ldp enable

[P-Ten-GigabitEthernet3/0/2] quit

[P] commit

# Configure PE 2.

[PE2] mpls lsr-id 10.1.1.2

[PE2] mpls ldp

[PE2-ldp] quit

[PE2] interface ten-gigabitethernet 3/0/2

[PE2-Ten-GigabitEthernet3/0/2] mpls enable

[PE2-Ten-GigabitEthernet3/0/2] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/2] quit

# Verify that LDP sessions can be established between PE 1, the P device, and PE 2:

¡     Execute the display mpls ldp peer command on each device to verify that their LDP sessions are in operational state.

¡     Execute the display mpls ldp lsp command to verify establishment of LDP LSPs.

3.     Configure VPN instances on PEs to provide network access for CEs:

# Configure PE 1.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 100:1

[PE1-vpn-instance-vpn1] vpn-target 111:1

[PE1-vpn-instance-vpn1] quit

[PE1] interface ten-gigabitethernet 3/0/1

[PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/1] ipv6 address 10:1::1 96

[PE1-Ten-GigabitEthernet3/0/1] quit

# Configure PE 2.

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 200:1

[PE2-vpn-instance-vpn1] vpn-target 111:1

[PE2-vpn-instance-vpn1] quit

[PE2] interface ten-gigabitethernet 3/0/1

[PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/1] ipv6 address 10:2::1 96

[PE2-Ten-GigabitEthernet3/0/1] quit

# Configure CE 1.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 10:1::2 96

[CE1-Ten-GigabitEthernet3/0/1] quit

[CE1] interface ten-gigabitethernet 3/0/2

[CE1-Ten-GigabitEthernet3/0/2] ipv6 address 100::1 96

[CE1-Ten-GigabitEthernet3/0/2] quit

# Configure CE 2.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 10:2::2 96

[CE2-Ten-GigabitEthernet3/0/1] quit

[CE2] interface ten-gigabitethernet 3/0/2

[CE2-Ten-GigabitEthernet3/0/2] ipv6 address 200::1 96

[CE2-Ten-GigabitEthernet3/0/2] quit

# Execute the display ip vpn-instance command on the PEs to verify the VPN instance configuration. Make sure the PEs can ping the CEs attached to them.

4.     Establish EBGP peer relationships between each PE and the CE attached to them, and import VPN IPv4 routes.

# Configure CE 1.

[CE1] bgp 600

[CE1-bgp-default] router-id 4.4.4.4

[CE1-bgp-default] peer 10:1::1 as-number 100

[CE1-bgp-default] address-family ipv6 unicast

[CE1-bgp-default-ipv6] peer 10:1::1 enable

[CE1-bgp-default-ipv6] import-route direct

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

# Configure CE 2.

[CE2] bgp 600

[CE2-bgp-default] router-id 5.5.5.5

[CE2-bgp-default] peer 10:2::1 as-number 100

[CE2-bgp-default] address-family ipv6 unicast

[CE2-bgp-default-ipv6] peer 10:2::1 enable

[CE2-bgp-default-ipv6] import-route direct

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

# Configure PE 1.

[PE1] bgp 100

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] peer 10:1::2 as-number 600

[PE1-bgp-default-vpn1] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn1] peer 10:1::2 enable

[PE1-bgp-default-ipv6-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure PE 2.

[PE2] bgp 100

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] peer 10:2::2 as-number 600

[PE2-bgp-default-vpn1] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn1] peer 10:2::2 enable

[PE2-bgp-default-ipv6-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Execute the display bgp peer ipv6 vpn-instance command on the PEs to verify that they have established BGP peer relationships with their CEs and the peer relationships are in Established state.

5.     Establish MP-IBGP peer relationships between PEs:

# Configure PE 1.

[PE1] bgp 100

[PE1-bgp-default] peer 10.1.1.2 as-number 100

[PE1-bgp-default] peer 10.1.1.2 connect-interface loopback 0

[PE1-bgp-default] address-family vpnv6

[PE1-bgp-default-vpnv6] peer 10.1.1.2 enable

[PE1-bgp-default-vpnv6] quit

[PE1-bgp-default] quit

# Configure PE 2.

[PE2] bgp 100

[PE2-bgp-default] peer 10.1.1.1 as-number 100

[PE2-bgp-default] peer 10.1.1.1 connect-interface loopback 0

[PE2-bgp-default] address-family vpnv6

[PE2-bgp-default-vpnv6] peer 10.1.1.1 enable

[PE2-bgp-default-vpnv6] quit

[PE2-bgp-default] quit

# Execute the display ipv6 routing-table command on CE 2 to verify that CE 2 has not learned the route to the VPN (100::/96) behind CE 1.

[CE2] display ipv6 routing-table

Destinations : 6        Routes : 6

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

Destination: 10:2::/96                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

Destination: 10:2::2/128                                 Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

Destination: 200::/96                                    Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/2                                    Cost      : 0

Destination: 200::1/128                                  Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/2                                    Cost      : 0

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

# Execute the display ipv6 routing-table vpn-instance command on the PEs. The output shows the route to the VPN behind the peer CE. This example uses PE 2.

[PE2] display ipv6 routing-table vpn-instance vpn1

Destinations : 7        Routes : 7

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

Destination: 10:1::/96                                   Protocol  : BGP4+

NextHop    : ::FFFF:10.1.1.1                             Preference: 255

Interface  : XGE3/0/2                                    Cost      : 0

Destination: 10:2::/96                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

Destination: 10:2::1/128                                 Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

Destination: 100::/96                                    Protocol  : BGP4+

NextHop    : ::FFFF:10.1.1.1                             Preference: 255

Interface  : XGE3/0/2                                    Cost      : 0

Destination: 200::/96                                    Protocol  : BGP4+

NextHop    : 10:2::2                                     Preference: 255

Interface  : XGE3/0/1                                    Cost      : 0

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

# Enable BGP update packet debugging on CE 2.

<CE2> terminal monitor

<CE2> terminal logging level 7

<CE2> debugging bgp update 10:2::1 ipv6

# Soft-reset all BGP sessions on PE 2.

<PE2> refresh bgp all export ipv6 vpn-instance vpn1

# View the debugging messages on CE 2. The messages show that CE 2 received the route towards CE 1 from PE 2, with an AS path list of 100 600. Because AS number 600 in the AS path list is the local AS number of CE 2, CE 2 determined that a loop exists and ignored the route.

<CE2>*Apr 27 14:24:34:235 2025 CE2 BGP/7/DEBUG:

        BGP_IPV6.: Recv UPDATE from peer 10:2::1 with following destinations:

        Update message length : 107

        Origin       : Incomplete

        AS path      : 100 600

        Next hop     : 10:2::1

*Apr 27 14:24:34:235 2025 CE2 BGP/7/DEBUG:

 BGP.: Error identified while receiving UPDATE message from the peer 10:2::1 and ignored

 Reason: Looping in ASPATH value.

        10:1::/96 PathID 0 ,

        100::/96 PathID 0 ,

6.     Configure BGP AS number substitution:

# Configure BGP AS number substitution on PE 1.

[PE1] bgp 100

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] peer 10:1::2 substitute-as

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure BGP AS number substitution on PE 2.

[PE2] bgp 100

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] peer 10:2::2 substitute-as

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

Verifying the configuration

# On CE 2, verify that among the routes advertised by PE 2 to CE 2, the AS path lists in the routes for 10:1::/96 and 100::/96 have changed from 100 600 to 100 100.

<CE2>*Apr 27 14:26:19:224 2025 CE2 BGP/7/DEBUG:

        BGP_IPV6.: Recv UPDATE from peer 10:2::1 with following destinations:

        Update message length : 107

        Origin       : Incomplete

        AS path      : 100 100

        Next hop     : 10:2::1

*Apr 27 14:26:19:224 2025 CE2 BGP/7/DEBUG: -MDC=1;

        10:1::/96 PathID 0 ,

        100::/96 PathID 0 ,

# Verify that CEs have learned routes to each other. Take CE 2 for example:

<CE2> display ipv6 routing-table

 

Destinations : 8        Routes : 8

 

Destination: ::1/128                                     Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 10:1::/96                                   Protocol  : BGP4+

NextHop    : 10:2::1                                     Preference: 255

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 10:2::/96                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 10:2::2/128                                 Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 100::/96                                    Protocol  : BGP4+

NextHop    : 10:2::1                                     Preference: 255

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 200::/96                                    Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : XGE3/0/2                                    Cost      : 0

 

Destination: 200::1/128                                  Protocol  : Direct

NextHop    : ::1                                         Preference: 0

Interface  : XGE3/0/2                                    Cost      : 0

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop    : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

# Verify that CE 1 and CE 2 can ping the interface addresses of each other. (Details not shown.)

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 111:1 import-extcommunity

 vpn-target 111:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 10.1.1.1 0.0.0.0

  network 20.1.1.0 0.0.0.255

#

 mpls lsr-id 10.1.1.1

#

mpls ldp

#

interface LoopBack0

 ip address 10.1.1.1 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 10:1::1/96

#

interface Ten-GigabitEthernet3/0/2

 ip address 20.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 10.1.1.2 as-number 100

 peer 10.1.1.2 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 10.1.1.2 enable

 #

 ip vpn-instance vpn1

  peer 10:1::2 as-number 600

  peer 10:1::2 substitute-as

  #

  address-family ipv6 unicast

   peer 10:1::2 enable

#

return

·     P:

#

 sysname P

#

ospf 1

 area 0.0.0.0

  network 2.2.2.9 0.0.0.0

  network 20.1.1.0 0.0.0.255

  network 30.1.1.0 0.0.0.255

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip address 20.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/2

 ip address 30.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 200:1

 vpn-target 111:1 import-extcommunity

 vpn-target 111:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 10.1.1.2 0.0.0.0

  network 30.1.1.0 0.0.0.255

#

 mpls lsr-id 10.1.1.2

#

mpls ldp

#

interface LoopBack0

 ip address 10.1.1.2 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 10:2::1/96

#

interface Ten-GigabitEthernet3/0/2

 ip address 30.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 10.1.1.1 as-number 100

 peer 10.1.1.1 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 10.1.1.1 enable

 #

 ip vpn-instance vpn1

  peer 10:2::2 as-number 600

  peer 10:2::2 substitute-as

  #

  address-family ipv6 unicast

   peer 10:2::2 enable

#

return

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 10:1::2/96

#

interface Ten-GigabitEthernet3/0/2

 ipv6 address 100::1/96

#

bgp 600

 router-id 4.4.4.4

 peer 10:1::1 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 10:1::1 enable

#

return

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 10:2::2/96

#

interface Ten-GigabitEthernet3/0/2

 ipv6 address 200::1/96

#

bgp 600

 router-id 5.5.5.5

 peer 10:2::1 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 10:2::1 enable

#

return

Example: Configuring BGP AS number substitution and SoO attribute

Network configuration

CE 1, CE 2, and CE 3 belong to VPN 1, and are connected to PE1, PE 2, and PE 3. CE 1 and CE 2 reside in the same site. CE1, CE2, and CE 3 all use AS number 600.

To avoid route loss, configure BGP AS number substitution on PEs.

To avoid routing loops, configure the same SoO attribute on PE 1 and PE 2 for CE 1 and CE 2.

Figure 12 Network diagram

 

Table 23 Interface label and interface name mappings

Interface label

Interface name

Interface1

Ten-GigabitEthernet3/0/1

Interface2

Ten-GigabitEthernet3/0/2

Interface3

Ten-GigabitEthernet3/0/3

 

Table 24 Interface and IP address assignment

Device

Interface

IP address

Device

Interface

IP address

CE 1

Loop0

100::1/96

CE 3

Loop0

200::1/96

 

XGE3/0/1

10:1::1/96

 

XGE3/0/1

10:3::1/96

CE 2

XGE3/0/1

10:2::1/96

PE 2

Loop0

2.2.2.9/32

PE 1

Loop0

1.1.1.9/32

 

XGE3/0/1

10:2::2/96

 

XGE3/0/1

10:1::2/96

 

XGE3/0/2

40.1.1.1/24

 

XGE3/0/2

20.1.1.1/24

 

XGE3/0/3

20.1.1.2/24

 

XGE3/0/3

30.1.1.1/24

P

Loop0

3.3.3.9/32

PE 3

Loop0

4.4.4.9/32

 

XGE3/0/1

30.1.1.2/24

 

XGE3/0/1

10:3::2/96

 

XGE3/0/2

40.1.1.2/24

 

XGE3/0/2

50.1.1.2/24

 

XGE3/0/3

50.1.1.1/24

Procedure

1.     Configure an IGP (OSPF in this example) on the MPLS backbone to establish connectivity between the PEs and the P device:

# Configure PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.9 32

[PE1-LoopBack0] quit

[PE1] interface ten-gigabitethernet 3/0/2

[PE1-Ten-GigabitEthernet3/0/2] ip address 20.1.1.1 24

[PE1-Ten-GigabitEthernet3/0/2] quit

[PE1] interface ten-gigabitethernet 3/0/3

[PE1-Ten-GigabitEthernet3/0/3] ip address 30.1.1.1 24

[PE1-Ten-GigabitEthernet3/0/3] quit

[PE1] ospf

[PE1-ospf-1] area 0

[PE1-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0

[PE1-ospf-1-area-0.0.0.0] quit

[PE1-ospf-1] quit

# Configure PE 2.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 2.2.2.9 32

[PE2-LoopBack0] quit

[PE2] interface ten-gigabitethernet 3/0/2

[PE2-Ten-GigabitEthernet3/0/2] ip address 40.1.1.1 24

[PE2-Ten-GigabitEthernet3/0/2] quit

[PE2] interface ten-gigabitethernet 3/0/3

[PE2-Ten-GigabitEthernet3/0/3] ip address 20.1.1.2 24

[PE2-Ten-GigabitEthernet3/0/3] quit

[PE2] ospf

[PE2-ospf-1] area 0

[PE2-ospf-1-area-0.0.0.0] network 20.1.1.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255

[PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0

[PE2-ospf-1-area-0.0.0.0] quit

[PE2-ospf-1] quit

# Configure the P device.

<Sysname> system-view

[Sysname] sysname P

[P] interface loopback 0

[P-LoopBack0] ip address 3.3.3.9 32

[P-LoopBack0] quit

[P] interface ten-gigabitethernet 3/0/1

[P-Ten-GigabitEthernet3/0/1] ip address 30.1.1.2 24

[P-Ten-GigabitEthernet3/0/1] quit

[P] interface ten-gigabitethernet 3/0/2

[P-Ten-GigabitEthernet3/0/2] ip address 40.1.1.2 24

[P-Ten-GigabitEthernet3/0/2] quit

[P] interface ten-gigabitethernet 3/0/3

[P-Ten-GigabitEthernet3/0/3] ip address 50.1.1.1 24

[P-Ten-GigabitEthernet3/0/3] quit

[P] ospf

[P-ospf-1] area 0

[P-ospf-1-area-0.0.0.0] network 30.1.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 40.1.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 50.1.1.0 0.0.0.255

[P-ospf-1-area-0.0.0.0] network 3.3.3.9 0.0.0.0

[P-ospf-1-area-0.0.0.0] quit

[P-ospf-1] quit

# Configure PE 3.

<Sysname> system-view

[Sysname] sysname PE3

[PE3] interface loopback 0

[PE3-LoopBack0] ip address 4.4.4.9 32

[PE3-LoopBack0] quit

[PE3] interface ten-gigabitethernet 3/0/2

[PE3-Ten-GigabitEthernet3/0/2] ip address 50.1.1.2 24

[PE3-Ten-GigabitEthernet3/0/2] quit

[PE3] ospf

[PE3-ospf-1] area 0

[PE3-ospf-1-area-0.0.0.0] network 50.1.1.0 0.0.0.255

[PE3-ospf-1-area-0.0.0.0] network 4.4.4.9 0.0.0.0

[PE3-ospf-1-area-0.0.0.0] quit

[PE3-ospf-1] quit

# Verify that OSPF neighbor relationships can be established between PE 1, PE 2, the P device, and PE 3:

¡     Execute the display ospf peer command on each device to verify that their OSPF neighbors have reached the FULL state.

¡     Execute the display ip routing-table command to verify that the PEs can learn the routes to the loopback interfaces on the remote PEs.

2.     Configure basic MPLS and MPLS LDP on the MPLS backbone to establish LDP LSPs:

# Configure PE 1.

[PE1] mpls lsr-id 1.1.1.9

[PE1] mpls ldp

[PE1-ldp] quit

[PE1] interface ten-gigabitethernet 3/0/2

[PE1-Ten-GigabitEthernet3/0/2] mpls enable

[PE1-Ten-GigabitEthernet3/0/2] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/2] quit

[PE1] interface ten-gigabitethernet 3/0/3

[PE1-Ten-GigabitEthernet3/0/3] mpls enable

[PE1-Ten-GigabitEthernet3/0/3] mpls ldp enable

[PE1-Ten-GigabitEthernet3/0/3] quit

# Configure PE 2.

[PE2] mpls lsr-id 2.2.2.9

[PE2] mpls ldp

[PE2-ldp] quit

[PE2] interface ten-gigabitethernet 3/0/2

[PE2-Ten-GigabitEthernet3/0/2] mpls enable

[PE2-Ten-GigabitEthernet3/0/2] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/2] quit

[PE2] interface ten-gigabitethernet 3/0/3

[PE2-Ten-GigabitEthernet3/0/3] mpls enable

[PE2-Ten-GigabitEthernet3/0/3] mpls ldp enable

[PE2-Ten-GigabitEthernet3/0/3] quit

# Configure the P device.

[P] mpls lsr-id 3.3.3.9

[P] mpls ldp

[P-ldp] quit

[P] interface ten-gigabitethernet 3/0/1

[P-Ten-GigabitEthernet3/0/1] mpls enable

[P-Ten-GigabitEthernet3/0/1] mpls ldp enable

[P-Ten-GigabitEthernet3/0/1] quit

[P] interface ten-gigabitethernet 3/0/2

[P-Ten-GigabitEthernet3/0/2] mpls enable

[P-Ten-GigabitEthernet3/0/2] mpls ldp enable

[P-Ten-GigabitEthernet3/0/2] quit

[P] interface ten-gigabitethernet 3/0/3

[P-Ten-GigabitEthernet3/0/3] mpls enable

[P-Ten-GigabitEthernet3/0/3] mpls ldp enable

[P-Ten-GigabitEthernet3/0/3] quit

# Configure PE 3.

[PE3] mpls lsr-id 4.4.4.9

[PE3] mpls ldp

[PE3-ldp] quit

[PE3] interface ten-gigabitethernet 3/0/2

[PE3-Ten-GigabitEthernet3/0/2] mpls enable

[PE3-Ten-GigabitEthernet3/0/2] mpls ldp enable

[PE3-Ten-GigabitEthernet3/0/2] quit

# Verify that LDP sessions can be established between PE 1, PE 2, the P device, and PE 3:

¡     Execute the display mpls ldp peer command on each device to verify that their LDP sessions are in operational state.

¡     Execute the display mpls ldp lsp command to verify establishment of LDP LSPs.

3.     Configure VPN instances on PEs to provide network access for CEs:

# Configure PE 1.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] route-distinguisher 100:1

[PE1-vpn-instance-vpn1] vpn-target 111:1

[PE1-vpn-instance-vpn1] quit

[PE1] interface ten-gigabitethernet 3/0/1

[PE1-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE1-Ten-GigabitEthernet3/0/1] ipv6 address 10:1::2 96

[PE1-Ten-GigabitEthernet3/0/1] quit

# Configure PE 2.

[PE2] ip vpn-instance vpn1

[PE2-vpn-instance-vpn1] route-distinguisher 200:1

[PE2-vpn-instance-vpn1] vpn-target 111:1

[PE2-vpn-instance-vpn1] quit

[PE2] interface ten-gigabitethernet 3/0/1

[PE2-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE2-Ten-GigabitEthernet3/0/1] ipv6 address 10:2::2 96

[PE2-Ten-GigabitEthernet3/0/1] quit

# Configure PE 3.

[PE3] ip vpn-instance vpn1

[PE3-vpn-instance-vpn1] route-distinguisher 300:1

[PE3-vpn-instance-vpn1] vpn-target 111:1

[PE3-vpn-instance-vpn1] quit

[PE3] interface ten-gigabitethernet 3/0/1

[PE3-Ten-GigabitEthernet3/0/1] ip binding vpn-instance vpn1

[PE3-Ten-GigabitEthernet3/0/1] ipv6 address 10:3::2 96

[PE3-Ten-GigabitEthernet3/0/1] quit

# Configure CE 1.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface ten-gigabitethernet 3/0/1

[CE1-Ten-GigabitEthernet3/0/1] ipv6 address 10:1::1 96

[CE1-Ten-GigabitEthernet3/0/1] quit

[CE1] interface loopback 0

[CE1-LoopBack0] ipv6 address 100::1 96

[CE1-LoopBack0] quit

# Configure CE 2.

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface ten-gigabitethernet 3/0/1

[CE2-Ten-GigabitEthernet3/0/1] ipv6 address 10:2::1 96

[CE2-Ten-GigabitEthernet3/0/1] quit

# Configure CE 3.

<Sysname> system-view

[Sysname] sysname CE3

[CE3] interface ten-gigabitethernet 3/0/1

[CE3-Ten-GigabitEthernet3/0/1] ipv6 address 10:3::1 96

[CE3-Ten-GigabitEthernet3/0/1] quit

[CE3] interface loopback 0

[CE3-LoopBack0] ipv6 address 200::1 96

[CE3-LoopBack0] quit

# Execute the display ip vpn-instance command on the PEs to verify the VPN instance configuration. Make sure the PEs can ping the CEs attached to them.

4.     Establish EBGP peer relationships between each PE and the CE attached to them, and redistribute VPN routes:

# Configure CE 1.

[CE1] bgp 600

[CE1-bgp-default] router-id 5.5.5.5

[CE1-bgp-default] peer 10:1::2 as-number 100

[CE1-bgp-default] address-family ipv6 unicast

[CE1-bgp-default-ipv6] peer 10:1::2 enable

[CE1-bgp-default-ipv6] import-route direct

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

# Configure CE 2.

[CE2] bgp 600

[CE2-bgp-default] router-id 6.6.6.6

[CE2-bgp-default] peer 10:2::2 as-number 100

[CE2-bgp-default] address-family ipv6 unicast

[CE2-bgp-default-ipv6] peer 10:2::2 enable

[CE2-bgp-default-ipv6] import-route direct

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

# Configure CE 3.

[CE3] bgp 600

[CE3-bgp-default] router-id 7.7.7.7

[CE3-bgp-default] peer 10:3::2 as-number 100

[CE3-bgp-default] address-family ipv6 unicast

[CE3-bgp-default-ipv6] peer 10:3::2 enable

[CE3-bgp-default-ipv6] import-route direct

[CE3-bgp-default-ipv6] quit

[CE3-bgp-default] quit

5.     Configure BGP AS number substitution:

# Configure BGP AS number substitution on PE 1.

[PE1] bgp 100

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] peer 10:1::1 as-number 600

[PE1-bgp-default-vpn1] peer 10:1::1 substitute-as

[PE1-bgp-default-vpn1] address-family ipv6 unicast

[PE1-bgp-default-ipv6-vpn1] peer 10:1::1 enable

[PE1-bgp-default-ipv6-vpn1] quit

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure BGP AS number substitution on PE 2.

[PE2] bgp 100

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] peer 10:2::1 as-number 600

[PE2-bgp-default-vpn1] peer 10:2::1 substitute-as

[PE2-bgp-default-vpn1] address-family ipv6 unicast

[PE2-bgp-default-ipv6-vpn1] peer 10:2::1 enable

[PE2-bgp-default-ipv6-vpn1] quit

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Configure BGP AS number substitution on PE 3.

[PE3] bgp 100

[PE3-bgp-default] ip vpn-instance vpn1

[PE3-bgp-default-vpn1] peer 10:3::1 as-number 600

[PE3-bgp-default-vpn1] peer 10:3::1 substitute-as

[PE3-bgp-default-vpn1] address-family ipv6 unicast

[PE3-bgp-default-ipv6-vpn1] peer 10:3::1 enable

[PE3-bgp-default-ipv6-vpn1] quit

[PE3-bgp-default-vpn1] quit

[PE3-bgp-default] quit

# Execute the display bgp peer ipv4 vpn-instance command on the PEs to verify that they have established BGP peer relationships with their CEs and the peer relationships are in Established state.

6.     Establish MP-IBGP peer relationships between PEs and specify PE 1 as the RR:

# Configure PE 1.

[PE1] bgp 100

[PE1-bgp-default] peer 2.2.2.9 as-number 100

[PE1-bgp-default] peer 4.4.4.9 as-number 100

[PE1-bgp-default] peer 2.2.2.9 connect-interface loopback 0

[PE1-bgp-default] peer 4.4.4.9 connect-interface loopback 0

[PE1-bgp-default] address-family vpnv6

[PE1-bgp-default-vpnv6] peer 2.2.2.9 enable

[PE1-bgp-default-vpnv6] peer 2.2.2.9 reflect-client

[PE1-bgp-default-vpnv6] peer 4.4.4.9 enable

[PE1-bgp-default-vpnv6] peer 4.4.4.9 reflect-client

[PE1-bgp-default-vpnv6] quit

[PE1-bgp-default] quit

# Configure PE 2.

[PE2] bgp 100

[PE2-bgp-default] peer 1.1.1.9 as-number 100

[PE2-bgp-default] peer 1.1.1.9 connect-interface loopback 0

[PE2-bgp-default] address-family vpnv6

[PE2-bgp-default-vpnv6] peer 1.1.1.9 enable

[PE2-bgp-default-vpnv6] quit

[PE2-bgp-default] quit

# Configure PE 3.

[PE3] bgp 100

[PE3-bgp-default] peer 1.1.1.9 as-number 100

[PE3-bgp-default] peer 1.1.1.9 connect-interface loopback 0

[PE3-bgp-default] address-family vpnv6

[PE3-bgp-default-vpnv6] peer 1.1.1.9 enable

[PE3-bgp-default-vpnv6] quit

[PE3-bgp-default] quit

[PE3] commit

7.     Configure BGP SoO attributes:

# Display routing information on CE 2. The output shows that CE 2 has learned the route for 100::/96 from CE 1. Routing loop occurs when the route advertised by CE 1 is re-advertised back to the site where CE 1 and CE 2 reside via PE 1, PE 2, and CE 2.

 

<CE2> display ipv6 routing-table

 

Destinations : 8        Routes : 8

 

Destination: ::1/128                                     Protocol  : Direct

NextHop     : ::1                                         Preference: 0

Interface  : InLoop0                                     Cost      : 0

 

Destination: 10:1::/96                                   Protocol  : BGP4+

NextHop     : 10:2::2                                     Preference: 255

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 10:2::/96                                   Protocol  : Direct

NextHop     : ::                                          Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 10:2::1/128                                 Protocol  : Direct

NextHop     : ::1                                         Preference: 0

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 10:3::/96                                   Protocol  : BGP4+

NextHop     : 10:2::2                                     Preference: 255

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 100::/96                                    Protocol  : BGP4+

NextHop     : 10:2::2                                     Preference: 255

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: 200::/96                                    Protocol  : BGP4+

NextHop     : 10:2::2                                     Preference: 255

Interface  : XGE3/0/1                                    Cost      : 0

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop     : ::                                          Preference: 0

Interface  : InLoop0                                     Cost      : 0

# On PE 1, configure the SoO attribute as 1:100 for CE 1.

<PE1> system-view

[PE1] bgp 100

[PE1-bgp-default] ip vpn-instance vpn1

[PE1-bgp-default-vpn1] address-family ipv6

[PE1-bgp-default-ipv6-vpn1] peer 10:1::1 soo 1:100

# On PE 2, configure the SoO attribute as 1:100 for CE 2.

<PE2> system-view

[PE2] bgp 100

[PE2-bgp-default] ip vpn-instance vpn1

[PE2-bgp-default-vpn1] address-family ipv6

[PE2-bgp-default-ipv6-vpn1] peer 10:2::1 soo 1:100

Verifying the configuration

# PE 2 does not advertise routes received from CE 1 to CE 2 because the same SoO attribute has been configured. Display the routing table of CE 2. The output shows that the route 100::/96 has been removed.

<CE2> display ipv6 routing-table

 

Destinations : 6        Routes : 6

 

Destination: ::1/128                                     Protocol  : Direct

NextHop     : ::1                                          Preference: 0

Interface   : InLoop0                                     Cost      : 0

 

Destination: 10:2::/96                                   Protocol  : Direct

NextHop     : ::                                           Preference: 0

Interface  : XGE3/0/1                                     Cost      : 0

 

Destination: 10:2::1/128                                 Protocol  : Direct

NextHop     : ::1                                          Preference: 0

Interface   : XGE3/0/1                                    Cost      : 0

 

Destination: 10:3::/96                                   Protocol  : BGP4+

NextHop     : 10:2::2                                     Preference: 255

Interface   : XGE3/0/1                                    Cost      : 0

 

Destination: 200::/96                                    Protocol  : BGP4+

NextHop     : 10:2::2                                     Preference: 255

Interface   : XGE3/0/1                                    Cost      : 0

 

Destination: FE80::/10                                   Protocol  : Direct

NextHop     : ::                                           Preference: 0

Interface   : InLoop0                                     Cost      : 0

Configuration files

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 111:1 import-extcommunity

 vpn-target 111:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 1.1.1.9 0.0.0.0

  network 20.1.1.0 0.0.0.255

  network 30.1.1.0 0.0.0.255

#

 mpls lsr-id 1.1.1.9

#

mpls ldp

#

interface LoopBack0

 ip address 1.1.1.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 10:1::2/96

#

interface Ten-GigabitEthernet3/0/2

 ip address 20.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/3

 ip address 30.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 2.2.2.9 as-number 100

 peer 2.2.2.9 connect-interface LoopBack0

 peer 4.4.4.9 as-number 100

 peer 4.4.4.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 2.2.2.9 enable

  peer 2.2.2.9 reflect-client

  peer 4.4.4.9 enable

  peer 4.4.4.9 reflect-client

 #

 ip vpn-instance vpn1

  peer 10:1::1 as-number 600

  peer 10:1::1 substitute-as

  #

  address-family ipv6 unicast

   peer 10:1::1 enable

   peer 10:1::1 soo 1:100

#

return

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 200:1

 vpn-target 111:1 import-extcommunity

 vpn-target 111:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 2.2.2.9 0.0.0.0

  network 20.1.1.0 0.0.0.255

  network 40.1.1.0 0.0.0.255

#

 mpls lsr-id 2.2.2.9

#

mpls ldp

#

interface LoopBack0

 ip address 2.2.2.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 10:2::2/96

#

interface Ten-GigabitEthernet3/0/2

 ip address 40.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/3

 ip address 20.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 1.1.1.9 enable

 #

 ip vpn-instance vpn1

  peer 10:2::1 as-number 600

  peer 10:2::1 substitute-as

  #

  address-family ipv6 unicast

   peer 10:2::1 enable

   peer 10:2::1 soo 1:100

#

return

·     P:

#

 sysname P

#

ospf 1

 area 0.0.0.0

  network 3.3.3.9 0.0.0.0

  network 30.1.1.0 0.0.0.255

  network 40.1.1.0 0.0.0.255

  network 50.1.1.0 0.0.0.255

#

 mpls lsr-id 3.3.3.9

#

mpls ldp

#

interface LoopBack0

 ip address 3.3.3.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip address 30.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/2

 ip address 40.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

interface Ten-GigabitEthernet3/0/3

 ip address 50.1.1.1 255.255.255.0

 mpls enable

 mpls ldp enable

#

return

·     PE 3:

#

 sysname PE3

#

ip vpn-instance vpn1

 route-distinguisher 300:1

 vpn-target 111:1 import-extcommunity

 vpn-target 111:1 export-extcommunity

#

ospf 1

 area 0.0.0.0

  network 4.4.4.9 0.0.0.0

  network 50.1.1.0 0.0.0.255

#

 mpls lsr-id 4.4.4.9

#

mpls ldp

#

interface LoopBack0

 ip address 4.4.4.9 255.255.255.255

#

interface Ten-GigabitEthernet3/0/1

 ip binding vpn-instance vpn1

 ipv6 address 10:3::2/96

#

interface Ten-GigabitEthernet3/0/2

 ip address 50.1.1.2 255.255.255.0

 mpls enable

 mpls ldp enable

#

bgp 100

 peer 1.1.1.9 as-number 100

 peer 1.1.1.9 connect-interface LoopBack0

 #

 address-family vpnv6

  peer 1.1.1.9 enable

 #

 ip vpn-instance vpn1

  peer 10:3::1 as-number 600

  peer 10:3::1 substitute-as

  #

  address-family ipv6 unicast

   peer 10:3::1 enable

#

return

·     CE 1:

#

 sysname CE1

#

interface LoopBack0

 ipv6 address 100::1/96

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 10:1::1/96

#

bgp 600

 router-id 5.5.5.5

 peer 10:1::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 10:1::2 enable

#

return

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 10:2::1/96

#

bgp 600

 router-id 6.6.6.6

 peer 10:2::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 10:2::2 enable

#

return

·     CE 3:

#

 sysname CE3

#

interface LoopBack0

 ipv6 address 200::1/96

#

interface Ten-GigabitEthernet3/0/1

 ipv6 address 10:3::1/96

#

bgp 600

 router-id 7.7.7.7

 peer 10:3::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 10:3::2 enable

#

return

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us