BGP for L3VPN using SRv6

L3VRF SRv6 configuration

BGP SRv6 basic configuration

The operator must configure a locator on the router, and reference it on the default BGP instance that will be configured with the L3VPN service. The locator is generally configured on a loopback interface, and redistributed by an IGP. This implies that when a BGP speaker receives an IPv6 prefix with a SID value derived from that locator, it must know the SID reachability.

vsr running config# vrf main
vsr running vrf main# routing segment-routing ipv6 locator srv6-locator1
vsr running locator srv6-locator1#! prefix 2001:db8:0:1::/64
vsr running locator srv6-locator1# .. .. ..
vsr running routing# bgp
vsr running bgp#! as 65500
vsr running bgp# router-id 192.0.2.1
vsr running bgp# vsr running bgp# segment-routing ipv6 locator
vsr running bgp# .. .. interface loopback loopback1
vsr running loopback loopback1# ipv6 address 2001:db8:0:1::/64
vsr running loopback loopback1#

Note

When receiving a SID attribute in BGP updates, the next-hop of the incoming BGP prefixes is not used, and is replaced by the SID value. The operator must ensure ensure that the SID IP address is reachable in the IPv6 core network.

The operator will complete the configuration by adding the L3VPN service to be deployed. Instead of configuring a label value to export, a SID value will be exported with the l3vpn export ipv6-sid command. A SID index will be configured, either manually by configuring the value, or automatically. That SID index will be written in the function part of the SID. The SID value will be encoded in two parts, by using the SID transposition algorithm: in the label part of the NLRI prefix, and in the SID attribute.

Note

Currently, the SID transposition algorithm implemented in BGP handles incorrectly the SRv6 locators with function length greater than 20 bits. To prevent issues, we currently limit the function length to 20 bits.

BGP SRv6 configuration example

The below topology is used to interconnect VPN networks behind an SRv6 network. An iBGP peering is performed between pe1 and pe2. An IPv6 address out of the locator range may be used to act as a BGP source address and also as BGP nexthop attribute.

Note

Operator may already have a deployed IPv6 network (with a following IPv6 address: 2001:db8:ffff::1/64) before the configuration of SRv6. Therefore the separate address 2001:db8:0:1::/64 is reserved for srv6.

It is assumed an IPv6 IGP like the IS-IS routing protocol is deployed in the rt3 and rt4 devices that physically separate the two PEs.

The iBGP peering permits prefix exchanges between pe1 and pe2. From pe1 perspective, two operations take place: - a BGP prefix is received from rt2, its SID attribute is taken and will be used as next hop; a segs route is installed in the green L3VRF. - The prefixes from the green L3VRF are redistributed by BGP and advertised with the local SID allocated from the green L3VRF. A seg6local local route is installed in the default L3VRF to properly handle the return traffic.

This behavior is presented in the below figure:

../../../../../_images/srv6_bgp_l3vpn_2.svg

Example of SRv6 BGP L3VRF behavior.

L3VRF SRv6 End.DT4 configuration

An example of SRv6 End.DT4 behavior is presented in the figure below, where the node from Network A sends an IPv4 packet to Network C. When packet reaches pe1,it is encapsulated into an IPv6 packet that is transmitted to pe2. At the moment when IPv4 in IPv6 packet arrives at pe2, it is decapsulated. The outer IPv6 header is stripped and the IPv4 packet is directed to the green L3VRF and finally to Network C.

../../../../../_images/srv6_bgp_dt4_2.svg

Example of SRv6 End.DT4 behavior.

To configure the End.DT4 operation on the pe1 device, use the following configuration:

pe1

