SRv6 Encapsulation in the Base Routing Instance

This chapter provides information about SRv6 encapsulation in the base routing instance.

Topics in this chapter include:

Applicability

The information and configuration in this chapter are based on SR OS Release 22.2.R1. Segment Routing over IPv6 (SRv6) is supported on FP4-based equipment in SR OS Release 21.5.R2 and later.

Overview

SRv6 encapsulation in the base routing instance allows the transport of native IPv4 and IPv6 data across an SRv6-enabled network. To this end, native IPv4 and IPv6 data is sent to an ingress SRv6 router, where it is encapsulated and forwarded via an SRv6 tunnel. The SRv6 tunnel transports the encapsulated data across the SRv6-enabled network to an egress SRv6 router, where it is decapsulated and forwarded further as native IPv4 and IPv6 data. SRv6-tunneled data is encapsulated using an IPv6 header, where the destination address is a unique SRv6 segment identifier (SID), and is processed and forwarded in the IPv6 data plane.

An SRv6 SID is a preconfigured 128-bit routable IPv6 prefix address that is encoded in three parts: a locator, a function, and an argument. The locator is a summary IPv6 prefix for a set of SRv6 SIDs instantiated on an SRv6-capable router. It is used to route the data within the IPv6 transport network. Each participating SRv6-capable router needs its unique locator, based on a common block that all participating SRv6-capable routers share in the IPv6 address space. The function is an opaque identifier that indicates the local behavior at the endpoint of an SRv6 segment. The focus in this topic is on the SRv6 End.DT4 and the SRv6 End.DT6 functions, performing a prefix lookup in the global IPv4 route table (End.DT4) or in the global IPv6 route table (End.DT6). The argument is not used in SR OS 22.2.R1 and is set to all zeros.

The local router installs its locator prefix in its IPv6 route table and Forwarding Information Base (FIB), and advertises its locator prefix in IS-IS with the SRv6 locator sub-TLV. Each remote router populates its route table and FIB with the received locator prefixes, including the tunneled next hop to the originating router.

SRv6 data transport requires additional processing at both the ingress and egress data planes. This processing relies on Forwarding Path Extension (FPE), as described in the Segment Routing over IPv6 chapter.

Configuration

Example topology shows the example topology with five routers. Two routers (CE-1 and CE-2) simulate an IPv6-enabled network. They are connected to an SRv6-enabled network, comprising of PE-1 and PE-2, and a route reflector (RR) RR-3 in the control plane. The SRv6-enabled network has only IPv6 addresses and interfaces.

Figure 1. Example topology
Example topology with five routers

For the transport of native IPv4 and IPv6 data from CE-1 to CE-2, PE-1 acts as the SRv6 ingress PE node, while PE-2 acts as the SRv6 egress PE node. For the transport of native IPv4 and IPv6 data from CE-2 to CE-1, PE-2 acts as the SRv6 ingress PE node, while PE-1 acts as the SRv6 egress PE node. To describe the SRv6 encapsulation concept, the topology does not need an SRv6 transit router because SRv6 transit routers simply forward SRv6-encapsulated packets via IPv6 route table lookup without any other processing.

SRv6 and FPE are configured only on PE-1 and on PE-2. RR-3 acts as the BGP RR in the control plane and does not participate in the SRv6 data transport that only exists between PE-1 and PE-2.

The ping and traceroute commands between IPv4 and IPv6 system addresses of CE-1 and CE-2 simulate data transport.

The configuration for this example topology is completely symmetrical. All configure and show command outputs for PE-1 also apply for PE-2, and similar for CE-1 and CE-2.

The following sections describe the configuration steps needed to establish SRv6 Encapsulation in the base routing instance.

Configure the transport network:

This configuration includes:

  • ports and IPv6-only interfaces on PE-1, PE-2, and RR-3
  • port cross connect (PXC) and FPE on PE-1 and PE-2 (using internal loopbacks on an FP4 MAC chip), as described in the Segment Routing over IPv6 chapter.
  • IS-IS on PE-1, PE-2, and RR-3 including:
    • level 2 capability with wide metrics (for the 128-bit identifiers)
    • native IPv6 routing
    • as best practice, include also: traffic-engineering and traffic-engineering-options on PE-1 and PE-2
    • advertise the router capability within the autonomous system (AS) (not for RR-3)
  • BGP on PE-1, PE-2, and RR-3, with internal group “gr_v6_internal” that includes:
    • IPv4 and IPv6 address families
    • extended-nh-encoding for IPv4
    • advertise-ipv6-next-hops for IPv4
    • next-hop-self (not for RR-3)
    • BGP neighbor system IPv6 addresses

The core network topology uses IPv6 for BGP peering (with 16-byte next hop addresses), so to advertise and receive IPv4 routes (which have 4-byte next hop addresses) with IPv6 next hop addresses the commands advertise-ipv6-next-hops and extended-nh-encoding need to be configured at the BGP, group, or neighbor level. The advertise-ipv6-next-hops command instructs the system to advertise IPv4 routes with an IPv6 next hop address. The extended-nh-encoding command configures BGP to advertise the capability to receive IPv4 routes with an IPv6 next hop address.

The following example configuration applies for PE-1 and is similar for PE-2.

*A:PE-1# configure
    router Base
        interface "int-PE-1-PE-2"
            description "interface between PE-1 and PE-2"
            port 1/1/c1/1:1000
            ipv6
                address 2001:db8::168:12:1/126
            exit
            no shutdown
        exit
        interface "int-PE-1-RR-3"
            description "interface between PE-1 and RR-3"
            port 1/1/c2/1:1000
            ipv6
                address 2001:db8::168:13:1/126
            exit
            no shutdown
        exit
        interface "system"
            description "system interface of PE-1"
            ipv6
                address 2001:db8::2:1/128
            exit
            no shutdown
        exit
        autonomous-system 64500
        isis 0
            router-id 1.1.1.1
            level-capability level-2    # required for SRv6
            area-id 49.0001
            traffic-engineering
            traffic-engineering-options
                ipv6
                application-link-attributes
                exit
            exit
            advertise-router-capability as
            ipv6-routing native
            level 2
                wide-metrics-only    # required for SRv6
            exit
            interface "system"
                passive
                no shutdown
            exit
            interface "int-PE-1-PE-2"
                interface-type point-to-point
                no shutdown
            exit
            interface "int-PE-1-RR-3"
                interface-type point-to-point
                no shutdown
            exit
            no shutdown
        exit
        bgp
            min-route-advertisement 1
            router-id 2.2.2.1
            rapid-withdrawal
            split-horizon
            group "gr_v6_internal"
                description "internal bgp group on PE-1"
                family ipv4 ipv6
                next-hop-self
                type internal
                extended-nh-encoding ipv4
                advertise-ipv6-next-hops ipv4
                neighbor 2001:db8::2:3    # RR-3 system address
                exit
            exit
            no shutdown
        exit
    exit all

The following example configuration applies for RR-3:

*A:RR-3# configure
    router Base
        interface "int-RR-3-PE-1"
            description "interface between RR-3 and PE-1"
            ipv6
                address 2001:db8::168:13:2/126
            exit
            port 1/1/c1/1:1000
        exit
        interface "int-RR-3-PE-2"
            description "interface between RR-3 and PE-2"
            ipv6
                address 2001:db8::168:23:2/126
            exit
            port 1/1/c2/1:1000
        exit
        interface "system"
            description "system interface of RR-3"
            ipv6
                address 2001:db8::2:3/128
            exit
        exit
        autonomous-system 64500
        isis 0
            router-id 1.1.1.3
            level-capability level-2    # required for SRv6
            area-id 49.0001
            ipv6-routing native
            level 2
                wide-metrics-only    # required for SRv6
            exit
            interface "system"
                passive
                no shutdown
            exit
            interface "int-RR-3-PE-1"
                interface-type point-to-point
                no shutdown
            exit
            interface "int-RR-3-PE-2"
                interface-type point-to-point
                no shutdown
            exit
            no shutdown
        exit
        bgp
            min-route-advertisement 1
            router-id 2.2.2.3
            rapid-withdrawal
            split-horizon
            group "gr_v6_internal"
                description "internal bgp group on RR-3"
                family ipv4 ipv6
                type internal
                cluster 3.3.3.3
                extended-nh-encoding ipv4
                advertise-ipv6-next-hops ipv4
                neighbor 2001:db8::2:1    # PE-1 system address
                exit
                neighbor 2001:db8::2:2    # PE-2 system address
                exit
            exit
            no shutdown
        exit
    exit all

