Enable Traffic Steering with SRv6 Locators

This chapter focuses on SRv6 locators, which are fundamental IPv6 address prefixes used to identify blocks of Segment Identifiers within an SRv6 network. It examines the structure and various types of locators, including Base Format, uSID, and Anycast locators, and discusses their specific applications and limitations.

SRv6 Locators

An SRv6 locator is a unique IPv6 address prefix that

  • identifies a block of Segment Identifiers (SIDs) in an SRv6-enabled network

  • belongs to a specific node in an SRv6-enabled network, and

  • enables routing and forwarding based on SRv6 SIDs.

A SID is a 128-bit value in SRv6 networks that represents a specific instruction or path in the network. For more information, see Segment Identifiers.

Structure of a SRv6 locator

The structure of an SRv6 locator consists of the most significant bits of the SID and serves as the address of a specific SRv6 node. The locator can be further divided into:

  • SID block: The most significant portion that designates the SRv6 domain.This field is the SRv6 network designator and is a fixed or known address space for an SRv6 domain. This is the most significant bit (MSB) portion of a locator subnet.

  • Node Id: This field is the node designator in an SRv6 network and is the least significant bit (LSB) portion of a locator subnet.

Types of locators

SRv6 supports several locator types to identify nodes and services within an SRv6 domain. Each locator type addresses specific requirements in network design and operation. The main SRv6 locator types are Base Format locator (F1), uSID locator (F3216), and Anycast locator.

Table 1. Comparison of SRv6 locator types

Feature

Base Format Locator (F1)

uSID Locator (F3216)

Anycast Locator

Definition

The Base Format locator is a standard SRv6 locator that identifies a specific router or node within the SRv6 domain.

It uses a prefix to indicate the node and a function identifier (Func ID) to specify what action the node should perform.

The uSID locator is an advanced SRv6 locator that compresses multiple SRv6 segments into a single IPv6 address.

An anycast locator is a shared locator that identifies a group of nodes (Anycast group).

All nodes in the group advertise the same locator, allowing traffic to be routed to the nearest node.

Components

Locator prefix and

Function identifier (Func ID)

Locator prefix

Micro-SID stack (uSIDs)

Anycast locator Prefix

Function identifier (Func ID)

Format

<Locator Prefix>::<Function ID> <Locator Prefix>::<uSID1>:<uSID2>:<uSID3> <Anycast Locator Prefix>::<Function ID>

Example

2001:db8:1::1

Prefix: 2001:db8:1::/48

Func ID: 1

2001:db8:2::100:200:300

Prefix: 2001:db8:2::/48

uSIDs: 100, 200, 300

2001:db8:3::2

Prefix: 2001:db8:3::/48 advertised by multiple nodes

Func ID: 2

Usecase

Node Identification

Simple SRv6 Deployments

Efficient Path Encoding

Service Chaining

Redundancy and Load Balancing

Exit Points in SRv6 Domains

Limitations for locators

Limitations for uSID locators

  • Cisco IOS XR supports uSIDs with 32-bit uSID blocks and 16-bit uSID IDs (3216). You must use a single UCF format for uSID locators in an SRv6 uSID domain.

  • Cisco IOS XR supports up to 16 uSID locator prefixes. Configure multiple locator prefixes when using anycast locators or SRv6 Flexible Algorithm instances.

  • Cisco IOS XR supports uSID locator prefixes from different uSID blocks. You can configure up to 256 uSID blocks across all uSID locators in the network.

Limitations for anycast locators

  • ISIS: Unlike a normal locator, IS-IS does not program or advertise uA SIDs associated with an anycast locator.

  • TI-LFA backup: uN SIDs allocated from anycast locators will not be used in constructing TI-LFA backup paths or Microloop Avoidance primary paths. TI-LFA backup and Microloop Avoidance paths for an Anycast locator prefix may terminate on any node advertising that locator, which may be different from the node terminating the original primary path.

  • Flexible algorithm: SRv6 anycast locators may have non-zero algorithm (Flexible Algorithm) values.

Configure SRv6 locators

Define and configure SRv6 locators, which represent IPv6 address spaces and behaviors used for SRv6. A locator configuration is essential for enabling SRv6 routing and forwarding within your network.

Follow these steps to configure SRv6 locators:

Procedure


Step 1

Enable SRv6 and configure a locator globally.

Example:

Router(config)# segment-routing srv6
Router(config-srv6)# locators
Router(config-srv6-locators)# locator myLoc1
Router(config-srv6-locator)# micro-segment behavior unode psp-usd
Router(config-srv6-locator)# prefix 2001:0:8::/48

You need to configure the locator prefix value, specify the locator as a micro-segment (uSID) locator and specify that IGP underlay uSID (uN/uA) variant is PSP-USD for this locator.

  • To configure a locator with a flexible algorithm:

    Router(config)# segment-routing srv6
    Router(config-srv6)# locators
    Router(config-srv6-locators)# locator myLocAlgo128
    Router(config-srv6-locator)# algorithm 128
    Router(config-srv6-locator)# micro-segment behavior unode psp-usd
    Router(config-srv6-locator)# prefix 2001:0:88::/48
    
  • To configure an anycast locator:

    
    Router(config)# segment-routing srv6
    Router(config-srv6)# locators
    Router(config-srv6-locators)# locator myLocAnycast
    Router(config-srv6-locator)# anycast
    Router(config-srv6-locator)# micro-segment behavior unode psp-usd
    Router(config-srv6-locator)# prefix 2001:0:100::/48
    
  • To advertise anycast prefixes on an interface

    Router(config)# router isis core
    Router(config-isis)# interface Loopback100
    Router(config-isis-if)# prefix-attributes anycast level 1
    
  • To configure an SRv6-TE locator and binding SID:

    Router#configure
    Router(config)#segment-routing traffic-eng 
    Router(config-sr-te)#srv6 locator loc1 binding-sid dynamic behavior ub6-encaps-reduced