pe1 running config# vrf main
pe1 running vrf main# l3vrf green
pe1 running l3vrf green# table-id 10
pe1 running l3vrf green# interface
pe1 running interface# physical eth1
pe1 running physical eth1# ipv4
pe1 running ipv4# address 192.168.10.1/24
pe1 running ipv4# ..
pe1 running physical eth1# port pci-b0s3
pe1 running physical eth1#! ..
pe1 running interface#! ..
pe1 running l3vrf green#! routing
pe1 running routing#! bgp
pe1 running bgp#! as 65500
pe1 running bgp#! router-id 192.0.2.1
pe1 running bgp#! address-family
pe1 running address-family#! ipv4-unicast
pe1 running ipv4-unicast#! network 192.168.10.0/24
pe1 running network 192.168.10.0/24#! ..
pe1 running ipv4-unicast#! l3vpn
pe1 running l3vpn#! export
pe1 running export#! vpn true
pe1 running export#! route-target 2:55
pe1 running export#! route-distinguisher 65500:1
pe1 running export#! ipv6-sid auto
pe1 running export#! ..
pe1 running l3vpn#! import
pe1 running import#! vpn true
pe1 running import#! route-target 2:55
pe1 running import#! ..
pe1 running l3vpn#! ..
pe1 running ipv4-unicast#! ..
pe1 running address-family#! ..
pe1 running bgp#! ..
pe1 running routing#! ..
pe1 running l3vrf green#! ..
pe1 running vrf main#! interface
pe1 running interface#! physical eth0
pe1 running physical eth0#! port pci-b0s4
pe1 running physical eth0# ipv6
pe1 running ipv6# address 2001:db8:1:1::1/64
pe1 running ipv6# ..
pe1 running physical eth0# ..
pe1 running interface# loopback loopback1
pe1 running loopback loopback1# ipv6
pe1 running ipv6# address 2001:db8:ffff::1/128
pe1 running ipv6# ..
pe1 running loopback loopback1# ..
pe1 running interface# loopback loopback2
pe1 running loopback loopback2# ipv6
pe1 running ipv6# address 2001:db8:0:1::/64
pe1 running ipv6# ..
pe1 running loopback loopback2# ..
pe1 running interface# ..
pe1 running vrf main# routing
pe1 running routing# interface eth0
pe1 running interface eth0# isis
pe1 running isis# area-tag coresrv6
pe1 running isis# ipv6-routing true
pe1 running isis# ..
pe1 running interface eth0# ..
pe1 running routing# interface loopback1
pe1 running interface loopback1# isis
pe1 running isis# area-tag coresrv6
pe1 running isis# ipv6-routing true
pe1 running isis# ..
pe1 running interface loopback1# ..
pe1 running routing# interface loopback2
pe1 running interface loopback2# isis
pe1 running isis# area-tag coresrv6
pe1 running isis# ipv6-routing true
pe1 running isis# ..
pe1 running interface loopback2# ..
pe1 running routing# bgp
pe1 running bgp# as 65500
pe1 running bgp# router-id 192.0.2.1
pe1 running bgp# segment-routing
pe1 running segment-routing# ipv6
pe1 running ipv6# locator srv6-locator1
pe1 running ipv6# ..
pe1 running segment-routing# ..
pe1 running bgp# neighbor 2001:db8:ffff::2
pe1 running neighbor 2001:db8:ffff::2#! remote-as 65500
pe1 running neighbor 2001:db8:ffff::2# capabilities extended-nexthop True
pe1 running neighbor 2001:db8:ffff::2# update-source loopback1
pe1 running neighbor 2001:db8:ffff::2# address-family
pe1 running address-family# ipv4-unicast
pe1 running ipv4-unicast# enabled false
pe1 running ipv4-unicast# ..
pe1 running address-family# ipv4-vpn
pe1 running ipv4-vpn# ..
pe1 running address-family# ..
pe1 running neighbor 2001:db8:ffff::2# ..
pe1 running bgp# ..
pe1 running routing# isis
pe1 running isis# instance coresrv6
pe1 running instance coresrv6# is-type level-1
pe1 running instance coresrv6# area-address 49.001a.0000.0000.0001.00
pe1 running instance coresrv6# multi-topology
pe1 running multi-topology# ipv6-unicast
pe1 running ipv6-unicast# ..
pe1 running multi-topology# ..
pe1 running instance coresrv6# ..
pe1 running isis# ..
pe1 running routing# segment-routing
pe1 running segment-routing# ipv6
pe1 running ipv6# locator srv6-locator1
pe1 running locator srv6-locator1# prefix 2001:db8:0:1::/64
pe1 running locator srv6-locator1#

To configure the End.DT4 operation on the pe2 device, use the following configuration:

pe2