Configure CE-1 and CE-2 for native IPv4 and IPv6 data

This configuration includes:

  • ports and IPv4 and IPv6 interfaces between CE-1 and PE-1 and between CE-2 and PE-2
  • an IPv4 system address and an IPv6 system address for CE-1 and for CE-2
  • BGP, with external group “gr_v6_external” that includes the following capabilities:
    • IPv4 and IPv6 address families
    • extended-nh-encoding for IPv4
    • advertise-ipv6-next-hops for IPv4
    • BGP neighbor interface IPv6 addresses, with BGP neighbors in a different external autonomous system

The following example configuration applies for PE-1 and is similar for PE-2. The strip-srv6-tlvs command (per address family) prevents PE-1 from advertising SRv6 TLVs to the BGP neighbor.

*A:PE-1# configure
    router Base
        interface "int-PE-1-CE-1"
            address 172.16.14.1/30
            description "interface between PE-1 and CE-1"
            port 1/1/c6/1:1000
            ipv6
                address 2001:db8::168:14:1/126
            exit
            no shutdown
        exit
        bgp
            group "gr_v6_external"
                description "external bgp group on PE-1"
                family ipv4 ipv6
                extended-nh-encoding ipv4
                advertise-ipv6-next-hops ipv4
                neighbor 2001:db8::168:14:2
                    type external
                    peer-as 64504
                    segment-routing-v6
                        route-advertisement
                            family ipv4
                                strip-srv6-tlvs
                            exit
                            family ipv6
                                strip-srv6-tlvs
                            exit
                        exit
                    exit
                exit
            exit
            no shutdown
        exit
    exit all

The following example configuration applies for CE-2 and is similar for CE-1.

*A:CE-2# configure
    router Base
        interface "int-CE-2-PE-2"
            description "interface between CE-2 and PE-2"
            address 172.16.25.2/30
            ipv6
                address 2001:db8::168:25:2/126
            exit
            port 1/1/c1/1:1000
        exit
        interface "system"
            address 192.0.2.5/32    # used for IPv4 ping
            description "system interface of CE-2"
            ipv6
                address 2001:db8::2:5/128    # used for IPv6 ping
            exit
        exit
        autonomous-system 64505
        bgp
            min-route-advertisement 1
            router-id 2.2.2.5
            rapid-withdrawal
            split-horizon
            group "gr_v6_external"
                description "external bgp group on CE-2"
                family ipv4 ipv6
                extended-nh-encoding ipv4
                advertise-ipv6-next-hops ipv4
                neighbor 2001:db8::168:25:1
                    type external
                    peer-as 64500
                exit
            exit
            no shutdown
        exit
    exit all

Ensure the export of the system addresses of CE-1 and CE-2

Configure a policy on CE-2 that imports the IPv4 and IPv6 prefixes into BGP. Configure a similar policy on CE-1.

*A:CE-2# configure router Base
        policy-options
            begin
            prefix-list "CE-2_prefixes"
                prefix 192.0.2.5/32 exact
                prefix 2001:db8::2:5/128 exact
            exit
            policy-statement "policy-export-bgp"
                entry 10
                    from
                        prefix-list "CE-2_prefixes"
                    exit
                    action accept
                    exit
                exit
            exit
            commit
        exit all

Apply this policy on CE-2 to the BGP neighbor PE-2. Perform a similar configuration on CE-1 to the BGP neighbor PE-1.

*A:CE-2# configure router Base
        bgp
            group "gr_v6_external"
                neighbor 2001:db8::168:25:1
                    export "policy-export-bgp"
                exit
            exit
        exit all

Verify the IPv4 and IPv6 route tables. The corresponding FIBs can be verified with the show router fib 1 ipv4 and show router fib 1 ipv6 commands.

On CE-1:

192.0.2.4/32 is the IPv4 system address of CE-1. 192.0.2.5/32 is the IPv4 system address of CE-2, which is reached via PE-1.

*A:CE-1# show router route-table ipv4

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
172.16.14.0/30                                Local   Local     00h04m04s  0
       int-CE-1-PE-1                                                0
192.0.2.4/32                                  Local   Local     00h04m04s  0
       system                                                       0
192.0.2.5/32                                  Remote  BGP       00h00m20s  170
       2001:db8::168:14:1                                           0
-------------------------------------------------------------------------------
No. of Routes: 3
---snip---
===============================================================================

2001:db8::2:4/128 is the IPv6 system address of CE-1. 2001:db8::2:5/128 is the IPv6 system address of CE-2, which is reached via PE-1.

*A:CE-1# show router route-table ipv6

===============================================================================
IPv6 Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
2001:db8::2:4/128                             Local   Local     00h04m04s  0
       system                                                       0
2001:db8::2:5/128                             Remote  BGP       00h00m20s  170
       2001:db8::168:14:1                                           0
2001:db8::168:14:0/126                        Local   Local     00h04m03s  0
       int-CE-1-PE-1                                                0
-------------------------------------------------------------------------------
No. of Routes: 3
---snip---
===============================================================================

On PE-1:

*A:PE-1# show router route-table ipv4

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
172.16.14.0/30                                Local   Local     00h04m32s  0
       int-PE-1-CE-1                                                0
192.0.2.4/32                                  Remote  BGP       00h00m31s  170
       2001:db8::168:14:2                                           0
192.0.2.5/32                                  Remote  BGP       00h00m15s  170
       fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                         10
-------------------------------------------------------------------------------
No. of Routes: 3
---snip---
===============================================================================
*A:PE-1# show router route-table ipv6

===============================================================================
IPv6 Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
2001:db8::2:1/128                             Local   Local     00h09m39s  0
       system                                                       0
2001:db8::2:2/128                             Remote  ISIS      00h07m25s  18
       fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                         10
2001:db8::2:3/128                             Remote  ISIS      00h07m13s  18
       fe80::611:ffff:fe00:0-"int-PE-1-RR-3"                        10
2001:db8::2:4/128                             Remote  BGP       00h00m31s  170
       2001:db8::168:14:2                                           0
2001:db8::2:5/128                             Remote  BGP       00h00m15s  170
       fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                         10
2001:db8::168:12:0/126                        Local   Local     00h09m37s  0
       int-PE-1-PE-2                                                0
2001:db8::168:13:0/126                        Local   Local     00h09m37s  0
       int-PE-1-RR-3                                                0
2001:db8::168:14:0/126                        Local   Local     00h04m31s  0
       int-PE-1-CE-1                                                0
2001:db8::168:23:0/126                        Remote  ISIS      00h07m25s  18
       fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                         20
-------------------------------------------------------------------------------
No. of Routes: 9
---snip---
===============================================================================

On PE-2:

*A:PE-2# show router route-table ipv4

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
172.16.25.0/30                                Local   Local     00h04m23s  0
       int-PE-2-CE-2                                                0
192.0.2.4/32                                  Remote  BGP       00h00m31s  170
       fe80::60a:1ff:fe01:1-"int-PE-2-PE-1"                         10
192.0.2.5/32                                  Remote  BGP       00h00m18s  170
       2001:db8::168:25:2                                           0
-------------------------------------------------------------------------------
No. of Routes: 3
---snip---
===============================================================================
*A:PE-2# show router route-table ipv6

===============================================================================
IPv6 Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
2001:db8::2:1/128                             Remote  ISIS      00h07m22s  18
       fe80::60a:1ff:fe01:1-"int-PE-2-PE-1"                         10
2001:db8::2:2/128                             Local   Local     00h09m21s  0
       system                                                       0
2001:db8::2:3/128                             Remote  ISIS      00h07m15s  18
       fe80::611:ffff:fe00:0-"int-PE-2-RR-3"                        10
2001:db8::2:4/128                             Remote  BGP       00h00m31s  170
       fe80::60a:1ff:fe01:1-"int-PE-2-PE-1"                         10
2001:db8::2:5/128                             Remote  BGP       00h00m18s  170
       2001:db8::168:25:2                                           0
2001:db8::168:12:0/126                        Local   Local     00h09m21s  0
       int-PE-2-PE-1                                                0
2001:db8::168:13:0/126                        Remote  ISIS      00h07m22s  18
       fe80::60a:1ff:fe01:1-"int-PE-2-PE-1"                         20
