Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

Segment Routing v6 Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

VRF-to-VRF route leaking in SRv6 core

Want to summarize with AI?

Log in

Explains how route targets control route exchange between isolated VRFs and provides the restrictions, operational behavior, and configuration needed for route leaking across an SRv6 core.


VRF-to-VRF route leaking is an SRv6 feature that

  • enables communication between separate Virtual Routing and Forwarding (VRF) instances

  • selectively shares specific routes between these VRFs while maintaining isolation for others, and

  • uses configured import and export route targets in each VRF to control the route exchange.

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

VRF-to-VRF route leaking in SRv6 core

Release 26.1.1

Introduced in this release on: Centralized Systems (8400 [ASIC: K100])(select variants only*)

* This feature is now supported on Cisco 8404-SYS-D routers.

VRF-to-VRF route leaking in SRv6 core

Release 25.4.1

Introduced in this release on: Fixed Systems (8700 [ASIC: K100], 8010 [ASIC: A100])(select variants only*)

*This feature is supported on:

  • 8711-48Z-M

  • 8011-32Y8L2H2FH

  • 8011-12G12X4Y-A/D

VRF-to-VRF route leaking in SRv6 core

Release 25.1.1

Introduced in this release on: Fixed Systems (8700 [ASIC: K100], 8010 [ASIC: A100])(select variants only*)

*This feature is now supported on:

  • 8712-MOD-M

  • 8011-4G24Y4H-I

VRF-to-VRF route leaking in SRv6 core

Release 24.4.1

Introduced in this release on: Fixed Systems (8200 [ASIC: Q200, P100], 8700 [ASIC: P100, K100])(select variants only*); Modular Systems (8800 [LC ASIC: Q200, P100])(select variants only*)

VRF-to-VRF route leaking enables sharing of routes between VRFs while maintaining their isolation. This feature allows the source VRF to send leaked routes to remote PEs or Route Reflectors (RRs) across an SRv6 core network, similar to an MPLS core network, enabling communication between different service tenants or administrative domains without compromising VRF isolation.

*This feature is supported on:

  • 8212-48FH-M

  • 8711-32FH-M

  • 88-LC1-36EH

  • 88-LC1-12TH24FH-E

  • 88-LC1-52Y8H-EM

SRv6 VRF-to-VRF route leaking capabilities

SRv6 VRF-to-VRF route leaking extends MPLS-based VRF route leaking functionalities to SRv6. This feature leverages SRv6 flexibility for path selection and optimization, allowing you to configure the destination VRF to send leaked routes to a remote Provider Edge (PE) or Route Reflector (RR) across an SRv6 core. It enables communication between VRFs in an SRv6-enabled environment while maintaining control over routing and traffic engineering decisions.

Benefits of VRF-to-VRF route leaking in SRv6

The key benefits of the feature are:

  • Improved traffic management: The feature allows routes in the source VRF to use SRv6 SIDs from a best-effort locator and routes in the destination VRF to use SIDs from a low-latency locator. This setup enables differentiated traffic treatment in the SRv6 core.

  • Enhanced flexibility: The feature leaks routes between VRFs and advertises them as VPNv4 or VPNv6 or EVPN RT5 prefixes to remote PE routers, providing better flexibility in managing network traffic and inter-VRF communication.

  • Scalability: The feature dynamically leaks routes that help to scale the network by automating the redistribution process between VRFs.

  • Security and isolation: The feature uses route targets and policies to control route leaking, ensuring that it only occurs between intended VRFs, maintaining both security and isolation.


Limitations for VRF-to-VRF route leaking in SRv6

  • VRF-to-VRF route leaking does not support multicast routes.

  • The feature supports both SRv6 Full-length SID and Micro-SIDs.

  • Depending on the destination VRF configuration, the PE router assigns SIDs to the leaked route based on the SID allocation mode, which can be per-VRF or per-VRF-46.


How SRv6 VRF-to-VRF route leaking works

VRF-to-VRF route leaking is an SRv6 feature that enables communication between separate VRF)instances by selectively sharing specific routes while keeping others isolated.

Summary