pe2 running config# vrf main
pe2 running vrf main# l3vrf green
pe2 running l3vrf green# table-id 10
pe2 running l3vrf green# interface
pe2 running interface# physical eth1
pe2 running physical eth1#! ipv4
pe2 running ipv4#! address 192.168.11.2/24
pe2 running ipv4#! ..
pe2 running physical eth1#! port pci-b0s4
pe2 running physical eth1# ..
pe2 running interface# ..
pe2 running l3vrf green# routing
pe2 running routing# bgp
pe2 running bgp#! as 65500
pe2 running bgp#! router-id 192.0.2.2
pe2 running bgp#! address-family
pe2 running address-family#! ipv4-unicast
pe2 running ipv4-unicast#! network 192.168.11.2/24
pe2 running ipv4-unicast#! l3vpn
pe2 running l3vpn#! export
pe2 running export#! vpn true
pe2 running export#! route-target 2:55
pe2 running export#! route-distinguisher 65500:2
pe2 running export#! ipv6-sid auto
pe2 running export#! ..
pe2 running l3vpn#! import
pe2 running import#! vpn true
pe2 running import#! route-target 2:55
pe2 running import#! ..
pe2 running l3vpn#! ..
pe2 running ipv4-unicast#! ..
pe2 running address-family#! ..
pe2 running bgp#! ..
pe2 running routing#! ..
pe2 running l3vrf green#! ..
pe2 running vrf main#! interface
pe2 running interface#! physical eth0
pe2 running physical eth0#! port pci-b0s3
pe2 running physical eth0#! ipv6
pe2 running ipv6#! address 2001:db8:1:3::2/64
pe2 running ipv6#! ..
pe2 running physical eth0#! ..
pe2 running interface#! loopback loopback1
pe2 running loopback loopback1#! ipv6
pe2 running ipv6#! address 2001:db8:ffff::2/128
pe2 running ipv6#! ..
pe2 running loopback loopback1#! ..
pe2 running interface#! loopback loopback2
pe2 running loopback loopback2#! ipv6
pe2 running ipv6#! address 2001:db8:0:2::/64
pe2 running ipv6#! ..
pe2 running loopback loopback2#! ..
pe2 running interface#! ..
pe2 running vrf main#! routing
pe2 running routing#! interface eth0
pe2 running interface eth0#! isis
pe2 running isis#! area-tag coresrv6
pe2 running isis#! ipv6-routing true
pe2 running isis#! ..
pe2 running interface eth0#! ..
pe2 running routing#! interface loopback1
pe2 running interface loopback1#! isis
pe2 running isis#! area-tag coresrv6
pe2 running isis#! ipv6-routing true
pe2 running isis#! ..
pe2 running interface loopback1#! ..
pe2 running routing#! interface loopback2
pe2 running interface loopback2#! isis
pe2 running isis#! area-tag coresrv6
pe2 running isis#! ipv6-routing true
pe2 running isis#! ..
pe2 running interface loopback2#! ..
pe2 running routing#! bgp
pe2 running bgp#! as 65500
pe2 running bgp#! router-id 192.0.2.2
pe2 running bgp#! segment-routing
pe2 running segment-routing#! ipv6
pe2 running ipv6#! locator srv6-locator1
pe2 running ipv6#! ..
pe2 running segment-routing#! ..
pe2 running bgp#! neighbor 2001:db8:ffff::1
pe2 running neighbor 2001:db8:ffff::1#! remote-as 65500
pe2 running neighbor 2001:db8:ffff::1#! capabilities extended-nexthop True
pe2 running neighbor 2001:db8:ffff::1#! update-source loopback1
pe2 running neighbor 2001:db8:ffff::1#! address-family
pe2 running address-family#! ipv4-unicast
pe2 running ipv4-unicast#! enabled false
pe2 running ipv4-unicast#! ..
pe2 running address-family#! ipv4-vpn
pe2 running ipv4-vpn#! ..
pe2 running address-family#! ..
pe2 running neighbor 2001:db8:ffff::1#! ..
pe2 running bgp#! ..
pe2 running routing#! isis
pe2 running isis#! instance coresrv6
pe2 running instance coresrv6# is-type level-1
pe2 running instance coresrv6# area-address 49.001a.0000.0000.0002.00
pe2 running instance coresrv6# multi-topology
pe2 running multi-topology# ipv6-unicast
pe2 running ipv6-unicast# ..
pe2 running multi-topology# ..
pe2 running instance coresrv6# ..
pe2 running isis# ..
pe2 running routing# segment-routing
pe2 running segment-routing# ipv6
pe2 running ipv6# locator srv6-locator1
pe2 running locator srv6-locator1#! prefix 2001:db8:0:2::/64
pe2 running locator srv6-locator1#

