02-Configuration Examples

HomeSupportRoutersCR16000-F SeriesConfigure & DeployConfiguration ExamplesH3C CR16000-F Routers Configuration Examples All-In-One-R8630Pxx-6W10002-Configuration Examples
Table of Contents
Related Documents
45-H3C_SRv6 Configuration Examples
Title Size Download
45-H3C_SRv6 Configuration Examples 1.28 MB

Contents

Example: Configuring IPv4 L3VPN over SRv6 BE ECMP·· 1

Network configuration· 1

Restrictions and guidelines· 1

Procedures· 2

Configuring CE 1· 2

Configuring PE 1· 2

Configuring P 1· 4

Configuring P 2· 4

Configuring PE 2· 5

Configuring CE 2· 6

Verifying the configuration· 7

Configuration files· 7

Example: Configuring VPN FRR for IPv4 L3VPN over SRv6 BE·· 12

Network configuration· 12

Restrictions and guidelines· 13

Procedures· 13

Configuring CE 1· 13

Configuring PE 1· 13

Configuring PE 2· 15

Configuring PE 3· 17

Configuring CE 2· 18

Verifying the configuration· 19

Configuration files· 20

Example: Configuring inter-AS IPv4 L3VPN over SRv6 BE·· 25

Network configuration· 25

Procedures· 26

Configuring CE 1· 26

Configuring PE 1· 26

Configuring ASBR 1· 28

Configuring ASBR 2· 29

Configuring PE 2· 30

Configuring CE 2· 31

Verifying the configuration· 32

Configuration files· 33

Example: Configuring IPv4 L3VPN over SRv6 TE policy (static configuration) 38

Network configuration· 38

Restrictions and guidelines· 39

Procedures· 39

Configuring CE 1· 39

Configuring PE 1· 39

Configuring P· 42

Configuring PE 2· 42

Configuring CE 2· 44

Verifying the configuration· 45

Configuration files· 47

Example: Configuring inter-AS IPv4 L3VPN over SRv6 TE policy (static configuration) 51

Network configuration· 51

Procedures· 52

Configuring CE 1· 52

Configuring PE 1· 52

Configuring ASBR 1· 55

Configuring ASBR 2· 56

Configuring PE 2· 57

Configuring CE 2· 60

Verifying the configuration· 60

Configuration files· 62

Example: Configuring IPv4 EVPN L3VPN over SRv6 TE policy (static configuration) 68

Network configuration· 68

Restrictions and guidelines· 69

Procedures· 69

Configuring CE 1· 69

Configuring PE 1· 70

Configuring P· 72

Configuring PE 2· 72

Configuring CE 2· 75

Verifying the configuration· 75

Configuration files· 76

Example: Configuring IPv6 EVPN L3VPN over SRv6 BE·· 81

Network configuration· 81

Procedures· 81

Configuring CE 1· 81

Configuring PE 1· 82

Configuring P· 83

Configuring PE 2· 84

Configuring CE 2· 85

Verifying the configuration· 86

Configuration files· 87

Example: Configuring IPv6 EVPN L3VPN over SRv6 BE ECMP·· 90

Network configuration· 90

Restrictions and guidelines· 91

Procedures· 91

Configuring CE 1· 91

Configuring PE 1· 92

Configuring P 1· 93

Configuring P 2· 94

Configuring PE 2· 94

Configuring CE 2· 96

Verifying the configuration· 96

Configuration files· 97

Example: Configuring IPv6 EVPN L3VPN over SRv6 BE FRR·· 101

Network configuration· 101

Procedures· 102

Configuring CE 1· 102

Configuring PE 1· 103

Configuring PE 2· 105

Configuring PE 3· 106

Configuring CE 2· 108

Verifying the configuration· 108

Configuration files· 110

Example: Configuring IPv6 EVPN L3VPN over SRv6 TE policy (static configuration) 115

Network configuration· 115

Restrictions and guidelines· 116

Procedures· 116

Configuring CE 1· 116

Configuring PE 1· 117

Configuring P· 119

Configuring PE 2· 119

Configuring CE 2· 122

Verifying the configuration· 122

Configuration files· 123

Example: Configuring connectivity between EVPN L3VPN and EVPN L3VPN over SRv6  128

Network configuration· 128

Configuration analysis· 129

Restrictions and guidelines· 129

Procedures· 129

Configuring PE 1· 129

Configuring PE 2· 132

Configuring PE 3· 135

Configuring CE 1· 137

Configuring CE 2· 137

Configuring CE 3· 138

Configuring CE 4· 138

Configuring CE 5· 138

Verifying the configuration· 139

Verifying IS-IS neighbor and BGP peer establishment 139

Verifying packet forwarding from EVPN L3VPN to EVPN L3VPN over SRv6· 140

Verifying packet forwarding from EVPN L3VPN over SRv6 to EVPN L3VPN· 143

Verifying connectivity between CEs· 145

Configuration files· 146

Example: Configuring EVPN VPWS over SRv6 BE (dual-homed single-active CE) 153

Network configuration· 153

Procedures· 154

Configuring CE 1· 154

Configuring PE 1· 154

Configuring PE 2· 156

Configuring PE 3· 157

Configuring CE 2· 159

Verifying the configuration· 159

Configuration files· 160

Example: Configuring EVPN VPWS over SRv6 TE policy (static configuration) 164

Network configuration· 164

Procedures· 164

Configuring CE 1· 164

Configuring PE 1· 164

Configuring PE 2· 166

Configuring P· 168

Configuring CE 2· 169

Verifying the configuration· 169

Configuration files· 169

Example: Configuring EVPN VPLS over SRv6 TE policy (static configuration) 173

Network configuration· 173

Procedures· 174

Configuring CE 1· 174

Configuring PE 1· 174

Configuring PE 2· 176

Configuring P· 178

Configuring CE 2· 178

Verifying the configuration· 178

Configuration files· 179

Related documentation· 183

 


Example: Configuring IPv4 L3VPN over SRv6 BE ECMP

Network configuration

As shown in Figure 1, the carrier network is an IPv6 network, and the private network is an IPv4 network. PE 1, P 1, P 2, and PE 2 belong to the same AS, and they use IS-IS for communication in the IPv6 network. Establish two SRv6 tunnels with the same cost between PE 1 and PE 2 to transmit IPv4 L3VPN data.

Figure 1 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

10.1.1.1/24

CE 2

XGE3/1/1

20.1.1.1/24

PE 1

Loop1

1::1/128

PE 2

Loop1

4::4/128

 

XGE3/1/1

10.1.1.2/24

 

XGE3/1/1

20.1.1.2/24

 

XGE3/1/2

2001::1/96

 

XGE3/1/2

2002::1/96

 

XGE3/1/3

3001::1/96

 

XGE3/1/3

3002::1/96

P 1

Loop1

2::2/128

P 2

Loop1

3::3/128

 

XGE3/1/1

2001::2/96

 

XGE3/1/1

3001::2/96

 

XGE3/1/2

2002::2/96

 

XGE3/1/2

3002::2/96

 

Restrictions and guidelines

SRv6 BE ECMP relies on equal-cost routes in the network. To ensure successful configuration, plan the IGP costs of links reasonably. In this example, all links use the default cost 10.

Procedures

Configuring CE 1

<Sysname> system-view

[Sysname] sysname CE1

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

