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

Configure SRv6 locators

Want to summarize with AI?

Log in

Explains how to configure SRv6 locators that define IPv6 address spaces and provide the foundation for SID allocation, routing, and traffic forwarding.


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

  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
  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)#
    
    
  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#
    
  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)
    
    
  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
    
    
  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.