2001:db8::168:23:0/126                        Local   Local     00h09m20s  0
       int-PE-2-RR-3                                                0
2001:db8::168:25:0/126                        Local   Local     00h04m21s  0
       int-PE-2-CE-2                                                0
-------------------------------------------------------------------------------
No. of Routes: 9
---snip---
===============================================================================

IPv4 data transport is not possible between CE-1 and CE-2. Verify this with a ping from CE-1 to the IPv4 system address that CE-2 advertises.

*A:CE-1# ping 192.0.2.5 
PING 192.0.2.5 56 data bytes
Request timed out. icmp_seq=1.
---snip---
---- 192.0.2.5 PING Statistics ----
5 packets transmitted, 0 packets received, 100% packet loss

IPv6 data transport is possible between CE-1 and CE-2, although not by using SRv6 between PE-1 and PE-2 but by using native IPv6. Verify this with a ping and a traceroute from CE-1 to the IPv6 system address that CE-2 advertises.

*A:CE-1# ping 2001:db8::2:5 
PING 2001:db8::2:5 56 data bytes
64 bytes from 2001:db8::2:5 icmp_seq=1 hlim=62 time=1.99ms.
---snip---
---- 2001:db8::2:5 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min = 1.72ms, avg = 1.93ms, max = 2.10ms, stddev = 0.133ms

Native IPv6 data flows over an IPv6 interface from CE-1 to PE-1, from there over an IPv6 interface to PE-2, and from there over an IPv6 interface to CE-2. The same is true for data transport between CE-2 and CE-1.

*A:CE-1# # traceroute 192.0.2.5
*A:CE-1# traceroute 2001:db8::2:5 
traceroute to 2001:db8::2:5, 30 hops max, 60 byte packets
  1  2001:db8::168:14:1 (2001:db8::168:14:1)    1.21 ms  1.08 ms  0.918 ms
  2  2001:db8::168:12:2 (2001:db8::168:12:2)    1.52 ms  1.51 ms  1.54 ms
  3  2001:db8::2:5 (2001:db8::2:5)    1.94 ms  1.92 ms  2.03 ms

Configure SRv6 in the router base context on PE-1 and PE-2

Configure the locator in the router Base segment-routing segment-routing-v6 context on PE-2. Perform a similar configuration on PE-1, with ip-prefix 2001:db8:aaaa:101::/64 for locator “PE-1_loc”.

*A:PE-2# configure router Base segment-routing
            segment-routing-v6
                locator "PE-2_loc"
                    block-length 48
                    prefix
                        ip-prefix 2001:db8:aaaa:102::/64
                    exit
                    no shutdown
                exit
            exit all

Configure the FPEs on PE-1 and PE-2.

*A:PE-2# configure
    fwd-path-ext
        fpe 1 create
            path pxc 1
            srv6 origination
                interface-a
                exit
                interface-b
                exit
            exit
        exit
        fpe 2 create
            path pxc 2
            srv6 termination
                interface-a
                exit
                interface-b
                exit
            exit
        exit
    exit all

Use FPE 1 as the SRv6 origination FPE in the router Base segment-routing segment-routing-v6 context and FPE 2 as the SRv6 termination FPE in the router Base segment-routing segment-routing-v6 locator context on PE-2. Perform a similar configuration on PE-1 for locator “PE-1_loc”.

*A:PE-2# configure router Base segment-routing
            segment-routing-v6
                origination-fpe 1
                locator "PE-2_loc"
                    termination-fpe 2
                    no shutdown
                exit
            exit all

Configure the SRv6 End function (equivalent to an IPv4 node SID) and SRv6 End.X functions (equivalent to IPv4 Adjacency SIDs) in the router Base segment-routing segment-routing-v6 base-routing-instance locator context on PE-2. Perform a similar configuration on PE-1 for locator “PE-1_loc”.

*A:PE-2# configure router Base segment-routing
            segment-routing-v6
                locator "PE-2_loc"
                    static-function
                        max-entries 1
                    exit
                    no shutdown
                exit
                base-routing-instance
                    locator "PE-2_loc"
                        function
                            end-x-auto-allocate srh-mode psp protection unprotected
                            end 1
                                srh-mode usp
                            exit
                        exit
                    exit
                exit
            exit all

Advertise the locator in IS-IS while ensuring level 2 capability on PE-2. Perform a similar configuration on PE-1 for locator “PE-1_loc”.

*A:PE-2# configure router Base isis 0
            segment-routing-v6
                locator "PE-2_loc"
                    level-capability level-2
                    level 1
                    exit
                    level 2
                    exit
                exit
                no shutdown
            exit all

A summary on locator and origination FPE configuration can be verified with the show router segment-routing-v6 summary command.

Verify the SRv6 local SIDs on PE-2 and similar on PE-1. Three SRv6 local SIDs are created: one for the statically configured SRv6 End function (configured in the base context) and two for the auto-allocated SRv6 End.X functions (one facing PE-1 and one facing RR-3). All three SRv6 local SIDs are concatenated with the locator. The statically configured SRv6 End function appears first with function number 1. The auto-allocated SRv6 End.X functions get subsequent function numbers, 2 and 3 respectively. RR-3 has no SRv6 configuration and does not have these SRv6 local SIDs and SRv6 functions.

*A:PE-2# show router segment-routing-v6 local-sid

===============================================================================
Segment Routing v6 Local SIDs
===============================================================================
SID                                               Type           Function
  Locator                                                        
  Context                                                        
-------------------------------------------------------------------------------
2001:db8:aaaa:102:0:1000::                        End            1
  PE-2_loc
  Base
2001:db8:aaaa:102:0:2000::                        End.X          2
  PE-2_loc
    None
2001:db8:aaaa:102:0:3000::                        End.X          3
  PE-2_loc
    None
-------------------------------------------------------------------------------
SIDs : 3
-------------------------------------------------------------------------------
===============================================================================

Verify the SRv6 base routing instance details on PE-2 and similar on PE-1. The SRv6 End function is statically configured. There is an auto-allocated SRv6 End.X function for each IS-IS neighbor.

*A:PE-2# show router segment-routing-v6 base-routing-instance

===============================================================================
Segment Routing v6 Base Routing Instance
===============================================================================
Locator                                                           
  Type       Function    SID                                     Status/InstId
    SRH-mode Protection  Interface                               
-------------------------------------------------------------------------------
PE-2_loc
  End                  1 2001:db8:aaaa:102:0:1000::              ok
    USP      
-------------------------------------------------------------------------------
  Auto-allocated End.X: PSP Unprotected,
-------------------------------------------------------------------------------
  End.X               *2 2001:db8:aaaa:102:0:2000::              0
    PSP      Unprotected int-PE-2-PE-1                           
    ISIS Level: L2 Mac Address: 04:0a:01:01:00:01 Nbr Sys Id: 0010.0100.1001
  End.X               *3 2001:db8:aaaa:102:0:3000::              0
    PSP      Unprotected int-PE-2-RR-3                           
    ISIS Level: L2 Mac Address: 04:12:01:01:00:0b Nbr Sys Id: 0010.0100.1003
-------------------------------------------------------------------------------
===============================================================================
Legend: * - System allocated

Verify the IPv6 route table on PE-1. The IPv6 route table has also routes to the local and the learned remote locators and to the local SRv6 function SIDs. The remotely configured locator prefix of PE-2 is reached via an SRv6 tunnel. The routes with protocol “SRv6” correspond with the locally configured locator prefix of PE-1, or the locally configured SRv6 End function.

*A:PE-1# show router route-table ipv6

===============================================================================
IPv6 Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
---snip---
2001:db8:aaaa:101::/64                        Local   SRV6      00h02m05s  3
       fe80::201-"_tmnx_fpe_2.a"                                    0
2001:db8:aaaa:101:0:1000::/128                Local   SRV6      00h01m17s  3
       Black Hole                                                   0
2001:db8:aaaa:101:0:2000::/128                Local   ISIS      00h00m38s  18
       fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                         10
2001:db8:aaaa:101:0:3000::/128                Local   ISIS      00h00m38s  18
       fe80::611:ffff:fe00:0-"int-PE-1-RR-3"                        10
2001:db8:aaaa:102::/64                        Remote  ISIS      00h00m26s  18
       2001:db8:aaaa:102::/64 (tunneled:SRV6-ISIS)                  10