The rt3 and the rt4 configuration is given below:

rt3

rt3 running config# vrf main
rt3 running vrf main# interface
rt3 running interface# physical eth0
rt3 running physical eth0#! port pci-b0s3
rt3 running physical eth0# ipv6
rt3 running ipv6# address 2001:db8:1:1::3/64
rt3 running ipv6# ..
rt3 running physical eth0# ..
rt3 running interface# physical eth1
rt3 running physical eth1#! port pci-b0s4
rt3 running physical eth1# ipv6
rt3 running ipv6# address 2001:db8:1:2::3/64
rt3 running ipv6# ..
rt3 running physical eth1# ..
rt3 running interface# loopback loopback1
rt3 running loopback loopback1# ipv6
rt3 running ipv6# address 2001:db8:ffff::3/128
rt3 running ipv6# ..
rt3 running loopback loopback1# ..
rt3 running interface# ..
rt3 running vrf main# routing
rt3 running routing# interface eth0
rt3 running interface eth0# isis
rt3 running isis#! area-tag coresrv6
rt3 running isis#! ipv6-routing true
rt3 running isis#! ..
rt3 running interface eth0#! ..
rt3 running routing#! interface eth1
rt3 running interface eth1#! isis
rt3 running isis#! area-tag coresrv6
rt3 running isis#! ipv6-routing true
rt3 running isis#! ..
rt3 running interface eth1#! ..
rt3 running routing#! interface loopback1
rt3 running interface loopback1#! isis
rt3 running isis#! area-tag coresrv6
rt3 running isis#! ipv6-routing true
rt3 running isis#! ..
rt3 running interface loopback1#! ..
rt3 running routing#! isis
rt3 running isis#! instance coresrv6
rt3 running instance coresrv6# is-type level-1
rt3 running instance coresrv6# area-address 49.001a.0000.0000.0003.00
rt3 running instance coresrv6# multi-topology
rt3 running multi-topology# ipv6-unicast

rt4

rt4 running config# vrf main
rt4 running vrf main# interface
rt4 running interface# physical eth0
rt4 running physical eth0#! port pci-b0s3
rt4 running physical eth0# ipv6
rt4 running ipv6# address 2001:db8:1:2::4/64
rt4 running ipv6# ..
rt4 running physical eth0# ..
rt4 running interface# physical eth1
rt4 running physical eth1#! port pci-b0s4
rt4 running physical eth1# ipv6
rt4 running ipv6# address 2001:db8:1:3::4/64
rt4 running ipv6# ..
rt4 running physical eth1# ..
rt4 running interface# loopback loopback1
rt4 running loopback loopback1# ipv6
rt4 running ipv6# address 2001:db8:ffff::4/128
rt4 running ipv6# ..
rt4 running loopback loopback1# ..
rt4 running interface# ..
rt4 running vrf main# routing
rt4 running routing# interface eth0
rt4 running interface eth0# isis
rt4 running isis#! area-tag coresrv6
rt4 running isis#! ipv6-routing true
rt4 running isis#! ..
rt4 running interface eth0#! ..
rt4 running routing#! interface eth1
rt4 running interface eth1#! isis
rt4 running isis#! area-tag coresrv6
rt4 running isis#! ipv6-routing true
rt4 running isis#! ..
rt4 running interface eth1#! ..
rt4 running routing#! interface loopback1
rt4 running interface loopback1#! isis
rt4 running isis#! area-tag coresrv6
rt4 running isis#! ipv6-routing true
rt4 running isis#! ..
rt4 running interface loopback1#! ..
rt4 running routing#! isis
rt4 running isis#! instance coresrv6
rt4 running instance coresrv6# is-type level-1
rt4 running instance coresrv6# area-address 49.001a.0000.0000.0004.00
rt4 running instance coresrv6# multi-topology
rt4 running multi-topology# ipv6-unicast