Step 2

(Optional) Customize SRv6 logging and SID allocation parameters.

Example:

Router(config)# segment-routing srv6 
Router(config-srv6)# logging locator status
Router(config-srv6)# sid holdtime 10
RP/0/RSP0/CPU0:Node1(config-srv6)#

Step 3

Verify overall SRv6 state and platform capabilities using SRv6 manager.

Example:

Router# SF-D#sh segment-routing srv6 manager 
Parameters:
  SRv6 Enabled: No
  SRv6 Operational Mode: None
  Encapsulation:
    Source Address:
      Configured: ::
      Default: 77::77
    Hop-Limit: Default
    Traffic-class: Default
    SID Formats:
      f3216 <32B/16NFA> (2)
    uSID LIB Range:
    LIB Start : 0xe000
    ELIB Start : 0xfe00
    uSID WLIB Range:
    EWLIB Start : 0xfff7
Summary:
  Number of Locators: 0 (0 operational)
  Number of SIDs: 0 (0 stale)
  Max SID resources: 24000
  Number of free SID resources: 24000
  OOR:
    Thresholds (resources): Green 1200, Warning 720
    Status: Resource Available
      History: (0 cleared, 0 warnings, 0 full)
Platform Capabilities:
  SRv6: Yes
  TILFA: Yes
  Microloop-Avoidance: Yes
  Endpoint behaviors:
    End.DT6
    End.DT4
    End.DT46
    End (PSP/USD)
    End.X (PSP/USD)
    uN (PSP/USD)
    uA (PSP/USD)
    uDT6
    uDT4
    uDT46
Headend behaviors:
  H.Insert.Red
  H.Encaps.Red
Security rules:
  SEC-1
  SEC-2
  SEC-3
Counters:
  None
Signaled parameters:
  Max-SL : 3
  Max-End-Pop-SRH : 3
  Max-H-Insert : 0 sids
  Max-H-Encap : 2 sids
  Max-End-D : 5
Configurable parameters (under srv6):
  Ranges:
   LIB : Yes
   WLIB : Yes
  Encapsulation:
    Source Address: Yes
    Hop-Limit : value=No, propagate=Yes
    Traffic-class : value=No, propagate=Yes
    Default parameters (under srv6):
  Encapsulation:
    Hop-Limit : value=128, propagate=No
    Traffic-class : value=0, propagate=No
    Max Locators: 16
    Max SIDs: 24000
    SID Holdtime: 3 mins
Router# :SF-D#

Step 4

Verify the locator configuration and its operational status.

Example:

Router# show segment-routing srv6 locator myLoc1 detail 

Name                  ID       Algo  Prefix                    Status   Flags
--------------------  -------  ----  ------------------------  -------  --------
myLoc1                3        0     2001:0:8::/48             Up       U
  (U): Micro-segment (behavior: uN (PSP/USD))
  Interface:
    Name: srv6-myLoc1
    IFH : 0x02000120
    IPv6 address: 2001:0:8::/48
  Number of SIDs: 1
  Created: Dec 10 21:26:54.407 (02:52:26 ago)

Step 5

Verify local SID allocation from locators.

Displays allocation information for SIDs belonging to a locator

Example:

Router# show segment-routing srv6 locator myLoc1 sid
SID                         Behavior          Context                           Owner               State  RW
--------------------------  ----------------  ------------------------------    ------------------  -----  --
2001:0:8::                  uN (PSP/USD)      'default':1                       sidmgr              InUse  Y

Step 6

View the detailed information for a specific SRv6 local SID.

Example:

Router# show segment-routing srv6 locator myLoc1 sid 2001:0:8:: detail
SID                         Behavior          Context                           Owner               State  RW
--------------------------  ----------------  ------------------------------    ------------------  -----  --
2001:0:8::                  uN (PSP/USD)      'default':8                       sidmgr              InUse  Y
  SID Function: 0x8
  SID context: { table-id=0xe0800000 ('default':IPv6/Unicast), opaque-id=8 }
  Locator: 'myLoc1'
  Allocation type: Dynamic
  Created: Dec 10 22:10:51.596 (02:10:05 ago)


What to do next

You can use these show commands to verify the SRv6 global and locator configuration:

Command

Description

show segment-routing srv6 manager

Displays the summary information from SRv6 manager, including platform capabilities.

show segment-routing srv6 locator locator-name [detail]

Displays the SRv6 locator information on the router.

show segment-routing srv6 locator locator-name sid [[sid-ipv6-address [detail]

Displays the information regarding SRv6 local SID(s) allocated from a given locator.

show segment-routing srv6 sid [sid-ipv6-address | all | stale] [detail]

Displays SID information across locators. By default, only “active” (i.e. non-stale) SIDs are displayed.

show route ipv6 local-srv6

Displays all SRv6 local-SID prefixes in IPv6 RIB.