-------------------------------------------------------------------------------
No. of Routes: 14
---snip---
===============================================================================

Verify the IS-IS routes on PE-1 and similar on PE-2. This corresponds with the information in the route table (and FIB). IS-IS is not configured on CE-1 and CE-2, so CE-1 and CE-2 have no IS-IS routes.

*A:PE-1# show router isis routes

===============================================================================
Rtr Base ISIS Instance 0 Route Table 
===============================================================================
Prefix[Flags]                     Metric     Lvl/Typ     Ver.  SysID/Hostname
  NextHop                                                MT     AdminTag/SID[F]
-------------------------------------------------------------------------------
2001:db8::2:1/128                 0          2/Int.      2     PE-1
   ::                                                      0       0
2001:db8::2:2/128                 10         2/Int.      10    PE-2
   fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                    0       0
2001:db8::2:3/128                 10         2/Int.      10    RR-3
   fe80::611:ffff:fe00:0-"int-PE-1-RR-3"                   0       0
2001:db8::168:12:0/126            10         2/Int.      4     PE-1
   ::                                                      0       0
2001:db8::168:13:0/126            10         2/Int.      4     PE-1
   ::                                                      0       0
2001:db8::168:23:0/126            20         2/Int.      10    PE-2
   fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                    0       0
2001:db8:aaaa:101::/64            0          2/Int.      11    PE-1
   ::                                                      0       0
2001:db8:aaaa:102::/64            10         2/Int.      11    PE-2
   fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                    0       0
-------------------------------------------------------------------------------
No. of Routes: 8 (8 paths)
---snip---
===============================================================================

The locator prefixes and who advertises them can be verified with the show router isis segment-routing-v6 locator command. The SRv6 End SIDs and who advertises them can be verified with the show router isis segment-routing-v6 end-sid command.

The IS-IS data base can be verified with the show router isis database detail command.

The output of this command provides information about each IS-IS-enabled router. Per uniquely identified IS-IS-enabled router, the SRv6 information indicates:

  • the IS-IS-advertised router capabilities
  • the advertised SRv6 locator TLV
  • the advertised configured SRv6 End SID and auto-allocated SRv6 End.X SIDs

The BGP groups can be verified with the show router bgp group command. PE-1 and PE-2 know the iBGP and eBGP peers. RR-3 only knows the iBGP peers. CE-1 and CE-2 only know the eBGP peers.

The BGP next hops can be verified with the show router bgp next-hop ipv4 and show router bgp next-hop ipv6 commands.

Configure SRv6 End.DT4 and SRv6 End.DT6 functions on PE-1 and PE-2

Configure SRv6 End.DT4 and SRv6 End.DT6 functions in the router Base segment-routing segment-routing-v6 base-routing-instance locator function context on PE-1. They can have statically or automatically allocated values. For statically allocated values, an SRv6 reserved label block must be configured. Perform an identical configuration on PE-2.

*A:PE-1# configure router Base
        mpls-labels
            sr-labels start 20000 end 20999
            reserved-label-block "SRv6"
                start-label 30100 end-label 30199
            exit
        exit all

This SRv6 reserved label block must be referenced in the router Base segment-routing segment-routing-v6 locator static-function context on PE-2, where also the total number of static functions, including the already existing SRv6 End function (with value 1), must be set. Perform a similar configuration on PE-1 for locator “PE-1_loc”. This requires a shutdown of the locator.

*A:PE-2# configure router Base segment-routing
            segment-routing-v6
                source-address 2001:db8::2:2
                locator "PE-2_loc"
                    shutdown
                    static-function
                        label-block "SRv6"
                        max-entries 3
                    exit
                    no shutdown
                exit
                base-routing-instance
                    locator "PE-2_loc"
                        function
                            end-dt4 2
                            end-dt6 3
                        exit
                    exit
                exit
            exit all

The SRv6 End.DT4 and SRv6 End.DT6 functions are allocated the unique static values of 2 and 3 respectively. The values allocated must not exceed the max-entries value.

Each PE must resolve the BGP next hop to an SRv6 End.DT4 or End.DT6 Segment ID. Therefore, each PE must advertise route prefixes within a BGP update message that includes an SRv6 Services TLV. This is achieved by configuring the add-srv6-tlvs command along with the locator value for each address family, IPv4 and IPv6.

When a PE receives a BGP update that includes the SRv6 Services TLV, the default behavior is to ignore this TLV, and resolve the next hop to the tunnel type configured in an auto-bind-tunnel statement. To override this behavior, no ignore-received-srv6-tlvs must be set for IPv4 and IPv6 address families on PE-1. Perform a similar configuration on PE-2 for locator “PE-2_loc”.

*A:PE-1# configure router Base bgp
            segment-routing-v6
                family ipv4
                    add-srv6-tlvs locator "PE-1_loc"
                    exit
                    no ignore-received-srv6-tlvs
                exit
                family ipv6
                    add-srv6-tlvs locator "PE-1_loc"
                    exit
                    no ignore-received-srv6-tlvs
                exit
            exit all

CE-2 sends BGP updates to PE-2 for the IPv4 and the IPv6 address families respectively. Each BGP update advertises the IPv4 or IPv6 address family, the reachable network prefixes, and the autonomous system to which they belong. PE-2 adds an SRv6 Services TLV, indicating that resolution to an SRv6 SID is available, making use of the endpoint behavior that is configured for the IPv4 or IPv6 address family on the locator. PE-2 advertises the BGP updates to PE-1 via the RR. PE-1 programs the route prefixes in its route table and FIB with an SRv6 tunnel next hop, and forwards the BGP updates to CE-1. CE-1 programs the learned route prefixes in its route table and FIB.

Similar BGP updates flow from CE-1 to CE-2, via PE-1, RR-3, and PE-2. PE-1 and PE-2 advertise only the SRv6 SIDs for the SRv6 End.DT4 and SRv6 End.DT6 functions.

After the BGP updates, the IS-IS data base remains the same, except for the renumbering of the SRv6 End.X functions. This can be verified with the show router isis database detail command.

The BGP next hops remain the same, except for the next hops to the system addresses of PE-1 and PE-2 that switch owner from “ISIS” to “N/A”. This can be verified with the show router bgp next-hop ipv4 and show router bgp next-hop ipv6 commands.

When debug logging for BGP updates is configured, the configuration results in the following BGP update logs for the IPv4 address family.

Focus as an example on prefix 192.0.2.5/32 and on prefix 192.0.2.4/32, but in the other direction.

Verify the IPv4 BGP routes.

CE-2 advertises route prefix 192.0.2.5/32 to PE-2 (in RIB Out Entries).

*A:CE-2# show router bgp routes 192.0.2.5 hunt
===============================================================================
 BGP Router ID:2.2.2.5          AS:64505       Local AS:64505      
===============================================================================
---snip---
===============================================================================
BGP IPv4 Routes
===============================================================================
-------------------------------------------------------------------------------
RIB In Entries
-------------------------------------------------------------------------------
 
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Network        : 192.0.2.5/32
Nexthop        : 2001:db8::168:25:2
Path Id        : None                   
To             : 2001:db8::168:25:1
Res. Protocol  : INVALID                Res. Metric    : 0
Res. Nexthop   : n/a
Local Pref.    : n/a                    Interface Name : NotAvailable
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : n/a
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.2
Origin         : IGP                    
AS-Path        : 64505 
Route Tag      : 0                      
Neighbor-AS    : 64505
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
 
-------------------------------------------------------------------------------
Routes : 1
===============================================================================

PE-2 receives the BGP update which CE-2 sends for the IPv4 address family:

*A:PE-2# show log log-id 2

---snip---
5 2022/07/18 15:30:35.785 UTC MINOR: DEBUG #2001 Base Peer 1: 2001:db8::168:25:2
"Peer 1: 2001:db8::168:25:2: UPDATE
Peer 1: 2001:db8::168:25:2 - Received BGP UPDATE:
    Withdrawn Length = 0
    Total Path Attr Length = 43
    Flag: 0x90 Type: 14 Len: 26 Multiprotocol Reachable NLRI:
        Address Family IPV4
        NextHop len 16 Global NextHop 2001:db8::168:25:2
        192.0.2.5/32
    Flag: 0x40 Type: 1 Len: 1 Origin: 0
    Flag: 0x40 Type: 2 Len: 6 AS Path:
        Type: 2 Len: 1 < 64505 >
"
---snip---