The seg6local route of pe1 can be seen below with the show ipv6-routes command.

pe1

pe1> show ipv6-routes
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

C>* 2001:db8:0:1::/64 is directly connected, loopback2, 17:50:39
B>* 2001:db8:0:1:1::/128 [20/0] is directly connected, green, seg6local End.DT4 table 10, weight 1, 18:43:17
I>* 2001:db8:0:2::/64 [115/40] via fe80::ed1:12ff:feab:0, eth0, weight 1, 17:27:59
C>* 2001:db8:1:1::/64 is directly connected, eth0, 18:10:05
I>* 2001:db8:1:2::/64 [115/30] via fe80::ed1:12ff:feab:0, eth0, weight 1, 17:31:16
I>* 2001:db8:1:3::/64 [115/40] via fe80::ed1:12ff:feab:0, eth0, weight 1, 17:27:59
C>* 2001:db8:ffff::1/128 is directly connected, loopback1, 18:43:18
I>* 2001:db8:ffff::2/128 [115/40] via fe80::ed1:12ff:feab:0, eth0, weight 1, 17:27:59
I>* 2001:db8:ffff::3/128 [115/20] via fe80::ed1:12ff:feab:0, eth0, weight 1, 17:31:18
I>* 2001:db8:ffff::4/128 [115/30] via fe80::ed1:12ff:feab:0, eth0, weight 1, 17:31:16
C>* fe80::/64 is directly connected, eth0, 18:10:05

The below command displays the remote SID attribute of the bgp 192.168.11.0/24 prefix in L3VRF green on the pe1 device:

pe1