The SRv6 VRF-to-VRF route leaking process involves several key actors and components:

  • Source VRF: The Virtual Routing and Forwarding instance that initiates the route import.

  • Destination VRF: The Virtual Routing and Forwarding instance that receives the imported prefix, allocates an SRv6 SID, and advertises the prefix.

  • SRv6 SID: The unique Segment Identifier allocated to the imported prefix for routing within the SRv6 core.

  • Remote neighbors: Other devices in the SRv6 network that receive the advertised prefixes and route traffic accordingly.

  • SRv6 core network: The underlying network infrastructure where SRv6 routing and traffic engineering occur.

  • BGP VPNv4/VPNv6/EVPN RT5: The BGP extensions used by the destination VRF to advertise the prefixes and SIDs.

The SRv6 VRF-to-VRF route leaking process involves VRFs importing and advertising prefixes with associated SRv6 SIDs, allowing remote neighbors to efficiently route traffic to the intended destinations within the SRv6 core.

Workflow

These stages describe how SRv6 VRF-to-VRF route leaking works:

  1. Route import: A source VRF imports a prefix from another destination VRF, which belongs to a different service. This action creates a route leak between them.

  2. SID allocation The destination VRF allocates a unique SRv6 SID to the newly imported prefix. This SID ensures that traffic destined for the imported prefix is correctly routed within the SRv6 core. The SID allocation type depends on the destination VRF configuration (either per-VRF or per-VRF-46).

  3. Prefix advertisement: The destination VRF advertises the imported prefix, along with its associated SRv6 SID, to remote neighbors in the SRv6 network. This advertisement occurs through BGP VPNv4, VPNv6, or EVPN RT5.

  4. Routing within the SRv6 core: Remote neighbors receive this information and can now route traffic to the imported prefix using the SRv6 SID. The SRv6 SID facilitates efficient routing and traffic engineering, ensuring that traffic reaches the correct VRF and its ultimate destination.


Configure VRF-to-VRF route leaking in SRv6