Upon receipt of the BGP update from CE-2, PE-2 programs route prefix 192.0.2.5/32 in its route table and FIB, with the interface toward CE-2 as next hop.

Verify the resulting IPv4 route table on PE-2:

*A:PE-2# show router route-table ipv4

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
172.16.25.0/30                                Local   Local     00h11m30s  0
       int-PE-2-CE-2                                                0
192.0.2.4/32                                  Remote  BGP       00h00m30s  170
       2001:db8:aaaa:101:0:2000:: (tunneled:SRV6)                   10
192.0.2.5/32                                  Remote  BGP       00h07m25s  170
       2001:db8::168:25:2                                           0
-------------------------------------------------------------------------------
No. of Routes: 3
---snip---
===============================================================================

Verify the corresponding IPv4 BGP routes on PE-2:

*A:PE-2# show router bgp routes 192.0.2.5 hunt
===============================================================================
 BGP Router ID:2.2.2.2          AS:64500       Local AS:64500      
===============================================================================
---snip---
===============================================================================
BGP IPv4 Routes
===============================================================================
-------------------------------------------------------------------------------
RIB In Entries
-------------------------------------------------------------------------------
Network        : 192.0.2.5/32
Nexthop        : 2001:db8::168:25:2
Path Id        : None                   
From           : 2001:db8::168:25:2
Res. Protocol  : LOCAL                  Res. Metric    : 0
Res. Nexthop   : 2001:db8::168:25:2
Local Pref.    : None                   Interface Name : int-PE-2-CE-2
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 0
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.5
Fwd Class      : None                   Priority       : None
Flags          : Used Valid Best IGP In-RTM 
Route Source   : External
AS-Path        : 64505 
Route Tag      : 0                      
Neighbor-AS    : 64505
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
Add Paths Send : Default                
RIB Priority   : Normal                 
Last Modified  : 00h07m26s              
 
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Network        : 192.0.2.5/32
Nexthop        : 2001:db8::2:2
Path Id        : None                   
To             : 2001:db8::2:3
Res. Protocol  : INVALID                Res. Metric    : 0
Res. Nexthop   : n/a
Local Pref.    : 100                    Interface Name : NotAvailable
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 0
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.3
Origin         : IGP                    
AS-Path        : 64505 
Route Tag      : 0                      
Neighbor-AS    : 64505
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
SRv6 TLV Type  : SRv6 L3 Service TLV (5)
SRv6 SubTLV    : SRv6 SID Information (1)
Sid            : 2001:db8:aaaa:102:0:2000::
Behavior       : End.DT4 (19)
SRv6 SubSubTLV : SRv6 SID Structure (1)
Loc-Block-Len  : 48                     Loc-Node-Len   : 16
Func-Len       : 20                     Arg-Len        : 0
Tpose-Len      : 0                      Tpose-offset   : 0
 
-------------------------------------------------------------------------------
Routes : 2
===============================================================================

PE-2 then advertises route prefix 192.0.2.5/32 (in RIB Out Entries), via RR-3, and inserts the SRv6 Services TLV. This TLV carries an SRv6 Service Information sub-TLV that contains the End.DT4 SID.

PE-1 receives (via RR-3) the BGP update which PE-2 sends for the IPv4 address family:

*A:PE-1# show log log-id 2

---snip---
3 2022/07/18 15:37:32.833 UTC MINOR: DEBUG #2001 Base Peer 1: 2001:db8::2:3
"Peer 1: 2001:db8::2:3: UPDATE
Peer 1: 2001:db8::2:3 - Received BGP UPDATE:
    Withdrawn Length = 0
    Total Path Attr Length = 104
    Flag: 0x90 Type: 14 Len: 26 Multiprotocol Reachable NLRI:
        Address Family IPV4
        NextHop len 16 Global NextHop 2001:db8::2:2
        192.0.2.5/32
    Flag: 0x40 Type: 1 Len: 1 Origin: 0
    Flag: 0x40 Type: 2 Len: 6 AS Path:
        Type: 2 Len: 1 < 64505 >
    Flag: 0x40 Type: 5 Len: 4 Local Preference: 100
    Flag: 0x80 Type: 9 Len: 4 Originator ID: 2.2.2.2
    Flag: 0x80 Type: 10 Len: 4 Cluster ID:
        3.3.3.3
    Flag: 0xc0 Type: 40 Len: 37 Prefix-SID-attr:
       SRv6 Services TLV (37 bytes):-
           Type: SRV6 L3 Service TLV (5)
           Length: 34 bytes, Reserved: 0x0
         SRv6 Service Information Sub-TLV (33 bytes)
             Type: 1 Len: 30 Rsvd1: 0x0
             SRv6 SID: 2001:db8:aaaa:102:0:2000::
             SID Flags: 0x0 Endpoint Behavior: 0x13 Rsvd2: 0x0
             SRv6 SID Sub-Sub-TLV
                Type: 1 Len: 6
                BL:48 NL:16 FL:20 AL:0 TL:0 TO:0
"
---snip---

Upon receipt of the BGP update from RR-3 on behalf of PE-2, PE-1 programs route prefix 192.0.2.5/32 in its route table and FIB. The presence of the SRv6 Services TLV indicates that the next hop is the SRv6 End.DT4 SID which, in turn, is resolved to the remote locator for PE-2.

PE-1 then advertises route prefix 192.0.2.5/32 to CE-1 (in RIB Out Entries).

Verify the resulting IPv4 route table on PE-1. The IPv4 route table has a route to the remote IPv4 system address of CE-2, via the End.DT4 SID of the remotely configured locator prefix of PE-2.

*A:PE-1# show router route-table ipv4

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
172.16.14.0/30                                Local   Local     00h11m35s  0
       int-PE-1-CE-1                                                0
192.0.2.4/32                                  Remote  BGP       00h07m34s  170
       2001:db8::168:14:2                                           0
192.0.2.5/32                                  Remote  BGP       00h00m22s  170
       2001:db8:aaaa:102:0:2000:: (tunneled:SRV6)                   10
-------------------------------------------------------------------------------
No. of Routes: 3
---snip---
===============================================================================

Verify the corresponding IPv4 BGP routes on PE-1:

*A:PE-1# show router bgp routes 192.0.2.5 hunt
===============================================================================
 BGP Router ID:2.2.2.1          AS:64500       Local AS:64500      
===============================================================================
---snip---
===============================================================================
BGP IPv4 Routes
===============================================================================
-------------------------------------------------------------------------------
RIB In Entries
-------------------------------------------------------------------------------
Network        : 192.0.2.5/32
Nexthop        : 2001:db8::2:2
Path Id        : None                   
From           : 2001:db8::2:3
Res. Protocol  : ISIS                   Res. Metric    : 10
Res. Nexthop   : fe80::60e:1ff:fe01:1
Local Pref.    : 100                    Interface Name : int-PE-1-PE-2
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 10
Connector      : None
Community      : No Community Members
Cluster        : 3.3.3.3
Originator Id  : 2.2.2.2                Peer Router Id : 2.2.2.3
Fwd Class      : None                   Priority       : None
Flags          : Used Valid Best IGP In-RTM 
Route Source   : Internal
AS-Path        : 64505 
Route Tag      : 0                      
Neighbor-AS    : 64505
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
Add Paths Send : Default                
RIB Priority   : Normal                 
Last Modified  : 00h00m23s              
SRv6 TLV Type  : SRv6 L3 Service TLV (5)
SRv6 SubTLV    : SRv6 SID Information (1)
Sid            : 2001:db8:aaaa:102:0:2000::
Behavior       : End.DT4 (19)
SRv6 SubSubTLV : SRv6 SID Structure (1)
Loc-Block-Len  : 48                     Loc-Node-Len   : 16
Func-Len       : 20                     Arg-Len        : 0
Tpose-Len      : 0                      Tpose-offset   : 0
 
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Network        : 192.0.2.5/32
Nexthop        : 2001:db8::168:14:1
Path Id        : None                   
To             : 2001:db8::168:14:2
Res. Protocol  : INVALID                Res. Metric    : 0
Res. Nexthop   : n/a
Local Pref.    : n/a                    Interface Name : NotAvailable
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 10
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.4
Origin         : IGP                    
AS-Path        : 64500 64505 
Route Tag      : 0                      
Neighbor-AS    : 64500
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
 
-------------------------------------------------------------------------------
Routes : 2
===============================================================================