pe1> show bgp l3vrf green ipv4 prefix 192.168.11.0/24
BGP routing table entry for 192.168.11.0/24, version 35
Paths: (1 available, best #1, vrf green)
  Not advertised to any peer
  Imported from 65500:2:192.168.11.0/24
  Local
    2001:db8:ffff::2 (metric 40) from :: (192.0.2.1) vrf default(0) announce-nh-self
      Origin incomplete, metric 0, localpref 100, valid, sourced, local, best (First path received)
      Extended Community: RT:2:55
      Remote label: 16
      Remote SID: 2001:db8:0:2::
      Last update: Thu Jun 22 15:38:22 2023

To show the routes in the L3VRF green on the pe1 device, use the following command:

pe1

pe1> show ipv4-routes l3vrf green
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF green:
[..]
B>  192.168.11.0/24 [200/0] via 2001:db8:ffff::2 (vrf default) (recursive), label 16, seg6 2001:db8:0:2:1::, weight 1, 20:05:10
  *                           via fe80::ed1:12ff:feab:0, eth0 (vrf default), label 16, seg6 2001:db8:0:2:1::, weight 1, 20:05:10

Note

To reach from a source IPv4 subnet 192.168.10.0/24 behind the pe1 the destination IPv4 subnet 192.168.11.0/24 behind the `pe2 the above BGP route is used. The nexthop of the BGP route is IPv6 address 2001:db8:ffff::2 that correponds to loopback1 of pe2. The IPv6 address 2001:db8:ffff::2 is not used as it is replaced by the SRv6 SID value.

From pe2 perspective, the incoming traffic is handled by the below highlighted seg6local route.

pe2

pe2> show ipv6-routes
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

[..]
B>* 2001:db8:0:2:1::/128 [20/0] is directly connected, green, seg6local End.DT4 table 10, weight 1, 17:56:54

The return traffic from pe2 to pe1 is handled by the below seg route:

pe2

pe2> show bgp l3vrf green ipv4 prefix 192.168.10.0/24
BGP routing table entry for 192.168.10.0/24, version 10
Paths: (1 available, best #1, vrf green)
  Not advertised to any peer
  Imported from 65500:1:192.168.10.0/24
  Local
    2001:db8:ffff::1 (metric 40) from :: (192.0.2.2) vrf default(0) announce-nh-self
      Origin IGP, metric 0, localpref 100, valid, sourced, local, best (First path received)
      Extended Community: RT:2:55
      Remote label: 16
      Remote SID: 2001:db8:0:1::
      Last update: Thu Jun 22 15:38:20 2023

To show the routes in L3VRF green on the pe2 device, use the following command:

pe2

pe2 running ipv6# show ipv4-routes l3vrf green
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF green:
[..]
B>  192.168.10.0/24 [200/0] via 2001:db8:ffff::1 (vrf default) (recursive), label 16, seg6 2001:db8:0:1:1::, weight 1, 16:12:06
  *                           via fe80::e85:b1ff:fe89:1, eth0 (vrf default), label 16, seg6 2001:db8:0:1:1::, weight 1, 16:12:06

L3VRF SRv6 End.DT6 configuration

Similar to SRv6 End.DT4 behavior, the End.DT6 behavior allows to instantiate IPv6 in IPv6 services, where the node from Network E sends the IPv6 packet to Network G. When the packet reaches pe1, it is encapsulated into an IPv6 packet that is transmitted to pe2. When encapsulated packet arrives at pe2, the outer IPv6 header is stripped and the IPv6 packet is directed to the L3VRF and finally to Network G.

To configure the End.DT6 operation on the pe1 device, use the following configuration:

../../../../../_images/srv6_bgp_dt6_2.svg

Example of SRv6 End.DT6 behavior.

pe1 running config# vrf main
pe1 running vrf main# l3vrf magenta
pe1 running l3vrf magenta#! table-id 20
pe1 running l3vrf magenta# interface
pe1 running interface# physical eth2
pe1 running physical eth1#! port pci-b0s5
pe1 running physical eth1# ipv6
pe1 running ipv6# address 2001:db8:aaaa:1::1/64
pe1 running ipv6# ..
pe1 running physical eth1# ..
pe1 running interface# ..
pe1 running l3vrf magenta# routing
pe1 running routing# bgp
pe1 running bgp#! as 65500
pe1 running bgp#! router-id 192.0.2.1
pe1 running bgp#! address-family
pe1 running address-family#! ipv6-unicast
pe1 running ipv6-unicast#! network 2001:db8:aaaa:1::1/64
pe1 running ipv6-unicast#! l3vpn
pe1 running l3vpn#! export
pe1 running export#! vpn true
pe1 running export#! route-target 6:55
pe1 running export#! route-distinguisher 65500:3
pe1 running export#! ipv6-sid auto
pe1 running export#! ..
pe1 running l3vpn#! import
pe1 running import#! vpn true
pe1 running import#! route-target 6:55
pe1 running import# / vrf main routing bgp
pe1 running bgp# neighbor 2001:db8:ffff::2
pe1 running neighbor 2001:db8:ffff::2#! remote-as 65500
pe1 running neighbor 2001:db8:ffff::2# capabilities extended-nexthop True
pe1 running neighbor 2001:db8:ffff::2# update-source loopback1
pe1 running neighbor 2001:db8:ffff::2# address-family
pe1 running address-family# ipv6-vpn
pe1 running ipv6-vpn#

To configure the End.DT6 operation on the pe2 device, use the following configuration:

pe2 running config# vrf main
pe2 running vrf main# l3vrf magenta
pe2 running l3vrf magenta#! table-id 20
pe2 running l3vrf magenta# interface
pe2 running interface# physical eth2
pe2 running physical eth1#! port pci-b0s5
pe2 running physical eth1# ipv6
pe2 running ipv6# address 2001:db8:aaaa:2::2/64
pe2 running ipv6# ..
pe2 running physical eth1# ..
pe2 running interface# ..
pe2 running l3vrf magenta# routing
pe2 running routing# bgp
pe2 running bgp#! as 65500
pe2 running bgp#! router-id 192.0.2.2
pe2 running bgp#! address-family
pe2 running address-family#! ipv6-unicast
pe1 running ipv6-unicast#! network 2001:db8:aaaa:2::2/64
pe2 running ipv6-unicast#! l3vpn
pe2 running l3vpn#! export
pe2 running export#! vpn true
pe2 running export#! route-target 6:55
pe2 running export#! route-distinguisher 65500:4
pe2 running export#! ipv6-sid auto
pe2 running export#! ..
pe2 running l3vpn#! import
pe2 running import#! vpn true
pe2 running import#! route-target 6:55
pe2 running import# / vrf main routing bgp
pe2 running bgp# neighbor 2001:db8:ffff::1
pe2 running neighbor 2001:db8:ffff::1#! remote-as 65500
pe2 running neighbor 2001:db8:ffff::1# capabilities extended-nexthop True
pe2 running neighbor 2001:db8:ffff::1# update-source loopback1
pe2 running neighbor 2001:db8:ffff::1# address-family
pe2 running address-family# ipv6-vpn
pe2 running ipv6-vpn#

The seg6local route of pe1 can be seen below with the show ipv6-routes command.

pe1> show ipv6-routes
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

[..]
B>* 2001:db8:0:1:2::/128 [20/0] is directly connected, magenta, seg6local End.DT6 table 20, weight 1, 00:16:58

The below command displays the remote SID attribute of the BGP 2001:db8:aaaa:2::/64 prefix in L3VRF magenta on the pe1 device. The 32 label value stands for the value encoded in the NLRI, and is part of the SID that has the second part encoded in the SID attribute.

pe1> show bgp l3vrf magenta ipv6 prefix 2001:db8:aaaa:2::/64
BGP routing table entry for 2001:db8:aaaa:2::/64, version 4
Paths: (1 available, best #1, vrf magenta)
  Not advertised to any peer
  Imported from 65500:4:2001:db8:aaaa:2::/64
  Local
    2001:db8:ffff::2 (metric 40) from :: (192.0.2.1) vrf default(0) announce-nh-self
      Origin incomplete, metric 0, localpref 100, valid, sourced, local, best (First path received)
      Extended Community: RT:6:55
      Remote label: 32
      Remote SID: 2001:db8:0:2::
      Last update: Fri Jun 23 15:47:13 2023

To show the routes in L3VRF magenta on the pe1 device, use the following command:

pe1> show ipv6-routes l3vrf magenta protocol bgp
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF magenta:
[..]
B>  2001:db8:aaaa:2::/64 [200/0] via 2001:db8:ffff::2 (vrf default) (recursive), label 32, seg6 2001:db8:0:2:2::, weight 1, 00:15:26
  *                                via fe80::e29:e0ff:feff:0, eth0 (vrf default), label 32, seg6 2001:db8:0:2:2::, weight 1, 00:15:26

The seg6local route of pe2 can be seen below with the show ipv6-routes command.

pe2> show ipv6-routes
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

[..]
B>* 2001:db8:0:2:2::/128 [20/0] is directly connected, magenta, seg6local End.DT6 table 20, weight 1, 00:16:51

The below command displays the remote SID attribute of the bgp 2001:db8:aaaa:1::/64 prefix in L3VRF magenta on the pe2 device:

pe2> show bgp l3vrf magenta ipv6 prefix 2001:db8:aaaa:1::/64
BGP routing table entry for 2001:db8:aaaa:1::/64, version 4
Paths: (1 available, best #1, vrf magenta)
  Not advertised to any peer
  Imported from 65500:3:2001:db8:aaaa:1::/64
  Local
    2001:db8:ffff::1 (metric 40) from :: (192.0.2.2) vrf default(0) announce-nh-self
      Origin incomplete, metric 0, localpref 100, valid, sourced, local, best (First path received)
      Extended Community: RT:6:55
      Remote label: 32
      Remote SID: 2001:db8:0:1::
      Last update: Fri Jun 23 15:47:13 2023

To show the routes in the L3VRF magenta on the pe2 device, use the following command:

pe2> show ipv6-routes l3vrf magenta protocol bgp
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       A - Babel, D - SHARP, F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

VRF magenta:
B>  2001:db8:aaaa:1::/64 [200/0] via 2001:db8:ffff::1 (vrf default) (recursive), label 32, seg6 2001:db8:0:1:2::, weight 1, 00:17:45
  *                                via fe80::ea9:fbff:fe58:1, eth0 (vrf default), label 32, seg6 2001:db8:0:1:2::, weight 1, 00:17:45