Procedure

  1. Run the export route-policy command to configure and attach route leaking in the source VRF.

    • Configure the static export Route Target to leak all prefixes to the destination VRF. In the below configuration, the leaked Route Target is 1:12.
      Router(config)#vrf vrf-be
      Router(config-vrf)#address-family ipv4 unicast
      Router(config-vrf-af)#import route-target 1:10
      Router(config-vrf-af)#export route-target 1:10
      Router(config-vrf-af)#export route-target 1:12
      Router(config-vrf-af)#commit
    • Configure a route policy that attaches appropriate Route Target to the leaked prefixes to leak specific prefixes to the destination VRF. Apply the IF condition in the Route Policy Language (RPL) to leak specific prefixes.

      Route(config)#prefix-set allowed-leaked-route
      Route(config-pfx)#192.168.1.0/32
      Router(config-pfx)#end-set
      Router(config)#route-policy export-policy 
      Router(config-rpl)#if destination in allowed-leaked-route then
      Router(config-rpl-if)#set extcommunity rt 1:12
      Router(config-rpl-if)#endif
      Router(config-rpl)#end-policy 
      Router(config)#commit
      Router(config)#vrf vrf-be 
      Router(config-vrf)#address-family ipv4 unicast
      Router(config-vrf-af)#import route-target 1:10
      Router(config-vrf-af)#export route-target 1:10
      Router(config-vrf-af)#export route-policy export-policy 
      Router(config-vrf-af)#commit
  2. Configure the destination VRF to import routes from the source VRF.

    Example:

    Router(config)#vrf vrf-ef
    Router(config-vrf)#address-family ipv4 unicast
    Router(config-vrf-af)#import route-target 2:2
    Router(config-vrf-af)#import route-target 1:12
    Router(config-vrf-af)#export route-target 2:2
  3. Run the show running-config command to verify the running configuration.

    Example:

    
    vrf vrf-be
      address-family ipv4 unicast
        import route-target 1:10
        export route-target 1:10 
        export route-targer 1:12
      !
    !
    vrf vrf-ef
      address-family ipv4 unicast
        import route-target 2:2
        import route-target 1:12
        export route-target 2:2
      !
    !
    
  4. Run the import from vrf advertise-as-vpn command to forward the imported routes to a remote PE or VPN RR peer through configuration.

    Example:

    Router(config)#vrf vrf-ef
    Router(config-vrf)#address-family ipv4 unicast
    Router(config-vrf-af)#import from vrf advertise-as-vpn 
    Router(config-vrf-af)#commit
  5. Run the show bgp vrf command to verify the route leaking from the source VRF vrf-be.

    In the below show output, the source VRF vrf-be leaks the Route Target 1:12.

    Example:

    Router#show bgp vrf vrf-be 192.168.1.0/32 detail 
    Mon Aug 19 14:06:22.668 UTC
    BGP routing table entry for 192.168.1.0/32, Route Distinguisher: 1.1.1.1:11
    Versions:
      Process           bRIB/RIB   SendTblVer
      Speaker            3434714      3434714
        SRv6-VPN SID: fc00:1:4:fff0:7d1::/80
        Format: f3216
        Alloc Mode/Locator ID: per-vrf/1
        Flags: 0x00143001+0x01000000+0x00000000 
    Last Modified: Aug 19 09:53:33.351 for 04:12:49
    Paths: (1 available, best #1)
      Advertised to update-groups (with more than one peer):
        0.2 
      Path #1: Received by speaker 0
      Flags: 0x3000000005040003+0x00, import: 0x31f
      Advertised to update-groups (with more than one peer):
        0.2 
      4
        100.4.0.1 from 100.4.0.1 (193.0.0.1), if-handle 0x00000000
          Origin IGP, localpref 100, valid, external, best, group-best, import-candidate
          Received Path ID 0, Local Path ID 1, version 3434714
          Extended community: RT:1:10 RT:1:12
    

    The described show output indicates that the destination VRF vrf-ef imports the prefix from the source VRF vrf-be, as shown by the imported flag. The output also includes details of the source VRF. A non-zero value in the Flags field confirms that the prefix is imported.

    Example:

    Router#show bgp vrf vrf-ef 192.168.1.0/24 detail 
    Mon Aug 19 14:08:07.102 UTC
    BGP routing table entry for 192.168.1.0/24, Route Distinguisher: 1.1.1.1:21
    Versions:
      Process           bRIB/RIB   SendTblVer
      Speaker            3440133      3440133
        SRv6-VPN SID: fc00:2:4:fff0:7d1::/80
        Format: f3216
        Alloc Mode/Locator ID: per-vrf/2
        Flags: 0x00103001+0x01000000+0x00000000 
    Last Modified: Aug 19 10:48:24.351 for 03:19:42
    Paths: (1 available, best #1)
      Advertised to update-groups (with more than one peer):
        0.2 
      Path #1: Received by speaker 0
      Flags: 0x3100000005040003+0x00, import: 0x080
      Advertised to update-groups (with more than one peer):
        0.2 
      4
        100.4.0.1 from 100.4.0.1 (193.0.0.1), if-handle 0x00000000
          Origin IGP, localpref 100, valid, external, best, group-best, import-candidate, imported
          Received Path ID 0, Local Path ID 1, version 3440133
          Extended community: RT:1:10 RT:1:12 RT:1:20 
          Source AFI: VPNv4 Unicast, Source VRF: vrf-be, Source Route Distinguisher: 1.1.1.1:11
    
    

    The below show output is an example of the output on remote PE:

    Router#show bgp vpnv4 unicast rd 1.1.1.1:21 192.168.1.0/32 detail
    Fri Dec 13 13:21:29.136 PST
    BGP routing table entry for 192.168.1.0/32, Route Distinguisher: 1.1.1.1:21
    Versions:
      Process           bRIB/RIB   SendTblVer
      Speaker                690          690
        Flags: 0x00040028+0x00000000+0x00000000
    Last Modified: Dec 13 13:14:37.000 for 00:06:52
    Paths: (1 available, best #1)
      Not advertised to any peer
      Path #1: Received by speaker 0
      Flags: 0x2000000025060005+0x00, import: 0x31f
      Not advertised to any peer
      10
        192::1 (metric 30) from 192::4 (192.168.0.1), if-handle 0x00000000
          Received Label 0x7d10
          Origin IGP, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, not-in-vrf
          Received Path ID 1, Local Path ID 1, version 690
          Extended community:RT:2:2
          Originator: 192.168.0.1, Cluster list: 192.168.1.4
          PSID-Type:L3, SubTLV Count:1, R:0x00,
           SubTLV:
    	T:1(Sid information), Sid:fcc00:2:4:fff0::(Transposed), F:0x00, R2:0x00, Behavior:61, R3:0x00, SS-TLV Count:1
             SubSubTLV:
              T:1(Sid structure):
               Length [Loc-blk,Loc-node,Func,Arg]:[32,16,32,0], Tpose-len:16, Tpose-offset:64