CE-1 receives the BGP update which PE-1 sends for the IPv4 address family:

*A:CE-1# show log log-id 2

---snip---
3 2022/07/18 15:30:37.124 UTC MINOR: DEBUG #2001 Base Peer 1: 2001:db8::168:14:1
"Peer 1: 2001:db8::168:14:1: UPDATE"Peer 1: 2001:db8::168:14:1: UPDATE
Peer 1: 2001:db8::168:14:1 - Received BGP UPDATE:
    Withdrawn Length = 0
    Total Path Attr Length = 47
    Flag: 0x90 Type: 14 Len: 26 Multiprotocol Reachable NLRI:
        Address Family IPV4
        NextHop len 16 Global NextHop 2001:db8::168:14:1
        192.0.2.5/32
    Flag: 0x40 Type: 1 Len: 1 Origin: 0
    Flag: 0x40 Type: 2 Len: 10 AS Path:
        Type: 2 Len: 2 < 64500 64505 >
"
---snip---

Upon receipt of the BGP update from PE-1, CE-1 programs route prefix 192.0.2.5/32 in its route table and FIB with the interface toward PE-1 as the next hop.

Verify the resulting IPv4 route table on CE-1:

*A:CE-1# show router route-table ipv4

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
172.16.14.0/30                                Local   Local     00h09m08s  0
       int-CE-1-PE-1                                                0
192.0.2.4/32                                  Local   Local     00h09m08s  0
       system                                                       0
192.0.2.5/32                                  Remote  BGP       00h05m24s  170
       2001:db8::168:14:1                                           0
-------------------------------------------------------------------------------
No. of Routes: 3
---snip---
===============================================================================

Verify the corresponding IPv4 BGP routes on CE-1:

*A:CE-1# show router bgp routes 192.0.2.5 hunt
===============================================================================
 BGP Router ID:2.2.2.4          AS:64504       Local AS:64504      
===============================================================================
---snip---
===============================================================================
BGP IPv4 Routes
===============================================================================
-------------------------------------------------------------------------------
RIB In Entries
-------------------------------------------------------------------------------
Network        : 192.0.2.5/32
Nexthop        : 2001:db8::168:14:1
Path Id        : None                   
From           : 2001:db8::168:14:1
Res. Protocol  : LOCAL                  Res. Metric    : 0
Res. Nexthop   : 2001:db8::168:14:1
Local Pref.    : None                   Interface Name : int-CE-1-PE-1
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 0
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.1
Fwd Class      : None                   Priority       : None
Flags          : Used Valid Best IGP In-RTM 
Route Source   : External
AS-Path        : 64500 64505 
Route Tag      : 0                      
Neighbor-AS    : 64500
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
Add Paths Send : Default                
RIB Priority   : Normal                 
Last Modified  : 00h00m20s              
 
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Routes : 1
===============================================================================

Similar BGP update logs are generated for the IPv6 address family.

Focus as an example on prefix 2001:db8::2:5/128 and on prefix 2001:db8::2:4/128, but in the other direction.

Verify the IPv6 BGP routes.

CE-2 advertises route prefix 2001:db8::2:5/128 to PE-2 (in RIB Out Entries).

*A:CE-2# show router bgp routes 2001:db8::2:5/128 hunt
===============================================================================
 BGP Router ID:2.2.2.5          AS:64505       Local AS:64505      
===============================================================================
---snip---
===============================================================================
BGP IPv6 Routes
===============================================================================
-------------------------------------------------------------------------------
RIB In Entries
-------------------------------------------------------------------------------
 
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Network        : 2001:db8::2:5/128
Nexthop        : 2001:db8::168:25:2
Path Id        : None                   
To             : 2001:db8::168:25:1
Res. Protocol  : INVALID                Res. Metric    : 0
Res. Nexthop   : n/a
Local Pref.    : n/a                    Interface Name : NotAvailable
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : n/a
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.2
Origin         : IGP                    
AS-Path        : 64505 
Route Tag      : 0                      
Neighbor-AS    : 64505
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
 
-------------------------------------------------------------------------------
Routes : 1
===============================================================================

PE-2 receives the BGP update which CE-2 sends for the IPv6 address family:

*A:PE-2# show log log-id 2

---snip---
6 2022/07/18 15:30:35.785 UTC MINOR: DEBUG #2001 Base Peer 1: 2001:db8::168:25:2
"Peer 1: 2001:db8::168:25:2: UPDATE
Peer 1: 2001:db8::168:25:2 - Received BGP UPDATE:
    Withdrawn Length = 0
    Total Path Attr Length = 55
    Flag: 0x90 Type: 14 Len: 38 Multiprotocol Reachable NLRI:
        Address Family IPV6
        NextHop len 16 Global NextHop 2001:db8::168:25:2
        2001:db8::2:5/128
    Flag: 0x40 Type: 1 Len: 1 Origin: 0
    Flag: 0x40 Type: 2 Len: 6 AS Path:
        Type: 2 Len: 1 < 64505 >
"
---snip---

Upon receipt of the BGP update from CE-2, PE-2 programs route prefix 2001:db8::2:5/128 in its route table and FIB, with the interface toward CE-2 as next hop.

Verify the resulting IPv6 route table on PE-2:

*A:PE-2# show router route-table ipv6

===============================================================================
IPv6 Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
---snip---
2001:db8::2:4/128                             Remote  BGP       00h00m30s  170
       2001:db8:aaaa:101:0:3000:: (tunneled:SRV6)                   10
2001:db8::2:5/128                             Remote  BGP       00h07m25s  170
       2001:db8::168:25:2                                           0
---snip---
2001:db8:aaaa:101::/64                        Remote  ISIS      00h02m32s  18
       2001:db8:aaaa:101::/64 (tunneled:SRV6-ISIS)                  10
2001:db8:aaaa:102::/64                        Local   SRV6      00h01m11s  3
       fe80::201-"_tmnx_fpe_2.a"                                    0
2001:db8:aaaa:102:0:1000::/128                Local   SRV6      00h01m11s  3
       Black Hole                                                   0
2001:db8:aaaa:102:0:4000::/128                Local   ISIS      00h01m11s  18
       fe80::60a:1ff:fe01:1-"int-PE-2-PE-1"                         10
2001:db8:aaaa:102:0:5000::/128                Local   ISIS      00h01m11s  18
       fe80::611:ffff:fe00:0-"int-PE-2-RR-3"                        10
-------------------------------------------------------------------------------
No. of Routes: 14
---snip---
===============================================================================

Verify the corresponding IPv6 BGP routes on PE-2:

*A:PE-2# show router bgp routes 2001:db8::2:5/128 hunt
===============================================================================
 BGP Router ID:2.2.2.2          AS:64500       Local AS:64500      
===============================================================================
---snip---
===============================================================================
BGP IPv6 Routes
===============================================================================
-------------------------------------------------------------------------------
RIB In Entries
-------------------------------------------------------------------------------
Network        : 2001:db8::2:5/128
Nexthop        : 2001:db8::168:25:2
Path Id        : None                   
From           : 2001:db8::168:25:2
Res. Protocol  : LOCAL                  Res. Metric    : 0
Res. Nexthop   : 2001:db8::168:25:2
Local Pref.    : None                   Interface Name : int-PE-2-CE-2
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 0
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.5
Fwd Class      : None                   Priority       : None
Flags          : Used Valid Best IGP In-RTM 
Route Source   : External
AS-Path        : 64505 
Route Tag      : 0                      
Neighbor-AS    : 64505
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
Add Paths Send : Default                
RIB Priority   : Normal                 
Last Modified  : 00h07m26s              
 
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Network        : 2001:db8::2:5/128
Nexthop        : 2001:db8::2:2
Path Id        : None                   
To             : 2001:db8::2:3
Res. Protocol  : INVALID                Res. Metric    : 0
Res. Nexthop   : n/a
Local Pref.    : 100                    Interface Name : NotAvailable
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 0
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.3
Origin         : IGP                    
AS-Path        : 64505 
Route Tag      : 0                      
Neighbor-AS    : 64505
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
SRv6 TLV Type  : SRv6 L3 Service TLV (5)
SRv6 SubTLV    : SRv6 SID Information (1)
Sid            : 2001:db8:aaaa:102:0:3000::
Behavior       : End.DT6 (18)
SRv6 SubSubTLV : SRv6 SID Structure (1)
Loc-Block-Len  : 48                     Loc-Node-Len   : 16
Func-Len       : 20                     Arg-Len        : 0
Tpose-Len      : 0                      Tpose-offset   : 0
 