[CE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.1 24

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

[CE1] bgp 200

[CE1-bgp-default] router-id 11.11.11.11

[CE1-bgp-default] peer 10.1.1.2 as-number 100

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

[CE1-bgp-default-ipv4] peer 10.1.1.2 enable

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

[CE1-bgp-default-ipv4] quit

[CE1-bgp-default] quit

Configuring PE 1

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices. Configure IS-IS BFD to increase the IS-IS convergence speed upon link state changes.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 bfd enable

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

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

[PE1-Ten-GigabitEthernet3/1/3] ipv6 address 3001::1 96

[PE1-Ten-GigabitEthernet3/1/3] isis ipv6 enable 1

[PE1-Ten-GigabitEthernet3/1/3] isis ipv6 bfd enable

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

# Configure a VPN instance on the PE to allow CE access.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 10.1.1.1 as-number 200

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

[PE1-bgp-default-ipv4-vpn1] peer 10.1.1.1 enable

[PE1-bgp-default-ipv4-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish MP-IBGP peer relationship between PEs.

[PE1-bgp-default] peer 4::4 as-number 100

[PE1-bgp-default] peer 4::4 connect-interface loopback 1

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 4::4 enable

[PE1-bgp-default-vpnv4] quit

[PE1-bgp-default] quit

# On the PE, specify a source address for the outer IPv6 header of SRv6-encapsulated IP L3VPN packets.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

# On the PE, configure the locator for the destination address End.DT4 SID of the IPv6 packet header encapsulated in IP L3VPN over SRv6.

[PE1-segment-routing-ipv6] locator abc ipv6-prefix 100:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] quit

[PE1-segment-routing-ipv6] quit

# Configure IS-IS on the PE to reference and advertise the locator.

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator abc

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

# Enable the PE to exchange End.DT4 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT4 SID routes.

[PE1] bgp 100

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 4::4 prefix-sid

[PE1-bgp-default-vpnv4] quit

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

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

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 best-effort

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

Configuring P 1

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices. Configure IS-IS BFD to increase the IS-IS convergence speed upon link state changes.

<Sysname> system-view

[Sysname] sysname P1

[P1] isis 1

[P1-isis-1] cost-style wide

[P1-isis-1] network-entity 00.0000.0000.0002.00

[P1-isis-1] address-family ipv6 unicast

[P1-isis-1-ipv6] quit

[P1-isis-1] quit

[P1] interface loopback 1

[P1-LoopBack1] ipv6 address 2::2 128

[P1-LoopBack1] isis ipv6 enable 1

[P1-LoopBack1] quit

[P1] interface ten-gigabitethernet 3/1/1

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

[P1-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[P1-Ten-GigabitEthernet3/1/1] isis ipv6 bfd enable

[P1-Ten-GigabitEthernet3/1/1] quit

[P1] interface ten-gigabitethernet 3/1/2

[P1-Ten-GigabitEthernet3/1/2] ipv6 address 2002::2 96

[P1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[P1-Ten-GigabitEthernet3/1/2] isis ipv6 bfd enable

[P1-Ten-GigabitEthernet3/1/2] quit

Configuring P 2

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices. Configure IS-IS BFD to increase the IS-IS convergence speed upon link state changes.

<Sysname> system-view

[Sysname] sysname P2

[P2] isis 1

[P2-isis-1] cost-style wide

[P2-isis-1] network-entity 00.0000.0000.0003.00

[P2-isis-1] address-family ipv6 unicast

[P2-isis-1-ipv6] quit

[P2-isis-1] quit

[P2] interface loopback 1

[P2-LoopBack1] ipv6 address 3::3 128

[P2-LoopBack1] isis ipv6 enable 1

[P2-LoopBack1] quit

[P2] interface ten-gigabitethernet 3/1/1

[P2-Ten-GigabitEthernet3/1/1] ipv6 address 3001::2 96

[P2-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[P2-Ten-GigabitEthernet3/1/1] isis ipv6 bfd enable

[P2-Ten-GigabitEthernet3/1/1] quit

[P2] interface ten-gigabitethernet 3/1/2

[P2-Ten-GigabitEthernet3/1/2] ipv6 address 3002::2 96

[P2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[P2-Ten-GigabitEthernet3/1/2] isis ipv6 bfd enable

[P2-Ten-GigabitEthernet3/1/2] quit

Configuring PE 2

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices. Configure IS-IS BFD to increase the IS-IS convergence speed upon link state changes.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0004.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 4::4 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 bfd enable

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

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

[PE2-Ten-GigabitEthernet3/1/3] ipv6 address 3002::1 96

[PE2-Ten-GigabitEthernet3/1/3] isis ipv6 enable 1

[PE2-Ten-GigabitEthernet3/1/3] isis ipv6 bfd enable

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

# Configure a VPN instance on the PE to allow CE access.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE2] bgp 100

[PE2-bgp-default] router-id 4.4.4.4

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

[PE2-bgp-default-vpn1] peer 20.1.1.1 as-number 300

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

[PE2-bgp-default-ipv6-vpn1] peer 20.1.1.1 enable

[PE2-bgp-default-ipv6-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish MP-IBGP peer relationship between PEs.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 enable

[PE2-bgp-default-vpnv4] quit

[PE2-bgp-default] quit

# On the PE, specify a source address for the outer IPv6 header of SRv6-encapsulated IP L3VPN packets.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 4::4

# On the PE, configure the locator for the destination address End.DT4 SID of the IPv6 packet header encapsulated in IP L3VPN over SRv6.

[PE2-segment-routing-ipv6] locator abc ipv6-prefix 200:1:: 64 static 16

[PE2-segment-routing-ipv6-locator-abc] quit

[PE2-segment-routing-ipv6] quit

# On the PE, configure IS-IS to reference and advertise the locator.

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator abc

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

# Enable the PE to exchange End.DT4 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT4 SID routes.

[PE2] bgp 100

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 prefix-sid

[PE2-bgp-default-vpnv4] quit

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

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

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 best-effort

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

Configuring CE 2

<Sysname> system-view

[Sysname] sysname CE2

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

[CE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.1 24

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

[CE2] bgp 300

[CE2-bgp-default] router-id 22.22.22.22

[CE2-bgp-default] peer 20.1.1.2 as-number 100

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

[CE2-bgp-default-ipv4] peer 20.1.1.2 enable

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

[CE2-bgp-default-ipv4] quit

[CE2-bgp-default] quit

Verifying the configuration

# Execute the display ip routing-table vpn-instance command on PE 1 to view VPN route information. Verify that VPN route 20.1.1.1/24 has two egress interfaces, form ECMP routes.

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

Destinations : 11       Routes : 11

Destination/Mask   Proto   Pre Cost        NextHop         Interface

0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0

10.1.1.0/24        Direct  0   0           10.1.1.2        XGE3/1/1

10.1.1.0/32        Direct  0   0           10.1.1.2        XGE3/1/1

10.1.1.2/32        Direct  0   0           127.0.0.1       InLoop0

10.1.1.255/32      Direct  0   0           10.1.1.2        XGE3/1/1

20.1.1.0/24        BGP     255 0           200:1::         XGE3/1/2

                   BGP     255 0           200:1::         XGE3/1/3

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.0/32       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 CE 1 and CE 2 can ping each other.

[CE1] ping -a 10.1.1.1 20.1.1.1

Ping 20.1.1.1 (20.1.1.1) from 10.1.1.1: 56 data bytes, press CTRL+C to break

56 bytes from 20.1.1.1: icmp_seq=0 ttl=253 time=1.000 ms

56 bytes from 20.1.1.1: icmp_seq=1 ttl=253 time=1.000 ms

56 bytes from 20.1.1.1: icmp_seq=2 ttl=253 time=1.000 ms

56 bytes from 20.1.1.1: icmp_seq=3 ttl=253 time=1.000 ms

56 bytes from 20.1.1.1: icmp_seq=4 ttl=253 time=2.000 ms

--- Ping statistics for 20.1.1.1 ---

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

round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 10.1.1.1 255.255.255.0

#

bgp 200

 router-id 11.11.11.11

 peer 10.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 10.1.1.2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 non-stop-routing

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ip address 10.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 isis ipv6 bfd enable

 ipv6 address 2001::1/96

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 isis ipv6 enable 1

 isis ipv6 bfd enable

 ipv6 address 3001::1/96

#

bgp 100

 router-id 1.1.1.1

 peer 4::4 as-number 100

 peer 4::4 connect-interface LoopBack1

 #

 address-family vpnv4

  peer 4::4 enable

  peer 4::4 prefix-sid

 #

 ip vpn-instance vpn1

  peer 10.1.1.1 as-number 200

  #

  address-family ipv4 unicast

   segment-routing ipv6 best-effort

   segment-routing ipv6 locator abc

   import-route direct

   peer 10.1.1.1 enable

#

segment-routing ipv6

 encapsulation source-address 1::1

 #

 locator abc ipv6-prefix 100:1:: 64 static 16

#

·     P 1:

#

 sysname P1

#

isis 1

 non-stop-routing

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 isis ipv6 bfd enable

 ipv6 address 2001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 isis ipv6 bfd enable

 ipv6 address 2002::2/96

#

·     P 2:

#

 sysname P2

#

isis 1

 non-stop-routing

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 isis ipv6 bfd enable

 ipv6 address 3001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 isis ipv6 bfd enable

 ipv6 address 3002::2/96

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 non-stop-routing

 cost-style wide

 network-entity 00.0000.0000.0004.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 4::4/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ip address 20.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 isis ipv6 bfd enable

 ipv6 address 2002::1/96

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 isis ipv6 enable 1

 isis ipv6 bfd enable

 ipv6 address 3002::1/96

#

bgp 100

 router-id 4.4.4.4

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family vpnv4

  peer 1::1 enable

  peer 1::1 prefix-sid

 #

 ip vpn-instance vpn1

  peer 20.1.1.1 as-number 300

  #

  address-family ipv4 unicast

   segment-routing ipv6 best-effort

   segment-routing ipv6 locator abc

   import-route direct

   peer 20.1.1.1 enable

#

segment-routing ipv6

 encapsulation source-address 4::4

 #

 locator abc ipv6-prefix 200:1:: 64 static 16

#

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 20.1.1.1 255.255.255.0

#

bgp 300

 router-id 22.22.22.22

 peer 20.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 20.1.1.2 enable

#

Example: Configuring VPN FRR for IPv4 L3VPN over SRv6 BE

Network configuration

As shown in Figure 2, the core network is an IPv6 network, and the private network is an IPv4 network. PE 1, PE 2, and PE 3 belong to the same AS, and they use IS-IS for communication in the IPv6 network. Establish SRv6 tunnels between PE 1 and PE 2 and between PE 1 and PE 3 to transmit IPv4 L3VPN data. CE 2 is dual-homed to PE 2 and PE 3. To implement fast switchover of VPN routes, enable IPv4 L3VPN FRR on PE 1. When the primary path fails, the VPN services can quickly switch to the backup path.

Figure 2 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

10.1.1.1/24

CE 2

XGE3/1/1

20.1.1.1/24

 

Loop0

11.11.11.11/32

 

XGE3/1/2

30.1.1.1/24

PE 1

Loop1

1::1/128

 

Loop0

22.22.22.22/32

 

XGE3/1/1

10.1.1.2/24

PE 3

Loop1

3::3/128

 

XGE3/1/2

2001::1/96

 

XGE3/1/2

30.1.1.2/24

 

XGE3/1/3

3001::1/96

 

XGE3/1/3

3001::2/96

PE 2

Loop1

2::2/128

 

 

 

 

XGE3/1/1

20.1.1.2/24

 

 

 

 

XGE3/1/2

2001::2/96

 

 

 

 

Restrictions and guidelines

VPN FRR for IPv4 L3VPN over SRv6 BE requires PE 1 to learn VPNv4 routes separately from PE 2 and PE 3, and the learned routes cannot be ECMP routes. To ensure successful configuration of VPN FRR, plan the IGP costs of the links reasonably. In this example, all links use the default cost 10.

Procedures

Configuring CE 1

<CE1> system-view

[CE1] sysname CE1

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

[CE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.1 24

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

[CE1] interface loopback 0

[CE1-LoopBack0] ip address 11.11.11.11 32

[CE1-LoopBack0] quit

[CE1] bgp 200

[CE1-bgp-default] router-id 11.11.11.11

[CE1-bgp-default] peer 10.1.1.2 as-number 100

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

[CE1-bgp-default-ipv4] peer 10.1.1.2 enable

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

[CE1-bgp-default-ipv4] quit

[CE1-bgp-default] quit

Configuring PE 1

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<PE1> system-view

[PE1] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

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

[PE1-Ten-GigabitEthernet3/1/3] ipv6 address 3001::1 96

[PE1-Ten-GigabitEthernet3/1/3] isis ipv6 enable 1

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

# Configure a VPN instance for CE 1 to access PE 1.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.2 24

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

# Establish EBGP peer relationship between PE 1 and CE 1, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 10.1.1.1 as-number 200

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

[PE1-bgp-default-ipv4-vpn1] peer 10.1.1.1 enable

[PE1-bgp-default-ipv4-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish MP-IBGP peer relationship between PE 1 and PE 2 and between PE 1 and PE 3.

[PE1-bgp-default] peer 2::2 as-number 100

[PE1-bgp-default] peer 2::2 connect-interface loopback 1

[PE1-bgp-default] peer 3::3 as-number 100

[PE1-bgp-default] peer 3::3 connect-interface loopback 1

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 2::2 enable

[PE1-bgp-default-vpnv4] peer 3::3 enable

[PE1-bgp-default-vpnv4] quit

[PE1-bgp-default] quit

# On PE 1, specify a source address for the outer IPv6 header of SRv6-encapsulated IP L3VPN packets.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

# On PE 1, configure the locator for the destination address End.DT4 SID of the IPv6 packet header encapsulated in IP L3VPN over SRv6.

[PE1-segment-routing-ipv6] locator abc ipv6-prefix 100:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] quit

[PE1-segment-routing-ipv6] quit

# On PE 1, configure IS-IS to reference and advertise the locator.

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator abc

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

# Enable PE 1 to exchange End.DT4 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT4 SID routes.

[PE1] bgp 100

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 2::2 prefix-sid

[PE1-bgp-default-vpnv4] peer 3::3 prefix-sid

[PE1-bgp-default-vpnv4] quit

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

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

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 best-effort

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Enable VPN FRR on PE 1, and configure static BFD to monitor the reachability of the locator advertised from PE 1 to PE 2. If the locator is unreachable (indicating a primary path failure), VPN FRR switches the traffic to the backup path.

[PE1] bgp 100

[PE1-bgp-default] primary-path-detect bfd ctrl

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

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

[PE1-bgp-default-ipv4-vpn1] pic

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

[PE1] bfd static ToPE2 peer-ipv6 200:1:: source-ipv6 100:1:: discriminator local 100 remote 200

[PE1-bfd-static-session-ToPE2] quit

Configuring PE 2

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<PE2> system-view

[PE2] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0002.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 2::2 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance for CE 2 to access PE 2.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.2 24

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

# Establish EBGP peer relationship between PE 2 and CE 2, and redistribute VPN routes.

[PE2] bgp 100

[PE2-bgp-default] router-id 2.2.2.2

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

[PE2-bgp-default-vpn1] peer 20.1.1.1 as-number 300

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

[PE2-bgp-default-ipv6-vpn1] peer 20.1.1.1 enable

[PE2-bgp-default-ipv6-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish MP-IBGP peer relationship between PE 1 and PE 2.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 enable

[PE2-bgp-default-vpnv4] quit

[PE2-bgp-default] quit

# On PE 2, specify a source address for the outer IPv6 header of SRv6-encapsulated IP L3VPN packets.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 2::2

# On PE 2, configure the locator for the destination address End.DT4 SID of the IPv6 packet header encapsulated in IP L3VPN over SRv6.

[PE2-segment-routing-ipv6] locator abc ipv6-prefix 200:1:: 64 static 16

[PE2-segment-routing-ipv6-locator-abc] quit

[PE2-segment-routing-ipv6] quit

# On PE 2, configure IS-IS to reference and advertise the locator.

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator abc

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

# Enable PE 2 to exchange End.DT4 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT4 SID routes.

[PE2] bgp 100

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 prefix-sid

[PE2-bgp-default-vpnv4] quit

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

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

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 best-effort

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# On PE 2, configure static BFD to monitor the reachability of the locator advertised from PE 2 to PE 1.

[PE2] bfd static ToPE1 peer-ipv6 100:1:: source-ipv6 200:1:: discriminator local 200 remote 100

[PE2-bfd-static-session-ToPE1] quit

Configuring PE 3

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<PE3> system-view

[PE3] sysname PE3

[PE3] isis 1

[PE3-isis-1] cost-style wide

[PE3-isis-1] network-entity 00.0000.0000.0003.00

[PE3-isis-1] address-family ipv6 unicast

[PE3-isis-1-ipv6] quit

[PE3-isis-1] quit

[PE3] interface loopback 1

[PE3-LoopBack1] ipv6 address 3::3 128

[PE3-LoopBack1] isis ipv6 enable 1

[PE3-LoopBack1] quit

[PE3] interface ten-gigabitethernet 3/1/3

[PE3-Ten-GigabitEthernet3/1/2] ipv6 address 3001::2 96

[PE3-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[PE3-Ten-GigabitEthernet3/1/2] quit

# Configure a VPN instance for CE 2 to access PE 3.

[PE3] ip vpn-instance vpn1

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

[PE3-vpn-instance-vpn1] vpn-target 100:1

[PE3-vpn-instance-vpn1] quit

[PE3] interface ten-gigabitethernet 3/1/2

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

[PE3-Ten-GigabitEthernet3/1/1] ip address 30.1.1.2 24

[PE3-Ten-GigabitEthernet3/1/1] quit

# Establish EBGP peer relationship between PE 3 and CE 2.

[PE3] bgp 100

[PE3-bgp-default] router-id 3.3.3.3

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

[PE3-bgp-default-vpn1] peer 30.1.1.1 as-number 300

[PE3-bgp-default-vpn1] address-family ipv4 unicast

[PE3-bgp-default-ipv6-vpn1] peer 30.1.1.1 enable

[PE3-bgp-default-ipv6-vpn1] import-route direct

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

[PE3-bgp-default-vpn1] quit

# Establish MP-IBGP peer relationship between PE 1 and PE 3.

[PE3-bgp-default] peer 1::1 as-number 100

[PE3-bgp-default] peer 1::1 connect-interface loopback 1

[PE3-bgp-default] address-family vpnv4

[PE3-bgp-default-vpnv4] peer 1::1 enable

[PE3-bgp-default-vpnv4] quit

[PE3-bgp-default] quit

# On PE 3, specify a source address for the outer IPv6 header of SRv6-encapsulated IP L3VPN packets.

[PE3] segment-routing ipv6

[PE3-segment-routing-ipv6] encapsulation source-address 3::3

# On PE 3, configure the locator for the destination address End.DT4 SID of the IPv6 packet header encapsulated in IP L3VPN over SRv6.

[PE3-segment-routing-ipv6] locator abc ipv6-prefix 300:1:: 64 static 16

[PE3-segment-routing-ipv6-locator-abc] quit

[PE3-segment-routing-ipv6] quit

# On PE 3, configure IS-IS to reference and advertise the locator.

[PE3] isis 1

[PE3-isis-1] address-family ipv6 unicast

[PE3-isis-1-ipv6] segment-routing ipv6 locator abc

[PE3-isis-1-ipv6] quit

[PE3-isis-1] quit

# Enable PE 3 to exchange End.DT4 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT4 SID routes.

[PE3] bgp 100

[PE3-bgp-default] address-family vpnv4

[PE3-bgp-default-vpnv4] peer 1::1 prefix-sid

[PE3-bgp-default-vpnv4] quit

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

[PE3-bgp-default-vpn1] address-family ipv4 unicast

[PE3-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE3-bgp-default-ipv4-vpn1] segment-routing ipv6 best-effort

[PE3-bgp-default-ipv4-vpn1] quit

[PE3-bgp-default-vpn1] quit

[PE3-bgp-default] quit

Configuring CE 2

<CE2> system-view

[CE2] sysname CE2

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

[CE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.1 24

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

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

[CE2-Ten-GigabitEthernet3/1/2] ip address 30.1.1.1 24

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

[CE2] interface loopback 0

[CE2-LoopBack0] ip address 22.22.22.22 32

[CE2-LoopBack0] quit

[CE2] bgp 300

[CE2-bgp-default] router-id 22.22.22.22

[CE2-bgp-default] peer 20.1.1.2 as-number 100

[CE2-bgp-default] peer 30.1.1.2 as-number 100

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

[CE2-bgp-default-ipv4] peer 20.1.1.2 enable

[CE2-bgp-default-ipv4] peer 30.1.1.2 enable

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

[CE2-bgp-default-ipv4] quit

[CE2-bgp-default] quit

Verifying the configuration

# Execute the display ip routing-table vpn-instance vpn1 22.22.22.22 verbose command on PE 1 to view VPN route information. Verify that VPN route 22.22.22.22/32 has a primary egress interface and a backup egress  interface, implementing VPN FRR.

[PE1] display ip routing-table vpn-instance vpn1 22.22.22.22 verbose

 

Summary count : 1

 Destination: 22.22.22.22/32

    Protocol: BGP instance default

  Process ID: 0

   SubProtID: 0x1                       Age: 00h32m17s

        Cost: 0                  Preference: 255

       IpPre: N/A                QosLocalID: N/A

         Tag: 0                       State: Active Adv

   OrigTblID: 0x0                   OrigVrf: default-vrf

     TableID: 0x102                  OrigAs: 300

       NibID: 0x16000003             LastAs: 300

      AttrID: 0x2                  Neighbor: 2::2

       Flags: 0x80010060        OrigNextHop: 200:1::

       Label: NULL              RealNextHop: FE80::62F5:1BFF:FEE0:307

     BkLabel: NULL                BkNextHop: FE80::62F5:20FF:FEC4:408

     SRLabel: NULL                Interface: Ten-GigabitEthernet3/1/2

   BkSRLabel: NULL              BkInterface: Ten-GigabitEthernet3/1/3

    SIDIndex: NULL                  InLabel: NULL

   Tunnel ID: Invalid           IPInterface: Ten-GigabitEthernet3/1/2

 BkTunnel ID: Invalid         BkIPInterface: Ten-GigabitEthernet3/1/3

    FtnIndex: 0x0            ColorInterface: N/A

TrafficIndex: N/A          BkColorInterface: N/A

   Connector: N/A                 VpnPeerId: N/A

        Dscp: N/A                       Exp: N/A

  SRTunnelID: Invalid             StatFlags: 0x0

    SID Type: N/A                       SID: 200:1::1:4

       BkSID: 300:1::1:4                NID: Invalid

    FlushNID: Invalid                 BkNID: Invalid

  BkFlushNID: Invalid                PathID: 0x0

CommBlockLen: 0

  OrigLinkID: 0x0                RealLinkID: 0x0

# Shut down the egress interface Ten-GigabitEthernet 3/1/2 of PE 1 on the primary path, and verify that CE 1 and CE 2 can ping each other.

[CE1] ping -a 11.11.11.11 22.22.22.22

Ping 22.22.22.22 (22.22.22.22) from 11.11.11.11: 56 data bytes, press CTRL_C to break

56 bytes from 22.22.22.22: icmp_seq=0 ttl=253 time=1.000 ms

56 bytes from 22.22.22.22: icmp_seq=1 ttl=253 time=2.000 ms

56 bytes from 22.22.22.22: icmp_seq=2 ttl=253 time=1.000 ms

56 bytes from 22.22.22.22: icmp_seq=3 ttl=253 time=1.000 ms

56 bytes from 22.22.22.22: icmp_seq=4 ttl=253 time=1.000 ms

--- Ping statistics for 22.22.22.22 ---

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

round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable fiber

 ip address 10.1.1.1 255.255.255.0

#

#

interface LoopBack0

 ip address 11.11.11.11 255.255.255.255

#

bgp 200

 router-id 11.11.11.11

 peer 10.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 10.1.1.2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 non-stop-routing

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn1

 ip address 10.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 ipv6 address 2001::1/96

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 ipv6 address 3001::1/96

#

bfd static ToPE2 peer-ipv6 200:1:: source-ipv6 100:1:: discriminator local 100 remote 200

#

bgp 100

 router-id 1.1.1.1

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack1

 peer 3::3 as-number 100

 peer 3::3 connect-interface LoopBack1

 primary-path-detect bfd ctrl

 #

 address-family vpnv4

  peer 2::2 enable

  peer 2::2 prefix-sid

  peer 3::3 enable

  peer 3::3 prefix-sid

 #

 ip vpn-instance vpn1

  peer 10.1.1.1 as-number 200

  #

  address-family ipv4 unicast

   pic

   segment-routing ipv6 best-effort

   segment-routing ipv6 locator abc

   import-route direct

   peer 10.1.1.1 enable

#

segment-routing ipv6

 encapsulation source-address 1::1

 locator abc ipv6-prefix 100:1:: 64 static 16

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn1

 ip address 20.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 ipv6 address 2001::2/96

#

bfd static ToPE1 peer-ipv6 100:1:: source-ipv6 200:1:: discriminator local 200 remote 100

#

bgp 100

 router-id 2.2.2.2

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family vpnv4

  peer 1::1 enable

  peer 1::1 prefix-sid

 #

 ip vpn-instance vpn1

  peer 20.1.1.1 as-number 300

  #

  address-family ipv4 unicast

   segment-routing ipv6 best-effort

   segment-routing ipv6 locator abc

   import-route direct

   peer 20.1.1.1 enable

#

segment-routing ipv6

 encapsulation source-address 2::2

 locator abc ipv6-prefix 200:1:: 64 static 16

#

·     PE 3:

#

 sysname PE3

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn1

 ip address 30.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 ipv6 address 3001::2/96

#

bgp 100

 router-id 3.3.3.3

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family ipv4 unicast

 #

 address-family vpnv4

  peer 1::1 enable

  peer 1::1 prefix-sid

 #

 ip vpn-instance vpn1

  peer 30.1.1.1 as-number 300

  #

  address-family ipv4 unicast

   segment-routing ipv6 best-effort

   segment-routing ipv6 locator abc

   import-route direct

   peer 30.1.1.1 enable

#

segment-routing ipv6

 encapsulation source-address 3::3

 locator abc ipv6-prefix 300:1:: 64 static 16

#

·     CE 2:

#

 sysname CE2

#

interface LoopBack0

 ip address 22.22.22.22 255.255.255.255

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip address 20.1.1.1 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 ip address 30.1.1.1 255.255.255.0

#

bgp 300

 router-id 22.22.22.22

 peer 20.1.1.2 as-number 100

 peer 30.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 20.1.1.2 enable

  peer 30.1.1.2 enable

#

Example: Configuring inter-AS IPv4 L3VPN over SRv6 BE

Network configuration

As shown in Figure 3, the core network is an IPv6 network, and the private network is an IPv4 network. PE 1 and ASBR 1 belong to AS 100, and PE 2 and ASBR 2 belong to AS 200. AS 100 and AS 200 use IS-IS to implement IPv6 connectivity. Configure inter-AS SRv6 BE paths between PE 1 and PE 2 to transmit IPv4 L3VPN traffic.

Figure 3 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

10.1.1.1/24

CE 2

XGE3/1/1

20.1.1.1/24

PE 1

Loop1

1::1/128

PE 2

Loop1

4::4/128

 

XGE3/1/1

10.1.1.2/24

 

XGE3/1/1

20.1.1.2/24

 

XGE3/1/2

101::1/96

 

XGE3/1/2

303::2/96

ASBR 1

Loop1

2::2/128

ASBR 2

Loop1

3::3/128

 

XGE3/1/1

101::2/96

 

XGE3/1/1

303::1/96

 

XGE3/1/2

202::1/96

 

XGE3/1/2

202::2/96

 

Procedures

Configuring CE 1

<Sysname> system-view

[Sysname] sysname CE1

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

[CE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.1 24

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

[CE1] bgp 65410

[CE1-bgp-default] peer 10.1.1.2 as-number 100

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

[CE1-bgp-default-ipv4] peer 10.1.1.2 enable

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

[CE1-bgp-default-ipv4] quit

[CE1-bgp-default] quit

Configuring PE 1

# Configure IPv6 IS-IS on the PE and ASBR for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 10.1.1.1 as-number 65410

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

[PE1-bgp-default-ipv4-vpn1] peer 10.1.1.1 enable

[PE1-bgp-default-ipv4-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish MP-EBGP peer relationship between PEs.

[PE1-bgp-default] peer 4::4 as-number 200

[PE1-bgp-default] peer 4::4 connect-interface loopback 1

[PE1-bgp-default] peer 4::4 ebgp-max-hop 255

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 4::4 enable

[PE1-bgp-default-vpnv4] quit

[PE1-bgp-default] quit

# Establish MP-IBGP peer relationship between the PE and ASBR.

[PE1-bgp-default] peer 2::2 as-number 100

[PE1-bgp-default] peer 2::2 connect-interface loopback 1

[PE1-bgp-default] address-family ipv6

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

[PE1-bgp-default-ipv6] quit

[PE1-bgp-default] quit

# Establish an SRv6 BE path between the PEs.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

[PE1-segment-routing-ipv6] locator abc ipv6-prefix 10:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] quit

[PE1-segment-routing-ipv6] quit

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator abc

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] bgp 100

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 4::4 prefix-sid

[PE1-bgp-default-vpnv4] quit

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

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

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 best-effort

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

Configuring ASBR 1

# Configure IPv6 IS-IS on the PE and ASBR for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname ASBR1

[ASBR1] isis 1

[ASBR1-isis-1] cost-style wide

[ASBR1-isis-1] network-entity 00.0000.0000.0002.00

[ASBR1-isis-1] address-family ipv6 unicast

[ASBR1-isis-1-ipv6] quit

[ASBR1-isis-1] quit

[ASBR1] interface loopback 1

[ASBR1-LoopBack1] ipv6 address 2::2 128

[ASBR1-LoopBack1] isis ipv6 enable 1

[ASBR1-LoopBack1] quit

[ASBR1] interface ten-gigabitethernet 3/1/1

[ASBR1-Ten-GigabitEthernet3/1/1] ipv6 address 101::2 96

[ASBR1-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[ASBR1-Ten-GigabitEthernet3/1/1] quit

[ASBR1] interface ten-gigabitethernet 3/1/2

[ASBR1-Ten-GigabitEthernet3/1/2] ipv6 address 201::1 96

[ASBR1-Ten-GigabitEthernet3/1/2] quit

# Establish MP-IBGP peer relationship between the PE and ASBR.

[ASBR1] bgp 100

[ASBR1-bgp-default] router-id 2.2.2.2

[ASBR1-bgp-default] peer 1::1 as-number 100

[ASBR1-bgp-default] peer 1::1 connect-interface loopback 1

[ASBR1-bgp-default] address-family ipv6

[ASBR1-bgp-default-ipv6] peer 1::1 enable

[ASBR1-bgp-default-ipv6] peer 1::1 next-hop-local

[ASBR1-bgp-default-ipv6] quit

# Configure BGP to import the locator routes advertised by IS-IS, and advertise the routes to ASBR 2.

[ASBR1-bgp-default] peer 202::2 as-number 200

[ASBR1-bgp-default] peer 202::2 ebgp-max-hop 255

[ASBR1-bgp-default] address-family ipv6

[ASBR1-bgp-default-ipv6] peer 202::2 enable

[ASBR1-bgp-default-ipv6] import-route isisv6 1

[ASBR1-bgp-default-ipv6] quit

[ASBR1-bgp-default] quit

# Configure IS-IS to redistribute the locator routes advertised by BGP.

[ASBR1] ipv6 prefix-list as100 index 10 permit 40:: 64

[ASBR1] ipv6 prefix-list as100 index 20 permit 4::4 128

[ASBR1] route-policy as100 permit node 1

[ASBR1-route-policy-as100-1] if-match ipv6 address prefix-list as100

[ASBR1-route-policy-as100-1] quit

[ASBR1] isis 1

[ASBR1-isis-1] address-family ipv6 unicast

[ASBR1-isis-1-ipv6] import-route bgp4+ route-policy as100

[ASBR1-isis-1-ipv6] quit

[ASBR1-isis-1] quit

Configuring ASBR 2

# Configure IPv6 IS-IS on the PE and ASBR for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname ASBR2

[ASBR2] isis 1

[ASBR2-isis-1] cost-style wide

[ASBR2-isis-1] network-entity 00.0000.0000.0003.00

[ASBR2-isis-1] address-family ipv6 unicast

[ASBR2-isis-1-ipv6] quit

[ASBR2-isis-1] quit

[ASBR2] interface loopback 1

[ASBR2-LoopBack1] ipv6 address 3::3 128

[ASBR2-LoopBack1] isis ipv6 enable 1

[ASBR2-LoopBack1] quit

[ASBR2] interface ten-gigabitethernet 3/1/1

[ASBR2-Ten-GigabitEthernet3/1/1] ipv6 address 303::1 96

[ASBR2-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[ASBR2-Ten-GigabitEthernet3/1/1] quit

[ASBR2] interface ten-gigabitethernet 3/1/2

[ASBR2-Ten-GigabitEthernet3/1/2] ipv6 address 202::2 96

[ASBR2-Ten-GigabitEthernet3/1/2] quit

# Establish MP-IBGP peer relationship between the PE and ASBR.

[ASBR2] bgp 200

[ASBR2-bgp-default] router-id 3.3.3.3

[ASBR2-bgp-default] peer 4::4 as-number 200

[ASBR2-bgp-default] peer 4::4 connect-interface loopback 1

[ASBR2-bgp-default] address-family ipv6

[ASBR2-bgp-default-ipv6] peer 4::4 enable

[ASBR2-bgp-default-ipv6] peer 4::4 next-hop-local

[ASBR2-bgp-default-ipv6] quit

# Configure BGP to import the locator routes advertised by IS-IS, and advertise the routes to ASBR 2.

[ASBR2-bgp-default] peer 202::1 as-number 100

[ASBR2-bgp-default] peer 202::1 ebgp-max-hop 255

[ASBR2-bgp-default] address-family ipv6

[ASBR2-bgp-default-ipv6] peer 202::1 enable

[ASBR2-bgp-default-ipv6] import-route isisv6 1

[ASBR2-bgp-default-ipv6] quit

[ASBR2-bgp-default] quit

# Configure IS-IS to redistribute the locator routes advertised by BGP.

[ASBR2] ipv6 prefix-list as200 index 10 permit 10:: 64

[ASBR2] ipv6 prefix-list as200 index 20 permit 1::1 128

[ASBR2] route-policy as200 permit node 1

[ASBR2-route-policy-as200-1] if-match ipv6 address prefix-list as200

[ASBR2-route-policy-as200-1] quit

[ASBR2] isis 1

[ASBR2-isis-1] address-family ipv6 unicast

[ASBR2-isis-1-ipv6] import-route bgp4+ route-policy as200

[ASBR2-isis-1-ipv6] quit

[ASBR2-isis-1] quit

Configuring PE 2

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0004.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 4::4 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE2] bgp 200

[PE2-bgp-default] router-id 4.4.4.4

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

[PE2-bgp-default-vpn1] peer 20.1.1.1 as-number 65420

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

[PE2-bgp-default-ipv6-vpn1] peer 20.1.1.1 enable

[PE2-bgp-default-ipv6-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish MP-EBGP peer relationship between PEs.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] peer 1::1 ebgp-max-hop 255

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 enable

[PE2-bgp-default-vpnv4] quit

[PE2-bgp-default] quit

# Establish MP-IBGP peer relationship between the PE and ASBR.

[PE2-bgp-default] peer 3::3 as-number 200

[PE2-bgp-default] peer 3::3 connect-interface LoopBack1

[PE2-bgp-default] address-family ipv6

[PE2-bgp-default-ipv6] peer 3::3 enable

[PE2-bgp-default-ipv6] quit

# Establish an SRv6 BE path between the PEs.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 4::4

[PE2-segment-routing-ipv6] locator abc ipv6-prefix 40:: 64 static 16

[PE2-segment-routing-ipv6-locator-abc] quit

[PE2-segment-routing-ipv6] quit

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator abc

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] bgp 100

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 prefix-sid

[PE2-bgp-default-vpnv4] quit

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

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

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 best-effort

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

Configuring CE 2

<Sysname> system-view

[Sysname] sysname CE2

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

[CE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.1 24

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

[CE2] bgp 65420

[CE2-bgp-default] peer 20.1.1.2 as-number 200

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

[CE2-bgp-default-ipv4] peer 20.1.1.2 enable

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

[CE2-bgp-default-ipv4] quit

[CE2-bgp-default] quit

Verifying the configuration

# Execute the display bgp routing-table vpnv4 command on the PE to view detailed information of the routes sent by the remote PE. Verify that the routes from the remote PE carry SID attribute data.

Use PE 1 as an example:

[PE1] display bgp routing-table vpnv4 20.1.1.0 24

 

 BGP local router ID: 1.1.1.1

 Local AS number: 100

 

 

 Route distinguisher: 100:1(vpn1)

 Total number of routes: 1

 Paths:   1 available, 1 best

 

 BGP routing table information of 20.1.1.0/24:

 From            : 4::4 (4.4.4.4)

 Rely nexthop    : FE80::3419:41FF:FE28:331

 Original nexthop: 4::4

 Out interface   : Ten-GigabitEthernet3/1/2

 Route age       : 00h07m07s

 OutLabel        : 3

 Ext-Community   : <RT: 100:1>

 RxPathID        : 0x0

 TxPathID        : 0x0

 PrefixSID       : End.DT4 SID <40::1:2>

 AS-path         : 200

 Origin          : incomplete

 Attribute value : MED 0, pref-val 0

 State           : valid, external, best

 Source type     : local

 IP precedence   : N/A

 QoS local ID    : N/A

 Traffic index   : N/A

 Tunnel policy   : NULL

 Rely tunnel IDs : N/A

# Execute the display ip routing-table vpn-instance command on the PE to view the route destined to the peer CE. Verify that the next hop of the route is the End.DT4 SID carried by the route.

Use PE 1 as an example:

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

 

Destinations : 11       Routes : 11

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0

10.1.1.0/24        Direct  0   0           10.1.1.2        XGE3/1/1

10.1.1.0/32        Direct  0   0           10.1.1.2        XGE3/1/1

10.1.1.2/32        Direct  0   0           127.0.0.1       InLoop0

10.1.1.255/32      Direct  0   0           10.1.1.2        XGE3/1/1

20.1.1.0/24        BGP     255 0           40::            XGE3/1/2

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.0/32       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 CE 1 and CE 2 can ping each other.

[CE1] ping 20.1.1.1

Ping 20.1.1.1 (20.1.1.1): 56 data bytes, press CTRL+C to break

56 bytes from 20.1.1.1: icmp_seq=0 ttl=253 time=3.000 ms

56 bytes from 20.1.1.1: icmp_seq=1 ttl=253 time=2.000 ms

56 bytes from 20.1.1.1: icmp_seq=2 ttl=253 time=3.000 ms

56 bytes from 20.1.1.1: icmp_seq=3 ttl=253 time=3.000 ms

56 bytes from 20.1.1.1: icmp_seq=4 ttl=253 time=2.000 ms

 

--- Ping statistics for 20.1.1.1 ---

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

round-trip min/avg/max/std-dev = 2.000/2.600/3.000/0.490 ms

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 10.1.1.1 255.255.255.0

#

bgp 65410

 peer 10.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 10.1.1.2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ip address 10.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 101::1/96

#

bgp 100

 router-id 1.1.1.1

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack1

 peer 4::4 as-number 200

 peer 4::4 connect-interface LoopBack1

 peer 4::4 ebgp-max-hop 255

 #

 address-family vpnv4

  peer 4::4 enable

  peer 4::4 prefix-sid

 #

 address-family ipv6 unicast

  peer 2::2 enable

 #

 ip vpn-instance vpn1

  peer 10.1.1.1 as-number 65410

  #

  address-family ipv4 unicast

   segment-routing ipv6 best-effort

   segment-routing ipv6 locator abc

   import-route direct

   peer 10.1.1.1 enable

#

segment-routing ipv6

 encapsulation source-address 1::1

 #

 locator abc ipv6-prefix 10:: 64 static 16

#

·     ASBR 1:

#

 sysname ASBR1

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

  import-route bgp4+ route-policy as100

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 101::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ipv6 address 202::1/96

#

bgp 100

 router-id 2.2.2.2

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 peer 202::2 as-number 200

 peer 202::2 ebgp-max-hop 255

 #

 address-family ipv6 unicast

  import-route isisv6 1

  network 10:: 64

  peer 1::1 enable

  peer 1::1 next-hop-local

  peer 202::2 enable

#

route-policy as100 permit node 1

 if-match ipv6 address prefix-list as100

#

 ipv6 prefix-list as100 index 10 permit 40:: 64

 ipv6 prefix-list as100 index 20 permit 4::4 128

#

·     ASBR 2:

#

 sysname ASBR2

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

  import-route bgp4+ route-policy as200

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 303::1/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ipv6 address 202::2/96

#

bgp 200

 router-id 3.3.3.3

 peer 4::4 as-number 200

 peer 4::4 connect-interface LoopBack1

 peer 202::1 as-number 100

 peer 202::1 ebgp-max-hop 255

 #

 address-family ipv6 unicast

  import-route isisv6 1

  network 40:: 64

  peer 4::4 enable

  peer 4::4 next-hop-local

  peer 202::1 enable

#

route-policy as200 permit node 1

 if-match ipv6 address prefix-list as200

#

 ipv6 prefix-list as200 index 10 permit 10:: 64

 ipv6 prefix-list as200 index 20 permit 1::1 128

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0004.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 4::4/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ip address 20.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 303::2/96

#

bgp 200

 router-id 4.4.4.4

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 peer 1::1 ebgp-max-hop 255

 peer 3::3 as-number 200

 peer 3::3 connect-interface LoopBack1

 #

 address-family vpnv4

  peer 1::1 enable

  peer 1::1 prefix-sid

 #

 address-family ipv6 unicast

  peer 3::3 enable

 #

 ip vpn-instance vpn1

  peer 20.1.1.1 as-number 65420

  #

  address-family ipv4 unicast

   segment-routing ipv6 best-effort

   segment-routing ipv6 locator abc

   import-route direct

   peer 20.1.1.1 enable

#

segment-routing ipv6

 encapsulation source-address 4::4

 #

 locator abc ipv6-prefix 40:: 64 static 16

#

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 20.1.1.1 255.255.255.0

#

bgp 65420

 peer 20.1.1.2 as-number 200

 #

 address-family ipv4 unicast

  import-route direct

  peer 20.1.1.2 enable

#

Example: Configuring IPv4 L3VPN over SRv6 TE policy (static configuration)

Network configuration

As shown in Figure 4, the carrier network is an IPv6 network, and the private network is an IPv4 network. PE 1, P, and PE 2 belong to the same AS, and they use IS-IS for communication in the IPv6 network. Establish two SRv6 TE policy tunnels between PE 1 and PE 2 to transmit IPv4 L3VPN traffic. On PE 1 and PE 2, configure a routing policy to set the color attribute for VPNv4 routes, directing VPN traffic to the specified SRv6 TE policy tunnel.

Figure 4 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

10.1.1.1/24

CE 2

XGE3/1/2

20.1.1.1/24

 

Loop0

11.11.11.11/32

 

Loop0

22.22.22.22/32

PE 1

Loop1

1::1/128

P

Loop1

2::2/128

 

XGE3/1/1

10.1.1.2/24

 

XGE3/1/1

3001::2/96

 

XGE3/1/2

2001::1/96

 

XGE3/1/2

2001::2/96

PE 2

Loop1

3::3/128

 

 

 

 

XGE3/1/1

3001::1/96

 

 

 

 

XGE3/1/2

30.1.1.2/24

 

 

 

 

Restrictions and guidelines

If multiple types of tunnels (such as SRv6 TE policy tunnels and SR-MPLS TE policy tunnels) in the network have the same color attribute value, you need to configure a routing policy to set the color attributes of the routes and configure a tunnel policy to ensure that the designated SRv6 TE policy tunnel is preferentially iterated.

Procedures

Configuring CE 1

<CE1> system-view

[CE1] sysname CE1

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

[CE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.1 24

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

[CE1] interface loopback 0

[CE1-LoopBack0] ip address 11.11.11.11 32

[CE1-LoopBack0] quit

[CE1] bgp 200

[CE1-bgp-default] router-id 11.11.11.11

[CE1-bgp-default] peer 10.1.1.2 as-number 100

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

[CE1-bgp-default-ipv4] peer 10.1.1.2 enable

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

[CE1-bgp-default-ipv4] quit

[CE1-bgp-default] quit

Configuring PE 1

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<PE1> system-view

[PE1] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance for CE 1 to access PE 1.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.2 24

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

# Establish EBGP peer relationship between PE 1 and CE 1, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 10.1.1.1 as-number 200

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

[PE1-bgp-default-ipv4-vpn1] peer 10.1.1.1 enable

[PE1-bgp-default-ipv4-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish MP-IBGP peer relationship between PE 1 and PE 2.

[PE1-bgp-default] peer 3::3 as-number 100

[PE1-bgp-default] peer 3::3 connect-interface loopback 1

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 3::3 enable

[PE1-bgp-default-vpnv4] quit

[PE1-bgp-default] quit

# Iterate VPN routes to the SRv6 TE policy tunnel.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

[PE1-segment-routing-ipv6] locator abc ipv6-prefix 100:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] opcode 1 end no-flavor

[PE1-segment-routing-ipv6-locator-abc] quit

[PE1-segment-routing-ipv6] quit

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator abc

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] bgp 100

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 3::3 prefix-sid

[PE1-bgp-default-vpnv4] quit

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

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

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 traffic-engineering

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure SRv6 TE policy on PE 1.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] traffic-engineering

[PE1-srv6-te] srv6-policy locator abc

[PE1-srv6-te] segment-list s1

[PE1-srv6-te-sl-s1] index 10 ipv6 200:1::1

[PE1-srv6-te-sl-s1] index 20 ipv6 300:1::1

[PE1-srv6-te-sl-s1] quit

[PE1-srv6-te] policy p1

[PE1-srv6-te-policy-p1] color 10 end-point ipv6 3::3

[PE1-srv6-te-policy-p1] candidate-paths

[PE1-srv6-te-policy-p1-path] preference 10

[PE1-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE1-srv6-te-policy-p1-path-pref-10] quit

[PE1-srv6-te-policy-p1-path] quit

[PE1-srv6-te-policy-p1] quit

[PE1-srv6-te] quit

[PE1-segment-routing-ipv6] quit

# On PE 1, configure a routing policy and a tunnel policy to direct VPN traffic to the specified SRv6 TE policy tunnel and ensure that the SRv6 TE policy tunnel is the preferred tunnel.

[PE1] route-policy a permit node 10

[PE1-route-policy-a-10] apply extcommunity color 00:10

[PE1-route-policy-a-10] quit

[PE1] bgp 100

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 3::3 route-policy a import

[PE1-bgp-default-vpnv4] quit

[PE1-bgp-default] quit

[PE1] tunnel-policy a

[PE1-tunnel-policy-a] select-seq srv6-policy load-balance-number 1

[PE1-tunnel-policy-a] quit

[PE1] ip vpn-instance vpn1

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

[PE1-vpn-instance-vpn1] quit

Configuring P

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<P> system-view

[P] sysname P

[P] isis 1

[P-isis-1] cost-style wide

[P-isis-1] network-entity 00.0000.0000.0002.00

[P-isis-1] address-family ipv6 unicast

[P-isis-1-ipv6] quit

[P-isis-1] quit

[P] interface loopback 1

[P-LoopBack1] ipv6 address 2::2 128

[P-LoopBack1] isis ipv6 enable 1

[P-LoopBack1] quit

[P] interface ten-gigabitethernet 3/1/2

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

[P-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[P-Ten-GigabitEthernet3/1/2] quit

[P] interface ten-gigabitethernet 3/1/1

[P-Ten-GigabitEthernet3/1/1] ipv6 address 3001::2 96

[P-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[P-Ten-GigabitEthernet3/1/1] quit

# Configure a locator on P and advertise the locator through IS-IS.

[P] segment-routing ipv6

[P-segment-routing-ipv6] locator abc ipv6-prefix 200:1:: 64 static 16

[P-segment-routing-ipv6-locator-abc] opcode 1 end no-flavor

[P-segment-routing-ipv6-locator-abc] quit

[P-segment-routing-ipv6] quit

[P] isis 1

[P-isis-1] address-family ipv6 unicast

[P-isis-1-ipv6] segment-routing ipv6 locator abc

[P-isis-1-ipv6] quit

[P-isis-1] quit

Configuring PE 2

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<PE2> system-view

[PE2] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0003.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 3::3 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

[PE2-Ten-GigabitEthernet3/1/1] ipv6 address 3001::1 96

[PE2-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

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

# Configure a VPN instance for CE 2 to access PE 2.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/2] ip address 20.1.1.2 24

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

# Establish EBGP peer relationship between PE 2 and CE 2, and redistribute VPN routes.

[PE2] bgp 100

[PE2-bgp-default] router-id 3.3.3.3

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

[PE2-bgp-default-vpn1] peer 20.1.1.1 as-number 300

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

[PE2-bgp-default-ipv4-vpn1] peer 20.1.1.1 enable

[PE2-bgp-default-ipv4-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish MP-IBGP peer relationship between PE 1 and PE 2.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 enable

[PE2-bgp-default-vpnv4] quit

[PE2-bgp-default] quit

# Iterate VPN routes to the SRv6 TE policy tunnel.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 3::3

[PE2-segment-routing-ipv6] locator abc ipv6-prefix 300:1:: 64 static 16

[PE2-segment-routing-ipv6-locator-abc] opcode 1 end no-flavor

[PE2-segment-routing-ipv6-locator-abc] quit

[PE2-segment-routing-ipv6] quit

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator abc

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] bgp 100

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 prefix-sid

[PE2-bgp-default-vpnv4] quit

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

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

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 traffic-engineering

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Configure SRv6 TE policy on PE 2.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] traffic-engineering

[PE2-srv6-te] srv6-policy locator abc

[PE2-srv6-te] segment-list s1

[PE2-srv6-te-sl-s1] index 10 ipv6 200:1::1

[PE2-srv6-te-sl-s1] index 20 ipv6 100:1::1

[PE2-srv6-te-sl-s1] quit

[PE2-srv6-te] policy p1

[PE2-srv6-te-policy-p1] color 10 end-point ipv6 1::1

[PE2-srv6-te-policy-p1] candidate-paths

[PE2-srv6-te-policy-p1-path] preference 10

[PE2-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE2-srv6-te-policy-p1-path-pref-10] quit

[PE2-srv6-te-policy-p1-path] quit

[PE2-srv6-te-policy-p1] quit

[PE2-srv6-te] quit

[PE2-segment-routing-ipv6] quit

# On PE 2, configure a routing policy and a tunnel policy to direct VPN traffic to the specified SRv6 TE policy tunnel and ensure that the SRv6 TE policy tunnel is the preferred tunnel.

[PE2] route-policy a permit node 10

[PE2-route-policy-a-10] apply extcommunity color 00:10

[PE2-route-policy-a-10] quit

[PE2] bgp 100

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 route-policy a import

[PE2-bgp-default-vpnv4] quit

[PE2-bgp-default] quit

[PE2] tunnel-policy a

[PE2-tunnel-policy-a] select-seq srv6-policy load-balance-number 1

[PE2-tunnel-policy-a] quit

[PE2] ip vpn-instance vpn1

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

[PE2-vpn-instance-vpn1] quit

Configuring CE 2

<CE2> system-view

[CE2] sysname CE2

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

[CE2-Ten-GigabitEthernet3/1/2] ip address 20.1.1.1 24

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

[CE2] interface loopback 0

[CE2-LoopBack0] ip address 22.22.22.22 32

[CE2-LoopBack0] quit

[CE2] bgp 300

[CE2-bgp-default] router-id 22.22.22.22

[CE2-bgp-default] peer 20.1.1.2 as-number 100

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

[CE2-bgp-default-ipv4] peer 20.1.1.2 enable

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

[CE2-bgp-default-ipv4] quit

[CE2-bgp-default] quit

Verifying the configuration

# On PE 1, execute the display segment-routing ipv6 te policy command to view the detailed information of the SRv6 TE policy tunnel. Verify that the status field of the SRv6 TE policy tunnel displays Up.

[PE1] display segment-routing ipv6 te policy

 

Name/ID: p1/0

 Color: 10

 End-point: 3::3

 Name from BGP:

 BSID:

  Mode:  Dynamic             Type: Type_2              Request state: Succeeded

  Current BSID: 100:1::1:0  Explicit BSID: -          Dynamic BSID: 100:1::1:0

 Reference counts: 4

 Flags: A/BS/NC

 Status: Up

 AdminStatus: Up

 Up time: 2021-11-17 16:21:17

 Down time: 2021-11-17 15:54:22

 Hot backup: Not configured

 Statistics: Not configured

  Statistics by service class: Not configured

 Drop-upon-invalid: Disabled

 BFD trigger path-down: Disabled

 SBFD: Not configured

 BFD Echo: Not configured

 Forwarding index: 2150629377

 Service-class: -

 Rate-limit: -

 Encapsulation mode: -

 Candidate paths state: Configured

 Candidate paths statistics:

  CLI paths: 1          BGP paths: 0          PCEP paths: 0

 Candidate paths:

  Preference : 10

   CPathName:

   Instance ID: 0          ASN: 0          Node address: 0.0.0.0

   Peer address:  ::

   Optimal: Y              Flags: V/A

   Explicit SID list:

    ID: 1                     Name: s1

    Weight: 1                 Forwarding index: 2149580802

    State: Up                 State(-): -

Active path MTU: 1428 bytes

# Execute the display ip routing-table vpn-instance vpn1 22.22.22.22 verbose command on PE 1 to view VPN route information. Verify that the egress interface of VPN route 22.22.22.22/32 is SRv6 TE policy tunnel p1.

[PE1] display ip routing-table vpn-instance vpn1 22.22.22.22 verbose

Summary count : 1

 

 Destination: 22.22.22.22/32

    Protocol: BGP instance default

  Process ID: 0

   SubProtID: 0x1                       Age: 00h30m45s

        Cost: 0                  Preference: 255

       IpPre: N/A                QosLocalID: N/A

         Tag: 0                       State: Active Adv

   OrigTblID: 0x0                   OrigVrf: default-vrf

     TableID: 0x102                  OrigAs: 300

       NibID: 0x16000003             LastAs: 300

      AttrID: 0x5                  Neighbor: 3::3

       Flags: 0x80010060        OrigNextHop: 3::3

       Label: NULL              RealNextHop: FE80::6033:29FF:FEAE:307

     BkLabel: NULL                BkNextHop: N/A

     SRLabel: NULL                Interface: p1

   BkSRLabel: NULL              BkInterface: N/A

    SIDIndex: NULL                  InLabel: NULL

   Tunnel ID: 0x80300001        IPInterface: Ten-GigabitEthernet3/1/2

 BkTunnel ID: Invalid         BkIPInterface: N/A

    FtnIndex: 0x0            ColorInterface: N/A

TrafficIndex: N/A          BkColorInterface: N/A

   Connector: N/A                 VpnPeerId: N/A

        Dscp: N/A                       Exp: N/A

  SRTunnelID: 0x80300001          StatFlags: 0x0

    SID Type: N/A                       SID: 300:1::1:0

       BkSID: N/A                       NID: Invalid

    FlushNID: 0x80300001              BkNID: Invalid

  BkFlushNID: Invalid                PathID: 0x0

CommBlockLen: 0

  OrigLinkID: 0x0                RealLinkID: 0x0

# Verify that CE 1 and CE 2 can ping each other.

[CE1] ping -a 11.11.11.11 22.22.22.22

Ping 22.22.22.22 (22.22.22.22) from 11.11.11.11: 56 data bytes, press CTRL_C to break

56 bytes from 22.22.22.22: icmp_seq=0 ttl=253 time=1.000 ms

56 bytes from 22.22.22.22: icmp_seq=1 ttl=253 time=2.000 ms

56 bytes from 22.22.22.22: icmp_seq=2 ttl=253 time=1.000 ms

56 bytes from 22.22.22.22: icmp_seq=3 ttl=253 time=1.000 ms

56 bytes from 22.22.22.22: icmp_seq=4 ttl=253 time=1.000 ms

--- Ping statistics for 22.22.22.22 ---

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

round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable fiber

 ip address 10.1.1.1 255.255.255.0

#

interface LoopBack0

 ip address 11.11.11.11 255.255.255.255

#

bgp 200

 router-id 11.11.11.11

 peer 10.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 10.1.1.2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 non-stop-routing

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

tunnel-policy a

 select-seq srv6-policy load-balance-number 1

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn1

 ip address 10.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 ipv6 address 2001::1/96

#

bgp 100

 router-id 1.1.1.1

 peer 3::3 as-number 100

 peer 3::3 connect-interface LoopBack1

 #

 address-family vpnv4

  peer 3::3 enable

  peer 3::3 route-policy a import

  peer 3::3 prefix-sid

 #

 ip vpn-instance vpn1

  peer 10.1.1.1 as-number 200

  #

  address-family ipv4 unicast

   segment-routing ipv6 traffic-engineering

   segment-routing ipv6 locator abc

   import-route direct

   peer 10.1.1.1 enable

#

route-policy a permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 1::1

 locator abc ipv6-prefix 100:1:: 64 static 16

  opcode 1 end no-flavor

 traffic-engineering

  srv6-policy locator abc

  segment-list s1

   index 10 ipv6 200:1::1

   index 20 ipv6 300:1::1

  policy p1

   color 10 end-point ipv6 3::3

   candidate-paths

    preference 10

     explicit segment-list s1

#

·     P:

#

 sysname P

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 ipv6 address 3001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 ipv6 address 2001::2/96

#

segment-routing ipv6

 locator abc ipv6-prefix 200:1:: 64 static 16

  opcode 1 end no-flavor

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 ipv6 address 3001::1/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn1

 ip address 20.1.1.2 255.255.255.0

#

bgp 100

 router-id 3.3.3.3

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family vpnv4

  peer 1::1 enable

  peer 1::1 prefix-sid

 #

 ip vpn-instance vpn1

  peer 20.1.1.1 as-number 300

  #

  address-family ipv4 unicast

   segment-routing ipv6 traffic-engineering

   segment-routing ipv6 locator abc

   import-route direct

   peer 20.1.1.1 enable

#

segment-routing ipv6

 encapsulation source-address 3::3

 locator abc ipv6-prefix 300:1:: 64 static 16

  opcode 1 end no-flavor

 traffic-engineering

  srv6-policy locator abc

  segment-list s1

   index 10 ipv6 200:1::1

   index 20 ipv6 100:1::1

  policy p1

   color 10 end-point ipv6 1::1

   candidate-paths

    preference 10

     explicit segment-list s1

#

·     CE 2:

#

 sysname CE2

#

interface LoopBack0

 ip address 22.22.22.22 255.255.255.255

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 ip address 20.1.1.1 255.255.255.0

#

bgp 300

 router-id 22.22.22.22

 peer 20.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 20.1.1.2 enable

#

Example: Configuring inter-AS IPv4 L3VPN over SRv6 TE policy (static configuration)

Network configuration

As shown in Figure 5, the core network is an IPv6 network, and the private network is an IPv4 network. PE 1 and ASBR 1 belong to AS 100, and PE 2 and ASBR 2 belong to AS 200. AS 100 and AS 200 use IS-IS to implement IPv6 connectivity. Establish a static inter-AS SRv6 TE policy tunnel between PE 1 and PE 2 to transmit IPv4 L3VPN traffic.

Figure 5 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

10.1.1.1/24

CE 2

XGE3/1/1

20.1.1.1/24

PE 1

Loop1

1::1/128

PE 2

Loop1

4::4/128

 

XGE3/1/1

10.1.1.2/24

 

XGE3/1/1

20.1.1.2/24

 

XGE3/1/2

1001::1/96

 

XGE3/1/2

2002::1/96

ASBR 1

Loop1

2::2/128

ASBR 2

Loop1

3::3/128

 

XGE3/1/1

1001::2/96

 

XGE3/1/1

2002::2/96

 

XGE3/1/2

3003::1/96

 

XGE3/1/2

3003::2/96

 

Procedures

Configuring CE 1

<Sysname> system-view

[Sysname] sysname CE1

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

[CE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.1 24

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

[CE1] bgp 65410

[CE1-bgp-default] peer 10.1.1.2 as-number 100

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

[CE1-bgp-default-ipv4] peer 10.1.1.2 enable

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

[CE1-bgp-default-ipv4] quit

[CE1-bgp-default] quit

Configuring PE 1

# Configure IPv6 IS-IS on the PE and ASBR for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 10.1.1.1 as-number 65410

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

[PE1-bgp-default-ipv4-vpn1] peer 10.1.1.1 enable

[PE1-bgp-default-ipv4-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish MP-EBGP peer relationship between PEs.

[PE1-bgp-default] peer 4::4 as-number 200

[PE1-bgp-default] peer 4::4 connect-interface loopback 1

[PE1-bgp-default] peer 4::4 ebgp-max-hop 255

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 4::4 enable

[PE1-bgp-default-vpnv4] quit

[PE1-bgp-default] quit

# Establish MP-IBGP peer relationship between the PE and ASBR.

[PE1-bgp-default] peer 2::2 as-number 100

[PE1-bgp-default] peer 2::2 connect-interface loopback 1

[PE1-bgp-default] address-family ipv6

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

[PE1-bgp-default-ipv6] quit

[PE1-bgp-default] quit

# Iterate VPN routes to the SRv6 TE policy tunnel.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

[PE1-segment-routing-ipv6] locator abc ipv6-prefix 100:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] opcode hex ::100 end-x interface ten-gigabitethernet 3/1/2 nexthop 1001::2 no-flavor

[PE1-segment-routing-ipv6-locator-abc] quit

[PE1-segment-routing-ipv6] quit

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator abc auto-sid-disable

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] bgp 100

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 4::4 prefix-sid

[PE1-bgp-default-vpnv4] quit

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

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

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 traffic-engineering

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure SRv6 TE policy on PE 1.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] traffic-engineering

[PE1-srv6-te] srv6-policy locator abc

[PE1-srv6-te] segment-list s1

[PE1-srv6-te-sl-s1] index 1 ipv6 100:1::100

[PE1-srv6-te-sl-s1] index 2 ipv6 200:1::100

[PE1-srv6-te-sl-s1] index 3 ipv6 300:1::100

[PE1-srv6-te-sl-s1] quit

[PE1-srv6-te] policy policy1

[PE1-srv6-te-policy-p1] color 10 end-point ipv6 4::4

[PE1-srv6-te-policy-p1] candidate-paths

[PE1-srv6-te-policy-p1-path] preference 10

[PE1-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE1-srv6-te-policy-p1-path-pref-10] quit

[PE1-srv6-te-policy-p1-path] quit

[PE1-srv6-te-policy-p1] quit

[PE1-srv6-te] quit

[PE1-segment-routing-ipv6] quit

# On PE 1, configure a routing policy and a tunnel policy to direct VPN traffic to the specified SRv6 TE policy tunnel and ensure that the SRv6 TE policy tunnel is the preferred tunnel.

[PE1] route-policy as100 permit node 10

[PE1-route-policy-as100-10] apply extcommunity color 00:10

[PE1-route-policy-as100-10] quit

[PE1] bgp 100

[PE1-bgp-default] address-family vpnv4

[PE1-bgp-default-vpnv4] peer 4::4 route-policy as100 import

[PE1-bgp-default-vpnv4] quit

[PE1-bgp-default] quit

[PE1] tunnel-policy as100

[PE1-tunnel-policy-as100] select-seq srv6-policy load-balance-number 1

[PE1-tunnel-policy-as100] quit

[PE1] ip vpn-instance vpn1

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

[PE1-vpn-instance-vpn1] quit

Configuring ASBR 1

# Configure IPv6 IS-IS on the PE and ASBR for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname ASBR1

[ASBR1] isis 1

[ASBR1-isis-1] cost-style wide

[ASBR1-isis-1] network-entity 00.0000.0000.0002.00

[ASBR1-isis-1] address-family ipv6 unicast

[ASBR1-isis-1-ipv6] quit

[ASBR1-isis-1] quit

[ASBR1] interface loopback 1

[ASBR1-LoopBack1] ipv6 address 2::2 128

[ASBR1-LoopBack1] isis ipv6 enable 1

[ASBR1-LoopBack1] quit

[ASBR1] interface ten-gigabitethernet 3/1/1

[ASBR1-Ten-GigabitEthernet3/1/1] ipv6 address 1001::2 96

[ASBR1-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[ASBR1-Ten-GigabitEthernet3/1/1] quit

[ASBR1] interface ten-gigabitethernet 3/1/2

[ASBR1-Ten-GigabitEthernet3/1/2] ipv6 address 3003::1 96

[ASBR1-Ten-GigabitEthernet3/1/2] quit

# Establish MP-IBGP peer relationship between the PE and ASBR.

[ASBR1] bgp 100

[ASBR1-bgp-default] router-id 2.2.2.2

[ASBR1-bgp-default] peer 1::1 as-number 100

[ASBR1-bgp-default] peer 1::1 connect-interface loopback 1

[ASBR1-bgp-default] address-family ipv6

[ASBR1-bgp-default-ipv6] peer 1::1 enable

[ASBR1-bgp-default-ipv6] peer 1::1 next-hop-local

[ASBR1-bgp-default-ipv6] quit

# Configure BGP to import the locator routes advertised by IS-IS, and advertise the routes to ASBR 2.

[ASBR1-bgp-default] peer 3003::2 as-number 200

[ASBR1-bgp-default] peer 3003::2 ebgp-max-hop 255

[ASBR1-bgp-default] address-family ipv6

[ASBR1-bgp-default-ipv6] peer 3003::2 enable

[ASBR1-bgp-default-ipv6] import-route isisv6 1

[ASBR1-bgp-default-ipv6] quit

[ASBR1-bgp-default] quit

# Configure SRv6 BGP EPE on the ASBR and configure static End.X SIDs.

[ASBR1] segment-routing ipv6

[ASBR1-segment-routing-ipv6] locator abc ipv6-prefix 200:1:: 64 static 16

[ASBR1-segment-routing-ipv6-locator-abc] opcode hex ::200 end-x interface Ten-GigabitEthernet3/1/1 nexthop 1001::1 no-flavor

[ASBR1-segment-routing-ipv6-locator-abc] quit

[ASBR1-segment-routing-ipv6] quit

[ASBR1] bgp 100

[ASBR1-bgp-default] segment-routing ipv6 egress-engineering locator abc

[ASBR1-bgp-default] peer 3003::2 egress-engineering srv6 static-sid no-flavor 200:1::100

[ASBR1-bgp-default] quit

# Configure IS-IS to redistribute the locator routes advertised by BGP.

[ASBR1] ipv6 prefix-list as100 index 10 permit 400:1:: 64

[ASBR1] ipv6 prefix-list as100 index 20 permit 4::4 128

[ASBR1] route-policy as100 permit node 1

[ASBR1-route-policy-as100-1] if-match ipv6 address prefix-list as100

[ASBR1-route-policy-as100-1] quit

[ASBR1] isis 1

[ASBR1-isis-1] address-family ipv6 unicast

[ASBR1-isis-1-ipv6] import-route bgp4+ route-policy as100

[ASBR1-isis-1-ipv6] quit

[ASBR1-isis-1] quit

Configuring ASBR 2

# Configure IPv6 IS-IS on the PE and ASBR for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname ASBR2

[ASBR2] isis 1

[ASBR2-isis-1] cost-style wide

[ASBR2-isis-1] network-entity 00.0000.0000.0003.00

[ASBR2-isis-1] address-family ipv6 unicast

[ASBR2-isis-1-ipv6] quit

[ASBR2-isis-1] quit

[ASBR2] interface loopback 1

[ASBR2-LoopBack1] ipv6 address 3::3 128

[ASBR2-LoopBack1] isis ipv6 enable 1

[ASBR2-LoopBack1] quit

[ASBR2] interface ten-gigabitethernet 3/1/1

[ASBR2-Ten-GigabitEthernet3/1/1] ipv6 address 2002::2 96

[ASBR2-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[ASBR2-Ten-GigabitEthernet3/1/1] quit

[ASBR2] interface ten-gigabitethernet 3/1/2

[ASBR2-Ten-GigabitEthernet3/1/2] ipv6 address 3003::2 96

[ASBR2-Ten-GigabitEthernet3/1/2] quit

# Establish MP-IBGP peer relationship between the PE and ASBR.

[ASBR2] bgp 200

[ASBR2-bgp-default] router-id 3.3.3.3

[ASBR2-bgp-default] peer 4::4 as-number 200

[ASBR2-bgp-default] peer 4::4 connect-interface loopback 1

[ASBR2-bgp-default] address-family ipv6

[ASBR2-bgp-default-ipv6] peer 4::4 enable

[ASBR2-bgp-default-ipv6] peer 4::4 next-hop-local

[ASBR2-bgp-default-ipv6] quit

# Configure BGP to import the locator routes advertised by IS-IS, and advertise the routes to ASBR 2.

[ASBR2-bgp-default] peer 3003::1 as-number 100

[ASBR2-bgp-default] peer 3003::1 ebgp-max-hop 255

[ASBR2-bgp-default] address-family ipv6

[ASBR2-bgp-default-ipv6] peer 3003::1 enable

[ASBR2-bgp-default-ipv6] import-route isisv6 1

[ASBR2-bgp-default-ipv6] quit

[ASBR2-bgp-default] quit

# Configure SRv6 BGP EPE on the ASBR and configure static End.X SIDs.

[ASBR2] segment-routing ipv6

[ASBR2-segment-routing-ipv6] locator abc ipv6-prefix 300:1:: 64 static 16

[ASBR2-segment-routing-ipv6-locator-abc] opcode hex ::100 end-x interface Ten-GigabitEthernet3/1/1 nexthop 2002::1 no-flavor

[ASBR2-segment-routing-ipv6-locator-abc] quit

[ASBR2-segment-routing-ipv6] quit

[ASBR2] bgp 200

[ASBR2-bgp-default] segment-routing ipv6 egress-engineering locator abc

[ASBR2-bgp-default]  peer 3003::1 egress-engineering srv6 static-sid no-flavor 300:1::200

[ASBR2-bgp-default] quit

# Configure IS-IS to redistribute the locator routes advertised by BGP.

[ASBR2] ipv6 prefix-list as200 index 10 permit 100:1:: 64

[ASBR2] ipv6 prefix-list as200 index 20 permit 1::1 128

[ASBR2] route-policy as200 permit node 1

[ASBR2-route-policy-as200-1] if-match ipv6 address prefix-list as200

[ASBR2-route-policy-as200-1] quit

[ASBR2] isis 1

[ASBR2-isis-1] address-family ipv6 unicast

[ASBR2-isis-1-ipv6] import-route bgp4+ route-policy as200

[ASBR2-isis-1-ipv6] quit

[ASBR2-isis-1] quit

Configuring PE 2

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0004.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 4::4 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE2] bgp 200

[PE2-bgp-default] router-id 4.4.4.4

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

[PE2-bgp-default-vpn1] peer 20.1.1.1 as-number 65420

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

[PE2-bgp-default-ipv6-vpn1] peer 20.1.1.1 enable

[PE2-bgp-default-ipv6-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish MP-EBGP peer relationship between PEs.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] peer 1::1 ebgp-max-hop 255

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 enable

[PE2-bgp-default-vpnv4] quit

[PE2-bgp-default] quit

# Establish MP-IBGP peer relationship between the PE and ASBR.

[PE2-bgp-default] peer 3::3 as-number 200

[PE2-bgp-default] peer 3::3 connect-interface LoopBack1

[PE2-bgp-default] address-family ipv6

[PE2-bgp-default-ipv6] peer 3::3 enable

[PE2-bgp-default-ipv6] quit

# Iterate VPN routes to the SRv6 TE policy tunnel.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 4::4

[PE2-segment-routing-ipv6] locator abc ipv6-prefix 400:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] opcode hex ::200 end-x interface Ten-GigabitEthernet3/1/2 nexthop 2002::2 no-flavor

[PE2-segment-routing-ipv6-locator-abc] quit

[PE2-segment-routing-ipv6] quit

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator abc auto-sid-disable

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] bgp 100

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 prefix-sid

[PE2-bgp-default-vpnv4] quit

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

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

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 traffic-engineering

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Configure SRv6 TE policy on PE 1.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] traffic-engineering

[PE2-srv6-te] srv6-policy locator abc

[PE2-srv6-te] segment-list s1

[PE2-srv6-te-sl-s1] index 1 ipv6 400:1::200

[PE2-srv6-te-sl-s1] index 2 ipv6 300:1::200

[PE2-srv6-te-sl-s1] index 3 ipv6 200:1::200

[PE2-srv6-te-sl-s1] quit

[PE2-srv6-te] policy policy1

[PE2-srv6-te-policy-p1] binding-sid ipv6 400:1::1

[PE2-srv6-te-policy-p1] color 10 end-point ipv6 1::1

[PE2-srv6-te-policy-p1] candidate-paths

[PE2-srv6-te-policy-p1-path] preference 10

[PE2-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE2-srv6-te-policy-p1-path-pref-10] quit

[PE2-srv6-te-policy-p1-path] quit

[PE2-srv6-te-policy-p1] quit

[PE2-srv6-te] quit

[PE2-segment-routing-ipv6] quit

# On PE 1, configure a routing policy and a tunnel policy to direct VPN traffic to the specified SRv6 TE policy tunnel and ensure that the SRv6 TE policy tunnel is the preferred tunnel.

[PE2] route-policy as200 permit node 10

[PE2-route-policy-as200-10] apply extcommunity color 00:10

[PE2-route-policy-as200-10] quit

[PE2] bgp 200

[PE2-bgp-default] address-family vpnv4

[PE2-bgp-default-vpnv4] peer 1::1 route-policy as200 import

[PE2-bgp-default-vpnv4] quit

[PE2-bgp-default] quit

[PE2] tunnel-policy as200

[PE2-tunnel-policy-as200] select-seq srv6-policy load-balance-number 1

[PE2-tunnel-policy-as200] quit

[PE2] ip vpn-instance vpn1

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

[PE2-vpn-instance-vpn1] quit

Configuring CE 2

<Sysname> system-view

[Sysname] sysname CE2

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

[CE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.1 24

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

[CE2] bgp 65420

[CE2-bgp-default] peer 20.1.1.2 as-number 200

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

[CE2-bgp-default-ipv4] peer 20.1.1.2 enable

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

[CE2-bgp-default-ipv4] quit

[CE2-bgp-default] quit

Verifying the configuration

# On PE 1, execute the display segment-routing ipv6 te policy command to view the detailed information of the SRv6 TE policy tunnel. Verify that the status field of the SRv6 TE policy tunnel displays Up.

[PE1] display segment-routing ipv6 te policy

 

Name/ID: policy1/0

 Color: 10

 End-point: 4::4

 Name from BGP:

 BSID:

  Mode: Explicit            Type: Type_2              Request state: Succeeded

  Current BSID: 100:1::1    Explicit BSID: 100:1::1   Dynamic BSID: -

 Reference counts: 4

 Flags: A/BS/NC

 Status: Up

 AdminStatus: Up

 Up time: 2021-11-27 16:26:20

 Down time: 2021-11-27 16:25:55

 Hot backup: Not configured

 Statistics: Not configured

  Statistics by service class: Not configured

 Drop-upon-invalid: Disabled

 BFD trigger path-down: Disabled

 SBFD: Not configured

 BFD Echo: Not configured

 Forwarding index: 2150629377

 Service-class: -

 Rate-limit: -

 Encapsulation mode: -

 Candidate paths state: Configured

 Candidate paths statistics:

  CLI paths: 1          BGP paths: 0          PCEP paths: 0

 Candidate paths:

  Preference : 10

   CPathName:

   Instance ID: 0          ASN: 0          Node address: 0.0.0.0

   Peer address:  ::

   Optimal: Y              Flags: V/A

   Explicit SID list:

    ID: 1                     Name: s1

    Weight: 1                 Forwarding index: 2149580802

    State:  Up                 State(-): -

    Active path MTU: 1428 bytes

# Execute the display ip routing-table vpn-instance vpn1 command on PE 1 to view VPN route information. Verify that the egress interface of VPN route 20.1.1.0/24 is SRv6 TE policy tunnel p1.

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

 

Destinations : 11       Routes : 11

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

0.0.0.0/32         Direct  0   0           127.0.0.1       InLoop0

10.1.1.0/24        Direct  0   0           10.1.1.2        XGE3/1/1

10.1.1.0/32        Direct  0   0           10.1.1.2        XGE3/1/1

10.1.1.2/32        Direct  0   0           127.0.0.1       InLoop0

10.1.1.255/32      Direct  0   0           10.1.1.2        XGE3/1/1

20.1.1.0/24        BGP     255 0           4::4            policy1

127.0.0.0/8        Direct  0   0           127.0.0.1       InLoop0

127.0.0.0/32       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 CE 1 and CE 2 can ping each other.

[CE1] ping 20.1.1.1

Ping 20.1.1.1 (20.1.1.1): 56 data bytes, press CTRL+C to break

56 bytes from 20.1.1.1: icmp_seq=0 ttl=253 time=3.000 ms

56 bytes from 20.1.1.1: icmp_seq=1 ttl=253 time=2.000 ms

56 bytes from 20.1.1.1: icmp_seq=2 ttl=253 time=3.000 ms

56 bytes from 20.1.1.1: icmp_seq=3 ttl=253 time=3.000 ms

56 bytes from 20.1.1.1: icmp_seq=4 ttl=253 time=2.000 ms

 

--- Ping statistics for 20.1.1.1 ---

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

round-trip min/avg/max/std-dev = 2.000/2.600/3.000/0.490 ms

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 10.1.1.1 255.255.255.0

#

bgp 65410

 peer 10.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 10.1.1.2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 tnl-policy as100

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc auto-sid-disable

#

tunnel-policy as100

 select-seq srv6-policy load-balance-number 1

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ip address 10.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 1001::1/96

#

bgp 100

 router-id 1.1.1.1

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack1

 peer 4::4 as-number 200

 peer 4::4 connect-interface LoopBack1

 peer 4::4 ebgp-max-hop 255

 #

 address-family vpnv4

  peer 4::4 enable

  peer 4::4 route-policy as100 import

  peer 4::4 prefix-sid

 #

 address-family ipv6 unicast

  peer 2::2 enable

 #

 ip vpn-instance vpn1

  peer 10.1.1.1 as-number 65410

  #

  address-family ipv4 unicast

   segment-routing ipv6 traffic-engineering

   segment-routing ipv6 locator abc

   import-route direct

   peer 10.1.1.1 enable

#

route-policy as100 permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 1::1

 #

 locator abc ipv6-prefix 100:1:: 64 static 16

  opcode hex ::100 end-x interface Ten-GigabitEthernet3/1/2 nexthop 1001::2 no-flavor

 #

 traffic-engineering

  srv6-policy locator abc

  #

  segment-list s1

   index 1 ipv6 100:1::100

   index 2 ipv6 200:1::100

   index 3 ipv6 300:1::100

  #

  policy policy1

   binding-sid ipv6 100:1::1

   color 10 end-point ipv6 4::4

   #

   candidate-paths

    #

    preference 10

     explicit segment-list s1

#

·     ASBR 1:

#

 sysname ASBR1

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

  import-route bgp4+ route-policy as100

  segment-routing ipv6 locator abc auto-sid-disable

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 1001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ipv6 address 3003::1/96

#

bgp 100

 segment-routing ipv6 egress-engineering locator abc

 router-id 2.2.2.2

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 peer 3003::2 as-number 200

 peer 3003::2 ebgp-max-hop 255

 peer 3003::2 egress-engineering srv6 static-sid no-flavor 200:1::100

 #

 address-family ipv6 unicast

  import-route isisv6 1

  peer 1::1 enable

  peer 1::1 next-hop-local

  peer 3003::2 enable

#

route-policy as100 permit node 1

 if-match ipv6 address prefix-list as100

#

 ipv6 prefix-list as100 index 10 permit 400:1:: 64

 ipv6 prefix-list as100 index 20 permit 4::4 128

#

segment-routing ipv6

 #

 locator abc ipv6-prefix 200:1:: 64 static 16

  opcode hex ::200 end-x interface Ten-GigabitEthernet3/1/1 nexthop 1001::1 no-flavor

#

·     ASBR 2:

#

 sysname ASBR2

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

  import-route bgp4+ route-policy as200

  segment-routing ipv6 locator abc auto-sid-disable

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2002::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ipv6 address 3003::2/96

#

bgp 200

 segment-routing ipv6 egress-engineering locator abc

 router-id 3.3.3.3

 peer 4::4 as-number 200

 peer 4::4 connect-interface LoopBack1

 peer 3003::1 as-number 100

 peer 3003::1 ebgp-max-hop 255

 peer 3003::1 egress-engineering srv6 static-sid no-flavor 300:1::200

 #

 address-family ipv6 unicast

  import-route isisv6 1

  peer 4::4 enable

  peer 4::4 next-hop-local

  peer 3003::1 enable

#

route-policy as200 permit node 1

 if-match ipv6 address prefix-list as200

#

 ipv6 prefix-list as200 index 10 permit 100:1:: 64

 ipv6 prefix-list as200 index 30 permit 1::1 128

#

segment-routing ipv6

 #

 locator abc ipv6-prefix 300:1:: 64 static 16

  opcode hex ::100 end-x interface Ten-GigabitEthernet3/1/1 nexthop 2002::1 no-flavor

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 tnl-policy as200

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0004.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc auto-sid-disable

#

tunnel-policy as200

 select-seq srv6-policy load-balance-number 1

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 4::4/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ip address 20.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2002::1/96

#

bgp 200

 router-id 4.4.4.4

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 peer 1::1 ebgp-max-hop 255

 peer 3::3 as-number 200

 peer 3::3 connect-interface LoopBack1

 #

 address-family vpnv4

  peer 1::1 enable

  peer 1::1 route-policy as200 import

  peer 1::1 prefix-sid

 #

 address-family ipv6 unicast

  peer 3::3 enable

 #

 ip vpn-instance vpn1

  peer 20.1.1.1 as-number 65420

  #

  address-family ipv4 unicast

   segment-routing ipv6 traffic-engineering

   segment-routing ipv6 locator abc

   import-route direct

   peer 20.1.1.1 enable

#

route-policy as200 permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 4::4

 #

 locator abc ipv6-prefix 400:1:: 64 static 16

  opcode hex ::200 end-x interface Ten-GigabitEthernet3/1/2 nexthop 2002::2 no-flavor

 #

 traffic-engineering

  srv6-policy locator abc

  #

  segment-list s1

   index 1 ipv6 400:1::200

   index 2 ipv6 300:1::200

   index 3 ipv6 200:1::200

  #

  policy policy1

   binding-sid ipv6 400:1::1

   color 10 end-point ipv6 1::1

   #

   candidate-paths

    #

    preference 10

     explicit segment-list astoas

     explicit segment-list s1

#

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 20.1.1.1 255.255.255.0

#

bgp 65420

 peer 20.1.1.2 as-number 200

 #

 address-family ipv4 unicast

  import-route direct

  peer 20.1.1.2 enable

#

Example: Configuring IPv4 EVPN L3VPN over SRv6 TE policy (static configuration)

Network configuration

As shown in Figure 6, the core network is an IPv6 network, and the private network is an IPv4 network. PE 1, P, and PE 2 belong to the same AS, and they use IS-IS for communication in the IPv6 network. Establish two SRv6 TE policy tunnels between PE 1 and PE 2 to transmit IPv4 EVPN L3VPN traffic. On PE 1 and PE 2, configure a routing policy to set the color attribute for EVPN routes, directing VPN traffic to the specified SRv6 TE policy tunnel.

Figure 6 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

10.1.1.1/24

CE 2

XGE3/1/2

20.1.1.1/24

PE 1

Loop1

1::1/128

PE 2

Loop1

3::3/128

 

XGE3/1/1

10.1.1.2/24

 

XGE3/1/1

20.1.1.2/24

 

XGE3/1/2

1001::1/96

 

XGE3/1/2

2001::1/96

P

Loop1

2::2/128

 

 

 

 

XGE3/1/1

1001::2/96

 

 

 

 

XGE3/1/2

2001::2/96

 

 

 

 

Restrictions and guidelines

If multiple types of tunnels (such as SRv6 TE policy tunnels and SR-MPLS TE policy tunnels) in the network have the same color attribute value, you need to configure a routing policy to set the color attributes of the routes and configure a tunnel policy to ensure that the designated SRv6 TE policy tunnel is preferentially iterated.

Procedures

Configuring CE 1

<Sysname> system-view

[Sysname] sysname CE1

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

[CE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.1 24

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

[CE1] bgp 200

[CE1-bgp-default] peer 10.1.1.2 as-number 100

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

[CE1-bgp-default-ipv4] peer 10.1.1.2 enable

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

[CE1-bgp-default-ipv4] quit

[CE1-bgp-default] quit

Configuring PE 1

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance for CE 1 to access PE 1.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.2 24

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

# Establish EBGP peer relationship between PE 1 and CE 1, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 10.1.1.1 as-number 200

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

[PE1-bgp-default-ipv4-vpn1] peer 10.1.1.1 enable

[PE1-bgp-default-ipv4-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

[PE1-bgp-default] peer 3::3 as-number 100

[PE1-bgp-default] peer 3::3 connect-interface loopback 1

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 3::3 enable

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

# Iterate VPN routes to the SRv6 TE policy tunnel.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

[PE1-segment-routing-ipv6] locator abc ipv6-prefix 100:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] opcode 1 end no-flavor

[PE1-segment-routing-ipv6-locator-abc] quit

[PE1-segment-routing-ipv6] quit

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator abc

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] bgp 100

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 3::3 advertise encap-type srv6

[PE1-bgp-default-evpn] quit

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

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

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc evpn

[PE1-bgp-default-ipv4-vpn1] segment-routing ipv6 traffic-engineering evpn

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure SRv6 TE policy on PE 1.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] traffic-engineering

[PE1-srv6-te] srv6-policy locator abc

[PE1-srv6-te] segment-list s1

[PE1-srv6-te-sl-s1] index 10 ipv6 200:1::1

[PE1-srv6-te-sl-s1] index 20 ipv6 300:1::1

[PE1-srv6-te-sl-s1] quit

[PE1-srv6-te] policy p1

[PE1-srv6-te-policy-p1] color 10 end-point ipv6 3::3

[PE1-srv6-te-policy-p1] candidate-paths

[PE1-srv6-te-policy-p1-path] preference 10

[PE1-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE1-srv6-te-policy-p1-path-pref-10] quit

[PE1-srv6-te-policy-p1-path] quit

[PE1-srv6-te-policy-p1] quit

[PE1-srv6-te] quit

[PE1-segment-routing-ipv6] quit

# On PE 1, configure a routing policy and a tunnel policy to direct VPN traffic to the specified SRv6 TE policy tunnel and ensure that the SRv6 TE policy tunnel is the preferred tunnel.

[PE1] route-policy a permit node 10

[PE1-route-policy-a-10] apply extcommunity color 00:10

[PE1-route-policy-a-10] quit

[PE1] bgp 100

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 3::3 route-policy a import

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

[PE1] tunnel-policy a

[PE1-tunnel-policy-a] select-seq srv6-policy load-balance-number 1

[PE1-tunnel-policy-a] quit

[PE1] ip vpn-instance vpn1

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

[PE1-vpn-instance-vpn1] quit

Configuring P

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname P

[P] isis 1

[P-isis-1] cost-style wide

[P-isis-1] network-entity 00.0000.0000.0002.00

[P-isis-1] address-family ipv6 unicast

[P-isis-1-ipv6] quit

[P-isis-1] quit

[P] interface loopback 1

[P-LoopBack1] ipv6 address 2::2 128

[P-LoopBack1] isis ipv6 enable 1

[P-LoopBack1] quit

[P] interface ten-gigabitethernet 3/1/2

[P-Ten-GigabitEthernet3/1/2] ipv6 address 1001::2 96

[P-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[P-Ten-GigabitEthernet3/1/2] quit

[P] interface ten-gigabitethernet 3/1/1

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

[P-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[P-Ten-GigabitEthernet3/1/1] quit

# Configure a locator on P and advertise the locator through IS-IS.

[P] segment-routing ipv6

[P-segment-routing-ipv6] locator abc ipv6-prefix 200:1:: 64 static 16

[P-segment-routing-ipv6-locator-abc] opcode 1 end no-flavor

[P-segment-routing-ipv6-locator-abc] quit

[P-segment-routing-ipv6] quit

[P] isis 1

[P-isis-1] address-family ipv6 unicast

[P-isis-1-ipv6] segment-routing ipv6 locator abc

[P-isis-1-ipv6] quit

[P-isis-1] quit

Configuring PE 2

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0003.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 3::3 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance for CE 2 to access PE 2.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.2 24

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

# Establish EBGP peer relationship between PE 2 and CE 2, and redistribute VPN routes.

[PE2] bgp 100

[PE2-bgp-default] router-id 3.3.3.3

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

[PE2-bgp-default-vpn1] peer 20.1.1.1 as-number 300

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

[PE2-bgp-default-ipv4-vpn1] peer 20.1.1.1 enable

[PE2-bgp-default-ipv4-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 enable

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

# Iterate VPN routes to the SRv6 TE policy tunnel.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 3::3

[PE2-segment-routing-ipv6] locator abc ipv6-prefix 300:1:: 64 static 16

[PE2-segment-routing-ipv6-locator-abc] opcode 1 end no-flavor

[PE2-segment-routing-ipv6-locator-abc] quit

[PE2-segment-routing-ipv6] quit

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator abc

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] bgp 100

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE2-bgp-default-evpn] quit

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

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

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 locator abc evpn

[PE2-bgp-default-ipv4-vpn1] segment-routing ipv6 traffic-engineering evpn

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Configure SRv6 TE policy on PE 2.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] traffic-engineering

[PE2-srv6-te] srv6-policy locator abc

[PE2-srv6-te] segment-list s1

[PE2-srv6-te-sl-s1] index 10 ipv6 200:1::1

[PE2-srv6-te-sl-s1] index 20 ipv6 100:1::1

[PE2-srv6-te-sl-s1] quit

[PE2-srv6-te] policy p1

[PE2-srv6-te-policy-p1] color 10 end-point ipv6 1::1

[PE2-srv6-te-policy-p1] candidate-paths

[PE2-srv6-te-policy-p1-path] preference 10

[PE2-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE2-srv6-te-policy-p1-path-pref-10] quit

[PE2-srv6-te-policy-p1-path] quit

[PE2-srv6-te-policy-p1] quit

[PE2-srv6-te] quit

[PE2-segment-routing-ipv6] quit

# On PE 2, configure a routing policy and a tunnel policy to direct VPN traffic to the specified SRv6 TE policy tunnel and ensure that the SRv6 TE policy tunnel is the preferred tunnel.

[PE2] route-policy a permit node 10

[PE2-route-policy-a-10] apply extcommunity color 00:10

[PE2-route-policy-a-10] quit

[PE2] bgp 100

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 route-policy a import

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

[PE2] tunnel-policy a

[PE2-tunnel-policy-a] select-seq srv6-policy load-balance-number 1

[PE2-tunnel-policy-a] quit

[PE2] ip vpn-instance vpn1

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

[PE2-vpn-instance-vpn1] quit

Configuring CE 2

<Sysname> system-view

[Sysname] sysname CE2

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

[CE2-Ten-GigabitEthernet3/1/2] ip address 20.1.1.1 24

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

[CE2] bgp 300

[CE2-bgp-default] peer 20.1.1.2 as-number 100

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

[CE2-bgp-default-ipv4] peer 20.1.1.2 enable

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

[CE2-bgp-default-ipv4] quit

[CE2-bgp-default] quit

Verifying the configuration

# On PE 1, execute the display segment-routing ipv6 te policy command to view the detailed information of the SRv6 TE policy tunnel. Verify that the status field of the SRv6 TE policy tunnel displays Up.

[PE1] display segment-routing ipv6 te policy

 

Name/ID: p1/0

 Color: 10

 End-point: 3::3

 Name from BGP:

 BSID:

  Mode: Dynamic             Type: Type_2              Request state: Succeeded

  Current BSID: 100:1::1:3  Explicit BSID: -          Dynamic BSID: 100:1::1:3

 Reference counts: 4

 Flags: A/BS/NC

 Status: Up

 AdminStatus: Up

 Up time: 2021-11-23 19:31:35

 Down time: 2021-11-23 19:27:37

 Hot backup: Not configured

 Statistics: Not configured

  Statistics by service class: Not configured

 Drop-upon-invalid: Disabled

 BFD trigger path-down: Disabled

 SBFD: Not configured

 BFD Echo: Not configured

 Forwarding index: 2150629377

 Service-class: -

 Rate-limit: -

 Encapsulation mode: -

 Candidate paths state: Configured

 Candidate paths statistics:

  CLI paths: 1          BGP paths: 0          PCEP paths: 0

 Candidate paths:

  Preference : 10

   CPathName:

   Instance ID: 0          ASN: 0          Node address: 0.0.0.0

   Peer address:  ::

   Optimal: Y              Flags: V/A

   Explicit SID list:

    ID: 1                     Name: s1

    Weight: 1                 Forwarding index: 2149580802

    State:  Up                 State(-): -

    Active path MTU: 1428 bytes

# Execute the display ip routing-table vpn-instance vpn1 20.1.1.0 24 command on PE 1 to view VPN route information. Verify that the egress interface of VPN route 20.1.1.0/24 is SRv6 TE policy tunnel p1.

[PE1] display ip routing-table vpn-instance vpn1 20.1.1.0 24

 

Summary count : 1

 

Destination/Mask   Proto   Pre Cost        NextHop         Interface

20.1.1.0/24        BGP     255 0           3::3            p1

# Verify that CE 1 and CE 2 can ping each other.

[CE1] ping 20.1.1.1

Ping 20.1.1.1 (20.1.1.1): 56 data bytes, press CTRL_C to break

56 bytes from 20.1.1.1: icmp_seq=0 ttl=253 time=2.000 ms

56 bytes from 20.1.1.1: icmp_seq=1 ttl=253 time=2.000 ms

56 bytes from 20.1.1.1: icmp_seq=2 ttl=253 time=1.000 ms

56 bytes from 20.1.1.1: icmp_seq=3 ttl=253 time=1.000 ms

56 bytes from 20.1.1.1: icmp_seq=4 ttl=253 time=2.000 ms

 

--- Ping statistics for 20.1.1.1 ---

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

round-trip min/avg/max/std-dev = 1.000/1.600/2.000/0.490 ms

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 10.1.1.1 255.255.255.0

#

bgp 200

 peer 10.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 10.1.1.2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 tnl-policy a

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

tunnel-policy a

 select-seq srv6-policy load-balance-number 1

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ip address 10.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 1001::1/96

#

bgp 100

 router-id 1.1.1.1

 peer 3::3 as-number 100

 peer 3::3 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 3::3 enable

  peer 3::3 route-policy a import

  peer 3::3 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 10.1.1.1 as-number 200

  #

  address-family ipv4 unicast

   segment-routing ipv6 traffic-engineering evpn

   segment-routing ipv6 locator abc evpn

   import-route direct

   peer 10.1.1.1 enable

#

route-policy a permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 1::1

 locator abc ipv6-prefix 100:1:: 64 static 16

  opcode 1 end no-flavor

 traffic-engineering

  srv6-policy locator abc

  segment-list s1

   index 10 ipv6 200:1::1

   index 20 ipv6 300:1::1

  policy p1

   color 10 end-point ipv6 3::3

   candidate-paths

    preference 10

     explicit segment-list s1

#

·     P:

#

 sysname P

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 1001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::2/96

#

segment-routing ipv6

 locator abc ipv6-prefix 200:1:: 64 static 16

  opcode 1 end no-flavor

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 tnl-policy a

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

tunnel-policy a

 select-seq srv6-policy load-balance-number 1

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ip address 20.1.1.2 255.255.255.0

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::1/96

#

bgp 100

 router-id 3.3.3.3

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 route-policy a import

  peer 1::1 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 20.1.1.1 as-number 300

  #

  address-family ipv4 unicast

   segment-routing ipv6 traffic-engineering evpn

   segment-routing ipv6 locator abc evpn

   import-route direct

   peer 20.1.1.1 enable

#

route-policy a permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 3::3

 locator abc ipv6-prefix 300:1:: 64 static 16

  opcode 1 end no-flavor

 traffic-engineering

  srv6-policy locator abc

  segment-list s1

   index 10 ipv6 200:1::1

   index 20 ipv6 100:1::1

  policy p1

   color 10 end-point ipv6 1::1

   candidate-paths

    preference 10

     explicit segment-list s1

#

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip address 20.1.1.1 255.255.255.0

#

bgp 300

 peer 20.1.1.2 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 20.1.1.2 enable

#

Example: Configuring IPv6 EVPN L3VPN over SRv6 BE

Network configuration

As shown in Figure 7, the core network is an IPv6 network, and the private network is also an IPv6 network. EVPN L3VPN over SRv6 BE is deployed between the PE devices in the core network to transmit private network data through SRv6 tunnels.

·     Both CE 1 and CE 2 belong to VPN 1.

·     Configure EBGP to exchange VPN routes between the CE and PE.

·     Run IS-IS to implement IPv6 connectivity between the PEs in the same AS, and configure MP-IBGP to implement EVPN route exchange.

Figure 7 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

1000::1/96

CE 2

XGE3/1/1

3000::1/96

PE 1

Loop1

1::1/128

PE 2

Loop1

3::3/128

 

XGE3/1/1

1000::2/96

 

XGE3/1/1

3000::2/96

 

XGE3/1/2

2001::1/96

 

XGE3/1/2

2002::1/96

P

Loop1

2::2/128

 

 

 

 

XGE3/1/1

2001::2/96

 

 

 

 

XGE3/1/2

2002::2/96

 

 

 

 

Procedures

Configuring CE 1

<Sysname> system-view

[Sysname] sysname CE1

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

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

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

[CE1] bgp 200

[CE1-bgp-default] router-id 11.11.11.11

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

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

[CE1-bgp-default-ipv6] peer 1000::2 enable

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

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

Configuring PE 1

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

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

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 1000::1 as-number 200

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

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

[PE1-bgp-default-ipv6-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

[PE1-bgp-default] peer 3::3 as-number 100

[PE1-bgp-default] peer 3::3 connect-interface loopback 1

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 3::3 enable

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

# On the PE, specify a source address for the outer IPv6 header of SRv6-encapsulated EVPN L3VPN packets.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

# On the PE, configure the locator for the destination address End.DT6 SID of the IPv6 packet header encapsulated in EVPN L3VPN over SRv6.

[PE1-segment-routing-ipv6] locator evpn ipv6-prefix 1:2:: 96 static 16

[PE1-segment-routing-ipv6-locator-evpn] quit

[PE1-segment-routing-ipv6] quit

# On the PE, configure IS-IS to reference and advertise the locator.

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator evpn

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

# Enable the PE to exchange End.DT6 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT6 SID routes.

[PE1] bgp 100

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 3::3 advertise encap-type srv6

[PE1-bgp-default-evpn] quit

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

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

[PE1-bgp-default-ipv6-vpn1] segment-routing ipv6 locator evpn evpn

[PE1-bgp-default-ipv6-vpn1] segment-routing ipv6 best-effort evpn

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

Configuring P

# Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname P

[P] isis 1

[P-isis-1] cost-style wide

[P-isis-1] network-entity 00.0000.0000.0002.00

[P-isis-1] address-family ipv6 unicast

[P-isis-1-ipv6] quit

[P-isis-1] quit

[P] interface loopback 1

[P-LoopBack1] ipv6 address 2::2 128

[P-LoopBack1] isis ipv6 enable 1

[P-LoopBack1] quit

[P] interface ten-gigabitethernet 3/1/1

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

[P-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[P-Ten-GigabitEthernet3/1/1] quit

[P] interface ten-gigabitethernet 3/1/2

[P-Ten-GigabitEthernet3/1/2] ipv6 address 2002::2 96

[P-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[P-Ten-GigabitEthernet3/1/2] quit

Configuring PE 2

# Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0003.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 3::3 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

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

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE2] bgp 100

[PE2-bgp-default] router-id 2.2.2.2

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

[PE2-bgp-default-vpn1] peer 3000::1 as-number 300

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

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

[PE2-bgp-default-ipv6-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 enable

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

# On the PE, specify a source address for the outer IPv6 header of SRv6-encapsulated EVPN L3VPN packets.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 3::3

# On the PE, configure the locator for the destination address End.DT6 SID of the IPv6 packet header encapsulated in EVPN L3VPN over SRv6.

[PE2-segment-routing-ipv6] locator evpn ipv6-prefix 3:4:: 96 static 16

[PE2-segment-routing-ipv6-locator-evpn] quit

[PE2-segment-routing-ipv6] quit

# On the PE, configure IS-IS to reference and advertise the locator.

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator evpn

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

# Enable the PE to exchange End.DT6 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT6 SID routes.

[PE2] bgp 100

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE2-bgp-default-evpn] quit

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

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

[PE2-bgp-default-ipv6-vpn1] segment-routing ipv6 locator evpn evpn

[PE2-bgp-default-ipv6-vpn1] segment-routing ipv6 best-effort evpn

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

Configuring CE 2

<Sysname> system-view

[Sysname] sysname CE2

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

[CE2-Ten-GigabitEthernet3/1/1] ipv6 address 3000::1 96

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

[CE2] bgp 300

[CE2-bgp-default] router-id 22.22.22.22

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

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

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

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

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

Verifying the configuration

# Execute the display bgp l2vpn evpn command on the PE to view detailed information of the routes sent by the remote PE. Verify that the routes from the remote PE carry SID attribute data.

Use PE 1 as an example:

[PE1] display bgp l2vpn evpn [5][0][96][3000::]/176

 

 BGP local router ID: 1.1.1.1

 Local AS number: 100

 

 

 Route distinguisher: 100:1(vpn1)

 Total number of routes: 1

 Paths:   1 available, 1 best

 

 BGP routing table information of [5][0][96][3000::]/176:

 From            : 3::3 (2.2.2.2)

 Rely nexthop    : FE80::A06E:DBFF:FEFC:316

 Original nexthop: 3::3

 Out interface   : Ten-GigabitEthernet3/1/2

 Route age       : 00h00m29s

 OutLabel        : 3

 Ext-Community   : <RT: 100:1>

 RxPathID        : 0x0

 TxPathID        : 0x0

 PrefixSID       : End.DT6 SID <3:4::1:4>

 AS-path         : (null)

 Origin          : incomplete

 Attribute value : MED 0, localpref 100, pref-val 0

 State           : valid, internal, best

 Source type     : local

 IP precedence   : N/A

 QoS local ID    : N/A

 Traffic index   : N/A

 EVPN route type : IP prefix advertisement route

 ESI             : 0000.0000.0000.0000.0000

 Ethernet tag ID : 0

 IP prefix       : 3000::/96

 Gateway address : ::

 MPLS label      : 3

 Tunnel policy   : NULL

 Rely tunnel IDs : N/A

 Re-orignination : Disable

# Verify that CE 1 and CE 2 can ping each other.

[CE1] ping ipv6 3000::1

Ping6(56 data bytes) 1000::1 --> 3000::1, press CTRL_C to break

56 bytes from 3000::1, icmp_seq=0 hlim=62 time=3.000 ms

56 bytes from 3000::1, icmp_seq=1 hlim=62 time=2.000 ms

56 bytes from 3000::1, icmp_seq=2 hlim=62 time=2.000 ms

56 bytes from 3000::1, icmp_seq=3 hlim=62 time=2.000 ms

56 bytes from 3000::1, icmp_seq=4 hlim=62 time=2.000 ms

 

--- Ping6 statistics for 3000::1 ---

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

round-trip min/avg/max/std-dev = 2.000/2.200/3.000/0.400 ms

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 1000::1/96

#

bgp 200

 router-id 11.11.11.11

 peer 1000::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 1000::2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator evpn

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ipv6 address 1000::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::1/96

#

bgp 100

 router-id 1.1.1.1

 peer 3::3 as-number 100

 peer 3::3 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 3::3 enable

  peer 3::3 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 1000::1 as-number 200

  #

  address-family ipv6 unicast

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator evpn evpn

   import-route direct

   peer 1000::1 enable

#

segment-routing ipv6

 encapsulation source-address 1::1

 #

 locator evpn ipv6-prefix 1:2:: 96 static 16

#

·     P:

#

 sysname P

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2002::2/96

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator evpn

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ipv6 address 3000::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2002::1/96

#

bgp 100

 router-id 2.2.2.2

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 3000::1 as-number 300

  #

  address-family ipv6 unicast

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator evpn evpn

   import-route direct

   peer 3000::1 enable

#

segment-routing ipv6

 encapsulation source-address 3::3

 #

 locator evpn ipv6-prefix 3:4:: 96 static 16

#

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 3000::1/96

#

bgp 300

 router-id 22.22.22.22

 peer 3000::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 3000::2 enable

#

Example: Configuring IPv6 EVPN L3VPN over SRv6 BE ECMP

Network configuration

As shown in Figure 8, the core network is an IPv6 network, and the private network is an IPv6 network. PE 1, P 1, P 2, and PE 2 belong to the same AS, and they use IS-IS for communication in the IPv6 network. Establish two SRv6 BE tunnels between PE 1 and PE 2 to transmit IPv6 EVPN L3VPN traffic. To fully utilize network resources, configure ECMP on the SRv6 BE tunnels between PE 1 and PE 2.

Figure 8 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

1000::1/96

CE 2

XGE3/1/1

4000::1/96

PE 1

Loop1

1::1/128

PE 2

Loop1

4::4/128

 

XGE3/1/1

1000::2/96

 

XGE3/1/1

4000::2/96

 

XGE3/1/2

2001::1/96

 

XGE3/1/2

2002::1/96

 

XGE3/1/3

3001::1/96

 

XGE3/1/3

3002::1/96

P 1

Loop1

2::2/128

P 2

Loop1

2::2/128

 

XGE3/1/1

2001::2/96

 

XGE3/1/1

3001::2/96

 

XGE3/1/2

2002::2/96

 

XGE3/1/2

3002::2/96

 

Restrictions and guidelines

SRv6 BE ECMP relies on equal-cost routes in the network. To ensure successful configuration, plan the IGP costs of links reasonably. In this example, all links use the default cost 10.

Procedures

Configuring CE 1

<Sysname> system-view

[Sysname] sysname CE1

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

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

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

[CE1] bgp 200

[CE1-bgp-default] router-id 11.11.11.11

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

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

[CE1-bgp-default-ipv6] peer 1000::2 enable

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

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

Configuring PE 1

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

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

[PE1-Ten-GigabitEthernet3/1/3] ipv6 address 3001::1 96

[PE1-Ten-GigabitEthernet3/1/3] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

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

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 1000::1 as-number 200

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

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

[PE1-bgp-default-ipv6-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

[PE1-bgp-default] peer 4::4 as-number 100

[PE1-bgp-default] peer 4::4 connect-interface loopback 1

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 4::4 enable

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

# On the PE, specify a source address for the outer IPv6 header of SRv6-encapsulated EVPN L3VPN packets.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

# On the PE, configure the locator for the destination address End.DT6 SID of the IPv6 packet header encapsulated in EVPN L3VPN over SRv6.

[PE1-segment-routing-ipv6] locator abc ipv6-prefix 100:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] quit

[PE1-segment-routing-ipv6] quit

# On the PE, configure IS-IS to reference and advertise the locator.

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator abc

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

# Enable the PE to exchange End.DT6 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT6 SID routes.

[PE1] bgp 100

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 4::4 advertise encap-type srv6

[PE1-bgp-default-evpn] quit

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

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

[PE1-bgp-default-ipv6-vpn1] segment-routing ipv6 locator abc evpn

[PE1-bgp-default-ipv6-vpn1] segment-routing ipv6 best-effort evpn

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

Configuring P 1

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname P1

[P1] isis 1

[P1-isis-1] cost-style wide

[P1-isis-1] network-entity 00.0000.0000.0002.00

[P1-isis-1] address-family ipv6 unicast

[P1-isis-1-ipv6] quit

[P1-isis-1] quit

[P1] interface loopback 1

[P1-LoopBack1] ipv6 address 2::2 128

[P1-LoopBack1] isis ipv6 enable 1

[P1-LoopBack1] quit

[P1] interface ten-gigabitethernet 3/1/1

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

[P1-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[P1-Ten-GigabitEthernet3/1/1] quit

[P1] interface ten-gigabitethernet 3/1/2

[P1-Ten-GigabitEthernet3/1/2] ipv6 address 2002::2 96

[P1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[P1-Ten-GigabitEthernet3/1/2] quit

Configuring P 2

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname P2

[P2] isis 1

[P2-isis-1] cost-style wide

[P2-isis-1] network-entity 00.0000.0000.0003.00

[P2-isis-1] address-family ipv6 unicast

[P2-isis-1-ipv6] quit

[P2-isis-1] quit

[P2] interface loopback 1

[P2-LoopBack1] ipv6 address 2::2 128

[P2-LoopBack1] isis ipv6 enable 1

[P2-LoopBack1] quit

[P2] interface ten-gigabitethernet 3/1/1

[P2-Ten-GigabitEthernet3/1/1] ipv6 address 3001::2 96

[P2-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[P2-Ten-GigabitEthernet3/1/1] quit

[P2] interface ten-gigabitethernet 3/1/2

[P2-Ten-GigabitEthernet3/1/2] ipv6 address 3002::2 96

[P2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[P2-Ten-GigabitEthernet3/1/2] quit

Configuring PE 2

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0004.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 4::4 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

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

[PE2-Ten-GigabitEthernet3/1/3] ipv6 address 3002::1 96

[PE2-Ten-GigabitEthernet3/1/3] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

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

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE2] bgp 100

[PE2-bgp-default] router-id 4.4.4.4

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

[PE2-bgp-default-vpn1] peer 4000::1 as-number 300

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

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

[PE2-bgp-default-ipv6-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 enable

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

# On the PE, specify a source address for the outer IPv6 header of SRv6-encapsulated EVPN L3VPN packets.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 4::4

# On the PE, configure the locator for the destination address End.DT6 SID of the IPv6 packet header encapsulated in EVPN L3VPN over SRv6.

[PE2-segment-routing-ipv6] locator abc ipv6-prefix 200:1:: 64 static 16

[PE2-segment-routing-ipv6-locator-abc] quit

[PE2-segment-routing-ipv6] quit

# On the PE, configure IS-IS to reference and advertise the locator.

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator abc

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

# Enable the PE to exchange End.DT6 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT6 SID routes.

[PE2] bgp 100

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE2-bgp-default-evpn] quit

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

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

[PE2-bgp-default-ipv6-vpn1] segment-routing ipv6 locator abc evpn

[PE2-bgp-default-ipv6-vpn1] segment-routing ipv6 best-effort evpn

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

Configuring CE 2

<Sysname> system-view

[Sysname] sysname CE2

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

[CE2-Ten-GigabitEthernet3/1/1] ipv6 address 4000::1 96

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

[CE2] bgp 300

[CE2-bgp-default] router-id 22.22.22.22

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

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

[CE2-bgp-default-ipv6] peer 4000::2 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 vpn-instance command on to view VPN route information. Verify that VPN route 4000::1/96 has two egress interfaces, forming ECMP routes.

Use PE 1 as an example:

[PE1] display ipv6 routing-table vpn-instance vpn1 4000::1 96

 

Summary count : 1

 

Destination: 4000::/96                                   Protocol  : BGP4+

NextHop    : 200:1::                                     Preference: 255

Interface  : XGE3/1/2                                     Cost      : 0

 

Destination: 4000::/96                                   Protocol  : BGP4+

NextHop    : 200:1::                                     Preference: 255

Interface  : XGE3/1/3                                     Cost      : 0

# Verify that CE 1 and CE 2 can ping each other.

[CE1] ping ipv6 4000::1

Ping6(56 data bytes) 1000::1 --> 4000::1, press CTRL_C to break

56 bytes from 4000::1, icmp_seq=0 hlim=62 time=2.000 ms

56 bytes from 4000::1, icmp_seq=1 hlim=62 time=2.000 ms

56 bytes from 4000::1, icmp_seq=2 hlim=62 time=2.000 ms

56 bytes from 4000::1, icmp_seq=3 hlim=62 time=1.000 ms

56 bytes from 4000::1, icmp_seq=4 hlim=62 time=1.000 ms

 

--- Ping6 statistics for 4000::1 ---

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

round-trip min/avg/max/std-dev = 1.000/1.600/2.000/0.490 ms

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 1000::1/96

#

bgp 200

 router-id 11.11.11.11

 peer 1000::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 1000::2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ipv6 address 1000::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::1/96

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 3001::1/96

#

bgp 100

 router-id 1.1.1.1

 peer 4::4 as-number 100

 peer 4::4 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 4::4 enable

  peer 4::4 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 1000::1 as-number 200

  #

  address-family ipv6 unicast

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator abc evpn

   import-route direct

   peer 1000::1 enable

#

segment-routing ipv6

 encapsulation source-address 1::1

 #

 locator abc ipv6-prefix 100:1:: 64 static 16

#

·     P 1:

#

 sysname P1

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2002::2/96

#

·     P 2:

#

 sysname P2

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 3001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 3002::2/96

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0004.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 4::4/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ipv6 address 4000::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2002::1/96

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 3002::1/96

#

bgp 100

 router-id 4.4.4.4

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 4000::1 as-number 300

  #

  address-family ipv6 unicast

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator abc evpn

   import-route direct

   peer 4000::1 enable

#

segment-routing ipv6

 encapsulation source-address 4::4

 #

 locator abc ipv6-prefix 200:1:: 64 static 16

#

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 4000::1/96

#

bgp 300

 router-id 22.22.22.22

 peer 4000::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 4000::2 enable

#

Example: Configuring IPv6 EVPN L3VPN over SRv6 BE FRR

Network configuration

As shown in Figure 9, the core network is an IPv6 network, and the private network is an IPv6 network. PE 1, P 1, P 2, and PE 2 belong to the same AS, and they use IS-IS for communication in the IPv6 network. Establish two SRv6 BE tunnels between PE 1 and PE 2 to transmit IPv6 EVPN L3VPN traffic. To enhance network reliability, configure FRR on PE 1 to quickly switch traffic to the backup path when the primary path fails, reducing recovery time.

Figure 9 Network diagram

Device

Interface

IP address

Device

Interface

IP address

PE 1

Loop1

1::1/128

PE 2

Loop1

2::2/128

 

XGE3/1/1

1000::2/96

 

XGE3/1/1

2001::2/96

 

XGE3/1/2

2001::1/96

 

XGE3/1/2

2002::2/96

 

XGE3/1/3

3001::1/96

PE 3

Loop1

3::3/128

 

 

 

 

XGE3/1/1

3001::2/96

 

 

 

 

XGE3/1/2

3002::2/96

CE 1

Loop1

11::11/128

CE 2

Loop1

22::22/128

 

XGE3/1/1

1000::1/96

 

XGE3/1/1

2002::1/96

 

 

 

 

XGE3/1/2

3002::1/96

 

Procedures

Configuring CE 1

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface loopback 1

[CE1-LoopBack1] ipv6 address 11::11 128

[CE1-LoopBack1] quit

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

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

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

[CE1] bgp 200

[CE1-bgp-default] router-id 11.11.11.11

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

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

[CE1-bgp-default-ipv6] peer 1000::2 enable

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

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

Configuring PE 1

# Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

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

[PE1-Ten-GigabitEthernet3/1/3] ipv6 address 3001::1 96

[PE1-Ten-GigabitEthernet3/1/3] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

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

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 1000::1 as-number 200

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

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

[PE1-bgp-default-ipv6-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

[PE1-bgp-default] peer 2::2 as-number 100

[PE1-bgp-default] peer 2::2 connect-interface loopback 1

[PE1-bgp-default] peer 3::3 as-number 100

[PE1-bgp-default] peer 3::3 connect-interface loopback 1

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 2::2 enable

[PE1-bgp-default-evpn] peer 3::3 enable

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

# On the PE, specify a source address for the outer IPv6 header of SRv6-encapsulated EVPN L3VPN packets.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

# On the PE, configure the locator for the destination address End.DT6 SID of the IPv6 packet header encapsulated in EVPN L3VPN over SRv6.

[PE1-segment-routing-ipv6] locator abc ipv6-prefix 100:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] quit

[PE1-segment-routing-ipv6] quit

# On the PE, configure IS-IS to reference and advertise the locator.

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator abc

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

# Enable the PE to exchange End.DT6 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT6 SID routes.

[PE1] bgp 100

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 2::2 advertise encap-type srv6

[PE1-bgp-default-evpn] peer 3::3 advertise encap-type srv6

[PE1-bgp-default-evpn] quit

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

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

[PE1-bgp-default-ipv6-vpn1] segment-routing ipv6 locator abc evpn

[PE1-bgp-default-ipv6-vpn1] segment-routing ipv6 best-effort evpn

# Configure FRR.

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

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure static BFD to detect locator routes. If the locator route is not reachable, FRR will switch the traffic to the backup path.

[PE1] bfd static test peer-ipv6 200:1:: source-ipv6 100:1:: discriminator local 10 remote 20

[PE1-bfd-static-session-test] bfd multi-hop min-transmit-interval 100

[PE1-bfd-static-session-test] bfd multi-hop min-receive-interval 100

[PE1-bfd-static-session-test] bfd multi-hop detect-multiplier 3

[PE1-bfd-static-session-test] quit

[PE1] bgp 100

[PE1-bgp-default] primary-path-detect bfd ctrl

[PE1-bgp-default] quit

Configuring PE 2

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0002.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 2::2 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

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

# Configure a VPN instance on the PE to allow CE access.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

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

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

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE2] bgp 100

[PE2-bgp-default] router-id 2.2.2.2

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

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

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

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

[PE2-bgp-default-ipv6-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 enable

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

# On the PE, specify a source address for the outer IPv6 header of SRv6-encapsulated EVPN L3VPN packets.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 2::2

# On the PE, configure the locator for the destination address End.DT6 SID of the IPv6 packet header encapsulated in EVPN L3VPN over SRv6.

[PE2-segment-routing-ipv6] locator abc ipv6-prefix 200:1:: 64 static 16

[PE2-segment-routing-ipv6-locator-abc] quit

[PE2-segment-routing-ipv6] quit

# On the PE, configure IS-IS to reference and advertise the locator.

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator abc

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

# Enable the PE to exchange End.DT6 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT6 SID routes.

[PE2] bgp 100

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE2-bgp-default-evpn] quit

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

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

[PE2-bgp-default-ipv6-vpn1] segment-routing ipv6 locator abc evpn

[PE2-bgp-default-ipv6-vpn1] segment-routing ipv6 best-effort evpn

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Configure static BFD to detect locator routes. If the locator route is not reachable, FRR will switch the traffic to the backup path.

[PE2] bfd static test peer-ipv6 100:1:: source-ipv6 200:1:: discriminator local 20 remote 10

[PE2-bfd-static-session-test] bfd multi-hop min-transmit-interval 100

[PE2-bfd-static-session-test] bfd multi-hop min-receive-interval 100

[PE2-bfd-static-session-test] bfd multi-hop detect-multiplier 3

[PE2-bfd-static-session-test] quit

Configuring PE 3

Configure IPv6 IS-IS on the PEs and device P for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE3

[PE3] isis 1

[PE3-isis-1] cost-style wide

[PE3-isis-1] network-entity 00.0000.0000.0003.00

[PE3-isis-1] address-family ipv6 unicast

[PE3-isis-1-ipv6] quit

[PE3-isis-1] quit

[PE3] interface loopback 1

[PE3-LoopBack1] ipv6 address 3::3 128

[PE3-LoopBack1] isis ipv6 enable 1

[PE3-LoopBack1] quit

[PE3] interface ten-gigabitethernet 3/1/1

[PE3-Ten-GigabitEthernet3/1/1] ipv6 address 3001::2 96

[PE3-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[PE3-Ten-GigabitEthernet3/1/1] quit

# Configure a VPN instance on the PE to allow CE access.

[PE3] ip vpn-instance vpn1

[PE3-vpn-instance-vpn1] route-distinguisher 300:1

[PE3-vpn-instance-vpn1] vpn-target 100:1

[PE3-vpn-instance-vpn1] quit

[PE3] interface ten-gigabitethernet 3/1/2

[PE3-Ten-GigabitEthernet3/1/2] ip binding vpn-instance vpn1

[PE3-Ten-GigabitEthernet3/1/2] ipv6 address 3002::2 96

[PE3-Ten-GigabitEthernet3/1/2] quit

# Establish EBGP peer relationship between the PE and CE, and redistribute VPN routes.

[PE3] bgp 100

[PE3-bgp-default] router-id 3.3.3.3

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

[PE3-bgp-default-vpn1] peer 3002::1 as-number 300

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

[PE3-bgp-default-ipv6-vpn1] peer 3002::1 enable

[PE3-bgp-default-ipv6-vpn1] import-route direct

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

[PE3-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

[PE3-bgp-default] peer 1::1 as-number 100

[PE3-bgp-default] peer 1::1 connect-interface loopback 1

[PE3-bgp-default] address-family l2vpn evpn

[PE3-bgp-default-evpn] peer 1::1 enable

[PE3-bgp-default-evpn] quit

[PE3-bgp-default] quit

# On the PE, specify a source address for the outer IPv6 header of SRv6-encapsulated EVPN L3VPN packets.

[PE3] segment-routing ipv6

[PE3-segment-routing-ipv6] encapsulation source-address 3::3

# On the PE, configure the locator for the destination address End.DT6 SID of the IPv6 packet header encapsulated in EVPN L3VPN over SRv6.

[PE3-segment-routing-ipv6] locator abc ipv6-prefix 300:1:: 64 static 16

[PE3-segment-routing-ipv6-locator-abc] quit

[PE3-segment-routing-ipv6] quit

# On the PE, configure IS-IS to reference and advertise the locator.

[PE3] isis 1

[PE3-isis-1] address-family ipv6 unicast

[PE3-isis-1-ipv6] segment-routing ipv6 locator abc

[PE3-isis-1-ipv6] quit

[PE3-isis-1] quit

# Enable the PE to exchange End.DT6 SIDs with the IPv6 peer, and allow private network routes to be iterated to the End.DT6 SID routes.

[PE3] bgp 100

[PE3-bgp-default] address-family l2vpn evpn

[PE3-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE3-bgp-default-evpn] quit

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

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

[PE3-bgp-default-ipv6-vpn1] segment-routing ipv6 locator abc evpn

[PE3-bgp-default-ipv6-vpn1] segment-routing ipv6 best-effort evpn

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

[PE3-bgp-default-vpn1] quit

[PE3-bgp-default] quit

Configuring CE 2

<Sysname> system-view

[Sysname] sysname CE2

[CE2] interface loopback 1

[CE2-LoopBack1] ipv6 address 22::22 128

[CE2-LoopBack1] quit

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

[CE2-Ten-GigabitEthernet3/1/1] ipv6 address 2002::1 96

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

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

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

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

[CE2] bgp 300

[CE2-bgp-default] router-id 22.22.22.22

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

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

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

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

[CE2-bgp-default-ipv6] peer 3002::2 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 vpn-instance verbose command on to view VPN route information. Verify that VPN route 22::22/128 has a backup egress interface.

Use PE 1 as an example:

[PE1] display ipv6 routing-table vpn-instance vpn1 22::22 128 verbose

 

Summary count : 1

 

 Destination: 22::22/128

    Protocol: BGP4+ instance default

  Process ID: 0

   SubProtID: 0x8                       Age: 00h27m38s

  FlushedAge: 00h27m38s

        Cost: 0                  Preference: 255

       IpPre: N/A                QosLocalID: N/A

         Tag: 0                       State: Active Adv

   OrigTblID: 0x0                   OrigVrf: default-vrf

     TableID: 0x10a                  OrigAs: 300

       NibID: 0x2600000a             LastAs: 300

      AttrID: 0x0

    BkAttrID: 0x7                  Neighbor: 2::2

       Flags: 0x80010060        OrigNextHop: 200:1::

       Label: NULL              RealNextHop: FE80::8099:2EFF:FE26:316

     BkLabel: NULL                BkNextHop: FE80::8099:32FF:FEB6:416

     SRLabel: NULL                Interface: Ten-GigabitEthernet3/1/2

   BkSRLabel: NULL              BkInterface: Ten-GigabitEthernet3/1/3

   Tunnel ID: Invalid           IPInterface: Ten-GigabitEthernet3/1/2

 BkTunnel ID: Invalid         BkIPInterface: Ten-GigabitEthernet3/1/3

     InLabel: 0              ColorInterface: N/A

    SIDIndex: 0            BkColorInterface: N/A

    FtnIndex: 0x0           TunnelInterface: N/A

TrafficIndex: N/A         BkTunnelInterface: N/A

   Connector: N/A                    PathID: 0x0

      UserID: 0x0                SRTunnelID: Invalid

    SID Type: N/A                       NID: Invalid

    FlushNID: Invalid                 BkNID: Invalid

  BkFlushNID: Invalid             StatFlags: 0x0

         SID: 200:1::1:4

       BkSID: 300:1::1:4

CommBlockLen: 0                    Priority: Low

# Verify that CE 1 and CE 2 can ping each other.

[CE1] ping ipv6 22::22

Ping6(56 data bytes) 1000::1 --> 22::22, press CTRL_C to break

56 bytes from 22::22, icmp_seq=0 hlim=62 time=2.000 ms

56 bytes from 22::22, icmp_seq=1 hlim=62 time=2.000 ms

56 bytes from 22::22, icmp_seq=2 hlim=62 time=1.000 ms

56 bytes from 22::22, icmp_seq=3 hlim=62 time=1.000 ms

56 bytes from 22::22, icmp_seq=4 hlim=62 time=1.000 ms

 

--- Ping6 statistics for 22::22 ---

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

round-trip min/avg/max/std-dev = 1.000/1.400/2.000/0.490 ms

# Shut down interface Ten-GigabitEthernet 3/1/2 on PE 1.

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

[PE1-Ten-GigabitEthernet3/1/2] shutdown

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

# Execute the display ipv6 routing-table vpn-instance verbose command on PE 1 to view VPN route information. Verify that the egress interface of VPN route 22::22/128 changed to Ten-GigabitEthernet 3/1/3.

[PE1] display ipv6 routing-table vpn-instance vpn1 22::22 128 verbose

 

Summary count : 1

 

 Destination: 22::22/128

    Protocol: BGP4+ instance default

  Process ID: 0

   SubProtID: 0x8                       Age: 01h24m03s

        Cost: 0                  Preference: 255

       IpPre: N/A                QosLocalID: N/A

         Tag: 0                       State: Active Adv

   OrigTblID: 0x0                   OrigVrf: default-vrf

     TableID: 0x10a                  OrigAs: 300

       NibID: 0x26000007             LastAs: 300

      AttrID: 0x3                  Neighbor: 3::3

       Flags: 0x80010060        OrigNextHop: 300:1::

       Label: NULL              RealNextHop: FE80::843:49FF:FE7B:506

     BkLabel: NULL                BkNextHop: N/A

     SRLabel: NULL                Interface: Ten-GigabitEthernet3/1/3

   BkSRLabel: NULL              BkInterface: N/A

    SIDIndex: NULL                  InLabel: NULL

   Tunnel ID: Invalid           IPInterface: Ten-GigabitEthernet3/1/3

 BkTunnel ID: Invalid         BkIPInterface: N/A

    FtnIndex: 0x0            ColorInterface: N/A

TrafficIndex: N/A          BkColorInterface: N/A

   Connector: N/A                 VpnPeerId: N/A

        Dscp: N/A                       Exp: N/A

  SRTunnelID: Invalid             StatFlags: 0x0

    SID Type: N/A                       SID: 300:1::1:2

       BkSID: N/A                       NID: Invalid

    FlushNID: Invalid                 BkNID: Invalid

  BkFlushNID: Invalid                PathID: 0x0

CommBlockLen: 0

  OrigLinkID: 0x0                RealLinkID: 0x0

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 1000::1/96

#

bgp 200

 router-id 11.11.11.11

 peer 1000::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 1000::2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ipv6 address 1000::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::1/96

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 3001::1/96

#

bfd static test peer-ipv6 200:1:: source-ipv6 100:1:: discriminator local 10 remote 20

 bfd multi-hop min-transmit-interval 100

 bfd multi-hop min-receive-interval 100

 bfd multi-hop detect-multiplier 3

#

bgp 100

 primary-path-detect bfd ctrl

 router-id 1.1.1.1

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack1

 peer 3::3 as-number 100

 peer 3::3 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 2::2 enable

  peer 2::2 advertise encap-type srv6

  peer 3::3 enable

  peer 3::3 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 1000::1 as-number 200

  #

  address-family ipv6 unicast

   pic

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator abc evpn

   import-route direct

   peer 1000::1 enable

#

segment-routing ipv6

 encapsulation source-address 1::1

 #

 locator abc ipv6-prefix 100:1:: 64 static 16

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 200:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ip binding vpn-instance vpn1

 ipv6 address 2002::2/96

#

bfd static test peer-ipv6 100:1:: source-ipv6 200:1:: discriminator local 20 remote 10

 bfd multi-hop min-transmit-interval 100

 bfd multi-hop min-receive-interval 100

 bfd multi-hop detect-multiplier 3

#

bgp 100

 router-id 2.2.2.2

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 2002::1 as-number 300

  #

  address-family ipv6 unicast

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator abc evpn

   import-route direct

   peer 2002::1 enable

#

segment-routing ipv6

 encapsulation source-address 2::2

 #

 locator abc ipv6-prefix 200:1:: 64 static 16

#

·     PE 3:

#

 sysname PE3

#

ip vpn-instance vpn1

 route-distinguisher 300:1

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 3001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ip binding vpn-instance vpn1

 ipv6 address 3002::2/96

#

bgp 100

 router-id 3.3.3.3

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 3002::1 as-number 300

  #

  address-family ipv6 unicast

   undo advertise l2vpn evpn

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator abc evpn

   import-route direct

   peer 3002::1 enable

#

segment-routing ipv6

 encapsulation source-address 3::3

 #

 locator abc ipv6-prefix 300:1:: 64 static 16

#

·     CE 2:

#

 sysname CE2

#

interface LoopBack1

 ipv6 address 22::22/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 2002::1/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ipv6 address 3002::1/96

#

bgp 300

 router-id 22.22.22.22

 peer 2002::2 as-number 100

 peer 3002::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 2002::2 enable

  peer 3002::2 enable

#

Example: Configuring IPv6 EVPN L3VPN over SRv6 TE policy (static configuration)

Network configuration

As shown in Figure 10, the core network is an IPv6 network, and the private network is an IPv6 network. PE 1, P, and PE 2 belong to the same AS, and they use IS-IS for communication in the IPv6 network. Establish two SRv6 TE policy tunnels between PE 1 and PE 2 to transmit IPv6 EVPN L3VPN traffic. Configure a routing policy on PE 1 and PE 2 to configure the color attributes of the EVPN routes to direct traffic to the specified SRv6 TE policy tunnel.

Figure 10 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

100::1/96

CE 2

XGE3/1/2

200::1/96

PE 1

Loop1

1::1/128

PE 2

Loop1

3::3/128

 

XGE3/1/1

100::2/96

 

XGE3/1/1

200::2/96

 

XGE3/1/2

1001::1/96

 

XGE3/1/2

2001::1/96

P

Loop1

2::2/128

 

 

 

 

XGE3/1/1

1001::2/96

 

 

 

 

XGE3/1/2

2001::2/96

 

 

 

 

Restrictions and guidelines

If multiple types of tunnels (such as SRv6 TE policy tunnels and SR-MPLS TE policy tunnels) in the network have the same color attribute value, you need to configure a routing policy to set the color attributes of the routes and configure a tunnel policy to ensure that the designated SRv6 TE policy tunnel is preferentially iterated.

Procedures

Configuring CE 1

<Sysname> system-view

[Sysname] sysname CE1

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

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

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

[CE1] bgp 200

[CE1-bgp-default] router-id 11.11.11.11

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

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

[CE1-bgp-default-ipv6] peer 100::2 enable

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

[CE1-bgp-default-ipv6] quit

[CE1-bgp-default] quit

Configuring PE 1

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] cost-style wide

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] interface loopback 1

[PE1-LoopBack1] ipv6 address 1::1 128

[PE1-LoopBack1] isis ipv6 enable 1

[PE1-LoopBack1] quit

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

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

[PE1-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance for CE 1 to access PE 1.

[PE1] ip vpn-instance vpn1

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

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

[PE1-vpn-instance-vpn1] quit

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

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

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

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

# Establish EBGP peer relationship between PE 1 and CE 1, and redistribute VPN routes.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

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

[PE1-bgp-default-vpn1] peer 100::1 as-number 200

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

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

[PE1-bgp-default-ipv6-vpn1] import-route direct

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

[PE1-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

[PE1-bgp-default] peer 3::3 as-number 100

[PE1-bgp-default] peer 3::3 connect-interface loopback 1

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 3::3 enable

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

# Iterate VPN routes to the SRv6 TE policy tunnel.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

[PE1-segment-routing-ipv6] locator abc ipv6-prefix 100:1:: 64 static 16

[PE1-segment-routing-ipv6-locator-abc] opcode 1 end no-flavor

[PE1-segment-routing-ipv6-locator-abc] quit

[PE1-segment-routing-ipv6] quit

[PE1] isis 1

[PE1-isis-1] address-family ipv6 unicast

[PE1-isis-1-ipv6] segment-routing ipv6 locator abc

[PE1-isis-1-ipv6] quit

[PE1-isis-1] quit

[PE1] bgp 100

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 3::3 advertise encap-type srv6

[PE1-bgp-default-evpn] quit

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

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

[PE1-bgp-default-ipv6-vpn1] segment-routing ipv6 locator abc evpn

[PE1-bgp-default-ipv6-vpn1] segment-routing ipv6 traffic-engineering evpn

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

[PE1-bgp-default-vpn1] quit

[PE1-bgp-default] quit

# Configure SRv6 TE policy on PE 1.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] traffic-engineering

[PE1-srv6-te] srv6-policy locator abc

[PE1-srv6-te] segment-list s1

[PE1-srv6-te-sl-s1] index 10 ipv6 200:1::1

[PE1-srv6-te-sl-s1] index 20 ipv6 300:1::1

[PE1-srv6-te-sl-s1] quit

[PE1-srv6-te] policy p1

[PE1-srv6-te-policy-p1] color 10 end-point ipv6 3::3

[PE1-srv6-te-policy-p1] candidate-paths

[PE1-srv6-te-policy-p1-path] preference 10

[PE1-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE1-srv6-te-policy-p1-path-pref-10] quit

[PE1-srv6-te-policy-p1-path] quit

[PE1-srv6-te-policy-p1] quit

[PE1-srv6-te] quit

[PE1-segment-routing-ipv6] quit

# On PE 1, configure a routing policy and a tunnel policy to direct VPN traffic to the specified SRv6 TE policy tunnel and ensure that the SRv6 TE policy tunnel is the preferred tunnel.

[PE1] route-policy a permit node 10

[PE1-route-policy-a-10] apply extcommunity color 00:10

[PE1-route-policy-a-10] quit

[PE1] bgp 100

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 3::3 route-policy a import

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

[PE1] tunnel-policy a

[PE1-tunnel-policy-a] select-seq srv6-policy load-balance-number 1

[PE1-tunnel-policy-a] quit

[PE1] ip vpn-instance vpn1

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

[PE1-vpn-instance-vpn1] quit

Configuring P

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname P

[P] isis 1

[P-isis-1] cost-style wide

[P-isis-1] network-entity 00.0000.0000.0002.00

[P-isis-1] address-family ipv6 unicast

[P-isis-1-ipv6] quit

[P-isis-1] quit

[P] interface loopback 1

[P-LoopBack1] ipv6 address 2::2 128

[P-LoopBack1] isis ipv6 enable 1

[P-LoopBack1] quit

[P] interface ten-gigabitethernet 3/1/2

[P-Ten-GigabitEthernet3/1/2] ipv6 address 1001::2 96

[P-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

[P-Ten-GigabitEthernet3/1/2] quit

[P] interface ten-gigabitethernet 3/1/1

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

[P-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[P-Ten-GigabitEthernet3/1/1] quit

# Configure a locator on P and advertise the locator through IS-IS.

[P] segment-routing ipv6

[P-segment-routing-ipv6] locator abc ipv6-prefix 200:1:: 64 static 16

[P-segment-routing-ipv6-locator-abc] opcode 1 end no-flavor

[P-segment-routing-ipv6-locator-abc] quit

[P-segment-routing-ipv6] quit

[P] isis 1

[P-isis-1] address-family ipv6 unicast

[P-isis-1-ipv6] segment-routing ipv6 locator abc

[P-isis-1-ipv6] quit

[P-isis-1] quit

Configuring PE 2

# Configure IPv6 IS-IS on the PEs for network connectivity between the devices.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] cost-style wide

[PE2-isis-1] network-entity 00.0000.0000.0003.00

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] interface loopback 1

[PE2-LoopBack1] ipv6 address 3::3 128

[PE2-LoopBack1] isis ipv6 enable 1

[PE2-LoopBack1] quit

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

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

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

# Configure a VPN instance for CE 2 to access PE 2.

[PE2] ip vpn-instance vpn1

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

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

[PE2-vpn-instance-vpn1] quit

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

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

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

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

# Establish EBGP peer relationship between PE 2 and CE 2, and redistribute VPN routes.

[PE2] bgp 100

[PE2-bgp-default] router-id 3.3.3.3

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

[PE2-bgp-default-vpn1] peer 200::1 as-number 300

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

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

[PE2-bgp-default-ipv6-vpn1] import-route direct

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

[PE2-bgp-default-vpn1] quit

# Establish BGP EVPN peer relationship between PEs.

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 1

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 enable

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

# Iterate VPN routes to the SRv6 TE policy tunnel.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 3::3

[PE2-segment-routing-ipv6] locator abc ipv6-prefix 300:1:: 64 static 16

[PE2-segment-routing-ipv6-locator-abc] opcode 1 end no-flavor

[PE2-segment-routing-ipv6-locator-abc] quit

[PE2-segment-routing-ipv6] quit

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator abc

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

[PE2] bgp 100

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE2-bgp-default-evpn] quit

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

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

[PE2-bgp-default-ipv6-vpn1] segment-routing ipv6 locator abc evpn

[PE2-bgp-default-ipv6-vpn1] segment-routing ipv6 traffic-engineering evpn

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

[PE2-bgp-default-vpn1] quit

[PE2-bgp-default] quit

# Configure SRv6 TE policy on PE 2.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] traffic-engineering

[PE2-srv6-te] srv6-policy locator abc

[PE2-srv6-te] segment-list s1

[PE2-srv6-te-sl-s1] index 10 ipv6 200:1::1

[PE2-srv6-te-sl-s1] index 20 ipv6 100:1::1

[PE2-srv6-te-sl-s1] quit

[PE2-srv6-te] policy p1

[PE2-srv6-te-policy-p1] color 10 end-point ipv6 1::1

[PE2-srv6-te-policy-p1] candidate-paths

[PE2-srv6-te-policy-p1-path] preference 10

[PE2-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE2-srv6-te-policy-p1-path-pref-10] quit

[PE2-srv6-te-policy-p1-path] quit

[PE2-srv6-te-policy-p1] quit

[PE2-srv6-te] quit

[PE2-segment-routing-ipv6] quit

# On PE 2, configure a routing policy and a tunnel policy to direct VPN traffic to the specified SRv6 TE policy tunnel and ensure that the SRv6 TE policy tunnel is the preferred tunnel.

[PE2] route-policy a permit node 10

[PE2-route-policy-a-10] apply extcommunity color 00:10

[PE2-route-policy-a-10] quit

[PE2] bgp 100

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 route-policy a import

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

[PE2] tunnel-policy a

[PE2-tunnel-policy-a] select-seq srv6-policy load-balance-number 1

[PE2-tunnel-policy-a] quit

[PE2] ip vpn-instance vpn1

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

[PE2-vpn-instance-vpn1] quit

Configuring CE 2

<Sysname> system-view

[Sysname] sysname CE2

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

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

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

[CE2] bgp 300

[CE2-bgp-default] router-id 22.22.22.22

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

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

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

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

[CE2-bgp-default-ipv6] quit

[CE2-bgp-default] quit

Verifying the configuration

# On PE 1, execute the display segment-routing ipv6 te policy command to view the detailed information of the SRv6 TE policy tunnel. Verify that the status field of the SRv6 TE policy tunnel displays Up.

[PE1] display segment-routing ipv6 te policy

 

Name/ID: p1/0

 Color: 10

 End-point: 3::3

 Name from BGP:

 BSID:

  Mode: Dynamic             Type: Type_2              Request state: Succeeded

  Current BSID: 100:1::1:3  Explicit BSID: -          Dynamic BSID: 100:1::1:3

 Reference counts: 4

 Flags: A/BS/NC

 Status: Up

 AdminStatus: Up

 Up time: 2021-11-23 19:31:35

 Down time: 2021-11-23 19:27:37

 Hot backup: Not configured

 Statistics: Not configured

  Statistics by service class: Not configured

 Drop-upon-invalid: Disabled

 BFD trigger path-down: Disabled

 SBFD: Not configured

 BFD Echo: Not configured

 Forwarding index: 2150629377

 Service-class: -

 Rate-limit: -

 Encapsulation mode: -

 Candidate paths state: Configured

 Candidate paths statistics:

  CLI paths: 1          BGP paths: 0          PCEP paths: 0

 Candidate paths:

  Preference : 10

   CPathName:

   Instance ID: 0          ASN: 0          Node address: 0.0.0.0

   Peer address:  ::

   Optimal: Y              Flags: V/A

   Explicit SID list:

    ID: 1                     Name: s1

    Weight: 1                 Forwarding index: 2149580802

    State:  Up                 State(-): -

    Active path MTU: 1428 bytes

# Execute the display ip routing-table vpn-instance vpn1 200::1 96 command on PE 1 to view VPN route information. Verify that the egress interface of VPN route 200::1/96 is SRv6 TE policy tunnel p1.

[PE1] display ipv6 routing-table vpn-instance vpn1 200::1 96

 

Summary count : 1

 

Destination: 200::/96                                    Protocol  : BGP4+

NextHop    : 3::3                                        Preference: 255

Interface  : p1                                          Cost      : 0

# Verify that CE 1 and CE 2 can ping each other.

[CE1] >ping ipv6 200::1

Ping6(56 data bytes) 100::1 --> 200::1, press CTRL_C to break

56 bytes from 200::1, icmp_seq=0 hlim=62 time=2.000 ms

56 bytes from 200::1, icmp_seq=1 hlim=62 time=1.000 ms

56 bytes from 200::1, icmp_seq=2 hlim=62 time=2.000 ms

56 bytes from 200::1, icmp_seq=3 hlim=62 time=2.000 ms

56 bytes from 200::1, icmp_seq=4 hlim=62 time=1.000 ms

 

--- Ping6 statistics for 200::1 ---

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

round-trip min/avg/max/std-dev = 1.000/1.600/2.000/0.490 mss

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 100::1/96

#

bgp 200

 router-id 11.11.11.11

 peer 100::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 100::2 enable

#

·     PE 1:

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 tnl-policy a

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

tunnel-policy a

 select-seq srv6-policy load-balance-number 1

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ipv6 address 100::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 1001::1/96

#

bgp 100

 router-id 1.1.1.1

 peer 3::3 as-number 100

 peer 3::3 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 3::3 enable

  peer 3::3 route-policy a import

  peer 3::3 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 100::1 as-number 200

  #

  address-family ipv6 unicast

   segment-routing ipv6 traffic-engineering evpn

   segment-routing ipv6 locator abc evpn

   import-route direct

   peer 100::1 enable

#

route-policy a permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 1::1

 locator abc ipv6-prefix 100:1:: 64 static 16

  opcode 1 end no-flavor

 traffic-engineering

  srv6-policy locator abc

  segment-list s1

   index 10 ipv6 200:1::1

   index 20 ipv6 300:1::1

  policy p1

   color 10 end-point ipv6 3::3

   candidate-paths

    preference 10

     explicit segment-list s1

#

·     P:

#

 sysname P

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 1001::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::2/96

#

segment-routing ipv6

 locator abc ipv6-prefix 200:1:: 64 static 16

  opcode 1 end no-flavor

#

·     PE 2:

#

 sysname PE2

#

ip vpn-instance vpn1

 route-distinguisher 100:1

 tnl-policy a

 vpn-target 100:1 import-extcommunity

 vpn-target 100:1 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator abc

#

tunnel-policy a

 select-seq srv6-policy load-balance-number 1

#

interface LoopBack1

 isis ipv6 enable 1

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ip binding vpn-instance vpn1

 ipv6 address 200::2/96

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 isis ipv6 enable 1

 ipv6 address 2001::1/96

#

bgp 100

 router-id 3.3.3.3

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack1

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 route-policy a import

  peer 1::1 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 200::1 as-number 300

  #

  address-family ipv6 unicast

   segment-routing ipv6 traffic-engineering evpn

   segment-routing ipv6 locator abc evpn

   import-route direct

   peer 200::1 enable

#

route-policy a permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 3::3

 locator abc ipv6-prefix 300:1:: 64 static 16

  opcode 1 end no-flavor

 traffic-engineering

  srv6-policy locator abc

  segment-list s1

   index 10 ipv6 200:1::1

   index 20 ipv6 100:1::1

  policy p1

   color 10 end-point ipv6 1::1

   candidate-paths

    preference 10

     explicit segment-list s1

#

·     CE 2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 200::1/96

#

bgp 300

 router-id 22.22.22.22

 peer 200::2 as-number 100

 #

 address-family ipv6 unicast

  import-route direct

  peer 200::2 enable

#

Example: Configuring connectivity between EVPN L3VPN and EVPN L3VPN over SRv6

Network configuration

As shown in Figure 11, PE 1 and PE 2 belong to the EVPN L3VPN network. PE 2 and PE 3 belong to the EVPN L3VPN over SRv6 network. PE 2 is the border device of the EVPN L3VPN network and the EVPN L3VPN over SRv6 networks.

·     Configure an SR-MPLS BE tunnel between PE 1 and PE 2 as the public tunnel.

·     Configure an SRv6 BE tunnel between PE 2 and PE 3 as the public tunnel.

·     PE 1, PE 2, and PE 3 belong to the same AS.

·     EVPN L3VPN and EVPN L3VPN over SRv6 networks use Option B for intra-domain connectivity.

·     CE 1 and CE 4 belong to VPN 1, and CE 2, CE 3, and CE 5 belong to VPN 2.

Figure 11 Network diagram

Configuration analysis

To enable EVPN L3VPN and EVPN L3VPN over SRv6 networks to use Option B for intra-domain connectivity, perform the following tasks:

·     Configure EVPN L3VPN on PE 1 and PE 2, and configure a tunnel policy to specify the SR-MPLS BE tunnel as the public tunnel.

·     Configure EVPN L3VPN over SRv6 on PE 2 and PE 3, and iterate packets encapsulating End.DT4 SID to the SRv6 BE tunnel.

·     Enable connectivity between the SRv6 and MPLS networks on border node PE 2. Specify the BGP-referenced locator to allocate End.T SIDs for packets forwarded from the SRv6 network to the MPLS network. Associate End.T SIDs with MPLS labels.

Restrictions and guidelines

After you enable connectivity between the SRv6 and MPLS networks, the device allocates labels based on a per next-hop basis when routes are advertised from the SRv6 network to the MPLS network. The label allocation mode is not affected by the label-allocation-mode or apply-label command.

When configuring the EVPN L3VPN over SRv6 network, follow these restrictions and guidelines:

·     For two PEs to exchange traffic through an SRv6 tunnel, establish either an IPv4 or IPv6 peer relationship between the PEs.

·     IS-IS and BGP can reference only locators that have been created.

·     The SRv6 encapsulated source address cannot be a loopback address, link-local address, multicast address, or unspecified address. The source address must be a local address that has been advertised by a routing protocol. As a best practice, specify the loopback interface address of the local device as the source address.

Procedures

Configuring PE 1

1.     Configuring IP addresses and unicast routing protocols

# Configure IS-IS to implement network layer connectivity, and specify the wide cost type.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] isis 1

[PE1-isis-1] network-entity 00.0000.0000.0001.00

[PE1-isis-1] cost-style wide

[PE1-isis-1] quit

# Configure IP addresses for interfaces loopback 0 and Ten-GigabitEthernet 3/1/1, and enable IS-IS on the interfaces.

[PE1] interface loopback 0

[PE1-LoopBack0] ip address 1.1.1.1 255.255.255.255

[PE1-LoopBack0] ipv6 address 11::11 128

[PE1-LoopBack0] isis enable 1

[PE1-LoopBack0] quit

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

[PE1-Ten-GigabitEthernet3/1/1] port link-mode route

[PE1-Ten-GigabitEthernet3/1/1] ip address 11.0.1.1 24

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

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

2.     Configure the MPLS LSR ID, and enable MPLS and MPLS TE.

[PE1] mpls lsr-id 1.1.1.1

[PE1] mpls te

[PE1-te] quit

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

[PE1-Ten-GigabitEthernet3/1/1] mpls enable

[PE1-Ten-GigabitEthernet3/1/1] mpls te enable

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

3.     Configure VPN instances for the CE to access the PE.

# Create VPN instance vpn1, and configure its RD and RT.

[PE1] ip vpn-instance vpn1

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

[PE1-vpn-instance-vpn1] vpn-target 1111:1000 import-extcommunity

[PE1-vpn-instance-vpn1] vpn-target 1111:1000 export-extcommunity

[PE1-vpn-instance-vpn1] quit

# Create VPN instance vpn2, and configure its RD and RT.

[PE1] ip vpn-instance vpn2

[PE1-vpn-instance-vpn2] route-distinguisher 2222:1

[PE1-vpn-instance-vpn2] vpn-target 2222:2000 import-extcommunity

[PE1-vpn-instance-vpn2] vpn-target 2222:2000 export-extcommunity

[PE1-vpn-instance-vpn2] quit

# Bind interface Ten-GigabitEthernet 3/1/2 to VPN instance vpn1.

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

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

[PE1-Ten-GigabitEthernet3/1/2] ip address 10.1.1.1 24

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

# Bind interface Ten-GigabitEthernet 3/1/3 to VPN instance vpn2.

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

[PE1-Ten-GigabitEthernet3/1/3] ip binding vpn-instance vpn2

[PE1-Ten-GigabitEthernet3/1/3] ip address 20.1.1.1 24

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

4.     Configure IS-IS SRGB, enable MPLS TE, and enable SR-MPLS in IS-IS IPv4 unicast address family view.

[PE1] isis 1

[PE1-isis-1] mpls te enable

[PE1-isis-1] segment-routing global-block 16000 16999

[PE1-isis-1] address-family ipv4

[PE1-isis-1-ipv4] segment-routing mpls

[PE1-isis-1-ipv4] segment-routing adjacency enable

[PE1-isis-1-ipv4] quit

[PE1-isis-1] quit

5.     Configure the prefix SID for interface loopback 0.

[PE1] interface loopback 0

[PE1-LoopBack0] isis prefix-sid index 10

[PE1-LoopBack0] quit

6.     Configure PE 1 and PE 2 to establish MP-IBGP peer relationship to exchange BGP EVPN routes.

[PE1] bgp 100

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

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

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 2.2.2.2 enable

[PE1-bgp-default-evpn] peer 2.2.2.2 advertise encap-type mpls

[PE1-bgp-default-evpn] peer 2.2.2.2 next-hop-local

[PE1-bgp-default-evpn] quit

7.     Configure PE 1 to establish EBGP peer relationships with CE 1 and CE 2.

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

[PE1-bgp-default-vpn1] peer 10.1.1.2 as-number 65410

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

[PE1-bgp-default-ipv4-vpn1] peer 10.1.1.2 enable

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

[PE1-bgp-default-vpn1] quit

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

[PE1-bgp-default-vpn2] peer 20.1.1.2 as-number 65420

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

[PE1-bgp-default-ipv4-vpn2] peer 20.1.1.2 enable

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

[PE1-bgp-default-vpn2] quit

[PE1-bgp-default] quit

8.     Configure a tunnel policy to enable EVPN L3VPN preferentially select the SR-MPLS BE tunnel as the public tunnel.

[PE1] tunnel-policy srbe

[PE1-tunnel-policy-srbe] select-seq sr-lsp load-balance-number 1

[PE1-tunnel-policy-srbe] quit

[PE1] ip vpn-instance vpn1

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

[PE1-vpn-instance-vpn1] quit

[PE1] ip vpn-instance vpn2

[PE1-vpn-instance-vpn2] tnl-policy srbe

[PE1-vpn-instance-vpn2] quit

9.     Enable EVPN to advertise VPN routes.

[PE1] ip vpn-instance vpn1

[PE1-vpn-instance-vpn1] address-family ipv4

[PE1-vpn-ipv4-vpn1] evpn mpls routing-enable

[PE1-vpn-ipv4-vpn1] quit

[PE1-vpn-instance-vpn1] quit

[PE1] ip vpn-instance vpn2

[PE1-vpn-instance-vpn2] address-family ipv4

[PE1-vpn-ipv4-vpn2] evpn mpls routing-enable

[PE1-vpn-ipv4-vpn2] quit

[PE1-vpn-instance-vpn2] quit

Configuring PE 2

1.     Configuring IP addresses and unicast routing protocols

# Configure IS-IS to implement network layer connectivity, and specify the wide cost type.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] isis 1

[PE2-isis-1] network-entity 00.0000.0000.0002.00

[PE2-isis-1] cost-style wide

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

# Configure IP addresses for interfaces loopback 0, Ten-GigabitEthernet 3/1/1, and Ten-GigabitEthernet 3/1/2, and enable IS-IS on the interfaces.

[PE2] interface loopback 0

[PE2-LoopBack0] ip address 2.2.2.2 255.255.255.255

[PE2-LoopBack0] ipv6 address 22::22 128

[PE2-LoopBack0] isis enable 1

[PE2-LoopBack0] isis ipv6 enable 1

[PE2-LoopBack0] quit

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

[PE2-Ten-GigabitEthernet3/1/1] port link-mode route

[PE2-Ten-GigabitEthernet3/1/1] ip address 11.0.1.2 24

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

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

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

[PE2-Ten-GigabitEthernet3/1/2] port link-mode route

[PE2-Ten-GigabitEthernet3/1/2] ipv6 address 61::1 64

[PE2-Ten-GigabitEthernet3/1/2] isis ipv6 enable 1

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

2.     Configure the MPLS LSR ID, and enable MPLS and MPLS TE.

[PE2] mpls lsr-id 2.2.2.2

[PE2] mpls te

[PE2-te] quit

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

[PE2-Ten-GigabitEthernet3/1/1] mpls enable

[PE2-Ten-GigabitEthernet3/1/1] mpls te enable

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

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

[PE2-Ten-GigabitEthernet3/1/2] mpls enable

[PE2-Ten-GigabitEthernet3/1/2] mpls te enable

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

3.     Configure VPN instances for the CE to access PE.

# Create VPN instance vpn2, and configure its RD and RT.

[PE2] ip vpn-instance vpn2

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

[PE2-vpn-instance-vpn2] vpn-target 2222:2000 import-extcommunity

[PE2-vpn-instance-vpn2] vpn-target 2222:2000 export-extcommunity

[PE2-vpn-instance-vpn2] quit

# Bind interface Ten-GigabitEthernet 3/1/3 to VPN instance vpn2.

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

[PE2-Ten-GigabitEthernet3/1/3] ip binding vpn-instance vpn2

[PE2-Ten-GigabitEthernet3/1/3] ip address 30.1.1.1 24

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

4.     Establish an EBGP peer relationship between PE 2 and CE 3.

[PE2] bgp 100

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

[PE2-bgp-default-vpn2] peer 30.1.1.2 as-number 65430

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

[PE2-bgp-default-ipv4-vpn2] peer 30.1.1.2 enable

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

[PE2-bgp-default-vpn2] quit

[PE2-bgp-default] quit

5.     Configure EVPN L3VPN, and use the SR-MPLS BE tunnel as the public tunnel.

a.     Configure IS-IS SRGB, enable MPLS TE, and enable SR-MPLS in IS-IS IPv4 unicast address family view.

[PE2] isis 1

[PE2-isis-1] mpls te enable

[PE2-isis-1] segment-routing global-block 17000 17999

[PE2-isis-1] address-family ipv4

[PE2-isis-1-ipv4] segment-routing mpls

[PE2-isis-1-ipv4] segment-routing adjacency enable

[PE2-isis-1-ipv4] quit

[PE2-isis-1] quit

b.     Configure a prefix SID for interface loopback 0.

[PE2] interface loopback 0

[PE2-LoopBack0] isis prefix-sid index 20

[PE2-LoopBack0] quit

c.     Configure PE 1 and PE 2 to establish an MP-IBGP peer relationship to exchange BGP EVPN routes.

[PE2] bgp 100

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

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

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] undo policy vpn-target

[PE2-bgp-default-evpn] peer 1.1.1.1 enable

[PE2-bgp-default-evpn] peer 1.1.1.1 advertise encap-type mpls

[PE2-bgp-default-evpn] peer 1.1.1.1 next-hop-local

[PE2-bgp-default-evpn] peer 1.1.1.1 reflect-client

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

d.     Enable EVPN to advertise VPN routes.

[PE2] ip vpn-instance vpn2

[PE2-vpn-instance-vpn2] address-family ipv4

[PE2-vpn-ipv4-vpn2] evpn mpls routing-enable

[PE2-vpn-ipv4-vpn2] quit

[PE2-vpn-instance-vpn2] quit

e.     Configure a tunnel policy for the EVPN L3VPN to preferentially select the SR-MPLS BE tunnel as the public tunnel.

[PE2] tunnel-policy srbe

[PE2-tunnel-policy-srbe] select-seq sr-lsp load-balance-number 1

[PE2-tunnel-policy-srbe] quit

[PE2] ip vpn-instance vpn2

[PE2-vpn-instance-vpn2] tnl-policy srbe

[PE2-vpn-instance-vpn2] quit

6.     Configure EVPN L3VPN over SRv6 to use the SRv6 BE tunnel as the public tunnel.

a.     Specify a source address for the outer IPv6 header of SRv6-encapsulated EVPN L3VPN packets.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 2::2

b.     Configure the destination address End.DT4 SID of the IPv6 packet headers encapsulated in EVPN L3VPN over SRv6.

[PE2-segment-routing-ipv6] locator bbb ipv6-prefix 200:: 64 static 32

[PE2-segment-routing-ipv6-locator-bbb] quit

[PE2-segment-routing-ipv6] quit

[PE2] isis 1

[PE2-isis-1] address-family ipv6 unicast

[PE2-isis-1-ipv6] segment-routing ipv6 locator bbb

[PE2-isis-1-ipv6] quit

[PE2-isis-1] quit

c.     Add End.DT4 SID for the private network route.

[PE2] bgp 100

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

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

[PE2-bgp-default-ipv4-vpn2] segment-routing ipv6 locator bbb evpn

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

[PE2-bgp-default-vpn2] quit

d.     Establish MP-IBGP peer relationship between PE 2 and PE 3.

[PE2-bgp-default] peer 3::3 as-number 100

[PE2-bgp-default] peer 3::3 connect-interface loopback 0

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 3::3 enable

[PE2-bgp-default-evpn] peer 3::3 nexthop-local

[PE2-bgp-default-evpn] peer 3::3 reflect-client

[PE2-bgp-default-evpn] peer 3::3 advertise encap-type srv6

[PE2-bgp-default-evpn] quit

e.     Allow private network routes to be iterated to End.DT4 SID routes.

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

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

[PE2-bgp-default-ipv4-vpn2] segment-routing ipv6 best-effort evpn

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

[PE2-bgp-default-vpn2] quit

7.     Configure SRv6 and EVPN L3VPN to communicate through Option B.

a.     Enable the SRv6 and MPLS network to communicate with each other.

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] srv6-mpls-interworking enable

b.     Configure BGP to reference the locator.

[PE2-bgp-default-evpn] segment-routing ipv6 locator bbb evpn

c.     Configure the route iteration mode.

[PE2-bgp-default-evpn] segment-routing ipv6 best-effort evpn

[PE2-bgp-default-evpn] quit

Configuring PE 3

1.     Configuring IP addresses and unicast routing protocols

# Configure IS-IS to implement network layer connectivity, and specify the wide cost type.

<Sysname> system-view

[Sysname] sysname PE3

[PE3] isis 1

[PE3-isis-1] network-entity 00.0000.0000.0003.00

[PE3-isis-1] cost-style wide

[PE3-isis-1] address-family ipv6 unicast

[PE3-isis-1-ipv6] quit

[PE3-isis-1] quit

# Configure IP addresses for interfaces loopback 0 and Ten-GigabitEthernet 3/1/1, and enable IS-IS on the interfaces.

[PE3] interface loopback 0

[PE3-LoopBack0] ip address 3.3.3.3 255.255.255.255

[PE3-LoopBack0] ipv6 address 33::33 128

[PE3-LoopBack0] isis ipv6 enable 1

[PE3-LoopBack0] quit

[PE3] interface ten-gigabitethernet 3/1/1

[PE3-Ten-GigabitEthernet3/1/1] port link-mode route

[PE3-Ten-GigabitEthernet3/1/1] ipv6 address 61::2 64

[PE3-Ten-GigabitEthernet3/1/1] isis ipv6 enable 1

[PE3-Ten-GigabitEthernet3/1/1] quit

2.     Configure VPN instances for the CE to access PE.

# Create VPN instance vpn1, and configure its RD and RT.

[PE3] ip vpn-instance vpn1

[PE3-vpn-instance-vpn1] route-distinguisher 1111:3

[PE3-vpn-instance-vpn1] vpn-target 1111:1000 import-extcommunity

[PE3-vpn-instance-vpn1] vpn-target 1111:1000 export-extcommunity

[PE3-vpn-instance-vpn1] quit

# Create VPN instance vpn2, and configure its RD and RT.

[PE3] ip vpn-instance vpn2

[PE3-vpn-instance-vpn2] route-distinguisher 2222:3

[PE3-vpn-instance-vpn2] vpn-target 2222:2000 import-extcommunity

[PE3-vpn-instance-vpn2] vpn-target 2222:2000 export-extcommunity

[PE3-vpn-instance-vpn2] quit

# Bind interface Ten-GigabitEthernet 3/1/2 to VPN instance vpn1.

[PE3] interface ten-gigabitethernet 3/1/2

[PE3-Ten-GigabitEthernet3/1/2] ip binding vpn-instance vpn1

[PE3-Ten-GigabitEthernet3/1/2] ip address 40.1.1.1 24

[PE3-Ten-GigabitEthernet3/1/2] quit

# Bind interface Ten-GigabitEthernet 3/1/3 to VPN instance vpn2.

[PE3] interface ten-gigabitethernet 3/1/3

[PE3-Ten-GigabitEthernet3/1/3] ip binding vpn-instance vpn2

[PE3-Ten-GigabitEthernet3/1/3] ip address 50.1.1.1 24

[PE3-Ten-GigabitEthernet3/1/3] quit

3.     Configure PE 3 to establish EBGP peer relationships with CE 4 and CE 5.

[PE3] bgp 100

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

[PE3-bgp-default-vpn1] peer 40.1.1.2 as-number 65440

[PE3-bgp-default-vpn1] address-family ipv4 unicast

[PE3-bgp-default-ipv4-vpn1] peer 40.1.1.2 enable

[PE3-bgp-default-ipv4-vpn1] quit

[PE3-bgp-default-vpn1] quit

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

[PE3-bgp-default-vpn2] peer 50.1.1.2 as-number 65450

[PE3-bgp-default-vpn2] address-family ipv4 unicast

[PE3-bgp-default-ipv4-vpn2] peer 50.1.1.2 enable

[PE3-bgp-default-ipv4-vpn2] quit

[PE3-bgp-default-vpn2] quit

[PE3-bgp-default] quit

4.     Configure the source address of IPv6 packet headers encapsulated in EVPN L3VPN over SRv6.

[PE3] segment-routing ipv6

[PE3-segment-routing-ipv6] encapsulation source-address 3::3

5.     Configure the destination address End.DT4 SID of IPv6 packet headers encapsulated in EVPN L3VPN over SRv6.

[PE3-segment-routing-ipv6] locator ccc ipv6-prefix 401:: 64 static 32

[PE3-segment-routing-ipv6-locator-ccc] quit

[PE3-segment-routing-ipv6] quit

[PE3] isis 1

[PE3-isis-1] address-family ipv6 unicast

[PE3-isis-1-ipv6] segment-routing ipv6 locator ccc

[PE3-isis-1-ipv6] quit

[PE3-isis-1] quit

6.     Add End.DT4 SIDs for private network routes.

[PE3] bgp 100

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

[PE3-bgp-default-vpn1] address-family ipv4 unicast

[PE3-bgp-default-ipv4-vpn1] segment-routing ipv6 locator ccc evpn

[PE3-bgp-default-ipv4-vpn1] quit

[PE3-bgp-default-vpn1] quit

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

[PE3-bgp-default-vpn2] address-family ipv4 unicast

[PE3-bgp-default-ipv4-vpn2] segment-routing ipv6 locator ccc evpn

[PE3-bgp-default-ipv4-vpn2] quit

[PE3-bgp-default-vpn2] quit

7.     Establish MP-IBGP peer relationship between PE 2 and PE 3.

[PE3-bgp-default] peer 2::2 as-number 100

[PE3-bgp-default] peer 2::2 connect-interface loopback 0

[PE3-bgp-default] address-family l2vpn evpn

[PE3-bgp-default-evpn] peer 2::2 enable

[PE3-bgp-default-evpn] peer 2::2 nexthop-local

[PE3-bgp-default-evpn] peer 2::2 advertise encap-type srv6

[PE3-bgp-default-evpn] quit

8.     Allow private network routes to be iterated to End.DT4 SID routes.

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

[PE3-bgp-default-vpn1] address-family ipv4 unicast

[PE3-bgp-default-ipv4-vpn1] segment-routing ipv6 best-effort evpn

[PE3-bgp-default-ipv4-vpn1] quit

[PE3-bgp-default-vpn1] quit

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

[PE3-bgp-default-vpn2] address-family ipv4 unicast

[PE3-bgp-default-ipv4-vpn2] segment-routing ipv6 best-effort evpn

[PE3-bgp-default-ipv4-vpn2] quit

[PE3-bgp-default-vpn2] quit

Configuring CE 1

# Assign an IP address to the interface.

<Sysname> system-view

[Sysname] sysname CE1

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

[CE1-Ten-GigabitEthernet3/1/1] port link-mode route

[CE1-Ten-GigabitEthernet3/1/1] ip address 10.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute direct routes.

[CE1] bgp 65410

[CE1-bgp-default] peer 10.1.1.1 as-number 100

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

[CE1-bgp-default-ipv4] peer 10.1.1.1 enable

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

[CE1-bgp-default-ipv4] quit

[CE1-bgp-default] quit

Configuring CE 2

# Assign an IP address to the interface.

<Sysname> system-view

[Sysname] sysname CE2

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

[CE2-Ten-GigabitEthernet3/1/1] port link-mode route

[CE2-Ten-GigabitEthernet3/1/1] ip address 20.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute direct routes.

[CE2] bgp 65420

[CE2-bgp-default] peer 20.1.1.1 as-number 100

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

[CE2-bgp-default-ipv4] peer 20.1.1.1 enable

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

[CE2-bgp-default-ipv4] quit

[CE2-bgp-default] quit

Configuring CE 3

# Assign an IP address to the interface.

<Sysname> system-view

[Sysname] sysname CE3

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

[CE3-Ten-GigabitEthernet3/1/1] port link-mode route

[CE3-Ten-GigabitEthernet3/1/1] ip address 30.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute direct routes.

[CE3] bgp 65430

[CE3-bgp-default] peer 30.1.1.1 as-number 100

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

[CE3-bgp-default-ipv4] peer 30.1.1.1 enable

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

[CE3-bgp-default-ipv4] quit

[CE3-bgp-default] quit

Configuring CE 4

# Assign an IP address to the interface.

<Sysname> system-view

[Sysname] sysname CE4

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

[CE4-Ten-GigabitEthernet3/1/1] port link-mode route

[CE4-Ten-GigabitEthernet3/1/1] ip address 40.1.1.2 24

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

# Establish EBGP peer relationship between the PE and CE, and redistribute direct routes.

[CE4] bgp 65440

[CE4-bgp-default] peer 40.1.1.1 as-number 100

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

[CE4-bgp-default-ipv4] peer 40.1.1.1 enable

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

[CE4-bgp-default-ipv4] quit

[CE4-bgp-default] quit

Configuring CE 5

# Assign an IP address to the interface.

<Sysname> system-view

[Sysname] sysname CE5

[CE5] interface ten-gigabitethernet 3/1/1

[CE5-Ten-GigabitEthernet3/1/1] port link-mode route

[CE5-Ten-GigabitEthernet3/1/1] ip address 50.1.1.2 24

[CE5-Ten-GigabitEthernet3/1/1] quit

# Establish EBGP peer relationship between the PE and CE, and redistribute direct routes.

[CE5] bgp 65450

[CE5-bgp-default] peer 50.1.1.1 as-number 100

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

[CE5-bgp-default-ipv4] peer 50.1.1.1 enable

[CE5-bgp-default-ipv4] import-route direct

[CE5-bgp-default-ipv4] quit

[CE5-bgp-default] quit

Verifying the configuration

Verifying IS-IS neighbor and BGP peer establishment

# View IS-IS neighbor information on the PEs. Verify that IS-IS neighbor relationships have been established between PE 1 and PE 2 and between PE 2 and PE 3. This section uses PE 2 as an example.

[PE2] display isis peer

 

                         Peer information for IS-IS(1)

                         -----------------------------

 

 System ID: 0000.0000.0001

 Interface: XGE3/1/1                 Circuit Id:  0000.0000.0002.01

 State:  Up     HoldTime: 25s        Type: L1(L1L2)     PRI: 64

 

 System ID: 0000.0000.0001

 Interface: XGE3/1/1                 Circuit Id:  0000.0000.0002.01

 State:  Up     HoldTime: 28s        Type: L2(L1L2)     PRI: 64

 

 System ID: 0000.0000.0003

 Interface: XGE3/1/2                 Circuit Id:  0000.0000.0003.01

 State:  Up     HoldTime: 7s         Type: L1(L1L2)     PRI: 64

 

 System ID: 0000.0000.0003

 Interface: XGE3/1/2                 Circuit Id:  0000.0000.0003.01

 State:  Up     HoldTime: 7s         Type: L2(L1L2)     PRI: 64

# View BGP L2VPN peer information on the PEs. Verify that BGP L2VPN peer relationships have been established between PE 1 and PE 2 and between PE 2 and PE 3. This section uses PE 2 as an example.

[PE2] display bgp peer l2vpn evpn

 

 BGP local router ID: 2.2.2.2

 Local AS number: 100

 Total number of peers: 2                 Peers in established state: 2

 

 * - Dynamically created peer

 Peer                    AS  MsgRcvd  MsgSent OutQ  PrefRcv Up/Down  State

 

 1.1.1.1                100       23       21    0        2 00:13:02 Established

 33::33                 100       20       20    0        2 00:13:09 Established

# View BGP-VPN IPv4 unicast peer information on the PEs. Verify that BGP peer relationships have been established between the PEs and CEs correctly. This section uses PE 2 as an example.

[PE2] display bgp peer ipv4 vpn-instance vpn2

 

 BGP local router ID: 2.2.2.2

 Local AS number: 100

 Total number of peers: 1                 Peers in established state: 1

 

 * - Dynamically created peer

 Peer                    AS  MsgRcvd  MsgSent OutQ  PrefRcv Up/Down  State

 

 30.1.1.2             65430       22       24    0        1 00:16:48 Established

Verifying packet forwarding from EVPN L3VPN to EVPN L3VPN over SRv6

The following information uses traffic forwarding from CE 2 (20.1.1.2) in VPN instance 2 to CE 5 (50.1.1.2) as an example to verify packet forwarding from EVPN L3VPN to EVPN L3VPN over SRv6.

# On PE 1, display the FIB table information of VPN instance vpn2. The output shows that private network label 1279 is added to packets sent to network 50.1.1.0/24, and the NHLFE ID for the outer public tunnel is 1.

[PE1] display fib vpn-instance vpn2 50.1.1.0

FIB entry count: 1

 

Flag:

  U:Usable   G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static

  R:Relay     F:FRR

 

Destination/Mask   Nexthop         Flag     OutInterface/Token       Label

50.1.1.0/24        2.2.2.2         UGR      1                        1279

# On PE 1, display the NHLFE entry information. The output shows that the NHLFE entry with ID 1 is an SRLSP, indicating that route 50.1.1.0/24 is iterated to the SR-MPLS BE tunnel.

[PE1] display mpls forwarding nhlfe 1

Flags: T - Forwarded through a tunnel

       N - Forwarded through the outgoing interface to the nexthop IP address

       B - Backup forwarding information

       A - Active forwarding information

       M - P2MP forwarding information

 

NID        Tnl-Type   Flag OutLabel Forwarding Info

--------------------------------------------------------------------------------

1          SRLSP      NA   3        XGE3/1/1                  11.0.1.2

# On PE 3, display the SRv6 local SID forwarding table information. The output shows that the End.DT4 SID that PE 3 allocates to VPN instance vpn2 (route 50.1.1.0/24 belongs to VPN instance vpn2) is 401::1:0:3.

[PE3] display segment-routing ipv6 local-sid end-dt4

 

                    Local SID forwarding table (End.DT4)

 

Total SIDs: 2

 

SID           : 401::1:0:1/64

Function type : End.DT4                         Flavor         : PSP

VPN instance  : vpn1                            Allocation type: Dynamic

Network type  : EVPN L3VPN

Locator name  : ccc

Owner         : BGP                             State          : Active

Create Time   : Apr 08 17:53:27.808 2022

 

SID           : 401::1:0:3/64

Function type : End.DT4                         Flavor         : PSP

VPN instance  : vpn2                            Allocation type: Dynamic

Network type  : EVPN L3VPN

Locator name  : ccc

Owner         : BGP                             State          : Active

Create Time   : Apr 08 17:53:27.811 2022

# On PE 2, execute the display mpls lsp srv6-mpls-interworking and display mpls forwarding ilm commands to verify that MPLS label 1279 has been mapped to End.DT4 SID (401::1:0:3). After PE 2 receives packets carrying private network label 1279, it replaces the private network label with the End.DT4 SID.

[PE2] display mpls lsp srv6-mpls-interworking

FEC            : 33::33/401::1:0:3

Protocol       : BGP

In Label       : 1279

Out SRv6 SID   : 401::1:0:3

Path ID        : 0x26000000.1

[PE2] display mpls forwarding ilm 1279

Flags: T - Forwarded through a tunnel

       N - Forwarded through the outgoing interface to the nexthop IP address

       B - Backup forwarding information

       A - Active forwarding information

       M - P2MP forwarding information

 

InLabel Oper    VRF   Flag SwapInfo  Forwarding Info

--------------------------------------------------------------------------------

1279    SWAP    0     NA   401::1:0:3

                                     XGE3/1/2

                                     FE80::3261:2FF:FE0A:306

# On PE 2, display the FIB table information of VPN instance vpn2. The output shows that the next hop of 50.1.1.0/24 is End.DT4 SID 401::1:0:3, the route is iterated to the SRv6 BE tunnel, and the iterated next hop address is FE80::3261:2FF:FE0A:306.

[PE2] display ip routing-table vpn-instance vpn2 50.1.1.0 verbose

 

Summary count : 1

 

 Destination: 50.1.1.0/24

    Protocol: BGP instance default

  Process ID: 0

   SubProtID: 0x8                       Age: 00h10m19s

  FlushedAge: 00h10m19s

        Cost: 0                  Preference: 255

       IpPre: N/A                QosLocalID: N/A

         Tag: 0                       State: Active Adv

   OrigTblID: 0x0                   OrigVrf: default-vrf

     TableID: 0x102                  OrigAs: 65450

       NibID: 0x16000000             LastAs: 100

      AttrID: 0x5

    BkAttrID: 0xffffffff           Neighbor: 33::33

       Flags: 0x80010060        OrigNextHop: 401::

       Label: NULL              RealNextHop: FE80::3261:2FF:FE0A:306

     BkLabel: NULL                BkNextHop: N/A

     SRLabel: NULL                Interface: Ten-GigabitEthernet3/1/2

   BkSRLabel: NULL              BkInterface: N/A

   Tunnel ID: Invalid           IPInterface: Ten-GigabitEthernet3/1/2

 BkTunnel ID: Invalid         BkIPInterface: N/A

     InLabel: 0              ColorInterface: N/A

    SIDIndex: 0            BkColorInterface: N/A

    FtnIndex: 0x0           TunnelInterface: N/A

TrafficIndex: N/A         BkTunnelInterface: N/A

   Connector: N/A                    PathID: 0x0

      UserID: 0x0                SRTunnelID: Invalid

    SID Type: N/A                       NID: Invalid

    FlushNID: Invalid                 BkNID: Invalid

  BkFlushNID: Invalid             StatFlags: 0x0

         SID: 401::1:0:3

       BkSID: N/A

CommBlockLen: 0                    Priority: Low

[PE2] display fib vpn-instance vpn2 50.1.1.0

FIB entry count: 1

 

Flag:

  U:Usable   G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static

  R:Relay     F:FRR

 

Destination/Mask   Nexthop         Flag     OutInterface/Token       Label

50.1.1.0/24        FE80::3261:2FF: UGR      XGE3/1/2                  Null

                   FE0A:306

Verifying packet forwarding from EVPN L3VPN over SRv6 to EVPN L3VPN

The following information uses traffic forwarding from CE 5 (50.1.1.2) in VPN instance 2 to CE 2 (20.1.1.2) as an example to verify packet forwarding from EVPN L3VPN over SRv6 to EVPN L3VPN.

# On PE 3, display the FIB table information of VPN instance vpn2. The output shows that the next hop of 20.1.1.0/24 is End.T SID 200::1:0:7, the route is iterated to the SRv6 BE tunnel, and the iterated next hop address is FE80::3260:E5FF:FEA1:207.

[PE3] display ip routing-table vpn-instance vpn2 20.1.1.0 verbose

 

Summary count : 1

 

 Destination: 20.1.1.0/24

    Protocol: BGP instance default

  Process ID: 0

   SubProtID: 0x8                       Age: 01h14m41s

  FlushedAge: 01h14m41s

        Cost: 0                  Preference: 255

       IpPre: N/A                QosLocalID: N/A

         Tag: 0                       State: Active Adv

   OrigTblID: 0x0                   OrigVrf: default-vrf

     TableID: 0x202                  OrigAs: 100

       NibID: 0x16000002             LastAs: 100

      AttrID: 0x5

    BkAttrID: 0xffffffff           Neighbor: 22::22

       Flags:  0x80010060        OrigNextHop: 200::

       Label:  NULL              RealNextHop: FE80::3260:E5FF:FEA1:207

     BkLabel: NULL                BkNextHop: N/A

     SRLabel: NULL                Interface: Ten-GigabitEthernet3/1/1

   BkSRLabel: NULL              BkInterface: N/A

   Tunnel ID: Invalid           IPInterface: Ten-GigabitEthernet3/1/1

 BkTunnel ID: Invalid         BkIPInterface: N/A

     InLabel: 0              ColorInterface: N/A

    SIDIndex: 0            BkColorInterface: N/A

    FtnIndex: 0x0           TunnelInterface: N/A

TrafficIndex: N/A         BkTunnelInterface: N/A

   Connector: N/A                    PathID: 0x0

      UserID: 0x0                SRTunnelID: Invalid

    SID Type: N/A                       NID: Invalid

    FlushNID: Invalid                 BkNID: Invalid

  BkFlushNID: Invalid             StatFlags: 0x0

         SID: 200::1:0:7

       BkSID: N/A

CommBlockLen: 0                    Priority: Low

[PE3] display fib vpn-instance vpn2 20.1.1.0

FIB entry count: 1

 

Flag:

  U:Usable   G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static

  R:Relay     F:FRR

 

Destination/Mask   Nexthop         Flag     OutInterface/Token       Label

20.1.1.0/24        FE80::3260:E5FF UGR      XGE3/3/1                  Null

                   :FEA1:207

# On PE 2, display the SRv6 local SID forwarding table information. The output shows that the End.T SID that PE 2 allocates is 200::1:0:7.

[PE2] display segment-routing ipv6 local-sid end-t

 

                    Local SID forwarding table (End.T)

 

Total SIDs: 1

 

SID           : 200::1:0:7/64

Function type : End.T                           Flavor         : PSP

Interface     : XGE3/1/1                         Interface Index: 0x2

Nexthop       : 11.0.1.1

VPN instance  : public instance                 Allocation type: Dynamic

Locator name  : bbb

Owner         : BGP                             State          : Active

Create Time   : May 06 16:39:46.513 2022

# On PE 2, display the IPv6 FIB table information. The output shows that the private network label corresponding to the End.T SID is 1151, and the NHLFE ID for the outer public tunnel is 1.

[PE2] display ipv6 fib 200::1:0:7

FIB entry count: 1

 

Flag:

  U:Usable   G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static

  R:Relay     F:FRR

 

Destination:  200::1:0:7                                     Prefix length: 128

Nexthop    : 0.0.0.0                                        Flags: UGH

Time stamp : 0x18                                           Label: 1151

Interface  : NULL0                                          Token: 1

# On PE 2, display the FIB table and routing table information of VPN instance vpn2. The output shows that route 20.1.1.0/24 is iterated to the MPLS tunnel, the inner private network label is 1151, and the NHLFE ID for the outer public tunnel is 1.

[PE2] display fib vpn-instance vpn2 20.1.1.0

FIB entry count: 1

Flag:

  U:Usable   G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static

  R:Relay     F:FRR

Destination/Mask   Nexthop         Flag     OutInterface/Token       Label

20.1.1.0/24        1.1.1.1         UGR      1                        1151

# On PE 2, display the NHLFE entry information. The output shows that the NHLFE entry with ID 1 is an SRLSP, indicating that the public tunnel is the SR-MPLS BE tunnel.

[PE2] display mpls forwarding nhlfe 1

Flags: T - Forwarded through a tunnel

       N - Forwarded through the outgoing interface to the nexthop IP address

       B - Backup forwarding information

       A - Active forwarding information

       M - P2MP forwarding information

 

NID        Tnl-Type   Flag OutLabel Forwarding Info

--------------------------------------------------------------------------------

1          SRLSP      NA   3        XGE3/1/1                  11.0.1.1

Verifying connectivity between CEs

# Verify that CE 1 and CE 4 in VPN instance 1 can ping each other and CE 2, CE 3, and CE 5 in VPN instance 2 can ping each other.

[CE1] ping 40.1.1.2

Ping 40.1.1.2 (40.1.1.2): 56 data bytes, press CTRL+C to break

56 bytes from 40.1.1.2: icmp_seq=0 ttl=253 time=1.000 ms

56 bytes from 40.1.1.2: icmp_seq=1 ttl=253 time=2.000 ms

56 bytes from 40.1.1.2: icmp_seq=2 ttl=253 time=1.000 ms

56 bytes from 40.1.1.2: icmp_seq=3 ttl=253 time=1.000 ms

56 bytes from 40.1.1.2: icmp_seq=4 ttl=253 time=1.000 ms

 

--- Ping statistics for 40.1.1.2 ---

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

round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms

[CE2] ping 30.1.1.2

Ping 30.1.1.2 (30.1.1.2): 56 data bytes, press CTRL+C to break

56 bytes from 30.1.1.2: icmp_seq=0 ttl=253 time=2.000 ms

56 bytes from 30.1.1.2: icmp_seq=1 ttl=253 time=1.000 ms

56 bytes from 30.1.1.2: icmp_seq=2 ttl=253 time=1.000 ms

56 bytes from 30.1.1.2: icmp_seq=3 ttl=253 time=1.000 ms

56 bytes from 30.1.1.2: icmp_seq=4 ttl=253 time=1.000 ms

 

--- Ping statistics for 30.1.1.2 ---

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

round-trip min/avg/max/std-dev = 1.000/1.200/2.000/0.400 ms

[CE2] ping 50.1.1.2

Ping 50.1.1.2 (50.1.1.2): 56 data bytes, press CTRL+C to break

56 bytes from 50.1.1.2: icmp_seq=0 ttl=253 time=2.000 ms

56 bytes from 50.1.1.2: icmp_seq=1 ttl=253 time=1.000 ms

56 bytes from 50.1.1.2: icmp_seq=2 ttl=253 time=2.000 ms

56 bytes from 50.1.1.2: icmp_seq=3 ttl=253 time=2.000 ms

56 bytes from 50.1.1.2: icmp_seq=4 ttl=253 time=1.000 ms

 

--- Ping statistics for 50.1.1.2 ---

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

round-trip min/avg/max/std-dev = 1.000/1.600/2.000/0.490 ms

# Verify that a CE in VPN 1 cannot ping a CE in VPN 2, for example, verify that CE 2 cannot ping CE 4.

[CE2] ping 40.1.1.2

Ping 40.1.1.2 (40.1.1.2): 56 data bytes, press CTRL+C to break

Request time out

Request time out

Request time out

Request time out

Request time out

 

--- Ping statistics for 40.1.1.2 ---

5 packet(s) transmitted, 0 packet(s) received, 100.0% packet loss

Configuration files

·     PE 1

#

 sysname PE1

#

ip vpn-instance vpn1

 route-distinguisher 1111:1

 tnl-policy srbe

 vpn-target 1111:1000 import-extcommunity

 vpn-target 1111:1000 export-extcommunity

 #

 address-family ipv4

  evpn mpls routing-enable

#

ip vpn-instance vpn2

 route-distinguisher 2222:1

 tnl-policy srbe

 vpn-target 2222:2000 import-extcommunity

 vpn-target 2222:2000 export-extcommunity

 #

 address-family ipv4

  evpn mpls routing-enable

#

isis 1

 cost-style wide

 mpls te enable

 segment-routing global-block 16000 16999

 network-entity 00.0000.0000.0001.00

 #

 address-family ipv4 unicast

  segment-routing mpls

  segment-routing adjacency enable

#

 mpls lsr-id 1.1.1.1

#

mpls te

#

tunnel-policy srbe

 select-seq sr-lsp load-balance-number 1

#

interface LoopBack0

 ip address 1.1.1.1 255.255.255.255

 isis enable 1

 isis prefix-sid index 10

 ipv6 address 11::11/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip address 11.0.1.1 255.255.255.0

 isis enable 1

 mpls enable

 mpls te enable

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn1

 ip address 10.1.1.1 255.255.255.0

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn2

 ip address 20.1.1.1 255.255.255.0

#

bgp 100

 peer 2.2.2.2 as-number 100

 peer 2.2.2.2 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 2.2.2.2 enable

  peer 2.2.2.2 next-hop-local

  peer 2.2.2.2 advertise encap-type mpls

 #

 ip vpn-instance vpn1

  peer 10.1.1.2 as-number 65410

  #

  address-family ipv4 unicast

   peer 10.1.1.2 enable

 #

 ip vpn-instance vpn2

  peer 20.1.1.2 as-number 65420

  #

  address-family ipv4 unicast

   import-route direct

   peer 20.1.1.2 enable

#

return

·     PE 2

#

 sysname PE2

#

ip vpn-instance vpn2

 route-distinguisher 2222:2

 tnl-policy srbe

 vpn-target 2222:2000 import-extcommunity

 vpn-target 2222:2000 export-extcommunity

 #

 address-family ipv4

  evpn mpls routing-enable

#

isis 1

 cost-style wide

 mpls te enable

 segment-routing global-block 17000 17999

 network-entity 00.0000.0000.0002.00

 #

 address-family ipv4 unicast

  segment-routing mpls

  segment-routing adjacency enable

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator bbb

#

 mpls lsr-id 2.2.2.2

#

mpls te

#

tunnel-policy srbe

 select-seq sr-lsp load-balance-number 1

#

interface LoopBack0

 ip address 2.2.2.2 255.255.255.255

 isis enable 1

 isis ipv6 enable 1

 isis prefix-sid index 20

 ipv6 address 22::22/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip address 11.0.1.2 255.255.255.0

 isis enable 1

 mpls enable

 mpls te enable

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 mpls enable

 mpls te enable

 ipv6 address 61::1/64

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn2

 ip address 30.1.1.1 255.255.255.0

#

bgp 100

 peer 1.1.1.1 as-number 100

 peer 1.1.1.1 connect-interface LoopBack0

 peer 33::33 as-number 100

 peer 33::33 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  undo policy vpn-target

  segment-routing ipv6 best-effort evpn

  segment-routing ipv6 locator bbb evpn

  srv6-mpls-interworking enable

  peer 1.1.1.1 enable

  peer 1.1.1.1 next-hop-local

  peer 1.1.1.1 reflect-client

  peer 1.1.1.1 advertise encap-type mpls

  peer 33::33 enable

  peer 33::33 next-hop-local

  peer 33::33 reflect-client

  peer 33::33 advertise encap-type srv6

 #

 ip vpn-instance vpn2

  peer 30.1.1.2 as-number 65430

  #

  address-family ipv4 unicast

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator bbb evpn

   peer 30.1.1.2 enable

#

segment-routing ipv6

 encapsulation source-address 2::2

 #

 locator bbb ipv6-prefix 200:: 64 static 32

#

return

·     PE 3

#

 sysname PE3

#

ip vpn-instance vpn1

 route-distinguisher 1111:3

 vpn-target 1111:1000 import-extcommunity

 vpn-target 1111:1000 export-extcommunity

#

ip vpn-instance vpn2

 route-distinguisher 2222:3

 vpn-target 2222:2000 import-extcommunity

 vpn-target 2222:2000 export-extcommunity

#

isis 1

 cost-style wide

 network-entity 00.0000.0000.0003.00

 #

 address-family ipv6 unicast

  segment-routing ipv6 locator ccc

#

interface LoopBack0

 ip address 3.3.3.3 255.255.255.255

 isis ipv6 enable 1

 ipv6 address 33::33/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 isis ipv6 enable 1

 ipv6 address 61::2/64

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn1

 ip address 40.1.1.1 255.255.255.0

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 combo enable copper

 ip binding vpn-instance vpn2

 ip address 50.1.1.1 255.255.255.0

#

bgp 100

 peer 22::22 as-number 100

 peer 22::22 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 22::22 enable

  peer 22::22 next-hop-local

  peer 22::22 advertise encap-type srv6

 #

 ip vpn-instance vpn1

  peer 40.1.1.2 as-number 65440

  #

  address-family ipv4 unicast

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator ccc evpn

   peer 40.1.1.2 enable

 #

 ip vpn-instance vpn2

  peer 50.1.1.2 as-number 65450

  #

  address-family ipv4 unicast

   segment-routing ipv6 best-effort evpn

   segment-routing ipv6 locator ccc evpn

   peer 50.1.1.2 enable

#

segment-routing ipv6

 encapsulation source-address 3::3

 #

 locator ccc ipv6-prefix 401:: 64 static 32

#

return

·     CE 1

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip address 10.1.1.2 255.255.255.0

#

bgp 65410

 peer 10.1.1.1 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 10.1.1.1 enable

#

return

·     CE 2

#

 sysname CE2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip address 20.1.1.2 255.255.255.0

#

bgp 65420

 peer 20.1.1.1 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 20.1.1.1 enable

#

return

·     CE 3

#

 sysname CE3

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip address 30.1.1.2 255.255.255.0

#

bgp 65430

 peer 30.1.1.1 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 30.1.1.1 enable

#

return

·     CE 4

#

 sysname CE4

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip address 40.1.1.2 255.255.255.0

#

bgp 65440

 peer 40.1.1.1 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 40.1.1.1 enable

#

return

·     CE 5

#

 sysname CE5

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 combo enable copper

 ip address 50.1.1.2 255.255.255.0

#

bgp 65450

 peer 50.1.1.1 as-number 100

 #

 address-family ipv4 unicast

  import-route direct

  peer 50.1.1.1 enable

#

return

Example: Configuring EVPN VPWS over SRv6 BE (dual-homed single-active CE)

Network configuration

The user network has two sites, with CE 1 and CE 2 as the edge devices, respectively. The PE devices use OSPFv3 for communication in the IPv6 network. CE 1 is multi-homed to PE 1 and PE 2 through link aggregation, and CE 2 is single-homed to PE 3. Establish an SRv6 tunnel over the backbone network between CE 1 and CE 2 to implement Layer 2 communication between the two sites.

Figure 12 Network diagram

Device

Interface

IP address

Device

Interface

IP address

PE 1

Loop0

1::1/128

CE 1

RAGG1

100::1/64

 

XGE3/1/1

N/A

CE 2

XGE3/1/1

100::2/64

 

XGE3/1/2

10::1/64

PE 3

Loop0

3::3/128

 

XGE3/1/3

20::1/64

 

XGE3/1/1

N/A

PE 2

Loop0

2::2/128

 

XGE3/1/2

10::3/64

 

XGE3/1/1

N/A

 

XGE3/1/3

30::3/64

 

XGE3/1/2

30::2/64

 

 

 

 

XGE3/1/3

20::2/64

 

 

 

 

Procedures

Configuring CE 1

# Create Layer 3 aggregate interface 1, specify the dynamic aggregation mode, and configure the IP address and subnet mask.

<Sysname> system-view

[Sysname] sysname CE1

[CE1] interface route-aggregation 1

[CE1-Route-Aggregation1] link-aggregation mode dynamic

[CE1-Route-Aggregation1] ipv6 address 100::1 64

[CE1-Route-Aggregation1] quit

# Assign interfaces Ten-GigabitEthernet 3/1/1 and Ten-GigabitEthernet 3/1/2 to aggregation group 1.

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

[CE1-Ten-GigabitEthernet3/1/1] port link-aggregation group 1

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

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

[CE1-Ten-GigabitEthernet3/1/2] port link-aggregation group 1

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

Configuring PE 1

# Run OSPFv3 on PE 1.

<Sysname> system-view

[Sysname] sysname PE1

[PE1] ospfv3

[PE1-ospfv3-1] router-id 1.1.1.1

[PE1-ospfv3-1] segment-routing ipv6 locator aaa

[PE1-ospfv3-1] area 0

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

[PE1-ospfv3-1] quit

# Configure the loopback 0 interface.

[PE1] interface loopback 0

[PE1-LoopBack0] ipv6 address 1::1 128

[PE1-LoopBack0] ospfv3 1 area 0

[PE1-LoopBack0] quit

# Enable L2VPN.

[PE1] l2vpn enable

# Configure interface Ten-GigabitEthernet 3/1/2 that connects PE 1 to PE 3.

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

[PE1-Ten-GigabitEthernet3/1/2] ipv6 address 10::1/64

[PE1-Ten-GigabitEthernet3/1/2] ospfv3 1 area 0

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

# Configure interface Ten-GigabitEthernet 3/1/3 that connects PE 1 to PE 2.

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

[PE1-Ten-GigabitEthernet3/1/3] ipv6 address 20::1/64

[PE1-Ten-GigabitEthernet3/1/3] ospfv3 1 area 0

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

# Establish IBGP peer relationships between PE 1 and PE 2 and between PE 1 and PE 3, and configure BGP EVPN for route exchange.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

[PE1-bgp-default] peer 2::2 as-number 100

[PE1-bgp-default] peer 2::2 connect-interface loopback 0

[PE1-bgp-default] peer 3::3 as-number 100

[PE1-bgp-default] peer 3::3 connect-interface loopback 0

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 2::2 enable

[PE1-bgp-default-evpn] peer 3::3 enable

[PE1-bgp-default-evpn] peer 2::2 advertise encap-type srv6

[PE1-bgp-default-evpn] peer 3::3 advertise encap-type srv6

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

# Configure the ESI value and interface redundancy mode on Ten-GigabitEthernet 3/1/1.

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

[PE1-Ten-GigabitEthernet3/1/1] esi 1.1.1.1.1

[PE1-Ten-GigabitEthernet3/1/1] evpn redundancy-mode all-active

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

# Create cross-connect group vpna and create an EVPN instance for the cross-connect group. Configure the EVPN instance to use SRv6 encapsulation. Configure the RD and RT for the EVPN instance of the cross-connect group, and implement route iteration through SID attributes.

[PE1] xconnect-group vpna

[PE1-xcg-vpna] evpn encapsulation srv6

[PE1-xcg-vpna-evpn-srv6] route-distinguisher 1:1

[PE1-xcg-vpna-evpn-srv6] vpn-target 1:1 export-extcommunity

[PE1-xcg-vpna-evpn-srv6] vpn-target 1:1 import-extcommunity

[PE1-xcg-vpna-evpn-srv6] segment-routing ipv6 best-effort

[PE1-xcg-vpna-evpn-srv6] quit

# Create cross-connect pw1, associate interface Ten-GigabitEthernet 3/1/1 with the cross-connect, and create an SRv6 tunnel in the cross-connect to associate the AC and the SRv6 tunnel.

[PE1-xcg-vpna] connection pw1

[PE1-xcg-vpna-pw1] ac interface ten-gigabitethernet 3/1/1

[PE1-xcg-vpna-pw1-Ten-GigabitEthernet3/1/1] quit

[PE1-xcg-vpna-pw1] evpn local-service-id 1 remote-service-id 2

[PE1-xcg-vpna-pw1-1-2] quit

[PE1-xcg-vpna-pw1] segment-routing ipv6 locator aaa

[PE1-xcg-vpna-pw1] quit

[PE1-xcg-vpna] quit

# Specify the source address of SRv6-encapsulated IPv6 packet headers.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

# Configure a locator to request End.DX2 SIDs.

[PE1-segment-routing-ipv6] locator aaa ipv6-prefix 111:: 64 static 32

[PE1-segment-routing-ipv6-locator-aaa] quit

[PE1-segment-routing-ipv6] quit

Configuring PE 2

# Run OSPFv3 on PE 2.

<Sysname> system-view

[Sysname] sysname PE2

[PE2] ospfv3

[PE2-ospfv3-1] router-id 2.2.2.2

[PE2-ospfv3-1] segment-routing ipv6 locator aaa

[PE2-ospfv3-1] area 0.0.0.0

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

[PE2-ospfv3-1] quit

# Configure the loopback 0 interface.

[PE2] interface loopback 0

[PE2-LoopBack0] ipv6 address 2::2 128

[PE2-LoopBack0] ospfv3 1 area 0

[PE2-LoopBack0] quit

# Enable L2VPN.

[PE2] l2vpn enable

# Configure interface Ten-GigabitEthernet 3/1/3 that connects PE 2 to PE 1.

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

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

[PE2-Ten-GigabitEthernet3/1/3] ospfv3 1 area 0

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

# Configure interface Ten-GigabitEthernet 3/1/2 that connects PE 2 to PE 3.

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

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

[PE2-Ten-GigabitEthernet3/1/2] ospfv3 1 area 0

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

# Establish IBGP peer relationships between PE 1 and PE 2 and between PE 3 and PE 2, and configure BGP EVPN for route exchange.

[PE2] bgp 100

[PE2-bgp-default] router-id 2.2.2.2

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 0

[PE2-bgp-default] peer 3::3 as-number 100

[PE2-bgp-default] peer 3::3 connect-interface loopback 0

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 enable

[PE2-bgp-default-evpn] peer 3::3 enable

[PE2-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE2-bgp-default-evpn] peer 3::3 advertise encap-type srv6

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

# Configure the ESI value and interface redundancy mode on Ten-GigabitEthernet 3/1/1.

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

[PE2-Ten-GigabitEthernet3/1/1] esi 1.1.1.1.1

[PE2-Ten-GigabitEthernet3/1/1] evpn redundancy-mode all-active

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

# Create cross-connect group vpna and create an EVPN instance for the cross-connect group. Configure the EVPN instance to use SRv6 encapsulation. Configure the RD and RT for the EVPN instance of the cross-connect group, and implement route iteration through SID attributes.

[PE2] xconnect-group vpna

[PE2-xcg-vpna] evpn encapsulation srv6

[PE2-xcg-vpna-evpn-srv6] route-distinguisher 1:1

[PE2-xcg-vpna-evpn-srv6] vpn-target 1:1 export-extcommunity

[PE2-xcg-vpna-evpn-srv6] vpn-target 1:1 import-extcommunity

[PE2-xcg-vpna-evpn-srv6] segment-routing ipv6 best-effort

[PE2-xcg-vpna-evpn-srv6] quit

# Create cross-connect pw1, associate interface Ten-GigabitEthernet 3/1/1 with the cross-connect, and create an SRv6 tunnel in the cross-connect to associate the AC and the SRv6 tunnel.

[PE2-xcg-vpna] connection pw1

[PE2-xcg-vpna-pw1] ac interface ten-gigabitethernet 3/1/1

[PE2-xcg-vpna-pw1-Ten-GigabitEthernet3/1/1] quit

[PE2-xcg-vpna-pw1] evpn local-service-id 1 remote-service-id 2

[PE2-xcg-vpna-pw1-1-2] quit

[PE2-xcg-vpna-pw1] segment-routing ipv6 locator aaa

[PE2-xcg-vpna-pw1] quit

[PE2-xcg-vpna] quit

# Specify a source address for the outer IPv6 header of SRv6-encapsulated packets.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 2::2

# Configure a locator to request End.DX2 SIDs.

[PE2-segment-routing-ipv6] locator aaa ipv6-prefix 222:: 64 static 32

[PE2-segment-routing-ipv6-locator-aaa] quit

[PE2-segment-routing-ipv6] quit

Configuring PE 3

# Run OSPFv3 on PE 3.

<Sysname> system-view

[Sysname] sysname PE3

[PE3] ospfv3

[PE3-ospfv3-1] router-id 3.3.3.3

[PE3-ospfv3-1] segment-routing ipv6 locator aaa

[PE3-ospfv3-1] area 0

[PE3-ospfv3-1-area-0.0.0.0] quit

[PE3-ospfv3-1] quit

# Configure the loopback 0 interface.

[PE3] interface loopback 0

[PE3-LoopBack0] ipv6 address 3::3 128

[PE3-LoopBack0] ospfv3 1 area 0

[PE3-LoopBack0] quit

# Enable L2VPN.

[PE3] l2vpn enable

# Configure interface Ten-GigabitEthernet 3/1/2 that connects PE 3 to PE 1.

[PE3] interface ten-gigabitethernet 3/1/2

[PE3-Ten-GigabitEthernet3/1/2] ipv6 address 10::3 64

[PE3-Ten-GigabitEthernet3/1/2] ospfv3 1 area 0

[PE3-Ten-GigabitEthernet3/1/2] quit

# Configure interface Ten-GigabitEthernet 3/1/3 that connects PE 3 to PE 2.

[PE3] interface ten-gigabitethernet 3/1/3

[PE3-Ten-GigabitEthernet3/1/3] ipv6 address 30::3 64

[PE3-Ten-GigabitEthernet3/1/3] ospfv3 1 area 0

[PE3-Ten-GigabitEthernet3/1/3] quit

# Establish IBGP peer relationships between PE 1 and PE 3 and between PE 2 and PE 3, and configure BGP EVPN for route exchange.

[PE3] bgp 100

[PE3-bgp-default] router-id 3.3.3.3

[PE3-bgp-default] peer 1::1 as-number 100

[PE3-bgp-default] peer 1::1 connect-interface loopback 0

[PE3-bgp-default] peer 2::2 as-number 100

[PE3-bgp-default] peer 2::2 connect-interface loopback 0

[PE3-bgp-default] address-family l2vpn evpn

[PE3-bgp-default-evpn] peer 1::1 enable

[PE3-bgp-default-evpn] peer 2::2 enable

[PE3-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE3-bgp-default-evpn] peer 2::2 advertise encap-type srv6

[PE3-bgp-default-evpn] quit

[PE3-bgp-default] quit

# Create cross-connect group vpna and create an EVPN instance for the cross-connect group. Configure the EVPN instance to use SRv6 encapsulation. Configure the RD and RT for the EVPN instance of the cross-connect group, and implement route iteration through SID attributes.

[PE3] xconnect-group vpna

[PE3-xcg-vpna] evpn encapsulation srv6

[PE3-xcg-vpna-evpn-srv6] route-distinguisher 1:1

[PE3-xcg-vpna-evpn-srv6] vpn-target 1:1 export-extcommunity

[PE3-xcg-vpna-evpn-srv6] vpn-target 1:1 import-extcommunity

[PE3-xcg-vpna-evpn-srv6] segment-routing ipv6 best-effort

[PE3-xcg-vpna-evpn-srv6] quit

# Create cross-connect pw1, associate interface Ten-GigabitEthernet 3/1/1 with the cross-connect, and create an SRv6 tunnel in the cross-connect to associate the AC and the SRv6 tunnel.

[PE3-xcg-vpna] connection pw1

[PE3-xcg-vpna-pw1] ac interface ten-gigabitethernet 3/1/1

[PE3-xcg-vpna-pw1-Ten-GigabitEthernet3/1/1] quit

[PE3-xcg-vpna-pw1] evpn local-service-id 2 remote-service-id 1

[PE3-xcg-vpna-pw1-1-2] quit

[PE3-xcg-vpna-pw1] segment-routing ipv6 locator aaa

[PE3-xcg-vpna-pw1] quit

[PE3-xcg-vpna] quit

# Specify a source address for the outer IPv6 header of SRv6-encapsulated packets.

[PE3] segment-routing ipv6

[PE3-segment-routing-ipv6] encapsulation source-address 3::3

# Configure a locator to request End.DX2 SIDs.

[PE3-segment-routing-ipv6] locator aaa ipv6-prefix 333:: 64 static 32

[PE3-segment-routing-ipv6-locator-aaa] quit

[PE3-segment-routing-ipv6] quit

Configuring CE 2

<Sysname> system-view

[Sysname] sysname CE2

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

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

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

Verifying the configuration

# View L2VPN SRv6 information on PE 1 to verify that an SRv6 tunnel has been established between PE 1 and PE 3.

[PE1] display l2vpn peer srv6

Total number of SRv6 Tunnels: 1

1 up, 0 blocked, 0 down

 

Xconnect-group Name: vpna

   Peer            : 3::3

   Flag            : Main

   State           : Up

   Remote SrvID    : 2

# Display SRv6 forwarding information on PE 1 to view the ingress and egress SIDs of the SRv6 tunnel.

[PE1] display l2vpn forwarding srv6

Total number of cross-connections: 1

Total number of SRv6 tunnels: 1, 1 up, 0 blocked, 0 down

Xconnect-group Name : vpna

Connection Name     : pw1

Link ID             : 0x1         Type: BE    State: Up

In SID              : 111::1:0:3

Out SID             : 333::1:0:3

# Verify that CE 1 and CE 2 can ping each other. Verify that CE 1 and CE 2 can ping each other when the link between CE 1 and PE 1 or the link between CE 1 and PE 2 fails.

Configuration files

·     CE1:

#

 sysname CE1

#

interface Route-Aggregation1

 link-aggregation mode dynamic

 ipv6 address 100::1/64

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 port link-aggregation group 1

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 port link-aggregation group 1

·     PE1:

#

 sysname PE1

#

ospfv3 1

 segment-routing ipv6 locator aaa

 area 0.0.0.0

#

interface LoopBack0

 ospfv3 1 area 0.0.0.0

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 esi 0001.0001.0001.0001.0001

 evpn redundancy-mode single-active

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 10::1/64

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 20::1/64

#

bgp 100

 router-id 1.1.1.1

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack0

 peer 3::3 as-number 100

 peer 3::3 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 2::2 enable

  peer 2::2 advertise encap-type srv6

  peer 3::3 enable

  peer 3::3 advertise encap-type srv6

#

xconnect-group vpna

 evpn encapsulation srv6

  route-distinguisher 1:1

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity

  segment-routing ipv6 best-effort

 connection pw1

  segment-routing ipv6 locator aaa

  evpn local-service-id 1 remote-service-id 2

  ac interface Ten-GigabitEthernet3/1/1

#

segment-routing ipv6

 encapsulation source-address 1::1

 locator aaa ipv6-prefix 111:: 64 static 32

·     PE2:

#

 sysname PE2

#

ospfv3 1

 segment-routing ipv6 locator aaa

 area 0.0.0.0

#

interface LoopBack0

 ospfv3 1 area 0.0.0.0

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 esi 0001.0001.0001.0001.0001

 evpn redundancy-mode single-active

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 30::2/64

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 20::2/64

#

bgp 100

 router-id 2.2.2.2

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack0

 peer 3::3 as-number 100

 peer 3::3 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 advertise encap-type srv6

  peer 3::3 enable

  peer 3::3 advertise encap-type srv6

#

xconnect-group vpna

 evpn encapsulation srv6

  route-distinguisher 1:1

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity

  segment-routing ipv6 best-effort

 connection pw1

  segment-routing ipv6 locator aaa

  evpn local-service-id 1 remote-service-id 2

  ac interface Ten-GigabitEthernet3/1/1

#

segment-routing ipv6

 encapsulation source-address 2::2

 locator aaa ipv6-prefix 222:: 64 static 32

·     PE3:

#

 sysname PE3

#

ospfv3 1

 segment-routing ipv6 locator aaa

 area 0.0.0.0

#

interface LoopBack0

 ospfv3 1 area 0.0.0.0

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 10::3/64

#

interface Ten-GigabitEthernet3/1/3

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 30::3/64

#

bgp 100

 router-id 3.3.3.3

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack0

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 advertise encap-type srv6

  peer 2::2 enable

  peer 2::2 advertise encap-type srv6

#

xconnect-group vpna

 evpn encapsulation srv6

  route-distinguisher 1:1

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity

  segment-routing ipv6 best-effort

 connection pw1

  segment-routing ipv6 locator aaa

  evpn local-service-id 2 remote-service-id 1

  ac interface Ten-GigabitEthernet3/1/1

#

segment-routing ipv6

 encapsulation source-address 3::3

 locator aaa ipv6-prefix 333:: 64 static 32

·     CE2:

#

 sysname CE2

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 100::2/64

Example: Configuring EVPN VPWS over SRv6 TE policy (static configuration)

Network configuration

The user network has two sites CE 1 and CE 2. CE 1 and CE 2 access PE 1 and PE 2 respectively through Ethernet interfaces and communicate with each other through an SRv6 PW tunnel established over the IPv6 backbone network. Deploy an SRv6 TE policy tunnel in the IGP network for the SRv6 PW to be iterated to the SRv6 TE policy tunnel for traffic forwarding.

Figure 13 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

10::1/64

P

Loop0

3::3/128

PE 1

Loop0

1::1/128

 

XGE3/1/1

20::2/64

 

XGE3/1/1

N/A

 

XGE3/1/2

30::1/64

 

XGE3/1/2

20::1/64

PE 2

Loop0

2::2/128

CE 2

XGE3/1/1

10::2/64

 

XGE3/1/1

N/A

 

 

 

 

XGE3/1/2

30::2/64

 

Procedures

Configuring CE 1

<CE1> system-view

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

[CE1-Ten-GigabitEthernet3/1/1] ipv6 address 10::1 64

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

Configuring PE 1

# Run OSPFv3 on PE 1 to advertise SIDs.

<PE1> system-view

[PE1] ospfv3

[PE1-ospfv3-1] router-id 1.1.1.1

[PE1-ospfv3-1] segment-routing ipv6 locator aaa

[PE1-ospfv3-1] area 0.0.0.0

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

[PE1-ospfv3-1] quit

# Configure the loopback 0 interface.

[PE1] interface loopback 0

[PE1-LoopBack0] ipv6 address 1::1 128

[PE1-LoopBack0] ospfv3 1 area 0

[PE1-LoopBack0] quit

# Enable L2VPN.

[PE1] l2vpn enable

# Configure interface Ten-GigabitEthernet3/1/2 that connects PE 1 to P.

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

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

[PE1-Ten-GigabitEthernet3/1/2] ospfv3 1 area 0

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

# Establish an IBGP peer relationship between PE 1 and PE 2, and configure them to exchange route information through BGP EVPN.

[PE1] bgp 100

[PE1-bgp-default] router-id 1.1.1.1

[PE1-bgp-default] peer 2::2 as-number 100

[PE1-bgp-default] peer 2::2 connect-interface loopback 0

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 2::2 enable

[PE1-bgp-default-evpn] peer 2::2 advertise encap-type srv6

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

# Create cross-connect group vpna and create an EVPN instance for the cross-connect group. Configure the EVPN instance to use SRv6 encapsulation. Configure the RD and RT for the EVPN instance of the cross-connect group, and implement route iteration through SR-TE.

[PE1] xconnect-group vpna

[PE1-xcg-vpna] evpn encapsulation srv6

[PE1-xcg-vpna-evpn-srv6] route-distinguisher 1:1

[PE1-xcg-vpna-evpn-srv6] vpn-target 1:1 export-extcommunity

[PE1-xcg-vpna-evpn-srv6] vpn-target 1:1 import-extcommunity

[PE1-xcg-vpna-evpn-srv6] segment-routing ipv6 traffic-engineer

[PE1-xcg-vpna-evpn-srv6] quit

# Create cross-connect pw1, associate interface Ten-GigabitEthernet3/1/1 with the cross-connect, and create an SRv6 tunnel in the cross-connect to associate the AC and the SRv6 tunnel.

[PE1-xcg-vpna] connection pw1

[PE1-xcg-vpna-pw1] ac interface ten-gigabitethernet 3/1/1

[PE1-xcg-vpna-pw1-Ten-GigabitEthernet3/1/1] quit

[PE1-xcg-vpna-pw1] evpn local-service-id 1 remote-service-id 2

[PE1-xcg-vpna-pw1-1-2] quit

[PE1-xcg-vpna-pw1] segment-routing ipv6 locator aaa

[PE1-xcg-vpna-pw1] quit

[PE1-xcg-vpna] quit

# Configure the SID list.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

[PE1-segment-routing-ipv6] locator aaa ipv6-prefix 5000:: 64 static 32

[PE1-segment-routing-ipv6-locator-aaa] opcode 1 end no-flavor

[PE1-segment-routing-ipv6-locator-aaa] quit

[PE1-segment-routing-ipv6] traffic-engineering

[PE1-srv6-te] srv6-policy locator aaa

[PE1-srv6-te] segment-list s1

[PE1-srv6-te-sl-s1] index 10 ipv6 6000::1

[PE1-srv6-te-sl-s1] index 20 ipv6 7000::1

[PE1-srv6-te-sl-s1] quit

# Create an SRv6 TE policy and configure SRv6 TE policy attributes.

[PE1-srv6-te] policy p1

[PE1-srv6-te-policy-p1] color 10 end-point ipv6 2::2

# Configure an SRv6 TE policy candidate path, and specify an SID list for the candidate path.

[PE1-srv6-te-policy-p1] candidate-paths

[PE1-srv6-te-policy-p1-path] preference 10

[PE1-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE1-srv6-te-policy-p1-path-pref-10] quit

[PE1-srv6-te-policy-p1-path] quit

[PE1-srv6-te-policy-p1] quit

[PE1-srv6-te] quit

[PE1-segment-routing-ipv6] quit

# Direct traffic to the SRv6 TE policy tunnel by configuring the color attributes.

[PE1] route-policy a permit node 10

[PE1-route-policy-a-10] apply extcommunity color 00:10

[PE1-route-policy-a-10] quit

[PE1] xconnect-group vpna

[PE1-xcg-vpna] evpn encapsulation srv6

[PE1-xcg-vpna-evpn-srv6] import route-policy a

[PE1-xcg-vpna-evpn-srv6] quit

[PE1-xcg-vpna] quit

Configuring PE 2

# Run OSPFv3 on PE 2, and advertise SIDs through OSPFv3.

<PE2> system-view

[PE2] ospfv3

[PE2-ospfv3-1] router-id 2.2.2.2

[PE2-ospfv3-1] segment-routing ipv6 locator aaa

[PE2-ospfv3-1] area 0.0.0.0

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

[PE2-ospfv3-1] quit

# Configure the loopback 0 interface.

[PE2] interface loopback 0

[PE2-LoopBack0] ipv6 address 2::2 128

[PE2-LoopBack0] ospfv3 1 area 0

[PE2-LoopBack0] quit

# Enable L2VPN.

[PE2] l2vpn enable

# Configure interface Ten-GigabitEthernet3/1/2 that connects PE 2 to P.

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

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

[PE2-Ten-GigabitEthernet3/1/2] ospfv3 1 area 0.0.0.0

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

# Establish an IBGP peer relationship between PE 1 and PE 2, and configure them to exchange route information through BGP EVPN.

[PE2] bgp 100

[PE2-bgp-default] router-id 2.2.2.2

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 0

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 enable

[PE2-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

# Create cross-connect group vpna and create an EVPN instance for the cross-connect group. Configure the EVPN instance to use SRv6 encapsulation. Configure the RD and RT for the EVPN instance of the cross-connect group, and implement route iteration through SR-TE.

[PE2] xconnect-group vpna

[PE2-xcg-vpna] evpn encapsulation srv6

[PE2-xcg-vpna-evpn-srv6] route-distinguisher 1:1

[PE2-xcg-vpna-evpn-srv6] vpn-target 1:1 export-extcommunity

[PE2-xcg-vpna-evpn-srv6] vpn-target 1:1 import-extcommunity

[PE2-xcg-vpna-evpn-srv6] segment-routing ipv6 traffic-engineer

[PE2-xcg-vpna-evpn-srv6] quit

# Create cross-connect pw1, associate interface Ten-GigabitEthernet3/1/1 with the cross-connect, and create an SRv6 tunnel in the cross-connect to associate the AC and the SRv6 tunnel.

[PE2-xcg-vpna] connection pw1

[PE2-xcg-vpna-pw1] ac interface ten-gigabitethernet 3/1/1

[PE2-xcg-vpna-pw1-Ten-GigabitEthernet3/1/1] quit

[PE2-xcg-vpna-pw1] evpn local-service-id 2 remote-service-id 1

[PE2-xcg-vpna-pw1-2-1] quit

[PE2-xcg-vpna-pw1] segment-routing ipv6 locator aaa

[PE2-xcg-vpna-pw1] quit

[PE2-xcg-vpna] quit

# Configure the SID list.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 2::2

[PE2-segment-routing-ipv6] locator aaa ipv6-prefix 7000:: 64 static 32

[PE2-segment-routing-ipv6-locator-aaa] opcode 1 end no-flavor

[PE2-segment-routing-ipv6-locator-aaa] quit

[PE2-segment-routing-ipv6] traffic-engineering

[PE2-srv6-te] srv6-policy locator aaa

[PE2-srv6-te] segment-list s1

[PE2-srv6-te-sl-s1] index 10 ipv6 6000::1

[PE2-srv6-te-sl-s1] index 20 ipv6 5000::1

[PE2-srv6-te-sl-s1] quit

# Configure SRv6 TE policy on PE 2.

[PE2-srv6-te] policy p1

[PE2-srv6-te-policy-p1] color 10 end-point ipv6 1::1

[PE2-srv6-te-policy-p1] candidate-paths

[PE2-srv6-te-policy-p1-path] preference 10

[PE2-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE2-srv6-te-policy-p1-path-pref-10] quit

[PE2-srv6-te-policy-p1-path] quit

[PE2-srv6-te-policy-p1] quit

[PE2-srv6-te] quit

[PE2-segment-routing-ipv6] quit

# Direct traffic to the SRv6 TE policy tunnel by configuring the color attributes.

[PE2] route-policy a permit node 10

[PE2-route-policy-a-10] apply extcommunity color 00:10

[PE2-route-policy-a-10] quit

[PE1] xconnect-group vpna

[PE1-xcg-vpna] evpn encapsulation srv6

[PE1-xcg-vpna-evpn-srv6] import route-policy a

[PE1-xcg-vpna-evpn-srv6] quit

[PE1-xcg-vpna] quit

Configuring P

# Configure the SRv6 End.SID.

<P> system-view

[P] segment-routing ipv6

[P-segment-routing-ipv6] locator b ipv6-prefix 6000:: 64 static 32

[P-segment-routing-ipv6-locator-b] opcode 1 end no-flavor

[P-segment-routing-ipv6-locator-b] quit

[P-segment-routing-ipv6] quit

# Run OSPFv3 on P.

[P] ospfv3

[P-ospfv3-1] router-id 3.3.3.3

[P-ospfv3-1] segment-routing ipv6 locator b

[P-ospfv3-1] area 0.0.0.0

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

[P-ospfv3-1] quit

# Configure an IPv6 address for the interface, and run OSPFv3 on the interface.

[P] interface loopback 0

[P-LoopBack0] ipv6 address 3::3 128

[P-LoopBack0] ospfv3 1 area 0

[P-LoopBack0] quit

[P] interface ten-gigabitethernet 3/1/1

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

[P-Ten-GigabitEthernet3/1/1] ospfv3 1 area 0

[P-Ten-GigabitEthernet3/1/1] quit

[P] interface ten-gigabitethernet 3/1/2

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

[P-Ten-GigabitEthernet3/1/2] ospfv3 1 area 0

[P-Ten-GigabitEthernet3/1/2] quit

Configuring CE 2

<CE2> system-view

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

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

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

Verifying the configuration

# View L2VPN SRv6 information on PE 1 to verify that an SRv6 tunnel has been established between PE 1 and PE 2.

[PE1] display l2vpn peer srv6

Total number of SRv6 Tunnels: 1

1 up, 0 blocked, 0 down

 

Xconnect-group Name: vpna

   Peer            : 2::2

   Flag            : Main

   State           : Up

   Remote SrvID    : 2

# Display SRv6 forwarding information on PE 1 to view the ingress and egress SIDs of the SRv6 tunnel.

[PE1] display l2vpn forwarding srv6

Total number of cross-connections: 1

Total number of SRv6 tunnels: 1, 1 up, 0 blocked, 0 down

Xconnect-group Name : vpna

Connection Name     : pw1

Link ID             : 0x1         Type: BE    State: Up

In SID              : 100::1:0:2

Out SID             : 200::1:0:2

# Verify that CE 1 and CE 2 can ping each other.

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 10::1/64

#

·     PE 1:

#

 sysname PE1

#

ospfv3 1

 router-id 1.1.1.1

 segment-routing ipv6 locator aaa

 area 0.0.0.0

#

 l2vpn enable

#

xconnect-group vpna

 evpn encapsulation srv6

  route-distinguisher 1:1

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity

  segment-routing ipv6 locator aaa

  segment-routing ipv6 traffic-engineer

  import route-policy a

 connection pw1

  segment-routing ipv6 locator aaa

  evpn local-service-id 1 remote-service-id 2

  ac interface Ten-GigabitEthernet3/1/1

#

interface LoopBack0

 ospfv3 1 area 0.0.0.0

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 20::1/64

#

bgp 100

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 2::2 enable

  peer 2::2 advertise encap-type srv6

#

route-policy a permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 1::1

 #

 locator aaa ipv6-prefix 100:: 64 static 32

  opcode 1 end no-flavor

#

 traffic-engineering

  srv6-policy locator aaa

  #

  segment-list s1

   index 10 ipv6 6000::1

   index 20 ipv6 7000::1

  #

  policy p1

   color 10 end-point ipv6 2::2

   #

   candidate-paths

    #

    preference 10

     explicit segment-list s1

#

·     P:

#

 sysname P

#

ospfv3 1

 router-id 3.3.3.3

 segment-routing ipv6 locator b

 area 0.0.0.0

#

interface LoopBack0

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 20::2/64

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 30::1/64

#

segment-routing ipv6

 #

 locator b ipv6-prefix 6000:: 64 static 32

  opcode 1 end no-flavor

#

·     PE 2:

#

 sysname PE2

#

ospfv3 1

 router-id 2.2.2.2

 segment-routing ipv6 locator aaa

 segment-routing ipv6 locator d

 area 0.0.0.0

#

 l2vpn enable

#

xconnect-group vpna

 evpn encapsulation srv6

  route-distinguisher 1:1

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity

  segment-routing ipv6 locator aaa

  segment-routing ipv6 traffic-engineer

  import route-policy a

 connection pw1

  segment-routing ipv6 locator aaa

  evpn local-service-id 2 remote-service-id 1

  ac interface Ten-GigabitEthernet3/1/1

 

#

interface LoopBack0

 ospfv3 1 area 0.0.0.0

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 30::2/64

#

bgp 100

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 advertise encap-type srv6

#

route-policy a permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 2::2

 #

 locator aaa ipv6-prefix 200:: 64 static 32

 #

 locator d ipv6-prefix 7000:: 64 static 32

  opcode 1 end no-flavor

 #

 traffic-engineering

  srv6-policy locator aaa

  #

  segment-list s1

   index 10 ipv6 6000::1

   index 20 ipv6 5000::1

  #

  policy p1

   color 10 end-point ipv6 1::1

   #

   candidate-paths

    #

    preference 10

     explicit segment-list s1

#

·     CE 2:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 10::2/64

#

Example: Configuring EVPN VPLS over SRv6 TE policy (static configuration)

Network configuration

The user network has two sites CE 1 and CE 2. CE 1 and CE 2 access PE 1 and PE 2 respectively through Ethernet interfaces. Deploy an SRv6 TE policy tunnel in the IGP network for the SRv6 PW to be iterated to the SRv6 TE policy tunnel for traffic forwarding.

Figure 14 Network diagram

Device

Interface

IP address

Device

Interface

IP address

CE 1

XGE3/1/1

10::1/64

P

Loop0

3::3/128

PE 1

Loop0

1::1/128

 

XGE3/1/1

20::2/64

 

XGE3/1/1

N/A

 

XGE3/1/2

30::1/64

 

XGE3/1/2

20::1/64

PE 2

Loop0

2::2/128

CE 2

XGE3/1/1

10::2/64

 

XGE3/1/1

N/A

 

 

 

 

XGE3/1/2

30::2/64

 

Procedures

Configuring CE 1

<CE1> system-view

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

[CE1-Ten-GigabitEthernet3/1/1] ipv6 address 10::1 64

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

Configuring PE 1

# Run OSPFv3 on PE 1 to advertise SIDs.

<PE1> system-view

[PE1] ospfv3

[PE1-ospfv3-1] router-id 1.1.1.1

[PE1-ospfv3-1] segment-routing ipv6 locator aaa

[PE1-ospfv3-1] area 0.0.0.0

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

[PE1-ospfv3-1] quit

# Configure the loopback 0 interface.

[PE1] interface loopback 0

[PE1-LoopBack0] ipv6 address 1::1 128

[PE1-LoopBack0] ospfv3 1 area 0

[PE1-LoopBack0] quit

# Enable L2VPN.

[PE1] l2vpn enable

# Configure interface Ten-GigabitEthernet 3/1/2 that connects the PE to P.

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

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

[PE1-Ten-GigabitEthernet3/1/2] ospfv3 1 area 0

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

# Establish an IBGP peer relationship between PE 1 and PE 2, and configure them to exchange route information through BGP EVPN.

[PE1] bgp 100

[PE1-bgp-default] peer 2::2 as-number 100

[PE1-bgp-default] peer 2::2 connect-interface loopback 0

[PE1-bgp-default] address-family l2vpn evpn

[PE1-bgp-default-evpn] peer 2::2 enable

[PE1-bgp-default-evpn] peer 2::2 advertise encap-type srv6

[PE1-bgp-default-evpn] quit

[PE1-bgp-default] quit

# Create a VSI and an EVPN instance, configure EVPN to use SRv6 encapsulation, configure the RD and RT of the EVPN instance, implement route iteration through SR-TE, and specify the locator used by the EVPN instance.

[PE1] vsi vpna

[PE1-vsi-vpna] evpn encapsulation srv6

[PE1-vsi-vpna-evpn-srv6] route-distinguisher 1:1

[PE1-vsi-vpna-evpn-srv6] vpn-target 1:1 export-extcommunity

[PE1-vsi-vpna-evpn-srv6] vpn-target 1:1 import-extcommunity

[PE1-vsi-vpna-evpn-srv6] segment-routing ipv6 traffic-engineer

[PE1-vsi-vpna-evpn-srv6] segment-routing ipv6 locator aaa

[PE1-vsi-vpna-evpn-srv6] quit

# Associate interface Ten-GigabitEthernet 3/1/1 with the VSI.

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

[PE1-Ten-GigabitEthernet3/1/1] xconnect vsi vpna

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

# Configure the SID list.

[PE1] segment-routing ipv6

[PE1-segment-routing-ipv6] encapsulation source-address 1::1

[PE1-segment-routing-ipv6] locator aaa ipv6-prefix 5000:: 64 static 32

[PE1-segment-routing-ipv6-locator-aaa] opcode 1 end no-flavor

[PE1-segment-routing-ipv6-locator-aaa] quit

[PE1-segment-routing-ipv6] traffic-engineering

[PE1-srv6-te] srv6-policy locator aaa

[PE1-srv6-te] segment-list s1

[PE1-srv6-te-sl-s1] index 10 ipv6 6000::1

[PE1-srv6-te-sl-s1] index 20 ipv6 7000::1

[PE1-srv6-te-sl-s1] quit

# Create an SRv6 TE policy and configure SRv6 TE policy attributes.

[PE1-srv6-te] policy p1

[PE1-srv6-te-policy-p1] color 10 end-point ipv6 2::2

# Configure an SRv6 TE policy candidate path, and specify an SID list for the candidate path.

[PE1-srv6-te-policy-p1] candidate-paths

[PE1-srv6-te-policy-p1-path] preference 10

[PE1-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE1-srv6-te-policy-p1-path-pref-10] quit

[PE1-srv6-te-policy-p1-path] quit

[PE1-srv6-te-policy-p1] quit

[PE1-srv6-te] quit

[PE1-segment-routing-ipv6] quit

# Direct traffic to the SRv6 TE policy tunnel by configuring the color attributes.

[PE1] route-policy a permit node 10

[PE1-route-policy-a-10] apply extcommunity color 00:10

[PE1-route-policy-a-10] quit

[PE1] vsi vpna

[PE1-vsi-vpna] evpn encapsulation srv6

[PE1-vsi-vpna-evpn-srv6] import route-policy a

[PE1-vsi-vpna-evpn-srv6] quit

[PE1-vsi-vpna] quit

Configuring PE 2

# Run OSPFv3 on PE 2, and advertise SIDs through OSPFv3.

<PE2> system-view

[PE2] ospfv3

[PE2-ospfv3-1] router-id 2.2.2.2

[PE2-ospfv3-1] segment-routing ipv6 locator aaa

[PE2-ospfv3-1] area 0.0.0.0

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

[PE2-ospfv3-1] quit

# Configure the loopback 0 interface.

[PE2] interface loopback 0

[PE2-LoopBack0] ipv6 address 2::2 128

[PE2-LoopBack0] ospfv3 1 area 0

[PE2-LoopBack0] quit

# Enable L2VPN.

[PE2] l2vpn enable

# Configure interface Ten-GigabitEthernet3/1/2 that connects PE 2 to P.

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

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

[PE2-Ten-GigabitEthernet3/1/2] ospfv3 1 area 0.0.0.0

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

# Establish an IBGP peer relationship between PE 1 and PE 2, and configure them to exchange route information through BGP EVPN.

[PE2] bgp 100

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

[PE2-bgp-default] peer 1::1 connect-interface loopback 0

[PE2-bgp-default] address-family l2vpn evpn

[PE2-bgp-default-evpn] peer 1::1 enable

[PE2-bgp-default-evpn] peer 1::1 advertise encap-type srv6

[PE2-bgp-default-evpn] quit

[PE2-bgp-default] quit

# Create a VSI and an EVPN instance, configure EVPN to use SRv6 encapsulation, configure the RD and RT of the EVPN instance, implement route iteration through SR-TE, and specify the locator used by the EVPN instance.

[PE2] vsi vpna

[PE2-vsi-vpna] evpn encapsulation srv6

[PE2-vsi-vpna-evpn-srv6] route-distinguisher 1:1

[PE2-vsi-vpna-evpn-srv6] vpn-target 1:1 export-extcommunity

[PE2-vsi-vpna-evpn-srv6] vpn-target 1:1 import-extcommunity

[PE2-vsi-vpna-evpn-srv6] segment-routing ipv6 traffic-engineer

[PE2-vsi-vpna-evpn-srv6] segment-routing ipv6 locator aaa

[PE2-vsi-vpna-evpn-srv6] quit

# Associate interface Ten-GigabitEthernet3/1/1 to the VSI.

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

[PE2-Ten-GigabitEthernet3/1/1] xconnect vsi vpna

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

# Configure the SID list.

[PE2] segment-routing ipv6

[PE2-segment-routing-ipv6] encapsulation source-address 2::2

[PE2-segment-routing-ipv6] locator aaa ipv6-prefix 7000:: 64 static 32

[PE2-segment-routing-ipv6-locator-aaa] opcode 1 end no-flavor

[PE2-segment-routing-ipv6-locator-aaa] quit

[PE2-segment-routing-ipv6] traffic-engineering

[PE2-srv6-te] srv6-policy locator aaa

[PE2-srv6-te] segment-list s1

[PE2-srv6-te-sl-s1] index 10 ipv6 6000::1

[PE2-srv6-te-sl-s1] index 20 ipv6 5000::1

[PE2-srv6-te-sl-s1] quit

# Configure SRv6 TE policy on PE 2.

[PE2-srv6-te] policy p1

[PE2-srv6-te-policy-p1] color 10 end-point ipv6 1::1

# Configure an SRv6 TE policy candidate path, and specify an SID list for the candidate path.

[PE2-srv6-te-policy-p1] candidate-paths

[PE2-srv6-te-policy-p1-path] preference 10

[PE2-srv6-te-policy-p1-path-pref-10] explicit segment-list s1

[PE2-srv6-te-policy-p1-path-pref-10] quit

[PE2-srv6-te-policy-p1-path] quit

[PE2-srv6-te-policy-p1] quit

[PE2-srv6-te] quit

[PE2-segment-routing-ipv6] quit

# Direct traffic to the SRv6 TE policy tunnel by configuring the color attributes.

[PE2] route-policy a permit node 10

[PE2-route-policy-a-10] apply extcommunity color 00:10

[PE2-route-policy-a-10] quit

[PE2] vsi vpna

[PE2-vsi-vpna] evpn encapsulation srv6

[PE2-vsi-vpna-evpn-srv6] import route-policy a

[PE2-vsi-vpna-evpn-srv6] quit

[PE2-vsi-vpna] quit

Configuring P

# Configure the SRv6 End.SID.

<P> system-view

[P] segment-routing ipv6

[P-segment-routing-ipv6] locator b ipv6-prefix 6000:: 64 static 32

[P-segment-routing-ipv6-locator-b] opcode 1 end no-flavor

[P-segment-routing-ipv6-locator-b] quit

[P-segment-routing-ipv6] quit

# Run OSPFv3 on P.

[P] ospfv3

[P-ospfv3-1] router-id 3.3.3.3

[P-ospfv3-1] segment-routing ipv6 locator b

[P-ospfv3-1] area 0.0.0.0

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

[P-ospfv3-1] quit

# Configure an IPv6 address for the interface and run OSPFv3 on the interface.

[P] interface loopback 0

[P-LoopBack0] ipv6 address 3::3 128

[P-LoopBack0] ospfv3 1 area 0

[P-LoopBack0] quit

[P] interface ten-gigabitethernet 3/1/1

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

[P-Ten-GigabitEthernet3/1/1] ospfv3 1 area 0

[P-Ten-GigabitEthernet3/1/1] quit

[P] interface ten-gigabitethernet 3/1/2

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

[P-Ten-GigabitEthernet3/1/2] ospfv3 1 area 0

[P-Ten-GigabitEthernet3/1/2] quit

Configuring CE 2

<CE2> system-view

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

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

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

Verifying the configuration

# View L2VPN SRv6 information on PE 1 to verify that an SRv6 tunnel has been established between PE 1 and PE 2.

[PE1] display l2vpn peer srv6

Total number of SRv6 Tunnels: 1

1 up, 0 blocked, 0 down

 

VSI Name: vpna

   Peer            : 2::2

   Flag            : Main

   State           : Up

# Display SRv6 forwarding information on PE 1.

[PE1] display l2vpn forwarding srv6

Total number of VSIs: 1

Total number of SRv6 tunnels: 1, 1 up, 0 blocked, 0 down

 

VSI Name : vpna

Link ID             : 0x9000000   Type: BE    State: Up

In SID   : 100::1:0:1

Out SID  : 200::1:0:0

# Verify that CE 1 and CE 2 can ping each other.

Configuration files

·     CE 1:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 10::1/64

#

·     PE 1:

#

 sysname PE1

#

ospfv3 1

 router-id 1.1.1.1

 segment-routing ipv6 locator aaa

 area 0.0.0.0

#

 l2vpn enable

#

vsi vpna

 evpn encapsulation srv6

  route-distinguisher 1:1

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity

  segment-routing ipv6 locator aaa

  segment-routing ipv6 traffic-engineer

  import route-policy a

#

interface LoopBack0

 ospfv3 1 area 0.0.0.0

 ipv6 address 1::1/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 xconnect vsi vpna

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 20::1/64

#

bgp 100

 peer 2::2 as-number 100

 peer 2::2 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 2::2 enable

  peer 2::2 advertise encap-type srv6

#

route-policy a permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 1::1

 #

 locator aaa ipv6-prefix 100:: 64 static 32

  opcode 1 end no-flavor

 #

 traffic-engineering

  srv6-policy locator aaa

  #

  segment-list s1

   index 10 ipv6 6000::1

   index 20 ipv6 7000::1

  #

  policy p1

   color 10 end-point ipv6 2::2

   #

   candidate-paths

    #

    preference 10

     explicit segment-list s1

#

·     P:

#

 sysname P

#

ospfv3 1

 router-id 3.3.3.3

 segment-routing ipv6 locator b

 area 0.0.0.0

#

interface LoopBack0

 ipv6 address 3::3/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 20::2/64

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 30::1/64

#

segment-routing ipv6

 #

 locator b ipv6-prefix 6000:: 64 static 32

  opcode 1 end no-flavor

#

·     PE 2:

#

 sysname PE2

#

ospfv3 1

 router-id 2.2.2.2

 segment-routing ipv6 locator aaa

 segment-routing ipv6 locator d

 area 0.0.0.0

#

 l2vpn enable

#

vsi vpna

 evpn encapsulation srv6

  route-distinguisher 1:1

  vpn-target 1:1 export-extcommunity

  vpn-target 1:1 import-extcommunity

  segment-routing ipv6 locator aaa

  segment-routing ipv6 traffic-engineer

  import route-policy a

#

interface LoopBack0

 ospfv3 1 area 0.0.0.0

 ipv6 address 2::2/128

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 xconnect vsi vpna

#

interface Ten-GigabitEthernet3/1/2

 port link-mode route

 ospfv3 1 area 0.0.0.0

 ipv6 address 30::2/64

#

bgp 100

 peer 1::1 as-number 100

 peer 1::1 connect-interface LoopBack0

 #

 address-family l2vpn evpn

  peer 1::1 enable

  peer 1::1 advertise encap-type srv6

#

route-policy a permit node 10

 apply extcommunity color 00:10

#

segment-routing ipv6

 encapsulation source-address 2::2

 #

 locator aaa ipv6-prefix 200:: 64 static 32

 #

 locator d ipv6-prefix 7000:: 64 static 32

  opcode 1 end no-flavor

 #

 traffic-engineering

  srv6-policy locator aaa

  #

  segment-list s1

   index 10 ipv6 6000::1

   index 20 ipv6 5000::1

  #

  policy p1

   color 10 end-point ipv6 1::1

   #

   candidate-paths

    #

    preference 10

     explicit segment-list s1

#

·     CE 2:

#

 sysname CE1

#

interface Ten-GigabitEthernet3/1/1

 port link-mode route

 ipv6 address 10::2/64

#

Related documentation

·     H3C CR16000-F Routers Segment Routing Configuration Guide

·     H3C CR16000-F Routers Segment Routing Command Reference

  • 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
新华三官网