-------------------------------------------------------------------------------
Routes : 2
===============================================================================

PE-2 then advertises route prefix 2001:db8::2:5/128, via RR-3, and inserts the SRv6 Services TLV. This TLV carries an SRv6 Service Information sub-TLV that contains the End.DT6 SID.

PE-1 receives (via RR-3) the BGP update which PE-2 sends for the IPv6 address family:

*A:PE-1# show log log-id 2

---snip---
4 2022/07/18 15:37:32.834 UTC MINOR: DEBUG #2001 Base Peer 1: 2001:db8::2:3
"Peer 1: 2001:db8::2:3: UPDATE
Peer 1: 2001:db8::2:3 - Received BGP UPDATE:
    Withdrawn Length = 0
    Total Path Attr Length = 116
    Flag: 0x90 Type: 14 Len: 38 Multiprotocol Reachable NLRI:
        Address Family IPV6
        NextHop len 16 Global NextHop 2001:db8::2:2
        2001:db8::2:5/128
    Flag: 0x40 Type: 1 Len: 1 Origin: 0
    Flag: 0x40 Type: 2 Len: 6 AS Path:
        Type: 2 Len: 1 < 64505 >
    Flag: 0x40 Type: 5 Len: 4 Local Preference: 100
    Flag: 0x80 Type: 9 Len: 4 Originator ID: 2.2.2.2
    Flag: 0x80 Type: 10 Len: 4 Cluster ID:
        3.3.3.3
    Flag: 0xc0 Type: 40 Len: 37 Prefix-SID-attr:
       SRv6 Services TLV (37 bytes):-
           Type: SRV6 L3 Service TLV (5)
           Length: 34 bytes, Reserved: 0x0
         SRv6 Service Information Sub-TLV (33 bytes)
             Type: 1 Len: 30 Rsvd1: 0x0
             SRv6 SID: 2001:db8:aaaa:102:0:3000::
             SID Flags: 0x0 Endpoint Behavior: 0x12 Rsvd2: 0x0
             SRv6 SID Sub-Sub-TLV
                Type: 1 Len: 6
                BL:48 NL:16 FL:20 AL:0 TL:0 TO:0
"
---snip---

Upon receipt of the BGP update from RR-3 on behalf of PE-2, PE-1 programs route prefix 2001:db8::2:5/128 in its route table and FIB. The presence of the SRv6 Services TLV indicates that the next hop is the SRv6 End.DT6 SID which, in turn, is resolved to the remote locator for PE-2.

PE-1 then advertises route prefix 2001:db8::2:5/128 to CE-1 (in RIB Out Entries).

Verify the resulting IPv6 route table on PE-1. The IPv6 route table has a route to the remote IPv6 system address of CE-2, now resolved to the End.DT6 SID of the remotely configured locator prefix of PE-2. The local auto-allocated SRv6 End.X functions have a renumbered SID, because their initial SID is now used for the statically configured SRv6 End.DT4 and SRv6 End.DT6 functions.

*A:PE-1# show router route-table ipv6

===============================================================================
IPv6 Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
---snip---
2001:db8::2:5/128                             Remote  BGP       00h00m22s  170
       2001:db8:aaaa:102:0:3000:: (tunneled:SRV6)                   10
---snip---
2001:db8:aaaa:101::/64                        Local   SRV6      00h01m20s  3
       fe80::201-"_tmnx_fpe_2.a"                                    0
2001:db8:aaaa:101:0:1000::/128                Local   SRV6      00h01m20s  3
       Black Hole                                                   0
2001:db8:aaaa:101:0:4000::/128                Local   ISIS      00h01m20s  18
       fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                         10
2001:db8:aaaa:101:0:5000::/128                Local   ISIS      00h01m20s  18
       fe80::611:ffff:fe00:0-"int-PE-1-RR-3"                        10
2001:db8:aaaa:102::/64                        Remote  ISIS      00h02m26s  18
       2001:db8:aaaa:102::/64 (tunneled:SRV6-ISIS)                  10
-------------------------------------------------------------------------------
No. of Routes: 14
---snip---
===============================================================================

Verify the corresponding IPv6 BGP routes on PE-1:

*A:PE-1# show router bgp routes 2001:db8::2:5/128 hunt
===============================================================================
 BGP Router ID:2.2.2.1          AS:64500       Local AS:64500      
===============================================================================
---snip---
===============================================================================
BGP IPv6 Routes
===============================================================================
-------------------------------------------------------------------------------
RIB In Entries
-------------------------------------------------------------------------------
Network        : 2001:db8::2:5/128
Nexthop        : 2001:db8::2:2
Path Id        : None                   
From           : 2001:db8::2:3
Res. Protocol  : ISIS                   Res. Metric    : 10
Res. Nexthop   : fe80::60e:1ff:fe01:1
Local Pref.    : 100                    Interface Name : int-PE-1-PE-2
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 10
Connector      : None
Community      : No Community Members
Cluster        : 3.3.3.3
Originator Id  : 2.2.2.2                Peer Router Id : 2.2.2.3
Fwd Class      : None                   Priority       : None
Flags          : Used Valid Best IGP In-RTM 
Route Source   : Internal
AS-Path        : 64505 
Route Tag      : 0                      
Neighbor-AS    : 64505
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
Add Paths Send : Default                
RIB Priority   : Normal                 
Last Modified  : 00h00m23s              
SRv6 TLV Type  : SRv6 L3 Service TLV (5)
SRv6 SubTLV    : SRv6 SID Information (1)
Sid            : 2001:db8:aaaa:102:0:3000::
Behavior       : End.DT6 (18)
SRv6 SubSubTLV : SRv6 SID Structure (1)
Loc-Block-Len  : 48                     Loc-Node-Len   : 16
Func-Len       : 20                     Arg-Len        : 0
Tpose-Len      : 0                      Tpose-offset   : 0
 
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
Network        : 2001:db8::2:5/128
Nexthop        : 2001:db8::168:14:1
Path Id        : None                   
To             : 2001:db8::168:14:2
Res. Protocol  : INVALID                Res. Metric    : 0
Res. Nexthop   : n/a
Local Pref.    : n/a                    Interface Name : NotAvailable
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 10
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.4
Origin         : IGP                    
AS-Path        : 64500 64505 
Route Tag      : 0                      
Neighbor-AS    : 64500
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
 
-------------------------------------------------------------------------------
Routes : 2
===============================================================================

CE-1 receives the BGP update which PE-1 sends for the IPv6 address family:

*A:CE-1# show log log-id 2

---snip---
2 2022/07/18 15:37:33.124 UTC MINOR: DEBUG #2001 Base Peer 1: 2001:db8::168:14:1
"Peer 1: 2001:db8::168:14:1: UPDATE
Peer 1: 2001:db8::168:14:1 - Received BGP UPDATE:
    Withdrawn Length = 0
    Total Path Attr Length = 59
    Flag: 0x90 Type: 14 Len: 38 Multiprotocol Reachable NLRI:
        Address Family IPV6
        NextHop len 16 Global NextHop 2001:db8::168:14:1
        2001:db8::2:5/128
    Flag: 0x40 Type: 1 Len: 1 Origin: 0
    Flag: 0x40 Type: 2 Len: 10 AS Path:
        Type: 2 Len: 2 < 64500 64505 >
"
---snip---

Upon receipt of the BGP update from PE-1, CE-1 programs prefix 2001:db8::2:5/128 in its route table and FIB, with the interface toward PE-1 as next hop.

Verify the resulting IPv6 route table on CE-1:

*A:CE-1# show router route-table ipv6

===============================================================================
IPv6 Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric   
-------------------------------------------------------------------------------
2001:db8::2:4/128                             Local   Local     00h19m39s  0
       system                                                       0
2001:db8::2:5/128                             Remote  BGP       00h00m32s  170
       2001:db8::168:14:1                                           0
2001:db8::168:14:0/126                        Local   Local     00h19m38s  0
       int-CE-1-PE-1                                                 0
-------------------------------------------------------------------------------
No. of Routes: 3
---snip---
===============================================================================

Verify the corresponding IPv6 BGP routes on CE-1:

*A:CE-1# show router bgp routes 2001:db8::2:5/128 hunt
===============================================================================
 BGP Router ID:2.2.2.4          AS:64504       Local AS:64504      
===============================================================================
---snip---
===============================================================================
BGP IPv6 Routes
===============================================================================
-------------------------------------------------------------------------------
RIB In Entries
-------------------------------------------------------------------------------
Network        : 2001:db8::2:5/128
Nexthop        : 2001:db8::168:14:1
Path Id        : None                   
From           : 2001:db8::168:14:1
Res. Protocol  : LOCAL                  Res. Metric    : 0
Res. Nexthop   : 2001:db8::168:14:1
Local Pref.    : None                   Interface Name : int-CE-1-PE-1
Aggregator AS  : None                   Aggregator     : None
Atomic Aggr.   : Not Atomic             MED            : None
AIGP Metric    : None                   IGP Cost       : 0
Connector      : None
Community      : No Community Members
Cluster        : No Cluster Members
Originator Id  : None                   Peer Router Id : 2.2.2.1
Fwd Class      : None                   Priority       : None
Flags          : Used Valid Best IGP In-RTM 
Route Source   : External
AS-Path        : 64500 64505 
Route Tag      : 0                      
Neighbor-AS    : 64500
Orig Validation: NotFound               
Source Class   : 0                      Dest Class     : 0
Add Paths Send : Default                
RIB Priority   : Normal                 
Last Modified  : 00h00m32s              
 
-------------------------------------------------------------------------------
RIB Out Entries
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Routes : 1
===============================================================================

Verify the SRv6 local SIDs on PE-2 and similar on PE-1. The SRv6 local SIDs 2001:db8:aaaa:102:0:2000:: and 2001:db8:aaaa:102:0:3000:: now correspond with the additional SRv6 End.DT4 and SRv6 End.DT6 behavior that is configured on the locator for the data transport between CE-1 and CE-2. RR-3, CE-1, and CE-2 do not have SRv6 configuration and do not have SRv6 local SIDs.

*A:PE-2# show router segment-routing-v6 local-sid

===============================================================================
Segment Routing v6 Local SIDs
===============================================================================
SID                                               Type           Function
  Locator                                                        
  Context                                                        
-------------------------------------------------------------------------------
2001:db8:aaaa:102:0:1000::                        End            1
  PE-2_loc
  Base
2001:db8:aaaa:102:0:2000::                        End.DT4        2
  PE-2_loc
  Base
2001:db8:aaaa:102:0:3000::                        End.DT6        3
  PE-2_loc
  Base
2001:db8:aaaa:102:0:4000::                        End.X          4
  PE-2_loc
    None
2001:db8:aaaa:102:0:5000::                        End.X          5
  PE-2_loc
    None
-------------------------------------------------------------------------------
SIDs : 5
-------------------------------------------------------------------------------
===============================================================================

Verify the SRv6 base routing instance on PE-2 and similar on PE-1.

*A:PE-2# show router segment-routing-v6 base-routing-instance

===============================================================================
Segment Routing v6 Base Routing Instance
===============================================================================
Locator                                                           
  Type       Function    SID                                     Status/InstId
    SRH-mode Protection  Interface                               
-------------------------------------------------------------------------------
PE-2_loc
  End.DT4              2 2001:db8:aaaa:102:0:2000::              ok
  End.DT6              3 2001:db8:aaaa:102:0:3000::              ok
  End                  1 2001:db8:aaaa:102:0:1000::              ok
    USP      
-------------------------------------------------------------------------------
  Auto-allocated End.X: PSP Unprotected,
-------------------------------------------------------------------------------
  End.X               *4 2001:db8:aaaa:102:0:4000::              0
    PSP      Unprotected int-PE-2-PE-1                           
    ISIS Level: L2 Mac Address: 04:0a:01:01:00:01 Nbr Sys Id: 0010.0100.1001
  End.X               *5 2001:db8:aaaa:102:0:5000::              0
    PSP      Unprotected int-PE-2-RR-3                           
    ISIS Level: L2 Mac Address: 04:12:01:01:00:0b Nbr Sys Id: 0010.0100.1003
-------------------------------------------------------------------------------
===============================================================================
Legend: * - System allocated

Verify that the tunnel from PE-1 to the remote locator has SRv6 encapsulation and similar for the tunnel from PE-2 to the remote locator. The tunnel tables on RR-3 and on CE-1 are empty.

*A:PE-1# show router tunnel-table ipv6

===============================================================================
IPv6 Tunnel Table (Router: Base)
===============================================================================
Destination                                     Owner     Encap TunnelId  Pref
Nexthop                                         Color           Metric    
-------------------------------------------------------------------------------
2001:db8:aaaa:102::/64                          srv6-isis SRV6  524289    0
  fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                            10        
-------------------------------------------------------------------------------
---snip---
===============================================================================

Verify that the tunnel from PE-1 to the remote locator uses the “int-PE-1-PE-2” interface and similar for the tunnel from PE-2 to the remote locator, where that tunnel uses the “int-PE-2-PE-1” interface. Interface “int-PE-1-PE-2” is configured on port 1/1/c1/1:1000. The FP tunnel tables on RR-3 and on CE-1 are empty.

*A:PE-1# show router fp-tunnel-table 1 ipv6

===============================================================================
IPv6 Tunnel Table Display

Legend: 
label stack is ordered from bottom-most to top-most
B - FRR Backup
===============================================================================
Destination                                  Protocol         Tunnel-ID
  Lbl/SID                                                      
    NextHop                                                   Intf/Tunnel
  Lbl/SID (backup)                                            
    NextHop   (backup)                                        
-------------------------------------------------------------------------------
2001:db8:aaaa:102::/64                       SRV6              524289
  -
    fe80::60e:1ff:fe01:1-"int-PE-1-PE-2"                       1/1/c1/1:1000
-------------------------------------------------------------------------------
Total Entries : 1
-------------------------------------------------------------------------------
===============================================================================

Verify that data transport is possible between CE-1 and CE-2. IPv4 data flows from CE-1 to PE-1, where it is SRv6-encapsulated and forwarded via the SRv6 tunnel to PE-2. At PE-2, the data is decapsulated and is forwarded to CE-2. Between PE-1 and PE-2, the IPv4 data cannot flow unencapsulated because there is no IPv4 interface between PE-1 and PE-2.

*A:CE-1# ping 192.0.2.5 
PING 192.0.2.5 56 data bytes
64 bytes from 192.0.2.5: icmp_seq=1 ttl=62 time=2.83ms.
---snip---
---- 192.0.2.5 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min = 2.41ms, avg = 2.59ms, max = 2.83ms, stddev = 0.132ms

*A:CE-1# traceroute 192.0.2.5 
traceroute to 192.0.2.5, 30 hops max, 40 byte packets
  1  172.16.14.1 (172.16.14.1)    1.47 ms  1.26 ms  1.45 ms
  2  0.0.0.0  * * * 
  3  192.0.2.5 (192.0.2.5)    3.00 ms  2.72 ms  2.48 ms

IPv6 data flows from CE-1 to PE-1, where it is SRv6 encapsulated and forwarded via the SRv6 tunnel to PE-2. At PE-2, the data is decapsulated and is forwarded to CE-2. The IPv6 data does not flow with native IPv6 between PE-1 and PE-2 because then it would use the 2001:db8::168:12:1 IPv6 interface instead of the 2001:db8::2:2 IPv6 system address in the second hop. The same is true for data transport between CE-2 and CE-1.

*A:CE-1# ping 2001:db8::2:5 
PING 2001:db8::2:5 56 data bytes
64 bytes from 2001:db8::2:5 icmp_seq=1 hlim=62 time=2.16ms.
---snip---
---- 2001:db8::2:5 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min = 2.16ms, avg = 2.32ms, max = 2.43ms, stddev = 0.089ms

*A:CE-1# traceroute 2001:db8::2:5 
traceroute to 2001:db8::2:5, 30 hops max, 60 byte packets
  1  2001:db8::168:14:1 (2001:db8::168:14:1)    1.38 ms  1.38 ms  1.12 ms
  2  2001:db8::2:2 (2001:db8::2:2)    2.28 ms  2.14 ms  2.34 ms
  3  2001:db8::2:5 (2001:db8::2:5)    2.91 ms  2.74 ms  2.83 ms

Conclusion

SRv6 Encapsulation in the base routing instance can be used to transport native IPv4 and IPv6 data across an SRv6-enabled provider network.