B Segment Routing CG Asr9000 711x
B Segment Routing CG Asr9000 711x
Americas Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 527-0883
THE SPECIFICATIONS AND INFORMATION REGARDING THE PRODUCTS IN THIS MANUAL ARE SUBJECT TO CHANGE WITHOUT NOTICE. ALL STATEMENTS,
INFORMATION, AND RECOMMENDATIONS IN THIS MANUAL ARE BELIEVED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED. USERS MUST TAKE FULL RESPONSIBILITY FOR THEIR APPLICATION OF ANY PRODUCTS.
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH
THE PRODUCT AND ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE SOFTWARE LICENSE OR LIMITED WARRANTY,
CONTACT YOUR CISCO REPRESENTATIVE FOR A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the University of California, Berkeley (UCB) as part of UCB's public domain version of
the UNIX operating system. All rights reserved. Copyright © 1981, Regents of the University of California.
NOTWITHSTANDING ANY OTHER WARRANTY HEREIN, ALL DOCUMENT FILES AND SOFTWARE OF THESE SUPPLIERS ARE PROVIDED “AS IS" WITH ALL FAULTS.
CISCO AND THE ABOVE-NAMED SUPPLIERS DISCLAIM ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THOSE OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OR ARISING FROM A COURSE OF DEALING, USAGE, OR TRADE PRACTICE.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT
LIMITATION, LOST PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network
topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional
and coincidental.
All printed copies and duplicate soft copies of this document are considered uncontrolled. See the current online version for the latest version.
Cisco has more than 200 offices worldwide. Addresses and phone numbers are listed on the Cisco website at www.cisco.com/go/offices.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL:
https://www.cisco.com/c/en/us/about/legal/trademarks.html. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a
partnership relationship between Cisco and any other company. (1721R)
© 2023 Cisco Systems, Inc. All rights reserved.
CONTENTS
PREFACE Preface xv
Changes to This Document xv
Communications, Services, and Additional Information xv
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
iii
Contents
SRv6-Services: EVPN ELAN Layer 2 Gateway With Automated Steering To Flexible Algorithm
Paths 90
SRv6 ESI Filtering 96
SRv6 Services: L3 EVPN 98
SRv6 Services: L2 and L3 Services with Remote SIDs from W-LIB 101
SRv6 Services: L2 EVPN Services with Local SIDs from W-LIB 104
SRv6-Services: L3 Services with Local SIDs from W-LIB 107
SRv6/MPLS L3 Service Interworking Gateway 112
L3 EVPN/SRv6 and L3 EVPN/MPLS Interworking Gateway 116
L3 EVPN/SRv6 and L3VPN/MPLS Interworking Gateway 119
SRv6/MPLS Dual-Connected PE 122
SRv6 Provider Edge (PE) Lite Support 124
SRv6 SID Information in BGP-LS Reporting 130
DHCPv4 Relay Agent and Proxy Support over SRv6 130
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
iv
Contents
CHAPTER 5 Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs 145
Segment Routing over IPv6 Overview 145
Configuring SRv6 under IS-IS 154
Configuring SRv6 IS-IS Flexible Algorithm 155
Configuring SRv6 IS-IS TI-LFA 157
Configuring SRv6 IS-IS Microloop Avoidance 160
SRv6 Services: IPv4 L3VPN 161
SRv6 Services: IPv6 L3VPN 169
SRv6 Services: IPv4 L3VPN Active-Standby Redundancy using Port-Active Mode 178
SRv6 Services for L3VPN Active-Standby Redundancy using Port-Active Mode: Operation 179
Configure SRv6 Services L3VPN Active-Standby Redundancy using Port-Active Mode 179
Configuration Example 179
Running Configuration 180
Verification 180
SRv6 Services: BGP Global IPv4 182
SRv6 Services: BGP Global IPv6 185
SRv6 Services: EVPN VPWS — All-Active Multi-Homing 191
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
v
Contents
CHAPTER 7 Configure Segment Routing Global Block and Segment Routing Local Block 243
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
vi
Contents
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
vii
Contents
SR-ODN/Automated Steering Support at ASBR for L3VPN Inter-AS Option B and L3VPN Inline
Route Reflector 321
SR-ODN Configuration Steps 325
Configuring SR-ODN: Examples 327
Configuring SR-ODN for EVPN-VPWS: Use Case 336
Manually Provisioned SR Policy 357
PCE-Initiated SR Policy 357
Cumulative Metric Bounds (Delay-Bound Use-Case) 358
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
viii
Contents
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
ix
Contents
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
x
Contents
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
xi
Contents
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
xii
Contents
MPLS Ping and Traceroute for BGP and IGP Prefix-SID 767
Examples: MPLS Ping, Traceroute, and Tree Trace for Prefix-SID 768
MPLS LSP Ping and Traceroute Nil FEC Target 770
Examples: LSP Ping and Traceroute for Nil_FEC Target 770
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
xiii
Contents
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
xiv
Preface
From Release 6.1.2 onwards, Cisco introduces support for the 64-bit Linux-based IOS XR operating system.
Extensive feature parity is maintained between the 32-bit and 64-bit environments. Unless explicitly marked
otherwise, the contents of this document are applicable for both the environments. For more details on Cisco
IOS XR 64 bit, refer to the Release Notes for Cisco ASR 9000 Series Routers, Release 6.1.2 document.
The Segment Routing Configuration Guide for Cisco ASR 9000 Series Aggregation Services Routers preface
contains these sections:
• Changes to This Document, on page xv
• Communications, Services, and Additional Information, on page xv
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
xv
Preface
Preface
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
xvi
CHAPTER 1
New and Changed Information for Segment
Routing Features
This table summarizes the new and changed feature information for the Segment Routing Configuration Guide
for Cisco ASR 9000 Aggregation Services Routers , and lists where they are documented.
• New and Changed Segment Routing Features, on page 1
Configure Segment Lists This feature was Release 7.11.1 Configure Segment Lists
to Activate Candidate introduced to Activate Candidate
Paths in SRv6 for PM Paths in SRv6 for PM
Liveness Liveness, on page 660
Configure Flow Labels in This feature was Release 7.11.1 Configure Flow Labels in
SRv6 Header for PM introduced SRv6 Header for PM
Liveness Liveness, on page 663
SRv6 ESI Filtering This feature was Release 7.11.1 SRv6 ESI Filtering
introduced
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
1
New and Changed Information for Segment Routing Features
New and Changed Segment Routing Features
SR-TE Explicit Path with This feature was Release 7.11.1 Explicit Path with a BGP
a BGP Prefix SID as First introduced Prefix SID as First
Segment Segment
IS-IS Flexible Algorithm This feature was Release 7.11.1 Flexible Algorithm with
with Exclude Minimum introduced Exclude Minimum
Bandwidth Constraint Bandwidth Constraint
IS-IS Flexible Algorithm This feature was Release 7.11.1 Flexible Algorithm with
with Exclude Maximum introduced Exclude Maximum Delay
Delay Constraint Constraint
Maximum Paths Per IS-IS This feature was Release 7.11.1 Maximum Paths Per IS-IS
Flexible Algorithm Per introduced Flexible Algorithm Per
Prefix Prefix
Microloop Avoidance for This feature was Release 7.11.1 Microloop Avoidance for
IS-IS with Per-Prefix introduced IS-IS with Per-Prefix
Filtering Filtering
Microloop Avoidance for This feature was Release 7.11.1 Configure Segment
OSPFv2 Single-Node introduced Routing Microloop
Cost-in and Single-Node Avoidance for OSPF
Cost-out Events
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
2
CHAPTER 2
YANG Data Models for Segment Routing Features
This chapter provides information about the YANG data models for Segment Routing features.
• Using YANG Data Models, on page 3
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
3
YANG Data Models for Segment Routing Features
Using YANG Data Models
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
4
CHAPTER 3
About Segment Routing
Note Segment Routing is not supported on 1st generation Cisco ASR 9000 Ethernet Line Cards or the Cisco ASR
9000 SIP-700 SPA Interface Processor. Refer to the Cisco ASR 9000 Ethernet Line Card Installation Guide
for details about 1st generation line cards.
• Scope, on page 5
• Need, on page 6
• Benefits, on page 6
• Workflow for Deploying Segment Routing, on page 7
Scope
Segment routing is a method of forwarding packets on the network based on the source routing paradigm.
The source chooses a path and encodes it in the packet header as an ordered list of segments. Segments are
an identifier for any type of instruction. For example, topology segments identify the next hop toward a
destination. Each segment is identified by the segment ID (SID) consisting of a flat unsigned 20-bit integer.
Segments
Interior gateway protocol (IGP) distributes two types of segments: prefix segments and adjacency segments.
Each router (node) and each link (adjacency) has an associated segment identifier (SID).
• A prefix SID is associated with an IP prefix. The prefix SID is manually configured from the segment
routing global block (SRGB) range of labels, and is distributed by IS-IS or OSPF. The prefix segment
steers the traffic along the shortest path to its destination. A node SID is a special type of prefix SID that
identifies a specific node. It is configured under the loopback interface with the loopback address of the
node as the prefix.
A prefix segment is a global segment, so a prefix SID is globally unique within the segment routing
domain.
• An adjacency segment is identified by a label called an adjacency SID, which represents a specific
adjacency, such as egress interface, to a neighboring router. An adjacency SID can be allocated dynamically
from the dynamic label range or configured manually from the segment routing local block (SRLB) range
of labels. The adjacency SID is distributed by IS-IS or OSPF. The adjacency segment steers the traffic
to a specific adjacency.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
5
About Segment Routing
Need
An adjacency segment is a local segment, so the adjacency SID is locally unique relative to a specific
router.
By combining prefix (node) and adjacency segment IDs in an ordered list, any path within a network can be
constructed. At each hop, the top segment is used to identify the next hop. Segments are stacked in order at
the top of the packet header. When the top segment contains the identity of another node, the receiving node
uses equal cost multipaths (ECMP) to move the packet to the next hop. When the identity is that of the receiving
node, the node pops the top segment and performs the task required by the next segment.
Dataplane
Segment routing can be directly applied to the Multiprotocol Label Switching (MPLS) architecture with no
change in the forwarding plane. A segment is encoded as an MPLS label. An ordered list of segments is
encoded as a stack of labels. The segment to process is on the top of the stack. The related label is popped
from the stack, after the completion of a segment.
Services
Segment Routing integrates with the rich multi-service capabilities of MPLS, including Layer 3 VPN (L3VPN),
Virtual Private Wire Service (VPWS), Virtual Private LAN Service (VPLS), and Ethernet VPN (EVPN).
Need
With segment routing for traffic engineering (SR-TE), the network no longer needs to maintain a per-application
and per-flow state. Instead, it simply obeys the forwarding instructions provided in the packet.
SR-TE utilizes network bandwidth more effectively than traditional MPLS-TE networks by using ECMP at
every segment level. It uses a single intelligent source and relieves remaining routers from the task of calculating
the required path through the network.
Benefits
• Ready for SDN: Segment routing was built for SDN and is the foundation for Application Engineered
Routing (AER). SR prepares networks for business models, where applications can direct network
behavior. SR provides the right balance between distributed intelligence and centralized optimization
and programming.
• Minimal configuration: Segment routing for TE requires minimal configuration on the source router.
• Load balancing: Unlike in RSVP-TE, load balancing for segment routing can take place in the presence
of equal cost multiple paths (ECMPs).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
6
About Segment Routing
Workflow for Deploying Segment Routing
• Supports Fast Reroute (FRR): Fast reroute enables the activation of a pre-configured backup path
within 50 milliseconds of path failure.
• Plug-and-Play deployment: Segment routing policies are interoperable with existing MPLS control
and data planes and can be implemented in an existing deployment.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
7
About Segment Routing
Workflow for Deploying Segment Routing
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
8
CHAPTER 4
Configure Segment Routing over IPv6 (SRv6) with
Micro-SIDs
Note IOS XR release 7.3.2 supports SRv6 with Full-length SID and Micro-SID formats; however, only one format
is supported in the network at a time.
To use SRv6 Micro-SID (uSID), globally enable SRv6 and configure the 48-bit locator. See Configuring
SRv6, on page 26.
To use SRv6 Full-length SID, see the Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs,
on page 145.
Segment Routing for IPv6 (SRv6) is the implementation of Segment Routing over the IPv6 dataplane.
• Segment Routing over IPv6 Overview, on page 10
• SRv6 Micro-Segment (uSID), on page 14
• Usage Guidelines and Limitations, on page 25
• Configuring SRv6, on page 26
• Configuring SRv6 under IS-IS, on page 31
• Configuring SRv6 Flexible Algorithm under IS-IS, on page 33
• Configuring SRv6 Locator Prefix Summarization, on page 35
• Configuring TI-LFA with SRv6 IS-IS, on page 35
• Configuring SRv6 IS-IS Microloop Avoidance, on page 38
• Configuring Static SIDs, on page 39
• Configuring Explicit SRv6 uSID Allocation Start Range, on page 44
• Configuring SRv6 BGP-Based Services, on page 45
• SRv6/MPLS L3 Service Interworking Gateway, on page 112
• L3 EVPN/SRv6 and L3 EVPN/MPLS Interworking Gateway, on page 116
• L3 EVPN/SRv6 and L3VPN/MPLS Interworking Gateway, on page 119
• SRv6/MPLS Dual-Connected PE, on page 122
• SRv6 Provider Edge (PE) Lite Support, on page 124
• SRv6 SID Information in BGP-LS Reporting, on page 130
• DHCPv4 Relay Agent and Proxy Support over SRv6, on page 130
• DHCPv6 Relay Agent Support over SRv6, on page 131
• Full-Replace Migration to SRv6 Micro-SID, on page 131
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
9
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Segment Routing over IPv6 Overview
The SRv6 SRH is documented in IETF RFC IPv6 Segment Routing Header (SRH).
The SRH is defined as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header | Hdr Ext Len | Routing Type | Segments Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Last Entry | Flags | Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Segment List[0] (128-bit IPv6 address) |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| |
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
10
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Segment Routing over IPv6 Overview
...
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Segment List[n] (128-bit IPv6 address) |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
// //
// Optional Type Length Value objects (variable) //
// //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
In SRv6, a SID represents a 128-bit value, consisting of the following three parts:
• Locator: This is the first part of the SID with most significant bits and represents an address of a specific
SRv6 node.
• Function: This is the portion of the SID that is local to the owner node and designates a specific SRv6
function (network instruction) that is executed locally on a particular node, specified by the locator bits.
• Args: This field is optional and represents optional arguments to the function.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
11
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Segment Routing over IPv6 Overview
• Transit node—A node along the path of the SRv6 packet (IPv6 packet and SRH). The transit node does
not inspect the SRH. The destination address of the IPv6 packet does not correspond to the transit node.
• Endpoint node—A node in the SRv6 domain where the SRv6 segment is terminated. The destination
address of the IPv6 packet with an SRH corresponds to the end point node. The segment endpoint node
executes the function bound to the SID
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
12
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Segment Routing over IPv6 Overview
One of the applications of the USP flavor is when a packet with an SRH is destined to an application on
hosts with smartNICs implementing SRv6. The USP flavor is used to remove the consumed SRH from
the extension header chain before sending the packet to the host.
• Ultimate Segment Decapsulation (USD) variant—The Upper-layer header processing of the End and
End.X behaviors are modified as follows:
• End behavior: If the Upper-layer Header type is 41 (IPv6), then:
1. Remove the outer IPv6 Header with all its extension headers
2. Submit the packet to the egress IPv6 FIB lookup and transmission to the new destination
3. Else, if the Upper-layer Header type is 4 (IPv4)
4. Remove the outer IPv6 Header with all its extension headers
5. Submit the packet to the egress IPv4 FIB lookup and transmission to the new destination
6. Else, process as per Section 4.1.1 (Upper-Layer Header) of IETF RFC 8986 SRv6 Network
Programming
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
13
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Micro-Segment (uSID)
3. Else, process as per Section 4.1.1 (Upper-Layer Header) of IETF RFC 8986 SRv6 Network
Programming
One of the applications of the USD flavor is the case of TI-LFA in P routers with encapsulation with
H.Encaps. The USD flavor allows the last Segment Endpoint Node in the repair path list to decapsulate
the IPv6 header added at the TI-LFA Point of Local Repair and forward the inner packet.
SRv6 Micro-Segment Release 7.3.1 This feature is an extension of the SRv6 architecture.
(uSID) It leverages the existing SRv6 Network Programming
architecture to encode up to six SRv6 Micro-SID
(uSID) instructions within a single 128-bit SID
address. Such a SID address is called a uSID Carrier.
In addition, this feature leverages the existing SRv6
data plane and control plane with no changes. It also
provides low MTU overhead; for example, 6 uSIDs
per uSID carrier results in 18 source-routing
waypoints in only 40 bytes of overhead (in SRH).
The SRv6 micro-segment (uSID) is an extension of the SRv6 architecture. It leverages the SRv6 Network
Programming architecture to encode several SRv6 Micro-SID (uSID) instructions within a single 128-bit SID
address. Such a SID address is called a uSID Carrier.
SRv6 uSID is documented in the IETF drafts Network Programming extension: SRv6 uSID instruction and
Compressed SRv6 Segment List Encoding in SRH.
Throughout this chapter, we will refer to SRv6 micro-segment as “uSID”.
The SRv6 uSID provides the following benefits:
• Leverages the SRv6 Network Programming with no change. SRv6 uSID is a new pseudo code in the
existing SRv6 network programming framework.
• Leverages the SRv6 data plane (SRH) with no change. Any SID in the destination address or SRH can
be an SRv6 uSID carrier.
• Leverages the SRv6 control plane with no change.
• Ultra-Scale—Scalable number of globally unique nodes in the domain, for example:
• 16-bit uSID ID size: 65k uSIDs per domain block
• 32-bit uSID ID size: 4.3M uSIDs per domain block
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
14
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 uSID Terminology
• Hardware-friendliness:
• Leverages mature hardware capabilities (inline IP Destination Address edit, IP Destination Address
longest match).
• Avoids any extra lookup in indexed mapping tables.
• A micro-program with 6 or fewer uSIDs requires only legacy IP-in-IP encapsulation behavior.
• Seamless Deployment:
• A uSID may be used as a SID (the carrier holds a single uSID).
• The inner structure of an SR Policy can stay opaque to the source. A carrier with uSIDs is just seen
as a SID by the policy headend Security.
• Leverages SRv6's native SR domain security.
where:
• uSID Block—An IPv6 prefix that defines a block of SRv6 uSIDs.
• Active uSID—The first uSID that follows the uSID block.
• Next uSID—The next uSID after the Active uSID.
• Last uSID—The last uSID in the carrier before the End-of-Carrier uSID.
• End-of-Carrier —A globally reserved uSID that marks the end of a uSID carrier. The End-of-Carrier
ID is 0000. All empty uSID carrier positions must be filled with the End-of-Carrier ID; therefore,
a uSID carrier can have more than one End-of-Carrier.
The following is an example of an SRH with 3 Micro-SID carriers for a total of up to 18 micro-instructions:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
15
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 uSID Carrier Format
The uSID carrier format is specified using the notation "Fbbuu" , where “bb” is size of block and “uu” is size
of ID. For example, "F3216" is a format with a 32-bit uSID block and 16-bit uSID IDs.
Note F3216 is the default format, and the only format that is supported in IOS XR 7.3.1 release.
Wide LIB uSID Release 7.8.1 This feature introduces support for Wide Local ID
Allocation for End.DT46 block (W-LIB).
SRv6 SIDs
W-LIB provides an extended set of IDs available for
local uSID allocation that can be used when a PE with
large-scale pseudowire termination requires more
local uSIDs than provided from the LIB.
W-LIB uSID allocation is supported for End.DT46
SRv6 SIDs.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
16
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 uSID Allocation Within a uSID Block
• Global ID block (GIB): The set of IDs available for globally scoped uSID allocation.
A globally scoped uSID is the type of uSID that provides reachability to a node. A globally scoped uSID
typically identifies a shortest path to a node in the SR domain. An IP route (for example, /48) is advertised
by the parent node to each of its globally scoped uSIDs, under the associated uSID block. The parent
node executes a variant of the END behavior.
The “nodal” uSID (uN) is an example of a globally scoped behavior defined in uSID architecture.
A node can have multiple globally scoped uSIDs under the same uSID blocks (for example, one uSID
per IGP flex-algorithm). Multiple nodes may share the same globally scoped uSID (Anycast).
• Local ID block (LIB): The set of IDs available for locally scoped uSID allocation.
A locally scoped uSID is associated to a local behavior, and therefore must be preceded by a globally
scoped uSID of the parent node when relying on routing to forward the packet.
A locally scoped uSID identifies a local micro-instruction on the parent node; for example, it may identify
a cross-connect to a direct neighbor over a specific interface or a VPN context. Locally scoped uSIDs
are not routeable.
For example, if N1 and N2 are two different physical nodes of the uSID domain and L is a locally scoped
uSID value, then N1 and N2 may bind two different behaviors to L.
• Wide LIB (W-LIB): The extended set of IDs available for local uSID allocation.
The extended set of IDs is useful when a PE with large-scale Pseudowire termination requires more local
uSIDs than provided from the LIB.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
17
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 uSID Allocation Within a uSID Block
With this allocation scheme, the uSID Block FCBB:BB00::/32 supports up to 57343 global uSIDs (routers)
with each router supporting up to 8192 local uSIDs.
For example, the following picture depicts the global uSIDs allocated for 3 nodes within the SRv6 domain.
Looking further into R1, this node also has Local uSIDs associated with uA end-point behaviors:
• Function ID 0xE000 – cross-connect to L3 neighbor R2
• Function ID 0xE001 – cross-connect to L3 neighbor R3
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
18
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 uSID Allocation Within a uSID Block
• Remote W-LIB
• An SRv6 headend node is capable of receiving and installing remote SIDs with Wide (32-bit)
functions
• Remote W-LIB is supported for Layer 3 (VPN/BGP global) and Layer 2 EVPN services
(ELINE/ELAN)
The range of IDs supported by the Cisco IOS XR implementation are as follows:
• The range of IDs in the GIB is 0x000 to 0xDFFF.
• The range of IDs by default in the LIB is divided as follows:
• Dynamic: 0xE000 to 0xFDFF
• Explicit: 0xFE00 to 0xFEFF
• Reserved: 0xFF00 to 0xFFEF and 0xFFF8 to 0xFFFF
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
19
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Endpoint Behaviors Associated with uSID
Figure 2: GIB/LIB/W-LIB
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
20
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 uSID in Action - Example
• 16-bit SRv6 ID
For example:
• Node 7 uN = fcbb:bb01:0700::/48
• Node 8 uN = fcbb:bb01:0800::/48
Node 1 encapsulates an IPv4 packet from VPN Site A and sends an IPv6 packet with destination address
fcbb:bb01:0800:0700:0200:f001:0000:0000. This is a uSID carrier, with a list of micro-instructions (uSIDs)
(0800, 0700, 0200, f001, and 0000 – indicating the end of the instruction).
uSIDs (uNs) 0800, 0700, 0200 are used to realize the traffic engineering path to Node 2 with way points at
Nodes 8 and 7. uSID f001 is the BGP-signalled instruction (uDT4) advertized by Node 2 for the VPNv4
service
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
21
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 uSID in Action - Example
Nodes 4 and 5 simply forward the packet along the shortest path to Node 8, providing seamless deployment
through classic IPv6 nodes.
Figure 5: Node 4 and Node 5: Classic IPv6 Nodes
When Node 8 receives the packet, it performs SRv6 uN behavior (shift-and-lookup with PSP/USD). It removes
its outer DA (0800) and advances the micro program to the next micro instruction by doing the following:
1. Pops its own uSID (0800)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
22
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 uSID in Action - Example
When Node 7 receives the packet, it performs the same SRv6 uN behavior (shift-and-lookup with PSP/USD),
forwarding it using the new DA fcbb:bb01:0200:f001:0000:0000:0000:0000
Figure 7: Node 7: SRv6 uN Behavior (Shift and Forward)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
23
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 uSID in Action - Example
Nodes 6 and 3 simply forward the packet along the shortest path to Node 2, providing seamless deployment
through classic IPv6 nodes.
Figure 8: Node 6 and Node 3: Classic IPv6 Nodes
When Node 2 receives the packet, it performs an SRv6 uDT4 behavior (End.DT4—Endpoint with decapsulation
and IPv4 table lookup) to VPNv4 Site B.
Figure 9: Node 2: SRv6 uDT4 Behavior
To recap, this example showed an integrated VPN and Traffic Engineering use-case, where VPNv4 site A
connected to Node 1 sent packets to VPNv4 site B connected to Node 2 alongside a traffic engineered path
via Node 8 and Node 7 using a single 128-bit SRv6 SID:
• @1: inner packet P encapsulated with outer DA fcbb:bb01:0800:0700:0200:f001:0000:0000
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
24
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Usage Guidelines and Limitations
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
25
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6
Note Allocation from the public Global Unicast Addresses (GUA) range is also supported.
For example:
• ULA /24 base = FC00:01/24
• uSID block space = 64 uSID blocks (from FC00:0100/32 to FC00:013F/32)
Note SRv6 with ACL Chaining is supported for permit and deny ACL traffic options only.
On fourth and fifth generations of the Cisco ASR 9000 Series High-Density Ethernet line cards, enabling
SRv6 and BGP Flowspec or local policy-based routing (PBR) is not supported.
This release supports the following SID Encap budget:
• P role:
• Underlay H-Insert: 12 sids (2 carriers with 6 sids per carrier)
• PE role:
• Underlay H-Insert: 12 sids (2 carriers with 6 sids per carrier)
• Overlay H-Encaps: 3 sids (1 carrier with 3 sids per carrier)
Configuring SRv6
Enabling SRv6 involves the following high-level configuration steps:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
26
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6
An SRv6 Anycast locator is a type of locator that identifies a set of nodes (uN SIDs). SRv6 Anycast Locators
and their associated uN SIDs may be provisioned at multiple places in a topology.
The set of nodes (Anycast group) is configured to advertise a shared Anycast locator and uN SID. Anycast
routing enables the steering of traffic toward multiple advertising nodes. Packets addressed to an Anycast
address are forwarded to the topologically nearest nodes.
One use case is to advertise Anycast uN SIDs at exit points from an SRv6 network. Any of the nodes that
advertise the common uN SID could be used to forward traffic out of the SRv6 portion of the network to the
topologically nearest node.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
27
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6
Use the following commands to configure the Anycast locator and advertise Anycast prefixes associated with
an interface.
• segment-routing srv6 locators locator locator anycast—Configure the Anycast locator
• router isis instance-id interface Loopback instance prefix-attributes anycast level level—Advertise
the Anycast prefixes associated with an interface.
Example 1:
The following example shows how to globally enable SRv6 and configure a locator.
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
Example 2:
The following example shows how to configure Flexible Algorithm associated with locator.
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
Example 3:
The following example shows how to configure 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
The following example shows how to advertise the Anycast prefixes associated with an interface.
Router(config)# router isis core
Router(config-isis)# interface Loopback100
Router(config-isis-if)# prefix-attributes anycast level 1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
28
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6
Example 4:
The following example shows how to configure optional SRv6 parameters:
RP/0/RSP0/CPU0:Node1(config)# segment-routing srv6 encapsulation
RP/0/RSP0/CPU0:Node1(config-srv6-encap)# source-address 1::1
RP/0/RSP0/CPU0:Node1(config-srv6-encap)# hop-limit 60
RP/0/RSP0/CPU0:Node1(config-srv6-encap)# traffic-class propagate
RP/0/RSP0/CPU0:Node1(config-srv6-encap)# evpn next-header 65
RP/0/RSP0/CPU0:Node1(config-srv6-encap)# exit
RP/0/RSP0/CPU0:Node1(config-srv6)# logging locator status
RP/0/RSP0/CPU0:Node1(config-srv6)# sid holdtime 10
RP/0/RSP0/CPU0:Node1(config-srv6)#
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
29
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6
Hop-Limit: Default
Traffic-class: Default
Summary:
Number of Locators: 3 (3 operational)
Number of SIDs: 3 (0 stale)
Max SIDs: 64000
OOR:
Thresholds: Green 3200, Warning 1920
Status: Resource Available
History: (0 cleared, 0 warnings, 0 full)
Block 2001::/32:
Number of SIDs free: 7680
Max SIDs: 7680
Thresholds: Green 384, Warning 231
Status: Resource Available
History: (0 cleared, 0 warnings, 0 full)
Platform Capabilities:
SRv6: Yes
TILFA: Yes
Microloop-Avoidance: Yes
Endpoint behaviors:
End (PSP)
End.X (PSP)
End.DX6
End.DX4
End.DT6
End.DT4
End.OP
uN (PSP/USD)
uA (PSP/USD)
uDT6
uDT4
uDX2
uB6 (Insert.Red)
Headend behaviors:
T
H.Insert.Red
H.Encaps.Red
Security rules:
SEC-1
SEC-2
SEC-3
Counters:
CNT-1
CNT-3
Signaled parameters:
Max-SL : 3
Max-End-Pop-SRH : 3
Max-H-Insert : 3 sids
Max-H-Encap : 3 sids
Max-End-D : 4
Configurable parameters (under srv6):
Encapsulation:
Source Address: Yes
Hop-Limit : value=Yes, propagate=No
Traffic-class : value=Yes, propagate=Yes
Max SIDs: 64000
SID Holdtime: 3 mins
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
30
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6 under IS-IS
The following example shows how to display detail information regarding an allocated SRv6 local SID.
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)
Similarly, you can display SID information across locators by using the show segment-routing srv6 sid
command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
31
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6 Locator Metric and Tag
2. Learns remote locator prefixes from other IS-IS neighbor routers and installs the learned remote locator
IPv6 prefix in RIB or FIB.
3. Allocate or learn prefix SID and adjacency SIDs, create local SID entries, and advertise them in the IGP
domain.
Note If no level is specified, local locators will be advertised into all configured ISIS levels. Ensure that locators
are included in the redistribution or propagation policy to prevent potential loops when redistributing between
multiple instances or propagating between Level 2 and Level 1.
For more information about configuring IS-IS, refer to the "Implementing IS-IS" chapter in the Routing
Configuration Guide for Cisco ASR 9000.
Running Configuration
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
32
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6 Flexible Algorithm under IS-IS
The following section shows how to configure two SRv6 locators: one associated with Algo 0, and the other
associated with Algo 128.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
33
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6 Flexible Algorithm under IS-IS
Router(config-srv6-locator)# exit
The following section shows how to assign multiple SRv6 locators under IS-IS.
The following section shows how to configure the Flexible Algorithm definition.
The following section shows how to configure the delay probe under the interface.
Router(config)# performance-measurement
Router(config-perf-meas)# interface GigabitEthernet0/0/0/0
Router(config-pm-intf)# delay-measurement
Router(config-pm-intf-dm)# commit
Verification
Router# show segment-routing srv6 locator
Flex-Algo 128:
Level-2:
Definition Priority: 128
Definition Source: Router.00, (Local)
Definition Equal to Local: Yes
Disabled: No
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
34
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6 Locator Prefix Summarization
Level-1:
Definition Priority: 128
Definition Source: Router.00, (Local)
Definition Equal to Local: Yes
Disabled: No
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
35
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring TI-LFA with SRv6 IS-IS
TI-LFA provides link, node, and Shared Risk Link Groups (SRLG) protection in any topology.
For more information, see Configure Topology-Independent Loop-Free Alternate (TI-LFA), on page 713.
Verification
This example shows how to verify the SRv6 IS-IS TI-LFA configuration using the show isis ipv6 fast-reroute
ipv6-prefix detail command.
Router# show isis ipv6 fast-reroute cafe:0:2::2/128 detail
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
36
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring TI-LFA with SRv6 IS-IS
Weight: 0, Metric: 40
P node: Node4.00 [cafe:0:4::4], SRv6 SID: cafe:0:4:: uN (PSP/USD)
Backup-src: Node2.00
P: No, TM: 40, LC: No, NP: No, D: No, SRLG: Yes
src Node2.00-00, cafe:0:2::2
This example shows how to verify the SRv6 IS-IS TI-LFA configuration using the show route ipv6 ipv6-prefix
detail command.
Router# show route ipv6 cafe:0:2::2/128 detail
Tue Feb 23 23:08:48.151 UTC
This example shows how to verify the SRv6 IS-IS TI-LFA configuration using the show cef ipv6 ipv6-prefix
detail location location command.
Router# show cef ipv6 cafe:0:2::2/128 detail location 0/0/cpu0
Tue Feb 23 23:09:07.719 UTC
cafe:0:2::2/128, version 66, SRv6 Headend, internal 0x1000001 0x210 (ptr 0x8e96fd2c) [1],
0x0 (0x8e93fae0), 0x0 (0x8f7510a8)
Updated Feb 23 22:57:38.904
local adjacency to HundredGigE0/0/0/0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
37
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6 IS-IS Microloop Avoidance
SRv6 IS-IS Microloop Avoidance Release 7.3.1 The SRv6 Microloop Avoidance
with Flexible Algorithm feature detects and addresses
microloops that (might) occur after
a topology change.
This feature introduces support for implementing microloop avoidance using IS-IS SRv6.
Microloops are brief packet loops that occur in the network following a topology change (link down, link up,
or metric change events). Microloops are caused by the non-simultaneous convergence of different nodes in
the network. If nodes converge and send traffic to a neighbor node that has not converged yet, traffic may be
looped between these two nodes, resulting in packet loss, jitter, and out-of-order packets.
The SRv6 Microloop Avoidance feature detects if microloops are possible following a topology change. If a
node computes that a microloop could occur on the new topology, the node creates a loop-free SR-TE policy
path to the destination using a list of segments. After the RIB update delay timer expires, the SR-TE policy
is replaced with regular forwarding paths.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
38
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring Static SIDs
Note Complete the Configuring SRv6, on page 26 before performing these steps.
Manually allocated (static) Adj-SIDs are persistent over reloads and restarts, making them a reliable option
to be used in explicit paths. They can be provisioned for multiple adjacencies to the same neighbor or to
different neighbors.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
39
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring Static Adjacency SIDs
You can specify that the Adj-SID is protected. If the Adj-SID is protected on the primary interface and a
backup path is available, a backup path is installed. By default, static Adj-SIDs are not protected.
• Static Adj-SIDs are allocated independent of IS-IS. If a static Adj-SID is successfully allocated, then the
SID Manager notifies IS-IS. IS-IS then claims the allocated static Adj-SID and installs the Adj-SID in
RIB or FIB.
• If you remove the static Adj-SID configuration, the SID Manager does not clear the allocated static
Adj-SID; IS-IS will continue to use the allocated static Adj-SID. This is expected behavior. If you
configure a different static Adj-SID, SID manager resolves the conflict and installs the new Adj-SID and
notifies IS-IS.
• Static Adj-SID allocation does not follow the interface manager (IM) interface state. The static Adj-SID
will be allocated even if the interface is down or doesn't exist in the system. However, the static Adj-SID
is not installed in forwarding, since IS-IS didn't claim this Adj-SID.
• Static Adj-SID follows the locator state. Static Adj-SID allocation will fail if the locator is down or
invalid.
• Static Adj-SID can be allocated as a protected Adj-SID.
• Static Adj-SID can be allocated to a specific algorithm.
Configuration
Use the segment-routing srv6 static endpoint command to configure static adjacency SID and SID allocation
context.
Use the sid <srv6-sid> behavior end-ua-psp-usd command in srv6-static-endpoint config mode to configure
the static Adj SID and endpoint behavior.
Use the allocation-context nexthop <nhop-int> [algo-id <algo> | protected] command in srv6-static-sid
config mode to configure the next-hop interface. You can also configure the following options:
• algo-id algo — Specify a Flex Algo value for the static Adj-SID. Valid values for algo are 128 to 255;
the default is 0 (SPF).
• protected — Specify if the static Adj-SID is protected
Example
Router(config)# segment-routing
Router(config-sr)# srv6
Router(config-srv6)# static
Router(config-srv6-static)# endpoint
Router(config-srv6-static-endpoint)# sid fccc:0:200:fe01:: behavior end-ua-psp-usd
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
40
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring Explicit End.DT46 SRv6 SIDs
Running Configuration
segment-routing
srv6
static
endpoint
sid fccc:0:200:fe01:: behavior end-ua-psp-usd
allocation-context nexthop TenGigE0/1/0/30/1
!
sid fccc:0:200:fe88:: behavior end-ua-psp-usd
allocation-context nexthop TenGigE0/1/0/0/3 protected
!
sid fccc:3a:200:fe01:: behavior end-ua-psp-usd
allocation-context nexthop TenGigE0/1/0/0/3 algo-id 132 protected
!
Support for End.DT46 Release 7.8.1 This feature adds support for the “Endpoint with
SRv6 Endpoint Behavior decapsulation and specific IP table lookup” SRv6
end-point behavior (End.DT46).
The End.DT46 behavior is used for dual-stack
L3VPNs. This behavior is equivalent to the single
per-VRF VPN label (for IPv4 and IPv6) in MPLS.
Support for Explicit Release 7.8.1 This feature allows you to configure explicit SIDs
End.DT46 SRv6 SIDs associated with SRv6-based L3VPN/Internet BGP
services. In previous releases, these SIDs were only
allocated dynamically by BGP.
Explicit End.DT46 SRv6 SIDs are persistent over
reloads and restarts.
Explicit End.DT46 SRv6 SIDs are persistent over reloads and restarts.
Multiple explicit uDT46 IDs allocated from the LIB or W-LIB range can be created under the same SRv6
locator. Each ID is uniquely associated to a VRF.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
41
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring Explicit End.DT46 SRv6 SIDs
Note See GIB and LIB – IOS-XR Implementation, on page 19 for information about the LIB and W-LIB
An explicit uDT46 ID allocated from the LIB or W-LIB range can be associated to the same VRF under
multiple SRv6 locators.
This association is useful when a look-up under a given VPN table is desired for a node with multiple locators
(for example, unicast and Anycast locators).
The locators can be from the same ID block or different ID blocks:
• When the locators are from the same block, the manual uDT46 IDs for a given VRF must have the same
value across locators.
• When the locators are from different blocks, the manual uDT46 IDs for a given VRF could be either the
same value or different values.
We recommend using the same function ID across locators since it allows for simpler identification to the
associated VRF table.
Example 1: Explicit uDT46 SIDs (LIB) with a common function ID under 2 locators of the same block-id
• Locator 1: fcbb:bb00:10::/48 (unicast locator)
• Locator 2: fcbb:bb00:100::/48 (Anycast locator)
• Explicit function: fe0a
• VRF lookup: VRF-A
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
42
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring Explicit End.DT46 SRv6 SIDs
Example 2: Explicit uDT46 SIDs (LIB) with a common function ID under 2 locators of different block-id
• Locator 1: fcbb:bb00:11::/48 (unicast locator – algo0)
• Locator 2: fcbb:bb01:11::/48 (unicast locator – algo128)
• Explicit function: fe0b
• VRF lookup: VRF-B
Example 3: Explicit uDT46 SIDs (W-LIB) with a common function ID under 2 locators of the same block-id
• Locator 1: fcbb:bb00:10::/48 (unicast locator)
• Locator 2: fcbb:bb00:100::/48 (Anycast locator)
• Explicit function: fff7:d
• VRF lookup: VRF-D
Example 4: Explicit uDT46 SIDs (W-LIB) with a common function ID under 2 locators of different block-id
• Locator 1: fcbb:bb00:11::/48 (unicast locator – algo0)
• Locator 2: fcbb:bb01:11::/48 (unicast locator – algo128)
• Explicit function: fff7:e
• VRF lookup: VRF-E
Configuration
To configure explicit uDT46 IDs allocated from the LIB or W-LIB range, use the router static address-family
ipv6 unicast prefix/ mask segment-routing srv6 endpoint behavior uDT46 vrf vrf-name command:
RP/0/RP0/CPU0:ios(config)# router static
RP/0/RP0/CPU0:ios(config-static)# address-family ipv6 unicast
RP/0/RP0/CPU0:ios(config-static-afi)# fcbb:bb00:10:fe0a::/64 segment-routing srv6 endpoint
behavior uDT46 vrf VRF-A
RP/0/RP0/CPU0:ios(config-static-afi)# fcbb:bb00:100:fe0a::/64 segment-routing srv6 endpoint
behavior uDT46 vrf VRF-A
RP/0/RP0/CPU0:ios(config-static-afi)# fcbb:bb00:11:fff7:d::/80 segment-routing srv6 endpoint
behavior uDT46 vrf VRF-D
RP/0/RP0/CPU0:ios(config-static-afi)# fcbb:bb00:100:fff7:d::/80 segment-routing srv6 endpoint
behavior uDT46 vrf VRF-D
Running Config
router static
address-family ipv6 unicast
fcbb:bb00:10:fe0a::/64 segment-routing srv6 endpoint behavior uDT46 vrf VRF-A
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
43
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring Explicit SRv6 uSID Allocation Start Range
Note When you increase the size of the explicit LIB range, you effectively decrease the number of available IDs
in the dynamic LIB range. For example, if you configure the explicit LIB starting value to 0xE064, the dynamic
LIB range is 0xE000 to 0xE063 (100 IDs).
To modify the start value for the explicit W-LIB, use the following command:
• segment-routing srv6 formats format usid-f3216 usid wide-local-id-block explicit start wlib
-start-value, where wlib-start-value is from 0xFFF0 to 0xFFF7
Example
Use the show segment-routing srv6 manager command to display the default start values of the explicit
LIB and W-LIB:
. . .
The following example shows how to modify the start of the range for explicit LIB and W-LIB:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
44
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6 BGP-Based Services
RP/0/RP0/CPU0:ios(config)# segment-routing
RP/0/RP0/CPU0:ios(config-sr)# srv6
RP/0/RP0/CPU0:ios(config-srv6)# formats
RP/0/RP0/CPU0:ios(config-srv6-fmts)# format usid-f3216
RP/0/RP0/CPU0:ios(config-srv6-fmt)# usid local-id-block explicit start 0xE064
RP/0/RP0/CPU0:ios(config-srv6-fmt)# usid wide-local-id-block explicit start 0xFFF0
Running Config
segment-routing
srv6
formats
format usid-f3216
usid local-id-block explicit start 0xe064
usid wide-local-id-block explicit start 0xfff0
!
!
!
!
Use the show segment-routing srv6 manager command to display the configured starting values of the
explicit LIB and W-LIB:
. . .
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
45
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configuring SRv6 BGP-Based Services
For more information about BGP, refer to the "Implementing BGP" chapter in the Routing Configuration
Guide for Cisco ASR 9000 Series Routers BGP Configuration Guide.
In SRv6-based services, the egress PE signals an SRv6 Service SID with the BGP service route. The ingress
PE encapsulates the payload in an outer IPv6 header where the destination address is the SRv6 Service SID
advertised by the egress PE. BGP messages between PEs carry SRv6 Service SIDs as a means to interconnect
PEs and form VPNs. SRv6 Service SID refers to a segment identifier associated with one of the SRv6
service-specific behaviors advertised by the egress PE router, such as:
• uDT4 (Endpoint with decapsulation and IPv4 table lookup)
• uDT6 (Endpoint with decapsulation and IPv6 table lookup)
• uDX4 (Endpoint with decapsulation and IPv4 cross-connect)
• uDX6 (Endpoint with decapsulation and IPv6 cross-connect)
Based on the messages and procedures defined in IETF draft "SRv6 BGP based Overlay services", BGP
encodes the SRv6 Service SID in the prefix-SID attribute of the corresponding BGP Network Layer Reachability
Information (NLRI) and advertises it to its IPv6 BGP peers.
• uDT4 and uDT6 for L3VPN and BGP global are supported.
• Dual-Stack L3 Services (IPv4 L3VPN, IPv6 L3VPN, IPv4 BGP global, IPv6 BGP global) are supported.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
46
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
For more information on how to configure an SRv6 locator, see Configuring SRv6, on page 26.
For more information on how to assign an SRv6 locator under the BGP service or BGP address-family, see
the following SRv6 Services sections.
Per-Prefix SRv6 Locator Release 7.5.1 This feature provides the ability to
Assignment assign a specific SRv6 locator for
a given prefix or a set of prefixes
(IPv4/IPv6 GRT, IPv4/IPv6 VPN).
The egress PE advertises the prefix
with the specified locator. This
allows for per-prefix steering into
desired transport behaviors, such
as Flex Algo.
Support for iBGP as PE-CE Release 7.5.1 This feature introduces support for
protocol iBGP as PE-CE protocol.
BGP Route Leaking Release 7.5.1 This feature adds support for
importing routes from default-VRF
to non-default VRF and routes from
non-default VRF to default VRF.
Dual-Stack L3VPN Services (IPv4, Release 7.3.2 This feature introduces support for
IPv6) (SRv6 Micro-SID) Dual-stack (VPNv4/VPNv6) VRFs.
VPNv4/VPNv6 Dual-stack
supports both IPv4 (uDT4) and
IPv6 (uDT6) based SRv6 L3VPN
service on the same interface,
sub-interface, or VRF.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
47
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
Running Config
router bgp 100
segment-routing srv6
locator Node1-locator
!
address-family vpnv4 unicast
!
neighbor 3001::1:1:1:4
remote-as 100
address-family vpnv4 unicast
!
!
vrf vrf_cust1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
48
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
rd 100:1
address-family ipv4 unicast
!
!
!
end
• router bgp as-number address-family vpnv4 unicast vrf all segment-routing srv6 locator WORD:
Specify the locator
This example shows how to enable SRv6 and configure the SRv6 locator for all VRFs under VPNv4 Address
Family, with per-VRF label allocation mode:
Node1(config)# router bgp 100
Node1(config-bgp)# address-family vpnv4 unicast
Node1(config-bgp-af)# vrf all
Node1(config-bgp-af-vrfall)# segment-routing srv6
Node1(config-bgp-af-vrfall-srv6)# locator Node1-locator
Node1(config-bgp-af-vrfall-srv6)# alloc mode per-vrf
Node1(config-bgp-af-vrfall-srv6)# exit
Node1(config-bgp-af-vrfall)# exit
Node1(config-bgp-af)# exit
Node1(config-bgp)# neighbor 3001::1:1:1:4
Node1(config-bgp-nbr)# remote-as 100
Node1(config-bgp-nbr)# address-family vpnv4 unicast
Node1(config-bgp-nbr-af)# exit
Node1(config-bgp-nbr)# exit
Node1(config-bgp)# vrf vrf_cust1
Node1(config-bgp-vrf)# rd 100:1
Node1(config-bgp-vrf)# address-family ipv4 unicast
Node1(config-bgp-vrf-af)# commit
Running Config
router bgp 100
address-family vpnv4 unicast
vrf all
segment-routing srv6
locator Node1-locator
alloc mode per-vrf
!
!
!
neighbor 3001::1:1:1:4
remote-as 100
address-family vpnv4 unicast
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
49
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
vrf vrf_cust1
rd 100:1
address-family ipv4 unicast
!
!
!
end
• router bgp as-number vrf WORD address-family ipv4 unicast segment-routing srv6 locator WORD:
Specify the locator
This example shows how to configure the SRv6 locator for an individual VRF, with per-VRF label allocation
mode:
Node1(config)# router bgp 100
Node1(config-bgp)# address-family vpnv4 unicast
Node1(config-bgp-af)# exit
Node1(config-bgp)# neighbor 3001::1:1:1:4
Node1(config-bgp-nbr)# remote-as 100
Node1(config-bgp-nbr)# address-family vpnv4 unicast
Node1(config-bgp-nbr-af)# exit
Node1(config-bgp-nbr)# exit
Node1(config-bgp)# vrf vrf_cust1
Node1(config-bgp-vrf)# rd 100:1
Node1(config-bgp-vrf)# address-family ipv4 unicast
Node1(config-bgp-vrf-af)# segment-routing srv6
Node1(config-bgp-vrf-af-srv6)# locator Node1-locator
Node1(config-bgp-vrf-af-srv6)# alloc mode per-vrf
Node1(config-bgp-vrf-af-srv6)# commit
Running Config
router bgp 100
address-family vpnv4 unicast
!
neighbor 3001::1:1:1:4
remote-as 100
address-family vpnv4 unicast
!
!
vrf vrf_cust1
rd 100:1
address-family ipv4 unicast
segment-routing srv6
locator Node1-locator
alloc mode per-vrf
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
50
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
!
!
end
For more information on configuring routing policies, refer to the "Implementing Routing Policy" chapter in
the Routing Configuration Guide for Cisco ASR 9000 Series Routers.
The following example shows a route policy specifying the SID allocation mode with destination-based match:
Node1(config)# route-policy set_per_prefix_locator_rpl
Node1(config-rpl)# if destination in (10.1.1.0/24) then
Node1(config-rpl-if)# set srv6-alloc-mode per-vrf locator locator1
Node1(config-rpl-if)# elseif destination in (2.2.2.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf locator locator2
Node1(config-rpl-elseif)# elseif destination in (3.3.3.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf
Node1(config-rpl-elseif)# else
Node1(config-rpl-else)# drop
Node1(config-rpl-else)# endif
Node1(config-rpl)# end-policy
Node1(config)#
To specify per-prefix allocation mode for a specific VRF under IPv4 address family, use the following
command:
• router bgp as-number vrf WORD address-family ipv4 unicast segment-routing srv6 alloc mode
route-policy policy_name
This example shows how to configure per-prefix allocation mode for a specific VRF (vrf_cust1) under IPv4
address family
Node1(config)# router bgp 100
Node1(config-bgp)# vrf vrf_cust1
Node1(config-bgp-vrf)# address-family ipv4 unicast
Node1(config-bgp-vrf-af)# segment-routing srv6
Node1(config-bgp-vrf-af-srv6)# alloc mode route-policy set_per_prefix_locator_rpl
Running Configuration
route-policy set_per_prefix_locator_rpl
if destination in (10.1.1.0/24) then
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
51
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
Verify that the local and received SIDs have been correctly allocated under VPNv4 and specific VRF
(vrf_cust1):
Node1# show bgp vpnv4 unicast local-sids
BGP router identifier 10.1.1.1, local AS number 100
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0 RD version: 0
BGP main routing table version 50
BGP NSR Initial initsync version 18 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
52
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
53
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
Verification
The following figure shows a VPNv4 scenario. The sequence of commands included correspond to router
Node1 acting as Ingress PE, and routers Node4 and Node5 acting as Egress PEs.
The following example shows how to verify the SRv6 based L3VPN configuration using the show
segment-routing srv6 sid command.
In this example, we can observe the uDT4 SIDs associated with the IPv4 L3VPN; where uDT4 behavior
represents Endpoint with decapsulation and IPv4 table lookup.
Node1# show segment-routing srv6 sid
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
54
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
The following example shows how to verify the SRv6 based L3VPN configuration using the show
segment-routing srv6SID-prefixdetail command.
Node1# show segment-routing srv6 sid cafe:0:1:e002:: detail
Tue Feb 9 17:50:40.621 UTC
The following example shows how to verify the SRv6 based L3VPN configuration using the show bgp vpnv4
unicast commands on Egress PE.
Node1# show bgp vpnv4 unicast summary
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
55
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
The following examples show how to verify the BGP prefix information for VRF instances using the show
bgp vrf commands:
Node1# show bgp vrf vrf_cust1 ipv4 unicast
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
56
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
Versions:
Process bRIB/RIB SendTblVer
Speaker 22 22
Last Modified: Feb 23 22:57:56.756 for 00:42:01
Paths: (1 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local, (received & used)
cafe:0:4::4 (metric 30) from cafe:0:4::4 (10.1.1.4)
Received Label 0xe00400
Origin incomplete, metric 0, localpref 100, valid, internal, best, group-best,
import-candidate, imported
Received Path ID 0, Local Path ID 1, version 22
Extended community: RT:1:1 RT:100:1
PSID-Type:L3, SubTLV Count:1
SubTLV:
T:1(Sid information), Sid:cafe:0:4::, Behavior:63, SS-TLV Count:1
SubSubTLV:
T:1(Sid structure):
Source AFI: VPNv4 Unicast, Source VRF: vrf_cust1, Source Route Distinguisher: 100:1
The following example shows how to verify the SRv6 based L3VPN configuration using the show route vrf
commands.
Node1# show route vrf vrf_cust1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
57
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN
Nexthop in Vrf: "default", Table: "default", IPv6 Unicast, Table Id: 0xe0800000
Route metric is 0
Label: None
Tunnel ID: None
Binding Label: None
Extended communities count: 0
Source RD attributes: 0x0000:100:1
NHID:0x0(Ref:0)
SRv6 Headend: H.Encaps.Red [f3216], SID-list {cafe:0:4:e004::}
Route version is 0x1 (1)
No local label
IP Precedence: Not Set
QoS Group ID: Not Set
Flow-tag: Not Set
Fwd-class: Not Set
Route Priority: RIB_PRIORITY_RECURSIVE (12) SVD Type RIB_SVD_TYPE_REMOTE
Download Priority 3, Download Version 3
No advertising protos.
The following example shows how to verify the SRv6 based L3VPN configuration using the show cef vrf
commands.
Node1# show cef vrf vrf_cust1
12.4.4.4/32, version 3, SRv6 Headend, internal 0x5000001 0x30 (ptr 0x78b9a61c) [1], 0x0
(0x0), 0x0 (0x88873720)
Updated Feb 23 22:57:56.749
Prefix Len 32, traffic index 0, precedence n/a, priority 3
via cafe:0:4::/128, 3 dependencies, recursive [flags 0x6000]
path-idx 0 NHID 0x0 [0x78e2da14 0x0]
next hop VRF - 'default', table - 0xe0800000
next hop cafe:0:4::/128 via cafe:0:4::/48
SRv6 H.Encaps.Red SID-list {cafe:0:4:e004::}
12.4.4.4/32, version 3, SRv6 Headend, internal 0x5000001 0x30 (ptr 0x78b9a61c) [1], 0x0
(0x0), 0x0 (0x88873720)
Updated Feb 23 22:57:56.749
Prefix Len 32, traffic index 0, precedence n/a, priority 3
gateway array (0x88a740a8) reference count 5, flags 0x2010, source rib (7), 0 backups
[1 type 3 flags 0x48441 (0x789cbcc8) ext 0x0 (0x0)]
LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
gateway array update type-time 1 Feb 23 22:57:56.749
LDI Update time Feb 23 22:57:56.754
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
58
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
SRv6 Services: IPv6 L3VPN Release 7.3.1 With this feature, the egress PE can
signal an SRv6 Service SID with
the BGP overlay service route. The
ingress PE encapsulates the
IPv4/IPv6 payload in an outer IPv6
header where the destination
address is the SRv6 Service SID
provided by the egress PE. BGP
messages between PEs carry SRv6
Service SIDs as a means to
interconnect PEs and form VPNs.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
59
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
Running Configuration
router bgp 100
segment-routing srv6
locator Node1-locator
!
address-family vpnv6 unicast
!
neighbor 3001::12:1:1:4
remote-as 100
address-family vpnv6 unicast
!
!
vrf vrf_cust6
rd 100:6
address-family ipv6 unicast
!
!
!
end
• router bgp as-number address-family vpnv6 unicast vrf all segment-routing srv6 locator WORD:
Specify the locator
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
60
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
This example shows how to configure the SRv6 locator for all VRFs under VPNv6 Address Family, with
per-VRF label allocation mode:
Node1(config)# router bgp 100
Node1(config-bgp)# address-family vpnv6 unicast
Node1(config-bgp-af)# vrf all
Node1(config-bgp-af-vrfall)# segment-routing srv6
Node1(config-bgp-af-vrfall-srv6)# locator Node1-locator
Node1(config-bgp-af-vrfall-srv6)# alloc mode per-vrf
Node1(config-bgp-af-vrfall-srv6)# exit
Node1(config-bgp-af-vrfall)# exit
Node1(config-bgp-af)# exit
Node1(config-bgp)# neighbor 3001::12:1:1:4
Node1(config-bgp-nbr)# remote-as 100
Node1(config-bgp-nbr)# address-family vpnv6 unicast
Node1(config-bgp-nbr-af)# exit
Node1(config-bgp-nbr)# exit
Node1(config-bgp)# vrf vrf_cust6
Node1(config-bgp-vrf)# rd 100:6
Node1(config-bgp-vrf)# address-family ipv6 unicast
Node1(config-bgp-vrf-af)# commit
Running Configuration
router bgp 100
address-family vpnv6 unicast
vrf all
segment-routing srv6
locator Node1-locator
alloc mode per-vrf
!
!
!
neighbor 3001::12:1:1:4
remote-as 100
address-family vpnv6 unicast
!
!
vrf vrf_cust6
rd 100:6
address-family ipv6 unicast
!
!
!
end
• router bgp as-number vrf WORD address-family ipv6 unicast segment-routing srv6 locator WORD:
Specify the locator
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
61
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
This example shows how to configure the SRv6 locator for an individual VRF, with per-VRF label allocation
mode:
Node1(config)# router bgp 100
Node1(config-bgp)# address-family vpnv6 unicast
Node1(config-bgp-af)# exit
Node1(config-bgp)# neighbor 3001::12:1:1:4
Node1(config-bgp-nbr)# remote-as 100
Node1(config-bgp-nbr)# address-family vpnv6 unicast
Node1(config-bgp-nbr-af)# exit
Node1(config-bgp-nbr)# exit
Node1(config-bgp)# vrf vrf_cust6
Node1(config-bgp-vrf)# rd 100:6
Node1(config-bgp-vrf)# address-family ipv6 unicast
Node1(config-bgp-vrf-af)# segment-routing srv6
Node1(config-bgp-vrf-af-srv6)# locator Node1-locator
Node1(config-bgp-vrf-af-srv6)# alloc mode per-vrf
Node1(config-bgp-vrf-af-srv6)# commit
Running Configuration
router bgp 100
address-family vpnv6 unicast
!
neighbor 3001::12:1:1:4
remote-as 100
address-family vpnv6 unicast
!
!
vrf vrf_cust6
rd 100:6
address-family ipv6 unicast
segment-routing srv6
locator Node1-locator
alloc mode per-vrf
!
!
!
!
end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
62
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
For more information on configuring routing policies, refer to the "Implementing Routing Policy" chapter in
the Routing Configuration Guide Cisco ASR 9000 Series Routers.
The following example shows a route policy specifying the SID allocation mode with destination-based match:
Node1(config)# route-policy set_per_prefix_locator_rpl
Node1(config-rpl)# if destination in (3001::1:1:1:1/128) then
Node1(config-rpl-if)# set srv6-alloc-mode per-vrf locator locator1
Node1(config-rpl-if)# elseif destination in (3001::2:2:2:2/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf locator locator2
Node1(config-rpl-elseif)# elseif destination in (3001::3:3:3:3/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf
Node1(config-rpl-elseif)# else
Node1(config-rpl-else)# drop
Node1(config-rpl-else)# endif
Node1(config-rpl)# end-policy
To specify per-prefix allocation mode for a specific VRF under IPv6 Address Family, use the following
command:
• router bgp as-number vrf WORD address-family ipv6 unicast segment-routing srv6 alloc mode
route-policy policy_name
This example shows how to specify per-prefix allocation mode for a specific VRF (vrf_cust6) under the IPv6
address family:
Node1(config)# router bgp 100
Node1(config-bgp)# vrf vrf_cust6
Node1(config-bgp-vrf)# address-family ipv6 unicast
Node1(config-bgp-vrf-af)# segment-routing srv6
Node1(config-bgp-vrf-af-srv6)# alloc mode route-policy set_per_prefix_locator_rpl
Running Configuration
route-policy set_per_prefix_locator_rpl
if destination in (3001::1:1:1:1/128) then
set srv6-alloc-mode per-vrf locator locator1
elseif destination in (3001::2:2:2:2/128) then
set srv6-alloc-mode per-vrf locator locator2
elseif destination in (3001::3:3:3:3/128) then
set srv6-alloc-mode per-vrf
else
drop
endif
end-policy
!
router bgp 100
vrf vrf_cust6
address-family ipv6 unicast
segment-routing srv6
alloc mode route-policy set_per_prefix_locator_rpl
!
!
!
!
Verify that the local and received SIDs have been correctly allocated under VPNv6 and specific VRF
(vrf_cust6):
Node1# show bgp vpnv6 unicast local-sids
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
63
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
64
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
Verification
The following figure shows a VPNv6 scenario. The sequence of commands included correspond to router
Node1 acting as Ingress PE, and routers Node4 and Node5 acting as Egress PEs.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
65
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
The following examples shows how to verify the SRv6 based L3VPN configurations for an Individual VRF
with per VRF label allocation mode.
In this example, we can observe the uDT6 SID associated with the IPv6 L3VPN, where uDT6 behavior
represents Endpoint with decapsulation and IPv6 table lookup.
Node1# show segment-routing srv6 sid
Fri Jan 29 19:31:53.293 UTC
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
66
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
InUse Y
The following examples show how to verify the SRv6 based L3VPN configuration using the show bgp vpnv6
unicast commands on the Ingress PE.
Node1# show bgp vpnv6 unicast summary
Fri Jan 29 19:33:01.177 UTC
BGP router identifier 10.1.1.1, local AS number 100
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0 RD version: 0
BGP main routing table version 6
BGP NSR Initial initsync version 4 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
67
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
The following examples show how to verify the BGP prefix information for VRF instances:
Node1# show bgp vrf vrf_cust6 ipv6 unicast
Fri Jan 29 19:42:05.675 UTC
BGP VRF vrf_cust6, state: Active
BGP Route Distinguisher: 100:6
VRF ID: 0x60000007
BGP router identifier 10.1.1.1, local AS number 100
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0800016 RD version: 8
BGP main routing table version 8
BGP NSR Initial initsync version 4 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
68
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
The following examples show how to verify the current routes in the Routing Information Base (RIB):
Node1# show route vrf vrf_cust6 ipv6 unicast
Fri Jan 29 19:43:28.067 UTC
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
69
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 L3VPN
The following examples show how to verify the current IPv6 Cisco Express Forwarding (CEF) table:
Node1# show cef vrf vrf_cust6 ipv6
Fri Jan 29 19:44:56.888 UTC
::/0
drop default handler
3001::12:1:1:1/128
receive Loopback105
3001::12:1:1:4/128
recursive cafe:0:4::/128
3001::12:1:1:5/128
recursive cafe:0:5::/128
fe80::/10
receive
ff02::/16
receive
ff02::2/128
receive
ff02::1:ff00:0/104
receive
ff05::/16
receive
ff12::/16
receive
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
70
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 BGP Global
1 Y HundredGigE0/0/0/1 remote
BGP Global IPv4 Over SRv6 with Per-AFI SID Allocation Mode (uDT4)
To configure BGP global IPv4 over SRv6, use the following commands:
• router bgp as-number address-family ipv4 unicast segment-routing srv6: Enable SRv6
• router bgp as-number address-family ipv4 unicast segment-routing srv6 alloc mode {per-vrf |
route-policy policy_name}: Specify the SID behavior (allocation mode).
• per-vrf: Specifies that the same label is be used for all the routes advertised from a unique VRF.
• route-policy policy_name: Uses a route policy to determine the SID allocation mode and locator
(if provided) for given prefix.
• router bgp as-number address-family ipv4 unicast segment-routing srv6 locator WORD: Specify
the locator
• router bgp as-number {af-group WORD| neighbor-group WORD | neighbor ipv6-addr} address-family
ipv4 unicast encapsulation-type srv6: Specify the encapuslation type for SRv6.
• Use af-group WORD to apply the SRv6 encapsulation type to the address family group for BGP
neighbors.
• Use neighbor-group WORDto apply the SRv6 encapsulation type to the neighbor group for BGP
neighbors.
• Use neighbor ipv6-addr to apply the SRv6 encapsulation type to the specific BGP neighbor.
Use Case 1: BGP Global IPv4 over SRv6 with Per-AFI SID Allocation
The following example shows how to configure BGP global IPv4 over SRv6 with per-AFI SID allocation.
Node1(config)# router bgp 1
Node1(config-bgp)# bgp router-id 10.1.0.1
Node1(config-bgp)# address-family ipv4 unicast
Node1(config-bgp-af)# segment-routing srv6
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
71
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 BGP Global
Running Configuration
router bgp 1
bgp router-id 10.1.0.1
address-family ipv4 unicast
segment-routing srv6
locator Node1
alloc mode per-vrf
!
!
neighbor 60::2
remote-as 1
update-source Loopback1
address-family ipv4 unicast
encapsulation-type srv6
!
!
neighbor 52.52.52.1
remote-as 3
address-family ipv4 unicast
route-policy passall in
route-policy passall out
!
!
!
Use Case 2: BGP Global IPv4 over SRv6 with Per-Prefix SID Allocation
This use case provides the ability to assign a specific SRv6 locator for a given prefix or a set of prefixes. The
egress PE advertises the prefix with the specified locator. This allows for per-prefix steering into desired
transport behaviors, such as Flex Algo.
To assign an SRv6 locator for a specific prefix, configure a route policy to specify the SID allocation mode
based on match criteria. Examples of match criteria are destination-based match or community-based match.
• Supported SID allocation mode is per-VRF.
• For per-VRF allocation mode, you can also specify the SRv6 locator.
• If an SRv6 locator is specified in the route policy, BGP will use that to allocate per-VRF SID. If
the specified locator is invalid, the SID will not be allocated.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
72
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 BGP Global
• If an SRv6 locator is not specified in the route policy, the default locator is used to allocate the SID.
If the default locator is not configured in BGP, then the SID will not be allocated.
For more information on configuring routing policies, refer to the "Implementing Routing Policy" chapter in
the Routing Configuration Guide for Cisco ASR 9000 Series Routers.
The following example shows a route policy specifying the SID allocation mode with destination-based match:
Node1(config)# route-policy set_per_prefix_locator_rpl
Node1(config-rpl)# if destination in (10.1.1.0/24) then
Node1(config-rpl-if)# set srv6-alloc-mode per-vrf locator locator1
Node1(config-rpl-if)# elseif destination in (2.2.2.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf locator locator2
Node1(config-rpl-elseif)# elseif destination in (3.3.3.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf
Node1(config-rpl-elseif)# else
Node1(config-rpl-else)# drop
Node1(config-rpl-else)# endif
Node1(config-rpl)# end-policy
Node1(config)#
The following example shows how to configure BGP global IPv4 over SRv6 with a route policy to determine
the SID allocation mode for given prefix.
Node1(config)# router bgp 100
Node1(config-bgp)# address-family ipv4 unicast
Node1(config-bgp-af)# segment-routing srv6
Node1(config-bgp-af-srv6)# alloc mode route-policy set_per_prefix_locator_rpl
Running Configuration
route-policy set_per_prefix_locator_rpl
if destination in (10.1.1.0/24) then
set srv6-alloc-mode per-vrf locator locator1
elseif destination in (2.2.2.0/24) then
set srv6-alloc-mode per-vrf locator locator2
elseif destination in (3.3.3.0/24) then
set srv6-alloc-mode per-vrf
else
drop
endif
end-policy
!
router bgp 100
address-family ipv4 unicast
segment-routing srv6
alloc mode route-policy set_per_prefix_locator_rpl
!
!
!
Verify that the local and received SIDs have been correctly allocated under BGP IPv4 address family:
Node1# show bgp ipv4 unicast local-sids
…
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Local Sid Alloc mode Locator
*> 10.1.1.0/24 fc00:8:1:41:: per-vrf locator2
*> 2.2.2.0/24 fc00:0:1:41:: per-vrf locator1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
73
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 BGP Global
SRv6 Services: BGP Global IPv6 Release 7.3.1 With this feature, the egress PE can
signal an SRv6 Service SID with
the BGP global route. The ingress
PE encapsulates the IPv4/IPv6
payload in an outer IPv6 header
where the destination address is the
SRv6 Service SID provided by the
egress PE. BGP messages between
PEs carry SRv6 Service SIDs as a
means to interconnect PEs.
This feature extends support of SRv6-based BGP services to include IPv6 global BGP by implementing uDT6
SRv6 functions at the PE node (draft-ietf-bess-srv6-services).
BGP Global IPv6 Over SRv6 with Per-AFI SID Allocation Mode (uDT6)
To configure BGP global IPv6 over SRv6, use the following commands:
• router bgp as-number address-family ipv6 unicast segment-routing srv6: Enable SRv6
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
74
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 BGP Global
• router bgp as-number address-family ipv6 unicast segment-routing srv6 alloc mode {per-vrf |
route-policy policy_name}: Specify the SID behavior (allocation mode).
• per-vrf: Specifies that the same label is be used for all the routes advertised from a unique VRF.
• route-policy policy_name: Uses a route policy to determine the SID allocation mode and locator
(if provided) for given prefix.
• router bgp as-number address-family ipv6 unicast segment-routing srv6 locator WORD: Specify
the locator
• router bgp as-number {af-group WORD| neighbor-group WORD | neighbor ipv6-addr} address-family
ipv6 unicast encapsulation-type srv6: Specify the encapuslation type for SRv6.
• Use af-group WORD to apply the SRv6 encapsulation type to the address family group for BGP
neighbors.
• Use neighbor-group WORDto apply the SRv6 encapsulation type to the neighbor group for Border
Gateway Protocol (BGP) neighbors.
• Use neighbor ipv6-addr to apply the SRv6 encapsulation type to the specific BGP neighbor.
Use Case 1: BGP Global IPv6 over SRv6 with Per-AFI SID Allocation
The following example shows how to configure BGP global IPv6 over SRv6 with per-AFI SID allocation.
Node1(config)# router bgp 100
Node1(config-bgp)# bgp router-id 10.1.1.1
Node1(config-bgp)# segment-routing srv6
Node1(config-bgp-gbl-srv6)# locator Node1
Node1(config-bgp-gbl-srv6)# exit
Node1(config-bgp)# address-family ipv6 unicast
Node1(config-bgp-af)# segment-routing srv6
Node1(config-bgp-af-srv6)# locator Node1
Node1(config-bgp-af-srv6)# alloc mode per-vrf
Node1(config-bgp-af-srv6)# exit
Node1(config-bgp-af)# exit
Node1(config-bgp)# neighbor cafe:0:4::4
Node1(config-bgp-nbr)# address-family ipv6 unicast
Node1(config-bgp-nbr-af)# encapsulation-type srv6
Node1(config-bgp-nbr-af)# exit
Node1(config-bgp-nbr)# exit
Node1(config-bgp)# neighbor cafe:0:5::5
Node1(config-bgp-nbr)# address-family ipv6 unicast
Node1(config-bgp-nbr-af)# encapsulation-type srv6
Node1(config-bgp-nbr-af)# commit
Running Configuration
router bgp 100
bgp router-id 10.1.1.1
segment-routing srv6
locator Node1
!
address-family ipv6 unicast
segment-routing srv6
locator Node1
alloc mode per-vrf
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
75
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 BGP Global
neighbor cafe:0:4::4
address-family ipv6 unicast
encapsulation-type srv6
!
!
neighbor cafe:0:5::5
address-family ipv6 unicast
encapsulation-type srv6
Use Case 2: BGP Global IPv6 over SRv6 with Per-Prefix SID Allocation
This use case provides the ability to assign a specific SRv6 locator for a given prefix or a set of prefixes. The
egress PE advertises the prefix with the specified locator. This allows for per-prefix steering into desired
transport behaviors, such as Flex Algo.
To assign an SRv6 locator for a specific prefix, configure a route policy to specify the SID allocation mode
based on match criteria. Examples of match criteria are destination-based match or community-based match.
• Supported SID allocation modes are per-VRF and per-CE.
• For per-VRF allocation mode, you can also specify the SRv6 locator.
• If an SRv6 locator is specified in the route policy, BGP will use that to allocate per-VRF SID. If
the specified locator is invalid, the SID will not be allocated.
• If an SRv6 locator is not specified in the route policy, the default locator is used to allocate the SID.
If the default locator is not configured in BGP, then the SID will not be allocated.
• Per-CE allocation mode always uses the default locator to allocate the SID.
For more information on configuring routing policies, refer to the "Implementing Routing Policy" chapter in
the Routing Configuration Guide for Cisco ASR 9000 Series Routers.
The following example shows a route policy specifying the SID allocation mode with destination-based match:
Node1(config)# route-policy set_per_prefix_locator_rpl
Node1(config-rpl)# if destination in (3001::1:1:1:1/128) then
Node1(config-rpl-if)# set srv6-alloc-mode per-vrf locator locator1
Node1(config-rpl-if)# elseif destination in (3001::2:2:2:2/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf locator locator2
Node1(config-rpl-elseif)# elseif destination in (3001::3:3:3:3/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf
Node1(config-rpl-elseif)# elseif destination in (3001::4:4:4:4/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-ce
Node1(config-rpl-elseif)# else
Node1(config-rpl-else)# drop
Node1(config-rpl-else)# endif
Node1(config-rpl)# end-policy
The following example shows how to configure BGP global IPv6 over SRv6 with a route policy to determine
the SID allocation mode for given prefix.
Node1(config)# router bgp 100
Node1(config-bgp)# address-family ipv6 unicast
Node1(config-bgp-af)# segment-routing srv6
Node1(config-bgp-af-srv6)# alloc mode route-policy set_per_prefix_locator_rpl
Running Configuration
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
76
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 BGP Global
route-policy set_per_prefix_locator_rpl
if destination in (3001::1:1:1:1/128) then
set srv6-alloc-mode per-vrf locator locator1
elseif destination in (3001::2:2:2:2/128) then
set srv6-alloc-mode per-vrf locator locator2
elseif destination in (3001::3:3:3:3/128) then
set srv6-alloc-mode per-vrf
else
drop
endif
end-policy
!
router bgp 100
address-family ipv6 unicast
segment-routing srv6
alloc mode route-policy set_per_prefix_locator_rpl
!
!
Verify that the local and received SIDs have been correctly allocated under BGP IPv6 address family:
Node1# show bgp ipv6 unicast local-sids
…
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Local Sid Alloc mode Locator
*> 3001::1:1:1:1/128 fc00:8:1:41:: per-vrf locator2
*> 3001::2:2:2:2/128 fc00:0:1:41:: per-vrf locator1
*> 3001::3:3:3:3/128 fc00:9:1:42:: per-vrf locator4
*> 3001::5:5:5:5/128 NO SRv6 Sid - -
* i3008::8:8:8:8/128 NO SRv6 Sid - -
Verification
The following figure shows a IPv6 BGP global scenario. The sequence of commands included correspond to
router Node1 acting as Ingress PE, and routers Node4 and Node5 acting as Egress PEs.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
77
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 BGP Global
The following examples show how to verify the BGP global IPv6 configuration using the show bgp ipv6
unicast commands.
Node1# show bgp ipv6 unicast summary
Fri Jan 29 19:48:23.255 UTC
BGP router identifier 10.1.1.1, local AS number 100
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0xe0800000 RD version: 4
BGP main routing table version 4
BGP NSR Initial initsync version 2 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
78
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv6 BGP Global
The following examples show how to verify the current routes in the Routing Information Base (RIB):
Node1# show route ipv6 3001::13:1:1:4/128
Fri Jan 29 19:53:26.839 UTC
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
79
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN Active-Standby Redundancy using Port-Active Mode
The following examples show how to verify the current IPv6 Cisco Express Forwarding (CEF) table:
Node1# show cef ipv6 3001::13:1:1:4/128
Fri Jan 29 19:50:29.149 UTC
3001::13:1:1:4/128, version 106, SRv6 Headend, internal 0x5000001 0x40 (ptr 0x78 cd3944)
[1], 0x0 (0x0), 0x0 (0x888a3a80)
Updated Jan 29 19:14:13.401
Prefix Len 128, traffic index 0, precedence n/a, priority 4
via cafe:0:4::/128, 7 dependencies, recursive [flags 0x6000]
path-idx 0 NHID 0x0 [0x78cd2a14 0x0]
next hop cafe:0:4::/128 via cafe:0:4::/48
SRv6 H.Encaps.Red SID-list {cafe:0:4:e009::}
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
80
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services for L3VPN Active-Standby Redundancy using Port-Active Mode: Operation
• When an EVPN Ethernet Segment (ES) is configured with port-active load-balancing mode, you cannot
configure ACs of that bundle on bridge-domains with a configured EVPN instance (EVI). EVPN Layer
2 bridging service is not compatible with port-active load-balancing.
SRv6 Services for L3VPN Active-Standby Redundancy using Port-Active Mode: Operation
Under port-active operational mode, EVPN Ethernet Segment (ES) routes are exchanged across BGP for the
routers servicing the multihomed ES. Each PE router then builds an ordered list of the IP addresses of all PEs
connected to the ES, including itself, and assigns itself an ordinal for its position in the list. The ordinals are
used with the modulo calculation to determine which PE will be the Designated Forwarder (DF) for a given
ES. All non-DF PEs will take the respective bundles out of service.
In the case of link or port failure, the active DF PE withdraws its ES route. This re-triggers DF election for
all PEs that service the ES and a new PE is elected as DF.
Configuration Example
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
81
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Running Configuration
Running Configuration
interface Bundle-Ether14
ipv4 address 14.0.0.2 255.255.255.0
ipv6 address 14::2/64
lacp period short
mac-address 1.2.3
bundle wait-while 0
!
interface GigabitEthernet0/2/0/5
bundle id 14 mode active
!
evpn
interface Bundle-Ether14
ethernet-segment
identifier type 0 11.11.11.11.11.11.11.11.14
load-balancing-mode port-active
!
!
!
router bgp 100
bgp router-id 192.168.0.2
address-family l2vpn evpn
!
neighbor 192.168.0.3
remote-as 100
update-source Loopback0
address-family l2vpn evpn
!
!
!
Verification
Verify the SRv6 services L3VPN active-standby redundancy using port-active mode configuration.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
82
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Verification
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
83
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN Active-Active Redundancy
Topology :
Operational : MH
Configured : Port-Active
Service Carving : Auto-selection
Multicast : Disabled
Peering Details :
192.168.0.2 [MOD:P:00]
192.168.0.3 [MOD:P:00]
Bundle-Ether24
Status: LACP OOS (out of service)
Local links <active/standby/configured>: 0 / 1 / 1
Local bandwidth <effective/available>: 0 (0) kbps
MAC address (source): 0001.0002.0003 (Configured)
Inter-chassis link: No
Minimum active links / bandwidth: 1 / 1 kbps
Maximum active links: 64
Wait while timer: Off
Load balancing:
Link order signaling: Not configured
Hash type: Default
Locality threshold: None
LACP: Operational
Flap suppression timer: Off
Cisco extensions: Disabled
Non-revertive: Disabled
mLACP: Not configured
IPv4 BFD: Not configured
IPv6 BFD: Not configured
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
84
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: IPv4 L3VPN Active-Active Redundancy
Route synchronization between service PEs is required in order to provide minimum interruption to unicast
and multicast services after failure on a redundant service PE. The following EVPN route-types are used for
Layer-3 route synchronization:
• EVPN route-type 2 for synchronizing ARP tables
• EVPN route-type 7/8 for synchronizing IGMP JOINS/LEAVES
In a Layer-3 CE scenario, the router that connects to the redundant PEs may establish an IGP adjacency on
the bundle port. In this case, the adjacency will be formed to one of the redundant PEs, and IGP customer
routes will only be present on that PE. To synchronize Layer-3 customer subnet routes (IP Prefixes), the EVPN
route-type 5 is used to carry the ESI and ETAG as well as the gateway address (prefix next-hop address).
Note Gratuitous ARP (GARP) or IPv6 Network Advertisement (NA) replay is not needed for CEs connected to
the redundant PEs over a single LAG port.
The below configuration enables Layer-3 route synchronization for routes learned on the Ethernet-segment
sub-interfaces.
evpn
route-sync vrf default
!
vrf RED
evi route-sync 10
!
vrf BLUE
evi route-sync 20
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
85
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: EVPN VPWS — All-Active Multi-Homing
SRv6 Services: EVPN VPWS — Release 7.3.2 This feature provides an ELINE
All-Active Multi-Homing (SRv6 (P2P) service with all-active
Micro SID) multihoming capability over an
SRv6 network.
All-Active Multi-Homing enables
an operator to connect a customer
edge (CE) device to two or more
provider edge (PE) devices to
provide load balancing and
redundant connectivity. With
All-Active Multi-Homing, all the
PEs can forward traffic to and from
the multi-homed device.
EVPN VPWS All-Active Multi-Homing over SRv6 provides an ELINE (P2P) service with all-active
multihoming capability over an SRv6 network.
All-Active Multi-Homing enables an operator to connect a customer edge (CE) device to two or more provider
edge (PE) devices to provide load balancing and redundant connectivity. With All-Active Multi-Homing, all
the PEs can forward traffic to and from the multi-homed device.
Note For information about EVPN VPWS, refer to the "EVPN Virtual Private Wire Service (VPWS)" chapter in
the L2VPN and Ethernet Services Configuration Guide for Cisco ASR 9000 Series Routers.
Note Complete the steps in Configuring SRv6, on page 26 before performing these steps.
An SRv6 Locator for an EVPN VPWS service can be configured at 3 different levels independently:
• global_locator is the default locator for all EVPN-VPWS services
• evi_locator is applied to all EVPN-VPWS services for the specific EVI
• evi_service_locator is applied to an individual EVI service
When locators are configured at different levels at the same time, the following priority is implemented:
1. evi_service_locator
2. evi_locator
3. global_locator
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
86
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: EVPN VPWS — All-Active Multi-Homing
This example shows how to configure an EVPN VPWS over SRv6 using a global locator for EVPN:
evpn
segment-routing srv6
locator sample_global_loc
l2vpn
xconnect group sample_xcg
p2p sample-vpws-12001-2002
interface Bundle-Ether12001.2002
neighbor evpn evi 12001 service 2002 segment-routing srv6
This example shows how to configure EVPN VPWS over SRv6 using specific EVI locator:
evpn
evi 11001 segment-routing srv6
locator sample_evi_loc
l2vpn
xconnect group sample_xcg
p2p sample-vpws-11001-2002
interface Bundle-Ether11001.2002
neighbor evpn evi 11001 service 2002 segment-routing srv6
This example shows how to configure an EVPN VPWS over SRv6 using a locator for an individual EVI
service:
l2vpn
xconnect group sample_xcg
p2p sample-vpws-11001-2001
interface Bundle-Ether11001.2001
neighbor evpn evi 11001 service 2001 segment-routing srv6
locator sample_evi_service_loc
Verification
Router# show segment-routing srv6 locator
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
87
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: EVPN VPWS — All-Active Multi-Homing
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
88
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: EVPN VPWS — All-Active Multi-Homing
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
89
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: EVPN ELAN Layer 2 Gateway With Automated Steering To Flexible Algorithm Paths
SRv6-Services: EVPN ELAN Release 7.5.2 This feature builds upon EVPN
Layer 2 Gateway With Automated BGP signaling to provide Emulated
Steering To Flexible Algorithm Local Area Network (ELAN)
Paths multipoint-to-multipoint Ethernet
services over an SRv6-based
network.
You can enable automated steering
of EVPN ELAN traffic into the
path associated with a best-effort
or Flex- Algorithm locator.
This feature combines the benefits
of EVPN ELAN service and SRv6
Micro-SIDs.
For this feature, the
segment-routing srv6 option was
added to the evi command:
evi (bridge-domain)
You can transport EVPN ELAN bridged unicast and broadcast, unknown unicast, and multicast (BUM) traffic
over an SRv6 network in the Micro-SID format. Relevant SRv6 headend and endpoint definitions are noted
below:
• H.Encaps.L2.Red: This headend router operation involves reduced encapsulation of Layer 2 or Ether
frames using an SRv6 Policy.
• uDT2U: This endpoint router operation involves traffic decapsulation and unicast MAC L2 table lookup.
This is used for the EVPN bridging unicast traffic use case.
• uDT2M: This endpoint router operation involves traffic decapsulation and L2 table flooding. This is
used for the EVPN bridging BUM traffic with ESI filtering use case.
Note For more information on SRv6 headend and endpoint behaviors, refer to Segment Routing over IPv6 Overview.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
90
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: EVPN ELAN Layer 2 Gateway With Automated Steering To Flexible Algorithm Paths
Topology pointers:
• Customer edge (CE) devices send traffic between each other over the SRv6 network. The CE devices
are CE-A, CE-B, and CE-C.
• The SRv6 network devices transport customer traffic, and they are R1, R2 .. till R8.
• The provider edge (PE) devices, R1, R3 and R8, are displayed in green. The SRv6 EVPN configurations
must be enabled on the PE devices since they participate in the EVPN EVI.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
91
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: EVPN ELAN Layer 2 Gateway With Automated Steering To Flexible Algorithm Paths
Note Complete the steps in Segment Routing over IPv6 Overview before performing these steps.
Enable SRv6 under the EVPN mode and associate a global locator (sample, in this case) with EVPN.
Router(config-evpn)# segment-routing srv6
Router(config-evpn-srv6)# locator sample
Router(config-evpn-srv6)# exit
Enable the evi 1 segment-routing srv6 command under L2VPN bridge domain bd1.
Router(config-l2vpn-bg-bd)# evi 1 segment-routing srv6
Router(config-l2vpn-bg-bd-evi-srv6)# commit
When transporting BUM traffic on a device with multiple line cards, enable the flood mode
resilience-optimized command for faster network convergence.
Router(config)# l2vpn
Router(config-l2vpn)# bridge group bg11001
Router(config-l2vpn-bg)# bridge-domain elan-11001-2001
Router(config-l2vpn-bg-bd)# flood mode resilience-optimized
Router(config-l2vpn-bg-bd)# commit
Verification
In this sample output, SRv6 EVPN ELAN traffic unicast and multicast SID information is displayed.
Router# show evpn evi vpn-id 1 detail
..
Stitching: Regular
Unicast SID: fccc:ccc1:a1:e000::
Multicast SID: fccc:ccc1:a1:e001::
..
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
92
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: EVPN ELAN Layer 2 Gateway With Automated Steering To Flexible Algorithm Paths
In this sample output, EVI 1 details, including the corresponding SID and EVPN MAC address details are
displayed.
Router# show evpn evi vpn-id 1 mac
In this sample output, for the specified EVI and EVPN MAC address, SRv6 EVPN ELAN traffic details are
displayed.
Router# show evpn evi vpn-id 1 mac 0010.3000.01d0 detail
Ethernet Tag : 0
Multi-paths Resolved : True
Multi-paths Internal label : None
Local Static : No
Remote Static : Yes
Local Ethernet Segment : N/A
Remote Ethernet Segment : 0100.0205.acce.5500.0500
Local Sequence Number : N/A
Remote Sequence Number : 0
Local Encapsulation : N/A
Remote Encapsulation : SRv6
Local E-Tree : Root
Remote E-Tree : Root
Remote matching E-Tree RT : No
Local AC-ID : 0x0
Remote AC-ID : 0x13
In this sample output, for the specified EVI, multicast SID details are displayed.
Router# show evpn evi vpn-id 1 inclusive-multicast detail
In this sample output, for the specified MAC address, bridge domain information is displayed.
Router# show l2route evpn mac all | i ee03.0500.0130
In this sample output, SRv6 network locator and corresponding SID information are displayed.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
93
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: EVPN ELAN Layer 2 Gateway With Automated Steering To Flexible Algorithm Paths
uDT2U and uDT2M refer to SRv6 network endpoint operations. uDT2U indicates SRv6 traffic decapsulation,
wherein EVPN bridged unicast traffic is forwarded out of the SR network. uDT2M indicates SRv6 traffic
decapsulation, wherein EVPN bridged multicast traffic is forwarded out of the SR network.
Router# show segment-routing srv6 sid
In this sample output, CEF information is displayed, including SRv6 network endpoint details. uDT2U is an
SRv6 network endpoint operation wherein SRv6 traffic is decapsulated and EVPN bridged unicast traffic is
forwarded out of the SR network.
Router# show cef ipv6 fccc:ccc1:a1:e000:: detail
In the following examples, SRv6 EVPN ELAN traffic-related IID information is displayed.
Router# show evpn internal-id vpn-id 3001 detail
Summary pathlist:
::ffff:10.0.0.4/128, version 39, SRv6 Headend, IID (EVPN-MH), internal 0x1000001 0x0 (ptr
0x8ba21798) [3], 0x0 (0x0), 0x0 (0x923967b0)
Updated Sep 8 18:01:06.495
Prefix Len 128, traffic index 0, precedence n/a, priority 0
gateway array (0x8ba36018) reference count 1, flags 0x2010, source rib (7), 0 backups
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
94
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: EVPN ELAN Layer 2 Gateway With Automated Steering To Flexible Algorithm Paths
In this sample output, SRv6 EVPN ELAN traffic-related IID information is displayed.
Router# show rib ipv6 iid
l2vpn_iid InUse Y
0xa000002 ::ffff:10.0.0.2
[EVPN-ELAN:evi=8:esi=8300.fccc.ccc1.00a4.0000:nh=fccc:ccc1:a4:::eth_tag=0:type=0:encap=255:opaque=0]
l2vpn_iid InUse Y
0xa000003 ::ffff:10.0.0.3
[EVPN-ELAN:evi=9:esi=8300.fccc.ccc1.00a4.0000:nh=fccc:ccc1:a4:::eth_tag=0:type=0:encap=255:opaque=0]
l2vpn_iid InUse Y
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
95
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 ESI Filtering
SRv6 ESI Filtering Release 7.11.1 Split Horizon Group (SHG) labels
and Ethernet Segment Identifier
(ESI) filtering functionalities exist
on MPLS underlay networks.
This feature introduces ESI filtering
functionality to SRv6 underlay
networks, using the End.DT2M
SRv6 endpoint behavior. This
behavior uses the "Arg.FE2"
argument for SRv6, which is
similar to the SHG label for MPLS.
This feature allows nodes to
identify BUM traffic based on the
advertised ESI and prevent a loop
by avoiding re-broadcasting the
same traffic back towards the
access node.
This functionality is enabled by
default.
Consider the below network topology where CE1 is attached to PE1 and PE2.
When broadcast, unknown unicast, and multicast (BUM) traffic is received by PE1 from CE1, PE1 floods
this traffic on the core network. This results in a copy of the BUM traffic being sent to PE2. PE2 in turn floods
it to the core and access network, and the BUM traffic would be received at CE1. This is undesirable as we
are flooding the same traffic to the source from which it originated, thus causing a loop.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
96
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 ESI Filtering
Note For more information, see “Split Horizon Groups” in the L2VPN and Ethernet Services Configuration Guide.
When PE1 receives BUM traffic from an attachment circuit (AC), it floods the traffic to all nodes in its core
network, where PE2 is also member node. The traffic flooded to PE2 is sent with its previously advertised
ID. When PE2 decodes the packet and examines the label, it recognizes this to be the label that it had generated.
In this mechanism, PE2 will not flood the BUM traffic back towards the access. PE2 has successfully prevented
a loop by avoiding re-broadcasting the same traffic back towards the source (CE1).
This feature introduces ESI filtering to SRv6 underlay networks, using the End.DT2M SRv6 endpoint behavior.
This behavior uses the "Arg.FE2" argument, as defined in IETF RFC 8986 SRv6 Network Programming and
IETF draft SRv6 Argument Signaling for BGP Services. This argument provides a local mapping to ESI for
split-horizon filtering of the received traffic to exclude a specific outgoing L2 interface (OIF), or a set of OIFs,
from L2 table T flooding. The allocation of the argument values is local to the SR Segment Endpoint Node
instantiating this behavior, and the signaling of the argument to other nodes for the EVPN functionality occurs
via the control plane.
Verification
The output of the show evpn ethernet-segment interface interface-name now displays both the SHG label
information for MPLS EVPN instances (EVIs) and the Arg.FE2 information for SRv6 EVIs:
Router# show evpn ethernet-segment interface Bundle-Ether 1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
97
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: L3 EVPN
Support for SRv6 Release 7.9.1 This feature adds support for carrying L3VPN routes
Services: L3 EVPN in L2VPN EVPN RT5 address-family instead of
VPNv4 unicast and/or VPNv6 unicast address-family
across SRv6 core (EVPN over SRv6 underlay).
This allows for efficient and scalable delivery of VPN
services using SRv6 technology.
EVPN Route Type 5 (RT5) is used for the advertisement of EVPN routes using IP prefixes (refer to IETF
RFC 9136 - IP Prefix Advertisement in Ethernet VPN (EVPN)) to provide end-to-end L3 connectivity
This feature adds support for carrying L3VPN routes in L2VPN EVPN EVPN RT5 address family instead of
VPNv4 unicast and/or VPNv6 unicast address-family across SRv6 core (EVPN over SRv6 underlay).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
98
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: L3 EVPN
Configure the SRv6 Locator for an Individual VRF, with Per-VRF Label Allocation Mode
Router(config)# router bgp 100
Router(config-bgp)# address-family vpnv4 unicast
Router(config-bgp-af)# additional-paths receive
Router(config-bgp-af)# additional-paths send
Router(config-bgp-af)# additional-paths selection route-policy add-path
Router(config-bgp-af)# exit
Router(config-bgp)# address-family vpnv6 unicast
Router(config-bgp-af)# additional-paths receive
Router(config-bgp-af)# additional-paths send
Router(config-bgp-af)# additional-paths selection route-policy add-path
Router(config-bgp-af)# exit
Router(config-bgp)# address-family l2vpn evpn
Router(config-bgp-af)# additional-paths receive
Router(config-bgp-af)# additional-paths send
Router(config-bgp-af)# additional-paths selection route-policy add-path
Router(config-bgp-af)# exit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
99
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: L3 EVPN
Router(config-bgp-nbr)# exit
Running Configuration
vrf VPN1
address-family ipv4 unicast
import route-target
1:1
!
export route-target
1:1
!
!
address-family ipv6 unicast
import route-target
1:1
!
export route-target
1:1
!
!
!
router bgp 100
address-family vpnv4 unicast
additional-paths receive
additional-paths send
additional-paths selection route-policy add-path
!
address-family vpnv6 unicast
additional-paths receive
additional-paths send
additional-paths selection route-policy add-path
!
address-family l2vpn evpn
additional-paths receive
additional-paths send
additional-paths selection route-policy add-path
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
100
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: L2 and L3 Services with Remote SIDs from W-LIB
neighbor 1111::1
remote-as 100
address-family l2vpn evpn
advertise vpnv4 unicast
advertise vpnv6 unicast
!
!
vrf VPN1
rd 100:1
address-family ipv4 unicast
segment-routing srv6
locator LOC1
alloc mode per-vrf
!
!
address-family ipv6 unicast
segment-routing srv6
locator LOC1
alloc mode per-vrf
!
!
neighbor 1.1.1.1
remote-as 200
address-family ipv4 unicast
!
!
neighbor 3333::3
remote-as 200
address-family ipv6 unicast
!
!
!
!
SRv6 Services: L2 and L3 Release 7.9.1 This feature enables an SRv6 headend node to receive
Services with Remote SIDs and install remote SIDs with Wide (32-bit) functions
from Wide Local ID Block (Remote W-LIB).
The Remote W-LIB is supported for Layer 3 (VPN/BGP
global) and Layer 2 EVPN services (ELINE/ELAN).
This capability is enabled by default.
This capability is enabled by default; there is no CLI to configure this capability at the ingress PE.
An SRv6 Service SID is used to identify a specific service function. This Service SID inserted into the packet
header by the source node is used to steer the packet along a specific path that includes the service function.
The Service SID signaled by transposing a variable part of the SRv6 SID value (function, argument, or both)
and carrying them in the existing label fields to achieve more efficient compression of those service prefix
NLRIs in BGP update messages. The SRv6 SID Structure Sub-Sub-TLV (SSTLV) contains appropriate length
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
101
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: L2 and L3 Services with Remote SIDs from W-LIB
fields when the SRv6 Service SID is signaled in split parts to enable the receiver to put together the SID
accurately.
The Transposition Offset indicates the bit position. The Transposition Length indicates the number of bits
that are being taken out of the SRv6 SID value and put into high order bits of label field.
For example, a remote W-LIB uSID fcbb:bb00:0200:fff0:0001:: with a SRv6 SID SSTLV of BL=32; NL=16;
FL=32; AL=0, TPOS len/offset=16/64 is defined as follows:
• Block length (BL) of 32 bits = fcbb:bb00
• Node length (NL) of 16 bits = 0200
• Function length (FL) of 32 bits = fff0:0001
• Argument length (AL) of 0
• Transposition length (TPOS len) of 16 bits = 0001
• Transposition offset (TPOS offset) of 64 bits = fcbb:bb00:0200:fff0:
Example
The following example shows output of a BGP route table for a VPNv4 prefix learned from three egress PEs:
• BGP Path 1 from next-hop 7::1 and a 32-bit uDT4 function (0xfff0 4002) allocated from W-LIB
• BGP Path 2 from next-hop 9::1 and a 16-bit uDT4 function (0x4002) allocated from LIB
• BGP Path 3 from next-hop 8::1 and a 16-bit uDT4 function (0x4002) allocated from LIB
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
102
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: L2 and L3 Services with Remote SIDs from W-LIB
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
103
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: L2 EVPN Services with Local SIDs from W-LIB
SRv6-Services: L2 EVPN Release 7.11.1 This feature enables an SRv6 headend node to allocate
Services with Local SIDs and advertise local SIDs with Wide (32-bit) functions
from W-LIB (Local W-LIB). The Local W-LIB is supported for
Layer 2 EVPN services (ELAN/ELINE) services.
Users with a large number of L2 EVPN services can
now have a larger address space (local ID block) for
local identifiers because this functionality enables an
SRv6 headend node to allocate and advertise local
SIDs with Wide (32-bit) functions (Local W-LIB).
The larger address space for local identifiers ensures
efficient address space utilization and better scalability
for BGP deployments.
This feature introduces the usid allocation
wide-local-id-block command.
An SRv6 Service SID is used to identify a specific service function. This Service SID inserted into the packet
header by the source node is used to steer the packet along a specific path that includes the service function.
Note See SRv6 uSID Allocation Within a uSID Block for more information about W-LIB.
By default, in BGP, the allocation of uSIDs is limited to the LIB space. However, with this feature, BGP can
instruct the SID-Manager to allocate uSIDs specifically from the W-LIB (Wide Local Identifier Block). This
enforcement provides a larger address space for local identifiers, which allows for more efficient utilization
of the address space and better scalability for BGP deployments.
BGP uses transposition to encode the service SID for VPN services into the label part of the NLRI, as specified
in IETF RFC 9252. In the current LIB implementation, BGP transposes the 16-bit function into the label field
of the NLRI. In the case of W-LIB, BGP transposes the last 16-bits of the W-LIB 32-bit function into the
label part of the NLRI for EVPN routes.
For example, if a local identifier looks like BBBB:BBBB:Loc:Service, resulting in an IPv6 address like
FC00:0100:8200:F111. With the W-LIB extension, the local identifier includes two additional segments for
the MSB (Most Significant Bits) and LSB (Least Significant Bits), resulting in an IPv6 address like
FC00:0100:8200:F111:1111.
For more information on transposition, see the SRv6 Services: L2 and L3 Services with Remote SIDs from
W-LIB section.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
104
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: L2 EVPN Services with Local SIDs from W-LIB
Configuration
The local WLIB configuration can be applied at three levels:
• Globally under EVPN
• Global locator
• Per-EVI locator
Use the usid allocation wide-local-id-block command to enable the allocation and advertisement of an SRv6
Service SID with wide function (W-LIB) for L2 EVPN services.
The precedence rules for the W-LIB allocation mode are applied at different levels:
• W-LIB uSID Allocation Applied Globally under EVPN:
evpn
segment-routing srv6
locator loc3
!
usid allocation wide-local-id-block
!
!
The following ouput shows the W-LIB uSID allocation under global EVPN:
RP/0/0/CPU0:PE1# show evpn segment-routing srv6 detail
• W-LIB uSID Allocation Applied under the Global Locator for EVPN:
evpn
segment-routing srv6
locator loc3
usid allocation wide-local-id-block
!
!
!
The following ouput shows the W-LIB uSID allocation under global locator:
RP/0/0/CPU0:PE1# show evpn segment-routing srv6 detail
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
105
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Services: L2 EVPN Services with Local SIDs from W-LIB
The following ouput shows the W-LIB uSID allocation for a apecific EVI locator:
RP/0/0/CPU0:PE1# show evpn evi vpn-id 4 detail
Statistics:
Packets Sent Received
Total : 0 0
Unicast : 0 0
BUM : 0 0
Bytes Sent Received
Total : 0 0
Unicast : 0 0
BUM : 0 0
RD Config: none
RD Auto : (auto) 192.168.0.1:4
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
106
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: L3 Services with Local SIDs from W-LIB
RT Auto : 100:4
Route Targets in Use Type
------------------------------ ---------------------
100:4 Import
100:4 Export
SRv6-Services: L3 Release 7.11.1 This feature enables an SRv6 headend node to allocate
Services with Local SIDs and advertise local SIDs with Wide (32-bit) functions
from W-LIB (Local W-LIB).
The headend router utilizes the local W-LIB
functionality to define and implement SR policies
using SRv6 SIDs.
The Local W-LIB is supported for Layer 3
(VPNv4/VPNv6/BGPv4/BGPv6 global) services.
This feature introduces the usid allocation
wide-local-id-block command.
An SRv6 Service SID is used to identify a specific service function. This Service SID inserted into the packet
header by the source node is used to steer the packet along a specific path that includes the service function.
This capability enhances flexibility and control over how packets are processed and enables efficient delivery
of services within the network.
Note See SRv6 uSID Allocation Within a uSID Block for more information about W-LIB.
By default, BGP specifies to SID-Manager that allocation of uSIDs is from LIB space only. With this feature
enabled, BGP can indicate to the SID-Manager that uSID allocation is to be enforced from W-LIB.
BGP performs transposition when encoding the service SID for VPN services to the label part of the NLRI,
as described in IETF RFC 9252. In the current LIB implementation, BGP transposes the 16-bit function to
the label field in the NLRI.
For W-LIB, BGP transposes the last 16-bits of the W-LIB 32-bit function to the label part of the NLRI for
VPNv4 and VPNv6 routes. For more information on transposition, see the SRv6 Services: L2 and L3 Services
with Remote SIDs from W-LIB section.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
107
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: L3 Services with Local SIDs from W-LIB
Configuration
Use the usid allocation wide-local-id-block command to enable the allocation and advertisement of an SRv6
Service SID with wide function (W-LIB) for L3 services.
The precedence rules for the W-LIB allocation mode are applied at different levels:
• W-LIB uSID Allocation Applied Globally under BGP:
router bgp 1
segment-routing srv6
usid allocation wide-local-id-block
!
• W-LIB uSID Allocation Applied at the IPv4/v6 Address Family under BGP:
router bgp 1
address-family ipv4 unicast
segment-routing srv6
usid allocation wide-local-id-block
!
address-family ipv6 unicast
segment-routing srv6
usid allocation wide-local-id-block
Verification
The following ouput shows the W-LIB uSID allocation:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
108
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: L3 Services with Local SIDs from W-LIB
VRF: foo
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
109
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: L3 Services with Local SIDs from W-LIB
-------
The following output shows the advertized SRv6 W-LIB uSID for the default VRF:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
110
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6-Services: L3 Services with Local SIDs from W-LIB
The following output shows the advertized SRv6 W-LIB uSID for a specific VRF (foo):
RP/0/0/CPU0:PE1# show bgp vrf foo 192.168.7.1/32
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
111
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6/MPLS L3 Service Interworking Gateway
SRv6/MPLS L3 Service Interworking Gateway enables you to extend L3 services between MPLS and SRv6
domains by providing service continuity on the control plane and data plane.
This feature allows for SRv6 L3VPN domains to interwork with existing MPLS L3VPN domains. The feature
also allows a way to migrate from MPLS L3VPN to SRv6 L3VPN.
The SRv6/MPLS L3 Service Interworking Gateway provides both transport and service termination at the
gateway node. The gateway generates both SRv6 VPN SIDs and MPLS VPN labels for all prefixes under the
VRF configured for re-origination. The gateway supports traffic forwarding from MPLS domain to SRv6
domain by popping the MPLS VPN label, looking up the destination prefix, and pushing the appropriate SRv6
encapsulation. From SRv6 domain to MPLS domain, the gateway removes the outer IPv6 header, looks up
the destination prefix, and pushes the VPN and next-hop MPLS labels.
VRFs on the gateway node are configured with 2 sets of route targets (RTs):
• MPLS L3VPN RTs
• SRv6 L3VPN RTs (called stitching RTs)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
112
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6/MPLS L3 Service Interworking Gateway
• Node 2 is the SRv6/MPLS L3 Service Interworking Gateway. In the MPLS domain, it has an SR prefix
SID label of 16002 for its Loopback interface 10.1.1.2/32. In the SRv6 domain, it has an SRv6 locator
of B:0:2::/48 and Loopback interface B:0:2::2/128.
• Node 3 is an L3VPN PE in the SRv6 domain with SRv6 locator of B:0:3::/48 and Loopback interface
B:0:3::3/128.
A. Node 3 advertises a BGP L3VPN update for prefix B.0.0.0/8 with RD corresponding to VRFA, including
the SRv6 VPN SID (B:0:3:V9::) assigned to this VRF, in the SRv6 domain.
Note SRv6 uDT4 function value "V9" is not a valid hex number, however it is used for illustration purposes to
remind you of its connection to a VRF.
B. Node 2 (gateway) imports the BGP L3VPN update and programs its FIB:
• MPLS label 24010 is allocated for VRFA
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
113
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6/MPLS L3 Service Interworking Gateway
• Prefix B.0.0.0/8 is programmed with an "SR Headend Behavior with Reduced Encapsulation in an SR
Policy" function (H.Encaps.Red) of B:0:3:V9::
Note The gateway follows per-VRF label and per-VRF SID allocation methods.
C. Node 2 re-originates a BGP L3VPN update for the same prefix, including the MPLS VPN label (24010)
allocated for the VRF, in the MPLS domain.
D. Site A sends traffic to an IPv4 prefix (B.B.B.B) of Site B
E. Node 1 encapsulates incoming traffic with the MPLS VPN label (24010) and the prefix SID MPLS label
(16002) of the BGP next-hop (Node 2).
F. Node 2 performs the following actions:
• Pops the MPLS VPN label and looks up the destination prefix
• Encapsulates the payload in an outer IPv6 header with destination address (DA) equal to the H.Encaps.Red
function (B:0:3:V9::)
G. Node 3 removes the outer IPv6 header, looks up the payload destination address (B.B.B.B), and forwards
to Site B.
A. Node 1 advertises a BGP L3VPN update for prefix A.0.0.0/8 with RD corresponding to VRFA, including
the MPLS VPN label (24055) assigned to this VRF, in the MPLS domain.
B. Node 2 (gateway) imports the BGP L3VPN update and programs its FIB:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
114
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6/MPLS L3 Service Interworking Gateway
• Prefix A.0.0.0/8 is programmed to impose an MPLS VPN label (24055) and the prefix SID MPLS label
(16001) of the BGP next-hop (Node 1)
• "Endpoint with decapsulation and IPv4 table lookup" function (uDT4) of B:0:2:V8:: is allocated to VRFA
Note SRv6 uDT4 function value "V8" is not a valid hex number, however it is used
for illustration purposes to remind you of its connection to a VRF.
Note The gateway follows per-VRF label and per-VRF SID allocation methods.
C. Node 2 re-originates a BGP L3VPN update for the same prefix, including the uDT4 function (B:0:2:V8::)
allocated for the VRF, in the SRv6 domain.
D. Site B sends traffic to an IPv4 prefix (A.A.A.A) of Site A.
E. Node 3 Encapsulates the payload in an outer IPv6 header with destination address (DA) equal to the uDT4
function (B:0:2:V8::).
F. Node 2 performs the following actions:
• Removes the outer IPv6 header and looks up the destination prefix
• Pushes the MPLS VPN label (24055) and the prefix SID MPLS label (16001) of the BGP next-hop (Node
1)
G. Node 1 pops the MPLS VPN label, looks up the payload destination address (A.A.A.A), and forwards to
Site A.
Example
Leveraging the topology described in the above use-case, this example shows the SRv6/MPLS L3 Service
Interworking Gateway configuration required at Node 2.
The following configuration shows how to enable SRv6 with locator and configure encapsulation parameters:
segment-routing
srv6
encapsulation
source-address B:0:2::2
!
locators
locator LOC1
prefix B:0:2::/48
!
!
!
!
The following configuration shows how to configure a VPNv4 VRF with the following route targets (RTs):
• 1111:1, RT used for MPLS L3VPN
• 2222:1, RT used for SRv6 L3VPN (stitching RT)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
115
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
L3 EVPN/SRv6 and L3 EVPN/MPLS Interworking Gateway
vrf ACME
address-family ipv4 unicast
import route-target
1111:1
2222:1 stitching
!
export route-target
1111:1
22222:1 stitching
!
!
!
The following configuration shows how to configure SRv6/SRv6 VPNs under BGP:
router bgp 100
segment-routing srv6
locator LOC1
!
neighbor 10.1.1.1
address-family vpnv4 unicast
import re-originate stitching-rt
route-reflector-client
advertise vpnv4 unicast re-originated
!
neighbor B:0:3::1
address-family vpnv4 unicast
import stitching-rt re-originate
route-reflector-client
encapsulation-type srv6
advertise vpnv4 unicast re-originated stitching-rt
!
vrf ACME
address-family ipv4 unicast
enable label-mode
segment-routing srv6
Support for L3 Release 7.9.1 This feature allows for SRv6 L3 EVPN domains to
EVPN/SRv6 and L3 interwork with existing MPLS L3 EVPN domains,
EVPN/MPLS enabling you to extend L3 EVPN services between
Interworking Gateway SRv6 and MPLS domains by providing service
continuity on the control plane and data plane.
This feature allows for SRv6 L3 EVPN domains to
interwork with existing MPLS L3 EVPN domains.
The feature also allows a way to migrate from MPLS
L3 EVPN to SRv6 L3 EVPN.
This feature adds support for L3 EVPN interworking between SRv6 and MPLS.
L3 EVPN/SRv6 and L3 EVPN/MPLS Interworking Gateway enables you to extend L3 EVPN services between
MPLS and SRv6 domains by providing service continuity on the control plane and data plane.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
116
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
L3 EVPN/SRv6 and L3 EVPN/MPLS Interworking Gateway
This feature allows for SRv6 L3 EVPN domains to interwork with existing MPLS L3 EVPN domains. The
feature also allows a way to migrate from MPLS L3 EVPN to SRv6 L3 EVPN.
The L3 EVPN/SRv6 and L3 EVPN/MPLS Interworking Gateway provides both transport and service
termination at the gateway node.
VRFs on the gateway node are configured with 2 sets of route targets (RTs):
• L3 EVPN/MPLS RTs
• L3 EVPN/SRv6 RTs (called stitching RTs)
The gateway generates both L3 EVPN/SRv6 SIDs and L3 EVPN/MPLS labels for all prefixes under the VRF
configured for re-origination:
• MPLS-to-SRv6 Control Plane Direction
The gateway imports routes received from the MPLS side (via EVPN RT5) and re-originates them in
L3VPN VRF with a per-VRF SRv6 SID.
• SRv6-to-MPLS Control Plane Direction
The gateway imports routes received from the SRv6 side (via EVPN RT5) and re-originates them in
L3VPN VRF with a per-VRF label.
In the data plane, the gateway forwards traffic from the MPLS domain to the SRv6 domain by popping the
MPLS L3 EVPN label, looking up the destination prefix, and pushing the appropriate SRv6 encapsulation.
In the opposite direction, the gateway removes the outer IPv6 header, looks up the destination prefix, and
pushes the L3 EVPN and next-hop MPLS labels.
Configuration Example
Leveraging the topology described above, this example shows the SRv6/MPLS L3 EVPN Service Interworking
Gateway configuration required at Node 2.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
117
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
L3 EVPN/SRv6 and L3 EVPN/MPLS Interworking Gateway
The following configuration shows how to enable SRv6 with locator and configure encapsulation parameters.
segment-routing
srv6
encapsulation
source-address b:0:2::2
!
locators
locator LOC1
prefix b:0:2::/48
!
!
!
!
The following configuration shows how to configure a VPNv4/VPNv6 VRF with the following route targets
(RTs):
• 1111:1, RT used for MPLS L3 EVPN
• 2222:1, RT used for SRv6 L3 EVPN (stitching RT)
vrf VPN1
address-family ipv4 unicast
import route-target
1111:1
2222:1 stitching
!
export route-target
1111:1
2222:1 stitching
!
!
address-family ipv6 unicast
import route-target
1111:1
2222:1 stitching
!
export route-target
1111:1
2222:1 stitching
!
!
!
The following configuration shows how to configure SRv6/SRv6 VPNs under BGP:
router bgp 100
segment-routing srv6
locator LOC1
!
address-family vpnv4 unicast
!
address-family vpnv6 unicast
!
address-family l2vpn evpn
!
neighbor 2222::2
remote-as 100
description SRv6 side peering
address-family l2vpn evpn
import reoriginate stitching-rt (Imports NLRIs that match normal route target
identifier and exports re-originated NLRIs assigned with the stitching
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
118
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
L3 EVPN/SRv6 and L3VPN/MPLS Interworking Gateway
Support for L3 Release 7.9.1 This feature allows for SRv6 L3 EVPN domains to
EVPN/SRv6 and interwork with existing MPLS L3VPN domains,
L3VPN/MPLS enabling you to extend L3 services between MPLS
Interworking Gateway and SRv6 domains by providing service continuity
on the control plane and data plane.
The feature also allows a way to migrate from MPLS
L3VPN to SRv6 L3 EVPN.
This feature adds support for EVPN L3VPN interworking between SRv6 and MPLS.
L3 EVPN/SRv6 and L3VPN/MPLS Interworking Gateway enables you to extend L3 services between MPLS
and SRv6 domains by providing service continuity on the control plane and data plane.
This feature allows for SRv6 L3 EVPN domains to interwork with existing MPLS L3VPN domains. The
feature also allows a way to migrate from MPLS L3VPN to SRv6 L3 EVPN.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
119
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
L3 EVPN/SRv6 and L3VPN/MPLS Interworking Gateway
The L3 EVPN/SRv6 and L3VPN/MPLS Interworking Gateway provides both transport and service termination
at the gateway node.
VRFs on the gateway node are configured with 2 sets of route targets (RTs):
• L3VPN/MPLS RTs
• L3 EVPN/SRv6 RTs (called stitching RTs)
The gateway generates both L3 EVPN/SRv6 SIDs and L3VPN/MPLS labels for all prefixes under the VRF
configured for re-origination:
• MPLS to SRv6 Control Plane Direction
The gateway imports routes received from the MPLS side (via EVPN RT5) and re-originates them in
L3 EVPN VRF with a per-VRF SRv6 SID.
• SRv6 to MPLS Control Plane Direction
The gateway imports routes received from the SRv6 side (via EVPN RT5) and re-originates them in
L3VPN VRF with a per-VRF label.
In the data plane, the gateway forwards traffic from the MPLS domain to the SRv6 domain by popping the
MPLS L3VPN label, looking up the destination prefix, and pushing the appropriate SRv6 encapsulation. In
the opposite direction, the gateway removes the outer IPv6 header, looks up the destination prefix, and pushes
the L3VPN and next-hop MPLS labels.
Configuration Example
The following configuration shows how to enable SRv6 with locator and configure encapsulation parameters:
segment-routing
srv6
encapsulation
source-address b:0:2::2
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
120
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
L3 EVPN/SRv6 and L3VPN/MPLS Interworking Gateway
locators
locator LOC1
prefix b:0:2::/48
!
!
!
!
The following configuration shows how to configure a VPNv4/VPNv6 VRF with the following route targets
(RTs):
• 1111:1, RT used for MPLS L3 EVPN
• 2222:1, RT used for SRv6 L3 EVPN (stitching RT)
vrf VPN1
address-family ipv4 unicast
import route-target
1111:1
2222:1 stitching
!
export route-target
1111:1
2222:1 stitching
!
!
address-family ipv6 unicast
import route-target
1111:1
2222:1 stitching
!
export route-target
1111:1
2222:1 stitching
!
!
!
The following configuration shows how to configure SRv6/SRv6 VPNs under BGP:
router bgp 100
segment-routing srv6
locator LOC1
!
address-family vpnv4 unicast
!
address-family vpnv6 unicast
!
address-family l2vpn evpn
!
neighbor 2222::2
remote-as 100
description SRv6 side peering
address-family l2vpn evpn
import reoriginate stitching-rt (Imports NLRIs that match normal route target
identifier and exports re-originated NLRIs assigned with the stitching
route target identifier)
route-reflector-client
encapsulation-type srv6
advertise vpnv4 unicast re-originated (Specifies advertisement of re-originated
VPNv4 unicast routes)
advertise vpnv6 unicast re-originated (Specifies advertisement of re-originated
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
121
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6/MPLS Dual-Connected PE
SRv6/MPLS Dual-Connected PE
Table 21: Feature History Table
SRv6/MPLS Dual-Connected Release This feature allows a PE router to support IPv4 L3VPN
PE (SRv6 Micro SID) 7.3.2 services for a given VRF with both MPLS and SRv6. This
is MPLS and SRv6 L3VPNv4 co-existence scenario and is
sometimes referred to as dual-connected PE.
A PE router can support IPv4 L3VPN service for a given VRF with both MPLS and SRv6. This is MPLS and
SRv6 L3VPNv4 co-existence scenario and is sometimes referred to as dual-connected PE.
In the figure below, node 2 is a dual-connected PE to Site C, providing:
• MPLS/IPv4 L3VPN between Site A and Site C
• SRv6/IPv4 L3VPN between Site B and Site C
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
122
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6/MPLS Dual-Connected PE
Configure Encaps on Neighbor to Send the SRv6 SID Toward the SRv6 Dataplane
By default, if a VRF prefix has both an MPLS label and an SRv6 SID, the MPLS label is sent when advertising
the prefix to the PE. To advertise a VRF prefix with an SRv6 SID to an SRv6 session, use the
encapsulation-type srv6 command under the neighbor VPN address-family.
Router(config-bgp)# neighbor 192::6
Router(config-bgp-nbr)# remote-as 1
Router(config-bgp-nbr)# address-family ipv4 unicast
Router(config-bgp-nbr-af)# encapsulation-type srv6
Router(config-bgp-nbr-af)# exit
Running Config
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
123
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Provider Edge (PE) Lite Support
!
!
vrf blue
rd 1:10
address-family ipv4 unicast
mpls alloc enable
label mode per-ce
segment-routing srv6
alloc mode per-ce
!
!
!
!
SRv6 Provider Edge (PE) Release 7.8.1 This feature provides VPN de-multiplexing-only
Lite behaviors (End.DT4/DT6/DT46) at an SRv6 PE node.
This allows for a lightweight-PE implementation (no
VPN encapsulation) that steers SRv6-encapsulated
traffic across an SR-MPLS backbone after performing
a VPN lookup.
SRv6 Provider Edge (PE) Lite leverages SRv6 programmability (SRv6 SID as a service ID) to steer traffic
across SR MPLS (non-SRv6) backbone.
Service traffic is encapsulated with an explicit SRv6 End.DT46 SID in ingress PE for a VRF.
Note See Configuring Explicit End.DT46 SRv6 SIDs, on page 41 for information about explicit End.DT46 SRv6
SIDs.
When traffic arrives at the ingress PE, it performs SRv6 Endpoint Behaviors.
The backbone leverages MPLS L3VPN and SR-TE MPLS (with route coloring and Automated Steering) to
transport the traffic to the egress nodes in the backbone via different explicitly specified SLA paths using an
SR-TE policy.
Use Case
The figure below shows a use case where inter-data-center traffic is encapsulated in SRv6 (IP-in-IPv6) and
is carried over IP-only metro domains and then over an SR-MPLS backbone.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
124
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Provider Edge (PE) Lite Support
Data center gateways (GW1 and GW2) perform IP-in-IPv6 encapsulation where the outer IPv6 destination
address represents an SRv6 network program that leads traffic to the SRv6 PE lite nodes (PE11 and PE12).
This outer IPv6 destination address is determined by the gateway controller to provide a desired transport
SLA to an application over the backbone. The SRv6 PE lite nodes remove the SRv6 encapsulation and perform
a lookup of the original encapsulated packet's IP destination address in the routing table of an MPLS VPN
built over the backbone. The prefixes in the VPN table are associated with different transport SLAs (for
example, best-effort or minimum delay). These prefixes can be steered over the native SR LSP or an SR-TE
policy path, according to automated steering (AS) principles.
Figure 12: SRv6 Locator/Functions and SR-MPLS Prefix SIDs (Traffic Direction – DC1 to DC2)
The SRv6 PE lite nodes are configured with SRv6 locators and explicit (manually assigned) service
de-multiplexing end-point behaviors to perform decapsulation and VPN table lookup.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
125
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Provider Edge (PE) Lite Support
For high-availability, the SRv6 PE lite nodes are configured with an Anycast SRv6 locator (same locator in
multiple nodes) and explicit end-point behavior with a common value among them. As a result, failure of a
given SRv6 PE lite node can be handled by other nodes with the same Anycast locator and end-point behavior.
For example, SRv6 PE lite nodes (PE11 and PE12) are configured with the Anycast SRv6 locator
(FCBB:BB00:100::/48) and a common End.DT46 function (0xFE01) associated with MPLS VPN VRF 200.
The SRv6 PE lite nodes, which are part of the SR MPLS backbone, are configured with corresponding prefix
SIDs.
Figure 13: BGP VPN Overlay Route Advertisement (Traffic Direction – DC1 to DC2)
Prefixes from the data center are advertised in the backbone via multiprotocol BGP as part of a VPN. These
prefixes can include a color extended community in order to indicate the desired transport SLA. For example,
PE21 advertises BGP VPN overlay routes for DC2, 20.0.0.0/24 and 30.0.0.0/24. Prefix 20.0.0.0/24 requires
best-effort treatment. Prefix 30.0.0.0/24 requires a transport SLA indicated by the presence of color extended
community of value 1000.
For traffic in the direction DC1 to DC2, the SRv6 PE lite node PE11 is an SR-TE headend of an SR policy
associated with color 1000 and end-point of PE21. This SR policy will be used to steer traffic toward BGP
service routes with color 1000 advertised by PE21. As an example, this SR policy is associated with a segment
list that includes the prefix SID of a transit router in the backbone (PE50) and the prefix SID of the intended
egress PE (PE21).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
126
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Provider Edge (PE) Lite Support
Traffic arriving at GW1 destined for 20.0.0.1 in DC2 is encapsulated into an outer IPv6 header with a destination
address of FCBB:BB00:100:FE01::. This address is composed of the Anycast locator at PE11 and the explicit
End.DT46 function value of VRF 200. Any transit nodes in the Metro1 domain simply perform a
longest-prefix-match lookup for prefix FCBB:BB00:100::/48 and forward the packet along the shortest path
to PE11.
PE11 removes the SRv6 encapsulation and looks up prefix 20.0.0.1 in VPN table of VRF 200. PE11 imposes
the VPN label and the prefix SID of PE21 in order to steer traffic over the native LSP path.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
127
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Provider Edge (PE) Lite Support
Traffic arriving at GW1 destined for 30.0.0.1 in DC2 is encapsulated into an outer IPv6 header with a destination
address of FCBB:BB00:100:FE01::. As in the previous case, this address is composed of the Anycast locator
at PE11 and the explicit End.DT46 function value of VRF 200. Any transit nodes in the Metro1 domain simply
perform a longest-prefix-match lookup for prefix FCBB:BB00:100::/48 and forward the packet along the
shortest path to PE11.
PE11 removes the SRv6 encapsulation and looks up prefix 30.0.0.1 in VPN table of VRF 200. PE11 imposes
the VPN label and transport labels corresponding to the segment list of the SR policy (1000, PE21) in order
to steer traffic over the path associated with the SR policy.
Configure IGP instance in core with SR MPLS enabled and prefix SID assigned to Loopback0:
router isis core
address-family ipv4 unicast
metric-style wide level 1
router-id Loopback0
segment-routing mpls
!
interface Loopback0
address-family ipv4 unicast
prefix-sid absolute 16011
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
128
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Provider Edge (PE) Lite Support
!
!
!
!
!
!
Configure BGP:
router bgp 100
segment-routing srv6
locator myLoc1
!
address-family vpnv4 unicast
!
neighbor 1.1.1.21
remote-as 100
address-family vpnv4 unicast
!
!
vrf VRF-200
rd 200:1
address-family ipv4 unicast
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
129
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 SID Information in BGP-LS Reporting
This example shows how to distribute IS-IS SRv6 link-state data using BGP-LS:
Router(config)# router isis 200
Router(config-isis)# distribute link-state instance-id 200
It is possible to use a list of packed carriers to ping or trace a SID, to ping or trace route, use <destination
SID> via srv6-carriers <list of packed carriers>
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
130
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
DHCPv6 Relay Agent Support over SRv6
For information on configuring DHCPv4 relay agent and proxy, refer to the “Implementing the Dynamic Host
Configuration Protocol” chapter in the IP Addresses and Services Configuration Guide .
For information on configuring DHCPv6 relay agent, refer to the “Implementing the Dynamic Host
Configuration Protocol” chapter in the IP Addresses and Services Configuration Guide.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
131
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Full-Replace Migration to SRv6 Micro-SID
At the end of this step, the migration status of the following PE Nodes are:
• Locator reachability: format1 and f3216
• Underlay endpoint/headends: f3216 only
• Overlay endpoint/headends: format1
3. Migrate the overlay to f3216: Enables overlay f3216 under BGP and EVPN on all PE nodes. The BGP
and EVPN configuration replaces format1 by f3216 locators. During this stage, the f3216 Micro-SIDs
are allocated, installed, and announced, while the format1 SIDs are deallocated, uninstalled, and withdrawn.
The format1 locators are removed after overlay traffic convergence to f3216 on all nodes. The format1
locators are unconfigured from BGP and EVPN, and deleted from SRv6. For a transient period, BGP and
EVPN might have some paths with format1 and some with f3216.
At the end of this step, the migration status of the following is:
• For P/PE Nodes:
• Locator reachability: f3216 only
• Underlay endpoint/headends: f3216 only
• Overlay endpoint/headends: f3216 only
The migration starts with SRv6 base format1, and ends with SRv6 Micro-SID f3216. The migration states
are:
1. Initial state: This is the early migration state of a deployment, for the supported features. This state
comprises SRv6 base with format1.
This example shows the initial state of migration with SRv6 and configure locator:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
132
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Full-Replace Migration to SRv6 Micro-SID
This example shows the initial state of migration with SRv6 and IS-IS:
This example shows the initial state of migration with SRv6 and BGP/EVPN:
Router(config)# evpn
Router(config-evpn)# segment-routing srv6
Router(config-evpn-srv6)# locator myLoc0
2. In-migration state: The migration procedures are initiated, and are in progress. This state comprises
SRv6 in dual mode (base with format1, and Micro-SID with f3216).
This example shows the in-migration state with SRv6 and configure locator:
This example shows the in-migration state with SRv6 and IS-IS:
This example shows the in-migration state with SRv6 and BGP/EVPN:
Router(config)# evpn
Router(config-evpn)# segment-routing srv6
Router(config-evpn-srv6)# locator myuLoc0
3. End state: This is the state of deployment at the end of the migration. At the end state, you can update
the network and add new features. The Full-Replace migration end state can be of two modes:
• Full-Replace: Both underlay and overlay are migrated to Micro-SID f3216. Full-Replace is the Cisco
recommended migration type.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
133
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Full-Replace Migration to SRv6 Micro-SID
• uF1: Underlay migrated to Micro-SID f3216, overlay remains format1. The uF1 migration is a
transient state of the Full-Replace migration type.
This example shows the end state with SRv6 and configure locator:
This example shows the end state with SRv6 and IS-IS:
This example shows the end state with SRv6 and BGP/EVPN:
Router(config)# evpn
Router(config-evpn)# segment-routing srv6
Router(config-evpn-srv6)# locator myuLoc0
Run the following command to check the result of migration, as shown in the example:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
134
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Full-Replace Migration to SRv6 Micro-SID Restrictions
SRv6 Traffic Accounting Release 7.10.1 You can now enable the router to
record the number of packets and
bytes transmitted on a specific
egress interface for IPv6 traffic
using the SRv6 locator counter.
You can use this data to create
deterministic data tools to anticipate
and plan for future capacity
planning solutions.
This feature introduces or modifies
the following changes:
CLI:
• accounting prefixes ipv6
mode per-prefix per-nexthop
srv6-locators
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
135
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Traffic Accounting
SRv6 traffic accounting is an integral part of today’s network for planning and forecasting traffic. Traffic
accounting is the volume of aggregated traffic flows that enter, traverse, and leave the network in a given
time. Traffic accounting is a solution to monitor the traffic that helps to measure traffic flows and record how
much customer traffic is passing through the SR network.
To design a network topology and meet the defined Service-Level Agreement (SLA), capacity planning
becomes essential for forecasting traffic load and failures. A complete view of the traffic in your network
enables you to anticipate common failures, and provision for network expansion.
You can now monitor traffic on an ingress node of a domain that is SRv6 encapsulated towards an egress
node of the domain. The traffic is recorded at the source using the per-locator, per-egress-interface (LOC.INT.E)
counter, which is the locator per interface at egress to account the traffic. For a given locator (L) and interface
(I), the router counts the number of packets and bytes for the traffic transmitted on the interface (I) with a
destination address (DA) matching the locator L.
When this feature is enabled on routers, all traffic passing through the routers are accounted. These counters
are periodically streamed through telemetry and you can retrieve the counters at any point.
To enable traffic accounting on PE and P routers, use the accounting prefixes ipv6 mode per-prefix command.
You can retrieve the number of packets transmitted and received on the specific interface of a PE or P routers
by using the following telemetry:
Cisco-IOS-XR-fib-common-oper:cef-accounting/vrfs/vrf[vrf-name='default']/afis/afi[afi-type=ipv6]/pfx/srv6locs/srv6loc
Benefits
Monitoring the traffic provides numerous benefits, and here are a few:
• To optimize network utilization and achieve a balance between underutilized and overutilized paths.
• To plan and optimize network capacity and avoid congestion.
• To plan the service provisioning and choose the right path and create an optimized backup path (for using
SRLG's affinity, and so on).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
136
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Traffic Accounting
PE1 learns CE2 reachability through PE2. Consider PE1 has ECMP paths via P21 and P22 to reach PE2.
• When traffic reaches PE1, PE1 imposes traffic with the PE2 locator fcbb:bb00:2::.
• SRv6 traffic accounting LOC.INT.E is per prefix per egress interface accounting.
When traffic exits the PE1 interface (fa21) through P21, PE1 keeps the count of this traffic that is sent.
Also, when traffic exits the PE1 interface (fa22) through P22, PE1 keeps the count of this traffic that is
sent. The traffic is accounted irrespective of the path PE1 takes to send traffic.
Here is the SRv6 label of the outgoing traffic for PE2:
<fcbb:bb00:1::1, fcbb:bb00:2:f2d1::> [CUSTTraffic]
• When the next set of packets are received and passed through PE1, the counters are incremented on
fa21or fa22 interface based on the path the traffic sent through PE2.
Let's see how the SRv6 traffic is calculated using the demand matrix.
The Demand Matrix (DM) also known as a traffic matrix is a representation of the amount of data transmitted
between every pair of routers. Each cell in the DM represents a traffic volume from one router to another.
DM gives a complete view of the traffic in your network.
In the topology, the amount of external traffic destined for PE2 is a combination of external and internal
traffic.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
137
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
SRv6 Traffic Accounting
The external traffic that PE2 receives is equal to the total traffic sent out from PE1 minus the received internal
traffic.
So, PE2 recieves 18 gigabits per second external traffic from PE1.
The calculation for external traffic for routers follows a similar approach. Let's see few examples in the
following demand matrix.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
138
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Usage Guidelines and Limitations
Table 24: Demand Matrix showing traffic transmitted from PE1 and PE4 to PE2
• SRv6 VPNv4
• SRv6 VPNv6
• SRv6 INETv4
• SRv6 INETv6
• SRv6 EVPN VPWS
• SRv6 EVPN ELAN (unicast and BUM traffic)
Limitations
• Supports a minimum telemetry pull interval of 30 seconds.
• Local generated control plane packets are considered for SRv6 traffic accounting.
• Ethernet header is not considered for bytes accounting.
• Packets are not counted if the local uA is the top SID.
• SRv6 traffic accounting is not supported with SRv6 TE policy.
• No additional MIBs are supported to retrieve SRv6 traffic statistics. We recommend to use telemetry
through the newly added sensor-path in Cisco-IOS-XR-fib-common-oper to retrieve these statistics.
• The accounting counters for L2VPN ELAN BUM and unknown unicast traffic exhibit a notable disparity.
For instance, when two million packets are sent, the counters record 2.5 million packets.
To rectify this discrepancy, you must subtract the count of the L2 egress LAG not local drop counter
from the value attributed to the bundle interface.
This adjustment allows for an accurate tally of packets exiting the bundle interface. Notably, no such
irregularities are observed in L3VPN, L2VPN VPWs, or L2VPN known unicast traffic.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
139
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configure SRv6 Traffic Accounting
This discrepancy persists even in scenarios where bundle members span different NPs on a single line
card router.
Configuration Example
To enable SRv6 traffic accounting:
Router#configure
Router(config)#accounting
Router(config-acct)#prefixes ipv6 mode per-prefix per-nexthop srv6-locators
Router(config-acct)#commit
Running Configuration
Router#show run
accounting
prefixes
ipv6
mode per-prefix per-nexthop srv6-locators
!
!
!
Verification
Verify the Stats ID allocated for remote locator. The following example shows the SRv6 locator ID and the
stats ID allocated for the prefixes with the locator ID.
Router#show route ipv6 fccc:cc00:1:: detail
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
140
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configure SRv6 Traffic Accounting
locator flag
Backup path id:2
Route version is 0x68 (104)
No local label
IP Precedence: Not Set
QoS Group ID: Not Set
Flow-tag: Not Set
Fwd-class: Not Set
Route Priority: RIB_PRIORITY_NON_RECURSIVE_LOW (8) SVD Type RIB_SVD_TYPE_LOCAL
Download Priority 2, Download Version 39779
No advertising protos.
Router#show run
grpc
port 57400
no-tls
!
telemetry model-driven
sensor-group s1
sensor-path
Cisco-IOS-XR-fib-common-oper:cef-accounting/vrfs/vrf[vrf-name='default']/afis/afi[afi-type=ipv6]/pfx/srv6locs/srv6loc
!
subscription sub1
sensor-group-id s1 sample-interval 30000
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
141
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configure SRv6 Traffic Accounting
"Cisco-IOS-XR-fib-common-oper:cef-accounting": {
"vrfs": {
"vrf": [
{
"vrf-name": "default",
"afis": {
"afi": [
{
"afi-type": "ipv6",
"pfx": {
"srv6locs": {
"srv6loc": [
{
"ipv6-address": " fccc:cc00:1::",
"prefix-length": 48,
"ipv6-prefix": " fccc:cc00:1::",
"ipv6-prefix-length": 48,
"accounting-information": [
{
"number-of-tx-packets": "1500000", <========= Accounting data
"number-of-tx-bytes": "378000000", <========= Accounting data
"path-index": 0,
"outgoing-interface": "Bundle-Ether1201",
"nexthop-addr": "fe80::2/128"
},
{
"number-of-tx-packets": "1000000", <========= Accounting data
"number-of-tx-bytes": "252000000", <========= Accounting data
"path-index": 1,
"outgoing-interface": "TenGigE0/0/0/22",
"nexthop-addr": "fe80::2/128"
}
],
"total-number-of-packets-switched": "2500000",
"total-number-of-bytes-switched": "630000000"
}
]
}
}
}
]
}
}
]
}
}
}
Run sh cef ipv6 accounting command to display the packets per bytes:
Router#sh cef ipv6 accounting
fccc:cc00:33::/48
Accounting: 0/0 packets/bytes output (per-prefix-per-path mode)
via fe80::2/128, Bundle-Ether1201
path-idx 0
next hop fe80::2/128
Accounting: 0/0 packets/bytes output
fccc:cc05:2::/48
Accounting: 0/0 packets/bytes output (per-prefix-per-path mode)
via fe80::2/128, Bundle-Ether1201
path-idx 0
next hop fe80::2/128
Accounting: 0/0 packets/bytes output
fccc:cc3e:2::/48
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
142
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configure SRv6 Traffic Accounting
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
143
Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs
Configure SRv6 Traffic Accounting
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
144
CHAPTER 5
Configure Segment Routing over IPv6 (SRv6) with
Full-Length SIDs
Note IOS XR release 7.3.2 supports SRv6 with Full-length SID and Micro-SID formats; however, only one format
is supported in the network at a time.
To use SRv6 Full-length SID, globally enable SRv6 and configure the 64-bit locator. See the Configuring
SRv6, on page 151.
To use SRv6 Micro-SID (uSID), see the Configure Segment Routing over IPv6 (SRv6) with Micro-SIDs, on
page 9 chapter.
Segment Routing for IPv6 (SRv6) is the implementation of Segment Routing over the IPv6 dataplane.
• Segment Routing over IPv6 Overview, on page 145
• Configuring SRv6 under IS-IS, on page 154
• Configuring SRv6 IS-IS Flexible Algorithm, on page 155
• Configuring SRv6 IS-IS TI-LFA, on page 157
• Configuring SRv6 IS-IS Microloop Avoidance, on page 160
• SRv6 Services: IPv4 L3VPN, on page 161
• SRv6 Services: IPv6 L3VPN, on page 169
• SRv6 Services: IPv4 L3VPN Active-Standby Redundancy using Port-Active Mode, on page 178
• SRv6 Services: BGP Global IPv4, on page 182
• SRv6 Services: BGP Global IPv6, on page 185
• SRv6 Services: EVPN VPWS — All-Active Multi-Homing , on page 191
• SRv6 Services: SRv6 Services TLV Type 5 Support, on page 193
• SRv6/MPLS L3 Service Interworking Gateway, on page 193
• SRv6/MPLS Dual-Connected PE, on page 198
• SRv6 SID Information in BGP-LS Reporting, on page 199
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
145
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Segment Routing over IPv6 Overview
In an SR-MPLS enabled network, an MPLS label represents an instruction. The source nodes programs the
path to a destination in the packet header as a stack of labels.
SRv6 introduces the Network Programming framework that enables a network operator or an application to
specify a packet processing program by encoding a sequence of instructions in the IPv6 packet header. Each
instruction is implemented on one or several nodes in the network and identified by an SRv6 Segment Identifier
(SID) in the packet. The SRv6 Network Programming framework is defined in IETF RFC 8986 SRv6 Network
Programming.
In SRv6, an IPv6 address represents an instruction. SRv6 uses a new type of IPv6 Routing Extension Header,
called the Segment Routing Header (SRH), in order to encode an ordered list of instructions. The active
segment is indicated by the destination address of the packet, and the next segment is indicated by a pointer
in the SRH.
Figure 19: Network Program in the Packet Header
The SRv6 SRH is documented in IETF RFC IPv6 Segment Routing Header (SRH).
The SRH is defined as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Next Header | Hdr Ext Len | Routing Type | Segments Left |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Last Entry | Flags | Tag |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Segment List[0] (128-bit IPv6 address) |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| |
...
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
| Segment List[n] (128-bit IPv6 address) |
| |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
146
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Segment Routing over IPv6 Overview
// //
// Optional Type Length Value objects (variable) //
// //
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
In SRv6, a SID represents a 128-bit value, consisting of the following three parts:
• Locator: This is the first part of the SID with most significant bits and represents an address of a specific
SRv6 node.
• Function: This is the portion of the SID that is local to the owner node and designates a specific SRv6
function (network instruction) that is executed locally on a particular node, specified by the locator bits.
• Args: This field is optional and represents optional arguments to the function.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
147
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Segment Routing over IPv6 Overview
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
148
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Segment Routing over IPv6 Overview
Depending on how the SRH is handled, different behavior variants are defined for the End and End.X behaviors.
The End and End.X behaviors can support these variants, either individually or in combinations.
• Penultimate Segment Pop (PSP) of the SRH variant—An SR Segment Endpoint Nodes receive the
IPv6 packet with the Destination Address field of the IPv6 Header equal to its SID address.
A penultimate SR Segment Endpoint Node is one that, as part of the SID processing, copies the last SID
from the SRH into the IPv6 Destination Address and decrements the Segments Left value from one to
zero.
The PSP operation takes place only at a penultimate SR Segment Endpoint Node and does not happen
at non-penultimate endpoint nodes. When a SID of PSP-flavor is processed at a non-penultimate SR
Segment Endpoint Node, the PSP behavior is not performed since Segments Left would not be zero.
The SR Segment Endpoint Nodes advertise the SIDs instantiated on them via control plane protocols. A
PSP-flavored SID is used by the Source SR Node when it needs to instruct the penultimate SR Segment
Endpoint Node listed in the SRH to remove the SRH from the IPv6 header.
• Ultimate Segment Pop (USP) of the SRH variant—The SRH processing of the End and End.X behaviors
are modified as follows:
If Segments Left is 0, then:
1. Update the Next Header field in the preceding header to the Next Header value of the SRH
2. Decrease the IPv6 header Payload Length by 8*(Hdr Ext Len+1)
3. Remove the SRH from the IPv6 extension header chain
4. Proceed to process the next header in the packet
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
149
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Segment Routing over IPv6 Overview
One of the applications of the USP flavor is when a packet with an SRH is destined to an application on
hosts with smartNICs implementing SRv6. The USP flavor is used to remove the consumed SRH from
the extension header chain before sending the packet to the host.
• Ultimate Segment Decapsulation (USD) variant—The Upper-layer header processing of the End and
End.X behaviors are modified as follows:
• End behavior: If the Upper-layer Header type is 41 (IPv6), then:
1. Remove the outer IPv6 Header with all its extension headers
2. Submit the packet to the egress IPv6 FIB lookup and transmission to the new destination
3. Else, if the Upper-layer Header type is 4 (IPv4)
4. Remove the outer IPv6 Header with all its extension headers
5. Submit the packet to the egress IPv4 FIB lookup and transmission to the new destination
6. Else, process as per Section 4.1.1 (Upper-Layer Header) of IETF RFC 8986 SRv6 Network
Programming
One of the applications of the USD flavor is the case of TI-LFA in P routers with encapsulation with
H.Encaps. The USD flavor allows the last Segment Endpoint Node in the repair path list to decapsulate
the IPv6 header added at the TI-LFA Point of Local Repair and forward the inner packet.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
150
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Segment Routing over IPv6 Overview
• Flex-algo
Configuring SRv6
To enable SRv6 globally, you should first configure a locator with its prefix. The IS-IS protocol announces
the locator prefix in IPv6 network and SRv6 applications (like ISIS, BGP) use it to allocate SIDs.
The following usage guidelines and restrictions apply while configuring SRv6.
• All routers in the SRv6 domain should have the same SID block (network designator) in their locator.
• The locator length should be 64-bits long.
• The SID block portion (MSBs) cannot exceed 40 bits. If this value is less than 40 bits, user should
use a pattern of zeros as a filler.
• The Node Id portion (LSBs) cannot exceed 24 bits.
• You can configure up to 8 locators to support SRv6 Flexible Algorithm. All locators prefix must share
the same SID block (first 40-bits).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
151
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Segment Routing over IPv6 Overview
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
152
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Segment Routing over IPv6 Overview
Encapsulation:
Source Address: Yes
Hop-Limit : value=Yes, propagate=No
Traffic-class : value=Yes, propagate=Yes
Max SIDs: 64000
SID Holdtime: 3 mins
The following example shows how to display detail information regarding an allocated SRv6 local SID.
Similarly, you can display SID information across locators by using the show segment-routing sid command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
153
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Configuring SRv6 under IS-IS
show Commands
You can use the following 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 Displays the SRv6 locator information on the router.
[detail]
show segment-routing srv6 locator locator-name Displays the information regarding SRv6 local SID(s)
sid [[sid-ipv6-address [detail] allocated from a given locator.
show segment-routing srv6 sid [sid-ipv6-address | Displays SID information across locators. By default,
all | stale] [detail] only “active” (i.e. non-stale) SIDs are displayed.
show route ipv6 local-srv6 Displays all SRv6 local-SID prefixes in IPv6 RIB.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
154
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Configuring SRv6 IS-IS Flexible Algorithm
Note If no level is specified, local locators will be advertised into all configured ISIS levels. Ensure that locators
are included in the redistribution or propagation policy to prevent potential loops when redistributing between
multiple instances or propagating between Level 2 and Level 1.
For more information about configuring IS-IS, refer to the "Implementing IS-IS" chapter in the Routing
Configuration Guide for Cisco ASR 9000.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
155
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Configuring SRv6 IS-IS Flexible Algorithm
Router(config-srv6-locator)# exit
Router(config-srv6)# exit
Router(config)# performance-measurement
Router(config-perf-meas)# interface GigabitEthernet0/0/0/0
Router(config-pm-intf)# delay-measurement
Router(config-pm-intf-dm)# advertise-delay 100
Router(config-pm-intf-dm)# commit
Verification
SRv6-LF1# show segment-routing srv6 locator
Mon Aug 12 20:54:15.414 EDT
Name ID Algo Prefix Status
-------------------- ------- ---- ------------------------ -------
Loc1-BE 17 0 2001:db8:0:a2::/64 Up
Loc1-LL 18 128 2001:db8:1:a2::/64 Up
Flex-Algo 128:
Level-2:
Definition Priority: 128
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
156
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Configuring SRv6 IS-IS TI-LFA
Level-1:
Definition Priority: 128
Definition Source: SRv6-LF1.00, (Local)
Definition Equal to Local: Yes
Disabled: No
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
157
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Configuring SRv6 IS-IS TI-LFA
Verification
This example shows how to verify the SRv6 IS-IS TI-LFA configuration using the show isis ipv6 fast-reroute
ipv6-prefix detail command.
This example shows how to verify the SRv6 IS-IS TI-LFA configuration using the show route ipv6 ipv6-prefix
detail command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
158
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Configuring SRv6 IS-IS TI-LFA
This example shows how to verify the SRv6 IS-IS TI-LFA configuration using the show cef ipv6 ipv6-prefix
detail location location command.
This example shows how to verify the SRv6 IS-IS TI-LFA configuration using the show cef ipv6
fast-reroute-db command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
159
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Configuring SRv6 IS-IS Microloop Avoidance
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
160
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv4 L3VPN
Dual-Stack L3VPN Services (IPv4, Release 7.3.2 This feature introduces support for
IPv6) (SRv6 Base) Dual-stack (VPNv4/VPNv6) VRFs.
VPNv4/VPNv6 Dual-stack
supports both IPv4 (End.DT4) and
IPv6 (End.DT6) based SRv6
L3VPN service on the same
interface, sub-interface, or VRF.
The SRv6-based IPv4 L3VPN feature enables deployment of IPv4 L3VPN over a SRv6 data plane.
Traditionally, it was done over an MPLS-based system. SRv6-based L3VPN uses SRv6 Segment IDs (SIDs)
for service segments instead of labels. SRv6-based L3VPN functionality interconnects multiple sites to
resemble a private network service over public infrastructure. To use this feature, you must configure SRv6-base.
For this feature, BGP allocates an SRv6 SID from the locator space, configured under SRv6-base and VPNv4
address family. For more information on this, refer Segment Routing over IPv6 Overview, on page 145. The
BGP SID can be allocated in the following ways:
• Per-VRF mode that provides End.DT4 support. End.DT4 represents the Endpoint with decapsulation
and IPv4 table lookup.
• Per-CE mode that provides End.DX4 cross connect support. End.DX4 represents the Endpoint with
decapsulation and IPv4 cross-connect.
BGP encodes the SRv6 SID in the prefix-SID attribute of the IPv4 L3VPN Network Layer Reachability
Information (NLRI) and advertises it to IPv6 peering over an SRv6 network. The Ingress PE (provider edge)
router encapsulates the VRF IPv4 traffic with the SRv6 VPN SID and sends it over the SRv6 network.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
161
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv4 L3VPN
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
162
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv4 L3VPN
• For per-VRF allocation mode, you can also specify the SRv6 locator.
• If an SRv6 locator is specified in the route policy, BGP will use that to allocate per-VRF SID. If
the specified locator is invalid, the SID will not be allocated.
• If an SRv6 locator is not specified in the route policy, the default locator configured under BGP is
used to allocate the SID. If the default locator is not configured, then the SID will not be allocated.
• Per-CE allocation mode always uses the default locator configured under BGP to allocate the SID.
For more information on configuring routing policies, refer to the "Implementing Routing Policy" chapter in
the Routing Configuration Guide for Cisco ASR 9000 Series Routers.
The following example shows a route policy specifying the SID allocation mode with destination-based match:
Node1(config)# route-policy set_per_prefix_locator_rpl
Node1(config-rpl)# if destination in (10.1.1.0/24) then
Node1(config-rpl-if)# set srv6-alloc-mode per-vrf locator locator1
Node1(config-rpl-if)# elseif destination in (2.2.2.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf locator locator2
Node1(config-rpl-elseif)# elseif destination in (3.3.3.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf
Node1(config-rpl-elseif)# elseif destination in (4.4.4.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-ce
Node1(config-rpl-elseif)# else
Node1(config-rpl-else)# drop
Node1(config-rpl-else)# endif
Node1(config-rpl)# end-policy
Node1(config)#
To specify per-prefix allocation mode for a specific VRF under IPv4 Address Family, use the following
command:
• router bgp as-number vrf WORD address-family ipv4 unicast segment-routing srv6 alloc mode
route-policy policy_name
This example shows how to configure per-prefix allocation mode for a specific VRF (vrf_cust1) under IPv4
address family
Node1(config)# router bgp 100
Node1(config-bgp)# vrf vrf_cust1
Node1(config-bgp-vrf)# address-family ipv4 unicast
Node1(config-bgp-vrf-af)# segment-routing srv6
Node1(config-bgp-vrf-af-srv6)# alloc mode route-policy set_per_prefix_locator_rpl
Running Configuration
route-policy set_per_prefix_locator_rpl
if destination in (10.1.1.0/24) then
set srv6-alloc-mode per-vrf locator locator1
elseif destination in (2.2.2.0/24) then
set srv6-alloc-mode per-vrf locator locator2
elseif destination in (3.3.3.0/24) then
set srv6-alloc-mode per-vrf
elseif destination in (4.4.4.0/24) then
set srv6-alloc-mode per-ce
else
drop
endif
end-policy
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
163
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv4 L3VPN
!
router bgp 100
vrf vrf_cust1
address-family ipv6 unicast
segment-routing srv6
alloc mode route-policy set_per_prefix_locator_rpl
!
!
!
!
Verify that the local and received SIDs have been correctly allocated under IPv4 address family and specific
VRF (vrf_cust1):
Node1# show bgp vpnv4 unicast local-sids
BGP router identifier 10.1.1.1, local AS number 100
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0 RD version: 0
BGP main routing table version 50
BGP NSR Initial initsync version 18 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
164
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv4 L3VPN
Verification
The following example shows how to verify the SRv6 based L3VPN configuration using the show
segment-routing srv6 sid command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
165
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv4 L3VPN
In this example, End.X represents Endpoint function with Layer-3 cross-connect, End.DT4 represents Endpoint
with decapsulation and IPv4 table lookup, and End.DX4 represents Endpoint with decapsulation and IPv4
cross-connect.
RP/0/0/CPU0:SRv6-Hub6# show segment-routing srv6 sid
*** Locator: 'my_locator' ***
SID Function Context Owner
State RW
-------------------------- ----------- ------------------------------ ------------------
----- --
cafe:0:0:66:1:: End (PSP) 'my_locator':1 sidmgr
InUse Y
cafe:0:0:66:40:: End.X (PSP) [Te0/0/0/2, Link-Local] isis-srv6
InUse Y
cafe:0:0:66:41:: End.X (PSP) [BE6801, Link-Local] isis-srv6
InUse Y
cafe:0:0:66:42:: End.X (PSP) [BE5601, Link-Local] isis-srv6
InUse Y
cafe:0:0:66:43:: End.X (PSP) [BE5602, Link-Local] isis-srv6
InUse Y
cafe:0:0:66:44:: End.DT4 'VRF1' bgp-100
InUse Y
cafe:0:0:66:45:: End.DT4 'VRF2' bgp-100
InUse Y
cafe:0:0:66:46:: End.DX4 'VRF2’:3 bgp-100
InUse Y
cafe:0:0:66:47:: End.DX4 'VRF2’:4 bgp-100
InUse Y
The following example shows how to verify the SRv6 based L3VPN configuration using the show
segment-routing srv6SID-prefixdetail command.
The following example shows how to verify the SRv6 based L3VPN configuration using the show bgp vpnv4
unicast rdroute-distinguisher/prefix command on Egress PE.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
166
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv4 L3VPN
The following example shows how to verify the SRv6 based L3VPN configuration using the show bgp vpnv4
unicast rdroute-distinguisher prefix command on Ingress PE.
The following example shows how to verify the SRv6 based L3VPN configuration using the show route
vrfvrf-name/prefixdetail command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
167
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv4 L3VPN
Nexthop in Vrf: "default", Table: "default", IPv6 Unicast, Table Id: 0xe0800000
Route metric is 0
Label: None
Tunnel ID: None
Binding Label: None
Extended communities count: 0
Source RD attributes: 0x0000:106:1
NHID:0x0(Ref:0)
SRv6 Headend: H.Encaps.Red [base], SID-list { cafe:0:0:66:44:: }
MPLS eid:0x1380600000001
Route version is 0xd (13)
No local label
IP Precedence: Not Set
QoS Group ID: Not Set
Flow-tag: Not Set
Fwd-class: Not Set
Route Priority: RIB_PRIORITY_RECURSIVE (12) SVD Type RIB_SVD_TYPE_REMOTE
Download Priority 3, Download Version 3038384
No advertising protos.
The following example shows how to verify the SRv6 based L3VPN configuration for per-ce allocation mode
using the show bgp vrfvrf-namenexthop-set command.
The following example shows how to verify the SRv6 based L3VPN configuration using the show cef
vrfvrf-name prefix detail locationline-card command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
168
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv6 L3VPN
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
169
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv6 L3VPN
Running Configuration
router bgp 100
segment-routing srv6
locator Node1-locator
!
address-family vpnv6 unicast
!
neighbor 3001::1:1:1:4
remote-as 100
address-family vpnv6 unicast
!
!
vrf vrf_cust6
rd 100:6
address-family ipv6 unicast
!
!
!
end
Running Configuration
router bgp 100
address-family vpnv6 unicast
vrf all
segment-routing srv6
locator Node1-locator
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
170
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv6 L3VPN
Running Configuration
router bgp 100
address-family vpnv6 unicast
!
neighbor 3001::1:1:1:4
remote-as 100
address-family vpnv6 unicast
!
!
vrf vrf_cust6
rd 100:6
address-family ipv6 unicast
segment-routing srv6
locator Node1-locator
alloc mode per-vrf
!
!
!
!
end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
171
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv6 L3VPN
This use case provides the ability to assign a specific SRv6 locator for a given prefix or a set of prefixes. The
egress PE advertises the prefix with the specified locator. This allows for per-prefix steering into desired
transport behaviors, such as Flex Algo.
To assign an SRv6 locator for a specific prefix, configure a route policy to specify the SID allocation mode
based on match criteria. Examples of match criteria are destination-based match or community-based match.
• Supported SID allocation modes are per-VRF and per-CE.
• For per-VRF allocation mode, you can also specify the SRv6 locator.
• If an SRv6 locator is specified in the route policy, BGP will use that to allocate per-VRF SID. If
the specified locator is invalid, the SID will not be allocated.
• If an SRv6 locator is not specified in the route policy, the default locator is used to allocate the SID.
If the default locator is not configured in BGP, then the SID will not be allocated.
• Per-CE allocation mode always uses the default locator to allocate the SID.
The following example shows a route policy specifying the SID allocation mode with destination-based match:
Node1(config)# route-policy set_per_prefix_locator_rpl
Node1(config-rpl)# if destination in (3001::1:1:1:1/128) then
Node1(config-rpl-if)# set srv6-alloc-mode per-vrf locator locator1
Node1(config-rpl-if)# elseif destination in (3001::2:2:2:2/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf locator locator2
Node1(config-rpl-elseif)# elseif destination in (3001::3:3:3:3/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf
Node1(config-rpl-elseif)# elseif destination in (3001::4:4:4:4/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-ce
Node1(config-rpl-elseif)# else
Node1(config-rpl-else)# drop
Node1(config-rpl-else)# endif
Node1(config-rpl)# end-policy
To specify per-prefix allocation mode for a specific VRF under IPv6 Address Family, use the following
command:
• router bgp as-number vrf WORD address-family ipv6 unicast segment-routing srv6 alloc mode
route-policy policy_name
This example shows how to specify per-prefix allocation mode for a specific VRF (vrf_cust1) under the IPv6
address family:
Node1(config)# router bgp 100
Node1(config-bgp)# vrf vrf_cust6
Node1(config-bgp-vrf)# address-family ipv6 unicast
Node1(config-bgp-vrf-af)# segment-routing srv6
Node1(config-bgp-vrf-af-srv6)# alloc mode route-policy set_per_prefix_locator_rpl
Running Configuration
route-policy set_per_prefix_locator_rpl
if destination in (3001::1:1:1:1/128) then
set srv6-alloc-mode per-vrf locator locator1
elseif destination in (3001::2:2:2:2/128) then
set srv6-alloc-mode per-vrf locator locator2
elseif destination in (3001::3:3:3:3/128) then
set srv6-alloc-mode per-vrf
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
172
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv6 L3VPN
Verify that the local and received SIDs have been correctly allocated under IPv6 address family and specific
VRF (vrf_cust6):
Node1# show bgp vpnv6 unicast local-sids
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
173
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv6 L3VPN
Verification
The following examples shows how to verify the SRv6 based L3VPN configurations for an Individual VRF
with per VRF label allocation mode.
In this example, End.X represents Endpoint function with Layer-3 cross-connect, and End.DT6 represents
Endpoint with decapsulation and IPv6 table lookup.
RP/0/RSP0/CPU0:Node1# show segment-routing srv6 sid
Fri Jan 15 18:58:04.911 UTC
The following examples show how to verify the SRv6 based L3VPN configuration using the show bgp vpnv6
unicast commands on the Ingress PE.
RP/0/RSP0/CPU0:Node1# show bgp vpnv6 unicast summary
Fri Jan 15 18:37:04.791 UTC
BGP router identifier 10.1.1.1, local AS number 100
BGP generic scan interval 60 secs
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0 RD version: 0
BGP main routing table version 21
BGP NSR Initial initsync version 4 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
BGP scan interval 60 secs
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
174
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv6 L3VPN
The following examples show how to verify the BGP prefix information for VRF instances:
RP/0/RSP0/CPU0:Node1# show bgp vrf vrf_cust6 ipv6 unicast
Fri Jan 15 18:38:49.705 UTC
BGP VRF vrf_cust6, state: Active
BGP Route Distinguisher: 100:6
VRF ID: 0x60000008
BGP router identifier 10.1.1.1, local AS number 100
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
175
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv6 L3VPN
The following examples show how to verify the current routes in the Routing Information Base (RIB):
RP/0/RSP0/CPU0:Node1# show route vrf vrf_cust6 ipv6 unicast
Fri Jan 15 18:39:20.619 UTC
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
176
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv6 L3VPN
B 3001::12:1:1:5/128
[200/0] via 3001::1:1:1:5 (nexthop in vrf default), 01:46:56
The following examples show how to verify the current IPv6 Cisco Express Forwarding (CEF) table:
RP/0/RSP0/CPU0:Node1# show cef vrf vrf_cust6 ipv6
Fri Jan 15 18:40:15.833 UTC
::/0
drop default handler
3001::12:1:1:1/128
receive Loopback105
3001::12:1:1:4/128
recursive cafe:0:0:4::/128
3001::12:1:1:5/128
recursive cafe:0:0:5::/128
fe80::/10
receive
ff02::/16
receive
ff02::2/128
receive
ff02::1:ff00:0/104
receive
ff05::/16
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
177
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: IPv4 L3VPN Active-Standby Redundancy using Port-Active Mode
receive
ff12::/16
receive
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
178
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services for L3VPN Active-Standby Redundancy using Port-Active Mode: Operation
• When an EVPN Ethernet Segment (ES) is configured with port-active load-balancing mode, you cannot
configure ACs of that bundle on bridge-domains with a configured EVPN instance (EVI). EVPN Layer
2 bridging service is not compatible with port-active load-balancing.
ConfigureSRv6ServicesL3VPNActive-Standby RedundancyusingPort-Active
Mode
This section describes how you can configure SRv6 services L3VPN active-standby redundancy using
port-active mode under an Ethernet Segment (ES).
Configuration Example
/* Configure Ethernet Link Bundles */
Router# configure
Router(config)# interface Bundle-Ether10
Router(config-if)# ipv4 address 10.0.0.2 255.255.255.0
Router(config-if)# ipv6 address 2001:DB8::1
Router(config-if)# lacp period short
Router(config-if)# mac-address 1.2.3
Router(config-if)# bundle wait-while 0
Router(config-if)# exit
Router(config)# interface GigabitEthernet 0/2/0/5
Router(config-if)# bundle id 14 mode active
Router(config-if)# commit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
179
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Running Configuration
Running Configuration
interface Bundle-Ether14
ipv4 address 14.0.0.2 255.255.255.0
ipv6 address 14::2/64
lacp period short
mac-address 1.2.3
bundle wait-while 0
!
interface GigabitEthernet0/2/0/5
bundle id 14 mode active
!
evpn
interface Bundle-Ether14
ethernet-segment
identifier type 0 11.11.11.11.11.11.11.11.14
load-balancing-mode port-active
!
!
!
router bgp 100
bgp router-id 192.168.0.2
address-family l2vpn evpn
!
neighbor 192.168.0.3
remote-as 100
update-source Loopback0
address-family l2vpn evpn
!
!
!
Verification
Verify the SRv6 services L3VPN active-standby redundancy using port-active mode configuration.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
180
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
Verification
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
181
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: BGP Global IPv4
Bundle-Ether24
Status: LACP OOS (out of service)
Local links <active/standby/configured>: 0 / 1 / 1
Local bandwidth <effective/available>: 0 (0) kbps
MAC address (source): 0001.0002.0003 (Configured)
Inter-chassis link: No
Minimum active links / bandwidth: 1 / 1 kbps
Maximum active links: 64
Wait while timer: Off
Load balancing:
Link order signaling: Not configured
Hash type: Default
Locality threshold: None
LACP: Operational
Flap suppression timer: Off
Cisco extensions: Disabled
Non-revertive: Disabled
mLACP: Not configured
IPv4 BFD: Not configured
IPv6 BFD: Not configured
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
182
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: BGP Global IPv4
Use Case 1: BGP Global IPv4 Over SRv6 with Per-VRF SID Allocation Mode (End.DT4)
The following example shows how to configure BGP global IPv4 over SRv6 with per-VRF SID allocation.
Node1(config)# router bgp 1
Node1(config-bgp)# bgp router-id 10.1.0.1
Node1(config-bgp)# address-family ipv4 unicast
Node1(config-bgp-af)# segment-routing srv6
Node1(config-bgp-af-srv6)# locator Node1
Node1(config-bgp-af-srv6)# alloc mode per-vrf
Node1(config-bgp-af-srv6)# exit
Node1(config-bgp-af)# exit
Node1(config-bgp)# neighbor 60::2
Node1(config-bgp-nbr)# remote-as 1
Node1(config-bgp-nbr)# update-source Loopback1
Node1(config-bgp-nbr)# address-family ipv4 unicast
Node1(config-bgp-nbr-af)# encapsulation-type srv6
Node1(config-bgp-nbr-af)# exit
Node1(config-bgp-nbr)# exit
Node1(config-bgp)# neighbor 52.52.52.1
Node1(config-bgp-nbr)# remote-as 3
Node1(config-bgp-nbr)# address-family ipv4 unicast
Node1(config-bgp-nbr-af)# route-policy passall in
Node1(config-bgp-nbr-af)# route-policy passall out
Node1(config-bgp-nbr-af)# commit
Running Configuration
router bgp 1
bgp router-id 10.1.0.1
address-family ipv4 unicast
segment-routing srv6
locator Node1
alloc mode per-vrf
!
!
neighbor 60::2
remote-as 1
update-source Loopback1
address-family ipv4 unicast
encapsulation-type srv6
!
!
neighbor 52.52.52.1
remote-as 3
address-family ipv4 unicast
route-policy passall in
route-policy passall out
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
183
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: BGP Global IPv4
Use Case 2: BGP Global IPv4 over SRv6 with Per-Prefix SID Allocation
This use case provides the ability to assign a specific SRv6 locator for a given prefix or a set of prefixes. The
egress PE advertises the prefix with the specified locator. This allows for per-prefix steering into desired
transport behaviors, such as Flex Algo.
To assign an SRv6 locator for a specific prefix, configure a route policy to specify the SID allocation mode
based on match criteria. Examples of match criteria are destination-based match or community-based match.
• Supported SID allocation modes are per-VRF and per-CE.
• For per-VRF allocation mode, you can also specify the SRv6 locator.
• If an SRv6 locator is specified in the route policy, BGP will use that to allocate per-VRF SID. If
the specified locator is invalid, the SID will not be allocated.
• If an SRv6 locator is not specified in the route policy, the default locator is used to allocate the SID.
If the default locator is not configured in BGP, then the SID will not be allocated.
• Per-CE allocation mode always uses the default locator to allocate the SID.
For more information on configuring routing policies, refer to the "Implementing Routing Policy" chapter in
the Routing Configuration Guide for Cisco ASR 9000 Series Routers.
The following example shows a route policy specifying the SID allocation mode with destination-based match:
Node1(config)# route-policy set_per_prefix_locator_rpl
Node1(config-rpl)# if destination in (10.1.1.0/24) then
Node1(config-rpl-if)# set srv6-alloc-mode per-vrf locator locator1
Node1(config-rpl-if)# elseif destination in (2.2.2.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf locator locator2
Node1(config-rpl-elseif)# elseif destination in (3.3.3.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf
Node1(config-rpl-elseif)# elseif destination in (4.4.4.0/24) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-ce
Node1(config-rpl-elseif)# else
Node1(config-rpl-else)# drop
Node1(config-rpl-else)# endif
Node1(config-rpl)# end-policy
Node1(config)#
The following example shows how to configure BGP global IPv4 over SRv6 with a route policy to determine
the SID allocation mode for given prefix.
Node1(config)# router bgp 100
Node1(config-bgp)# address-family ipv4 unicast
Node1(config-bgp-af)# segment-routing srv6
Node1(config-bgp-af-srv6)# alloc mode route-policy set_per_prefix_locator_rpl
Running Configuration
route-policy set_per_prefix_locator_rpl
if destination in (10.1.1.0/24) then
set srv6-alloc-mode per-vrf locator locator1
elseif destination in (2.2.2.0/24) then
set srv6-alloc-mode per-vrf locator locator2
elseif destination in (3.3.3.0/24) then
set srv6-alloc-mode per-vrf
elseif destination in (4.4.4.0/24) then
set srv6-alloc-mode per-ce
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
184
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: BGP Global IPv6
else
drop
endif
end-policy
!
router bgp 100
address-family ipv4 unicast
segment-routing srv6
alloc mode route-policy set_per_prefix_locator_rpl
!
!
!
Verify that the local and received SIDs have been correctly allocated under BGP IPv4 address family:
Node1# show bgp ipv4 unicast local-sids
…
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Local Sid Alloc mode Locator
*> 10.1.1.0/24 fc00:0:0:1:41:: per-vrf locator1
*> 2.2.2.0/24 fc00:0:8:1:41:: per-vrf locator2
*> 3.3.3.0/24 fc00:0:9:1:42:: per-vrf locator4
*> 4.4.4.0/24 fc00:0:9:1:43:: per-ce locator4
*> 10.1.1.5/32 NO SRv6 Sid - -
* i8.8.8.8/32 NO SRv6 Sid - -
BGP Global IPv6 Over SRv6 with Per-VRF SID Allocation Mode (End.DT6)
To configure BGP global IPv6 over SRv6, use the following commands:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
185
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: BGP Global IPv6
• router bgp as-number address-family ipv6 unicast segment-routing srv6: Enable SRv6
• router bgp as-number address-family ipv6 unicast segment-routing srv6 alloc mode {per-vrf |
route-policy policy_name}: Specify the SID behavior (allocation mode).
• per-vrf: Specifies that the same label is be used for all the routes advertised from a unique VRF.
• route-policy policy_name: Uses a route policy to determine the SID allocation mode and locator
(if provided) for given prefix.
• router bgp as-number address-family ipv6 unicast segment-routing srv6 locator WORD: Specify
the locator
• router bgp as-number {af-group WORD| neighbor-group WORD | neighbor ipv6-addr} address-family
ipv6 unicast encapsulation-type srv6: Specify the encapuslation type for SRv6.
• Use af-group WORD to apply the SRv6 encapsulation type to the address family group for BGP
neighbors.
• Use neighbor-group WORDto apply the SRv6 encapsulation type to the neighbor group for Border
Gateway Protocol (BGP) neighbors.
• Use neighbor ipv6-addr to apply the SRv6 encapsulation type to the specific BGP neighbor.
Use Case 1: BGP Global IPv6 over SRv6 with Per-AFI SID Allocation
The following example shows how to configure BGP global IPv6 over SRv6 with per-VRF SID allocation.
Node1(config)# router bgp 100
Node1(config-bgp)# bgp router-id 10.1.1.1
Node1(config-bgp)# segment-routing srv6
Node1(config-bgp-gbl-srv6)# locator Node1
Node1(config-bgp-gbl-srv6)# exit
Node1(config-bgp)# address-family ipv6 unicast
Node1(config-bgp-af)# segment-routing srv6
Node1(config-bgp-af-srv6)# locator Node1
Node1(config-bgp-af-srv6)# alloc mode per-vrf
Node1(config-bgp-af-srv6)# exit
Node1(config-bgp-af)# exit
Node1(config-bgp)# neighbor 3001::1:1:1:4
Node1(config-bgp-nbr)# address-family ipv6 unicast
Node1(config-bgp-nbr-af)# encapsulation-type srv6
Node1(config-bgp-nbr-af)# exit
Node1(config-bgp-nbr)# exit
Node1(config-bgp)# neighbor 3001::1:1:1:5
Node1(config-bgp-nbr)# address-family ipv6 unicast
Node1(config-bgp-nbr-af)# encapsulation-type srv6
Node1(config-bgp-nbr-af)# commit
Running Configuration
router bgp 100
bgp router-id 10.1.1.1
segment-routing srv6
locator Node1
!
address-family ipv6 unicast
segment-routing srv6
locator Node1
alloc mode per-vrf
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
186
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: BGP Global IPv6
!
!
neighbor 3001::1:1:1:4
address-family ipv6 unicast
encapsulation-type srv6
!
!
neighbor 3001::1:1:1:5
address-family ipv6 unicast
encapsulation-type srv6
Use Case 2: BGP Global IPv6 over SRv6 with Per-Prefix SID Allocation
This use case provides the ability to assign a specific SRv6 locator for a given prefix or a set of prefixes. The
egress PE advertises the prefix with the specified locator. This allows for per-prefix steering into desired
transport behaviors, such as Flex Algo.
To assign an SRv6 locator for a specific prefix, configure a route policy to specify the SID allocation mode
based on match criteria. Examples of match criteria are destination-based match or community-based match.
• Supported SID allocation modes are per-VRF and per-CE.
• For per-VRF allocation mode, you can also specify the SRv6 locator.
• If an SRv6 locator is specified in the route policy, BGP will use that to allocate per-VRF SID. If
the specified locator is invalid, the SID will not be allocated.
• If an SRv6 locator is not specified in the route policy, the default locator is used to allocate the SID.
If the default locator is not configured in BGP, then the SID will not be allocated.
• Per-CE allocation mode always uses the default locator to allocate the SID.
For more information on configuring routing policies, refer to the "Implementing Routing Policy" chapter in
the Routing Configuration Guide for Cisco ASR 9000 Series Routers.
The following example shows a route policy specifying the SID allocation mode with destination-based match:
Node1(config)# route-policy set_per_prefix_locator_rpl
Node1(config-rpl)# if destination in (3001::1:1:1:1/128) then
Node1(config-rpl-if)# set srv6-alloc-mode per-vrf locator locator1
Node1(config-rpl-if)# elseif destination in (3001::2:2:2:2/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf locator locator2
Node1(config-rpl-elseif)# elseif destination in (3001::3:3:3:3/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-vrf
Node1(config-rpl-elseif)# elseif destination in (3001::4:4:4:4/128) then
Node1(config-rpl-elseif)# set srv6-alloc-mode per-ce
Node1(config-rpl-elseif)# else
Node1(config-rpl-else)# drop
Node1(config-rpl-else)# endif
Node1(config-rpl)# end-policy
The following example shows how to configure BGP global IPv6 over SRv6 with a route policy to determine
the SID allocation mode for given prefix.
Node1(config)# router bgp 100
Node1(config-bgp)# address-family ipv4 unicast
Node1(config-bgp-af)# segment-routing srv6
Node1(config-bgp-af-srv6)# alloc mode route-policy set_per_prefix_locator_rpl
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
187
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: BGP Global IPv6
Running Configuration
route-policy set_per_prefix_locator_rpl
if destination in (3001::1:1:1:1/128) then
set srv6-alloc-mode per-vrf locator locator1
elseif destination in (3001::2:2:2:2/128) then
set srv6-alloc-mode per-vrf locator locator2
elseif destination in (3001::3:3:3:3/128) then
set srv6-alloc-mode per-vrf
elseif destination in (3001::4:4:4:4/128) then
set srv6-alloc-mode per-ce
else
drop
endif
end-policy
!
router bgp 100
address-family ipv6 unicast
segment-routing srv6
alloc mode route-policy set_per_prefix_locator_rpl
!
!
Verify that the local and received SIDs have been correctly allocated under BGP IPv6 address family:
Node1# show bgp ipv6 unicast local-sids
…
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Local Sid Alloc mode Locator
*> 3001::1:1:1:1/128 fc00:0:0:1:41:: per-vrf locator1
*> 3001::2:2:2:2/128 fc00:0:8:1:41:: per-vrf locator2
*> 3001::3:3:3:3/128 fc00:0:9:1:42:: per-vrf locator4
*> 3001::4:4:4:4/128 fc00:0:9:1:43:: per-ce locator4
*> 3001::5:5:5:5/128 NO SRv6 Sid - -
* i3008::8:8:8:8/128 NO SRv6 Sid - -
Verification
The following examples show how to verify the BGP global IPv6 configuration using the show bgp ipv6
unicast commands.
RP/0/RSP0/CPU0:Node1# show bgp ipv6 unicast summary
Fri Jan 15 21:07:04.681 UTC
BGP router identifier 10.1.1.1, local AS number 100
BGP generic scan interval 60 secs
Non-stop routing is enabled
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
188
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: BGP Global IPv6
The following examples show how to verify the current routes in the Routing Information Base (RIB):
RP/0/RSP0/CPU0:Node1# show route ipv6 3001::13:1:1:4/128
Fri Jan 15 21:08:05.499 UTC
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
189
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: BGP Global IPv6
The following examples show how to verify the current IPv6 Cisco Express Forwarding (CEF) table:
RP/0/RSP0/CPU0:Node1# show cef ipv6 3001::13:1:1:4/128
Fri Jan 15 21:08:41.483 UTC
3001::13:1:1:4/128, version 93, SRv6 Headend, internal 0x5000001 0x40 (ptr 0x78a100d4) [1],
0x0 (0x0), 0x0 (0x8886b840)
Updated Jan 15 17:13:50.433
Prefix Len 128, traffic index 0, precedence n/a, priority 4
via cafe:0:0:4::/128, 9 dependencies, recursive [flags 0x6000]
path-idx 0 NHID 0x0 [0x78a0f504 0x0]
next hop cafe:0:0:4::/128 via cafe:0:0:4::/64
SRv6 H.Encaps.Red SID-list {cafe:0:0:4:4b::}
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
190
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: EVPN VPWS — All-Active Multi-Homing
SRv6 Services: EVPN VPWS — Release 7.3.2 This feature provides an ELINE
All-Active Multi-Homing (SRv6 (P2P) service with all-active
Base) multihoming capability over an
SRv6 network. This features is
supported on ASR 9000 3rd, 4th,
and 5th generation line cards.
All-Active Multi-Homing enables
an operator to connect a customer
edge (CE) device to two or more
provider edge (PE) devices to
provide load balancing and
redundant connectivity. With
All-Active Multi-Homing, all the
PEs can forward traffic to and from
the multi-homed device.
EVPN VPWS All-Active Multi-Homing over SRv6 provides an ELINE (P2P) service with all-active
multihoming capability over an SRv6 network.
All-Active Multi-Homing enables an operator to connect a customer edge (CE) device to two or more provider
edge (PE) devices to provide load balancing and redundant connectivity. With All-Active Multi-Homing, all
the PEs can forward traffic to and from the multi-homed device.
Note For information about EVPN VPWS, refer to the "EVPN Virtual Private Wire Service (VPWS)" chapter in
the L2VPN and Ethernet Services Configuration Guide for Cisco ASR 9000 Series Routers.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
191
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: EVPN VPWS — All-Active Multi-Homing
When locators are configured at different levels at the same time, the following priority is implemented:
1. evi_service_locator
2. evi_locator
3. global_locator
This example shows how to configure an EVPN VPWS over SRv6 using a global locator for EVPN:
evpn
segment-routing srv6
locator sample_global_loc
l2vpn
xconnect group sample_xcg
p2p sample-vpws-12001-2002
interface Bundle-Ether12001.2002
neighbor evpn evi 12001 service 2002 segment-routing srv6
This example shows how to configure EVPN VPWS over SRv6 using specific EVI locator:
evpn
evi 11001 segment-routing srv6
locator sample_evi_loc
l2vpn
xconnect group sample_xcg
p2p sample-vpws-11001-2002
interface Bundle-Ether11001.2002
neighbor evpn evi 11001 service 2002 segment-routing srv6
This example shows how to configure an EVPN VPWS over SRv6 using a locator for an individual EVI
service:
l2vpn
xconnect group sample_xcg
p2p sample-vpws-11001-2001
interface Bundle-Ether11001.2001
neighbor evpn evi 11001 service 2001 segment-routing srv6
locator sample_evi_service_loc
Verification
Router# show segment-routing srv6 locator sample_evi_loc sid
Mon Aug 12 20:57:07.759 EDT
SID Behavior Context Owner
State RW
-------------------------- ----------- ------------------------------ ------------------
----- --
cafe:0:8:1:1:: End (PSP) 'default':1 sidmgr
InUse Y
cafe:0:8:1:40:: End.DX2 11001:1 l2vpn_srv6
InUse Y
cafe:0:8:1:41:: End.DX2 11001:2 l2vpn_srv6
InUse Y
cafe:0:8:1:42:: End.DX2 11001:3 l2vpn_srv6
InUse Y
cafe:0:8:1:44:: End.DX2 11001:2002 l2vpn_srv6
InUse Y
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
192
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 Services: SRv6 Services TLV Type 5 Support
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
193
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6/MPLS L3 Service Interworking Gateway
encapsulation. From SRv6 domain to MPLS domain, the gateway removes the outer IPv6 header, looks up
the destination prefix, and pushes the VPN and next-hop MPLS labels.
VRFs on the gateway node are configured with 2 sets of route targets (RTs):
• MPLS L3VPN RTs
• SRv6 L3VPN RTs (called stitching RTs)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
194
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6/MPLS L3 Service Interworking Gateway
A. Node 3 advertises a BGP L3VPN update for prefix B.0.0.0/8 with RD corresponding to VRFA, including
the SRv6 VPN SID (B:0:0:3:V9::) assigned to this VRF, in the SRv6 domain.
Note SRv6 End.DT4 function value "V9" is not a valid hex number, however it is used for illustration purposes to
remind you of its connection to a VRF.
B. Node 2 (gateway) imports the BGP L3VPN update and programs its FIB:
• MPLS label 24010 is allocated for VRFA
• Prefix B.0.0.0/8 is programmed with an "SR Headend Behavior with Reduced Encapsulation in an SR
Policy" function (H.Encaps.Red) of B:0:0:3:V9::
Note The gateway follows per-VRF label and per-VRF SID allocation methods.
C. Node 2 re-originates a BGP L3VPN update for the same prefix, including the MPLS VPN label (24010)
allocated for the VRF, in the MPLS domain.
D. Site A sends traffic to an IPv4 prefix (B.B.B.B) of Site B
E. Node 1 encapsulates incoming traffic with the MPLS VPN label (24010) and the prefix SID MPLS label
(16002) of the BGP next-hop (Node 2).
F. Node 2 performs the following actions:
• Pops the MPLS VPN label and looks up the destination prefix
• Encapsulates the payload in an outer IPv6 header with destination address (DA) equal to the H.Encaps.Red
function (B:0:0:3:V9::)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
195
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6/MPLS L3 Service Interworking Gateway
G. Node 3 removes the outer IPv6 header, looks up the payload destination address (B.B.B.B), and forwards
to Site B.
A. Node 1 advertises a BGP L3VPN update for prefix A.0.0.0/8 with RD corresponding to VRFA, including
the MPLS VPN label (24055) assigned to this VRF, in the MPLS domain.
B. Node 2 (gateway) imports the BGP L3VPN update and programs its FIB:
• Prefix A.0.0.0/8 is programmed to impose an MPLS VPN label (24055) and the prefix SID MPLS label
(16001) of the BGP next-hop (Node 1)
• "Endpoint with decapsulation and IPv4 table lookup" function (End.DT4) of B:0:0:2:V8:: is allocated
to VRFA
Note SRv6 End.DT4 function value "V8" is not a valid hex number, however it is used
for illustration purposes to remind you of its connection to a VRF.
Note The gateway follows per-VRF label and per-VRF SID allocation methods.
C. Node 2 re-originates a BGP L3VPN update for the same prefix, including the End.DT4 function
(B:0:0:2:V8::) allocated for the VRF, in the SRv6 domain.
D. Site B sends traffic to an IPv4 prefix (A.A.A.A) of Site A.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
196
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6/MPLS L3 Service Interworking Gateway
E. Node 3 Encapsulates the payload in an outer IPv6 header with destination address (DA) equal to the
End.DT4 function (B:0:0:2:V8::).
F. Node 2 performs the following actions:
• Removes the outer IPv6 header and looks up the destination prefix
• Pushes the MPLS VPN label (24055) and the prefix SID MPLS label (16001) of the BGP next-hop (Node
1)
G. Node 1 pops the MPLS VPN label, looks up the payload destination address (A.A.A.A), and forwards to
Site A.
Example
Leveraging the topology described in the above use-case, this example shows the SRv6/MPLS L3 Service
Interworking Gateway configuration required at Node 2.
The following configuration shows how to enable SRv6 with locator and configure encapsulation parameters:
segment-routing
srv6
encapsulation
source-address b:0:0:2::1
!
locators
locator LOC1
prefix b:0:0:2::/64
!
!
!
!
The following configuration shows how to configure a VPNv4 VRF with the following route targets (RTs):
• 1111:1, RT used for MPLS L3VPN
• 2222:1, RT used for SRv6 L3VPN (stitching RT)
vrf ACME
address-family ipv4 unicast
import route-target
1111:1
2222:1 stitching
!
export route-target
1111:1
22222:1 stitching
!
!
!
The following configuration shows how to configure SRv6/SRv6 VPNs under BGP:
router bgp 100
segment-routing srv6
locator LOC1
!
neighbor 10.1.1.1
address-family vpnv4 unicast
import re-originate stitching-rt
route-reflector-client
advertise vpnv4 unicast re-originated
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
197
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6/MPLS Dual-Connected PE
!
neighbor b:0:0:3::1
address-family vpnv4 unicast
import stitching-rt re-originate
route-reflector-client
encapsulation-type srv6
advertise vpnv4 unicast re-originated stitching-rt
!
vrf ACME
address-family ipv4 unicast
enable label-mode
segment-routing srv6
SRv6/MPLS Dual-Connected PE
Table 28: Feature History Table
A PE router can support IPv4 L3VPN service for a given VRF with both MPLS and SRv6. This is MPLS and
SRv6 L3VPNv4 co-existence scenario and is sometimes referred to as dual-connected PE.
In the figure below, node 2 is a dual-connected PE to Site C, providing:
• MPLS/IPv4 L3VPN between Site A and Site C
• SRv6/IPv4 L3VPN between Site B and Site C
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
198
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 SID Information in BGP-LS Reporting
Configure Encaps on Neighbor to Send the SRv6 SID Toward the SRv6 Dataplane
By default, if a VRF prefix has both an MPLS label and an SRv6 SID, the MPLS label is sent when advertising
the prefix to the PE. To advertise a VRF prefix with an SRv6 SID to an SRv6 session, use the
encapsulation-type srv6 command under the neighbor VPN address-family.
Router(config-bgp)# neighbor 192::6
Router(config-bgp-nbr)# remote-as 1
Router(config-bgp-nbr)# address-family ipv4 unicast
Router(config-bgp-nbr-af)# encapsulation-type srv6
Router(config-bgp-nbr-af)# exit
Running Config
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
199
Configure Segment Routing over IPv6 (SRv6) with Full-Length SIDs
SRv6 SID Information in BGP-LS Reporting
The following NLRI has been added to the BGP-LS protocol to support SRv6:
• Node NLRI: SRv6 Capabilities, SRv6 MSD types
• Link NLRI: End.X, LAN End.X, and SRv6 MSD types
• Prefix NLRI: SRv6 Locator
• SRv6 SID NLRI (for SIDs associated with the node): Endpoint Function, BGP-EPE Peer Node/Set
This example shows how to distribute IS-IS SRv6 link-state data using BGP-LS:
Router(config)# router isis 200
Router(config-isis)# distribute link-state instance-id 200
It is possible to use a list of packed carriers to ping or trace a SID, to ping or trace route, use <destination
SID> via srv6-carriers <list of packed carriers>
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
200
CHAPTER 6
Configure SRv6 Traffic Engineering
Table 29: Feature History Table
SRv6 Traffic Engineering Release 7.3.2 This feature introduces Segment Routing over IPv6
(SRv6) Traffic Engineering.
This release supports the following features:
• SRv6-TE with SRv6 micro-SIDs (uSIDs)
• SRv6 policies
• Manual SRv6 policies
• Automated steering for Layer 3-based BGP
services (IPv4 L3VPN, IPv6 L3VPN, IPv4 BGP
global, IPv6 BGP global)
• SRv6-aware Path Computation Element (PCE)
• PCEPv6
• Path computation optimization objectives (TE,
IGP, latency)
• Path computation constraints (affinity,
disjointness)
This feature introduces Segment Routing over IPv6 (SRv6) Traffic Engineering.
• SRv6-TE Overview, on page 202
• Usage Guidelines and Limitations, on page 202
• Traffic Steering, on page 204
• SRv6-TE Policy Path Types, on page 210
• Protocols, on page 226
• SR-TE Application Programming Interface (API), on page 233
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
201
Configure SRv6 Traffic Engineering
SRv6-TE Overview
SRv6-TE Overview
Traffic engineering over SRv6 can be accomplished in the following ways:
• End-to-End Flexible Algorithm: This is used for traffic engineering intents achieved with Flexible
Algorithm, including low latency, multi-plane disjointness, affinity inclusion/exclusion, and SRLG
exclusion.
• SRv6-TE Policy: This is used for traffic engineering intents beyond Flex Algo capabilities, such as path
disjointness that rely on path computation by a PCE. In addition, this is used for user-configured explicit
paths.
SRv6-TE Policy
SRv6 for traffic engineering (SRv6-TE) uses a “policy” to steer traffic through the network. An SRv6-TE
policy path is expressed as a list of micro-segments that specifies the path, called a micro-segment ID (uSID)
list. Each segment list is an end-to-end path from the source to the destination, and instructs the routers in the
network to follow the specified path instead of following the shortest path calculated by the IGP. If a packet
is steered into an SRv6-TE policy, the uSID list is pushed on the packet by the head-end. The rest of the
network executes the instructions embedded in the uSID list.
An SRv6-TE policy is identified as an ordered list (head-end, color, end-point):
• Head-end – Where the SRv6-TE policy is instantiated
• Color – A numerical value that distinguishes between two or more policies to the same node pairs
(Head-end – End point)
• End-point – The destination of the SRv6-TE policy
Every SRv6-TE policy has a color value. Every policy between the same node pairs requires a unique color
value.
An SRv6-TE policy uses one or more candidate paths. A candidate path can be made up of a single SID-list
or a set of weighted SID-lists (for weighted equal cost multi-path [WECMP]).
A SID list can be either the result of a dynamic path computation by a PCE or a user-configured explicit path.
See SRv6-TE Policy Path Types for more information.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
202
Configure SRv6 Traffic Engineering
Usage Guidelines and Limitations
• SRv6 policy with TI-LFA (protection of the first segment in the segment list at the head-end)
• Steering over SRv6 policies with Automated Steering for the following services:
• L3 BGP-based services (IPv4 L3VPN, IPv6 L3VPN, IPv4 BGP global, IPv6 BGP global)
• L2 BGP-based service (EVPN VPWS)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
203
Configure SRv6 Traffic Engineering
Traffic Steering
• Steering over SRv6 policies based on incoming BSID (remote automated steering)
• PCC with user-configured PCE groups
• SR-PM delay-measurement over SRv6 policies
• SR-PM liveness detection over SRv6 policies
• L3 services with BGP PIC over SRv6 policies
• SRv6 policy ping
Note When a pair of SR-PCEs part of the same redundancy group run different versions
of Cisco IOS XR, they will lose their state-sync PCEP session until both SR-PCEs
are upgraded to Cisco IOS XR release 7.8.1.
Traffic Steering
SRv6 Flexible Algorithm
With SRv6 Flexible Algorithm, a PE can advertise BGP service routes (global, VPN) that include the SRv6
locator (Algo 0 or Flex Algo) of the intended transport SLA.
For information about configuring Flexible Algorithm, see Configuring SRv6 IS-IS Flexible Algorithm, on
page 155.
In the example below, the SR domain has 2 network slices. Each slice is assigned a /32 uSID Locator Block.
A slice can be realized with a user-defined Flex-Algo instances (for example, Flex Algo 128 = min-delay)
• Min-Cost Slice — FCBB:BB00/32
• Min-Delay Slice — FCBB:BB01/32
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
204
Configure SRv6 Traffic Engineering
SRv6 Flexible Algorithm
IS-IS in Node1 computes shortest paths for each locator and programs them in the FIB:
Node1 and Node2 are PEs of a common VPN. PEs advertise VPN routes via BGP with different transport
SLAs. For example, traffic to a set of prefixes is to be delivered over the min-cost slice, while for another set
of prefixes is to be delivered over the min-delay slice. To achieve this, the egress PE’s service route
advertisement includes the locator of the intended transport SLA type.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
205
Configure SRv6 Traffic Engineering
SRv6 Flexible Algorithm
• Hardware Efficiency
• Egress PE Node2 processes multiple uSIDs with a single /64 lookup
• FCBB:BB00:0002:F009/64
• Hardware Efficiency
• Egress PE 2 processes multiple uSIDs with a single /64 lookup
• FCBB:BB01:0002:F009/64
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
206
Configure SRv6 Traffic Engineering
SRv6 Flexible Algorithm
4. SRv6 allows for seamless deployment where any transit node (SRv6-capable or not) simply routes based
on a /48 longest prefix match lookup.
For example, transit node (Node 3) forwards traffic along the Algo 0 (min-cost) shortest path for the
remote prefix FCBB:BB00:0002::/48.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
207
Configure SRv6 Traffic Engineering
SRv6 Flexible Algorithm
5. Egress PE (Node 2) matches local SID FCBB:BB00:0002:F009/64. Node 2 applies “VPN Decaps”
behavior into VRF9 by removing the IPv6 encapsulation and looking up the payload’s DA on the
corresponding VPN table.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
208
Configure SRv6 Traffic Engineering
Automated Steering
Automated Steering
Automated steering (AS) allows service traffic to be automatically steered onto the required transport SLA
path programmed by an SRv6 policy.
With AS, BGP automatically steers traffic onto an SRv6 policy based on the next-hop and color of a BGP
service route. The color of a BGP service route is specified by a color extended community attribute. This
color is used as a transport SLA indicator, such as min-delay or min-cost.
When the next-hop and color of a BGP service route matches the end-point and color of an SRv6 policy, BGP
automatically installs the route resolving onto the BSID of the matching SRv6 policy. Recall that an SRv6
policy on a head-end is uniquely identified by an end-point and color.
When a BGP route has multiple extended-color communities, each with a valid SRv6 policy, the BGP process
installs the route on the SRv6 policy giving preference to the color with the highest numerical value.
The granularity of AS behaviors can be applied at multiple levels, for example:
• At a service level—When traffic destined to all prefixes in a given service is associated to the same
transport path type. All prefixes share the same color.
• At a destination/prefix level—When traffic destined to a prefix in a given service is associated to a
specific transport path type. Each prefix could be assigned a different color.
• At a flow level—When flows destined to the same prefix are associated with different transport path
types
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
209
Configure SRv6 Traffic Engineering
SRv6-TE Policy Path Types
A path is selected when the path is valid and its preference is the best among all candidate paths for that policy.
Note The protocol of the source is not relevant in the path selection logic.
The following SRv6-TE policy path types are supported in this release:
• Explicit Paths
• Dynamic Paths, on page 217
Explicit Paths
Table 30: Feature History Table
Manual SRv6-TE Policies Release 7.8.1 This feature allows you to create an explicit list of
with Explicit Paths segment IDs (SID list) for a candidate path or multiple
candidate paths.
An explicit path can be a single SID list or set of SID
lists.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
210
Configure SRv6 Traffic Engineering
Configure SRv6-TE Policy with Explicit Path
When configuring an explicit path using IP addresses of links along the path, the SRv6-TE process prefers
the protected Adj-SID of the link, if one is available. In addition, when manual Adj-SIDs are configured, the
SRv6-TE process prefers a manual protected Adj-SID over a dynamic protected Adj-SID.
You can configure the path to prefer the protected or unprotected Adj-SID, or to use only protected or
unprotected Adj-SID. See Segment Protection-Type Constraint, on page 220.
You can enable SRv6-TE explicit segment list SID validation to allow the head-end node to validate the SIDs
in an explicit SRv6-TE segment list against the SR-TE topology database. See SRv6-TE Explicit Segment
List SID Validation, on page 215.
Running Configuration
Router# show running-config
. . .
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
211
Configure SRv6 Traffic Engineering
Configure SRv6-TE Policy with Explicit Path
segment-routing
traffic-eng
segment-lists
srv6
sid-format usid-f3216
!
segment-list p1_r8_1
srv6
index 10 sid FCBB:BB00:10:feff::
index 15 sid FCBB:BB00:100:fe00::
index 20 sid FCBB:BB00:1::
index 30 sid FCBB:BB00:1:fe00::
index 40 sid FCBB:BB00:fe00::
index 50 sid FCBB:BB00:5::
index 60 sid FCBB:BB00:6::
!
!
!
policy POLICY1
srv6
locator loc1 binding-sid dynamic behavior ub6-insert-reduced
!
color 10 end-point ipv6 fcbb:bb00:2::1
candidate-paths
preference 100
explicit segment-list p1_r8_1
!
!
!
!
!
!
Verification
Verify the SR-TE policy configuration using:
Router# show segment-routing traffic-eng policy name srte_c_10_ep_fcbb:bb00:2::1 d
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
212
Configure SRv6 Traffic Engineering
Configure SRv6-TE Policy with Explicit Path
Locator: loc1
Binding SID requested: Dynamic
Binding SID behavior: End.B6.Insert.Red
Attributes:
Forward Class: 0
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
Configuration Example
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
213
Configure SRv6 Traffic Engineering
Configure SRv6-TE Policy with Explicit Path
Running Configuration
Router# show running-config
. . .
segment-routing
traffic-eng
segment-lists
srv6
sid-format usid-f3216
!
segment-list p1_r8_3
srv6
index 10 sid FCBB:BB00:10:fe01::
index 20 sid FCBB:BB00:1::
index 30 sid FCBB:BB00:1:fe00::
index 40 sid FCBB:BB00:fe00::
index 50 sid FCBB:BB00:5::
index 60 sid FCBB:BB00:6::
!
!
segment-list igp_ucmp1
srv6
index 10 sid FCBB:BB00:1::
index 20 sid FCBB:BB00:4::
index 30 sid FCBB:BB00:5::
!
!
!
policy po_r8_1001
srv6
locator loc1 binding-sid dynamic behavior ub6-insert-reduced
!
color 1001 end-point ipv6 fcbb:bb00:2::1
candidate-paths
preference 1000
explicit segment-list p1_r8_3
weight 4
!
explicit segment-list igp_ucmp1
weight 2
!
!
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
214
Configure SRv6 Traffic Engineering
SRv6-TE Explicit Segment List SID Validation
SRv6-TE Explicit Segment Release 7.8.1 This feature provides a way for the head-end node to
List SID Validation validate the SIDs in an explicit SRv6-TE segment list
against the SR-TE topology database.
If any SID in the segment list is not found on the head-end,
the validation fails, and the policy remains down.
SRv6-TE explicit segment list SID validation evaluates whether the explicit segment list of an SR policy's
candidate path is valid and therefore usable. The head-end node validates if the hops are in the SR-TE topology
database.
When enabled, the segment list SID validation occurs before programming the SR policy and after an IGP
topology change.
When the segment list validation fails, then the segment list is declared invalid. An SR policy candidate path
is declared invalid when it has no valid segment lists. An SR policy is declared invalid when it has no valid
candidate paths.
Configuration
Prior to enabling SRv6 explicit segment list SID validation, use the show segment-routing traffic-eng
topology command to verify if the SR-TE topology is available on the headend PCC router.
To enable SID validation globally, use the segment-routing traffic-eng segment-lists srv6 topology-check
command.
To enable SID validation for a specific explicit SID list, use the segment-routing traffic-eng segment-lists
segment-list name srv6 topology-check command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
215
Configure SRv6 Traffic Engineering
SRv6-TE Explicit Segment List SID Validation
Configuration Example
The following example shows how to enable SID validation globally for all SRv6 explicit segment lists:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# segment-lists
Router(config-sr-te-segment-lists)# srv6
Router(config-sr-te-sl-global-srv6)# topology-check
The following example shows how to enable SID validation for a specific SRv6 explicit segment list:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# segment-lists
Router(config-sr-te-segment-lists)# segment-list p1_r8_1
Router(config-sr-te-sl)# srv6
Router(config-sr-te-sl-srv6)# topology-check
The following example shows how to enable SID validation globally and disable SID validation for a specific
SRv6 explicit segment list:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# segment-lists
Router(config-sr-te-segment-lists)# srv6
Router(config-sr-te-sl-global-srv6)# topology-check
Router(config-sr-te-sl-global-srv6)# exit
Router(config-sr-te-segment-lists)# segment-list p1_r8_1
Router(config-sr-te-sl)# srv6
Router(config-sr-te-sl-srv6)# no topology-check
Running Configuration
segment-routing
traffic-eng
segment-lists
srv6
topology-check
!
segment-list p1_r8_1
srv6
no topology-check
!
!
!
!
!
Verification
Router# show segment-routing traffic-eng policy name srte_c_10_ep_fcbb:bb00:2::1 detail
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
216
Configure SRv6 Traffic Engineering
Dynamic Paths
Dynamic Paths
Behaviors and Limitations
For a dynamic path that traverses a specific interface between nodes (segment), the algorithm may encode
this segment using an Adjacency uSID (uA SID).
Optimization Objectives
Optimization objectives allow the head-end router to compute a uSID-list that expresses the shortest dynamic
path according to the selected metric type:
• Hopcount — Use the least number of hops for path computation.
• IGP metric — Refer to the "Implementing IS-IS" and "Implementing OSPF" chapters in the Routing
Configuration Guide for Cisco ASR 9000 Series Routers.
• TE metric — See the Configure Interface TE Metrics, on page 364 section for information about configuring
TE metrics.
• Delay (latency) — See the Configure Performance Measurement, on page 647 chapter for information
about measuring delay for links or SRv6 policies.
This example shows a dynamic path from head-end router 1 to end-point router 3 that minimizes IGP or TE
metric:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
217
Configure SRv6 Traffic Engineering
Configure Interface TE Metrics
• The blue path uses the minimum IGP metric: Min-Metric (1 → 3, IGP) = uSID-list {cafe:0:3::}; cumulative
IGP metric: 20
• The green path uses the minimum TE metric: Min-Metric (1 → 3, TE) = uSID-list {cafe:0:5:4:3::};
cumulative TE metric: 23
Constraints
Constraints allow the head-end router to compute a dynamic path according to the selected metric type:
Note For path-computation on PCE, configuring both affinity and disjoint-path is not supported.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
218
Configure SRv6 Traffic Engineering
Named Interface Link Admin Groups and SRv6-TE Affinity Maps
• Affinity — You can apply a color or name to links or interfaces by assigning affinity bit-maps to them.
You can then specify an affinity (or relationship) between an SRv6 policy path and link colors. SRv6-TE
computes a path that includes or excludes links that have specific colors,or combinations of colors. See
the Named Interface Link Admin Groups and SR-TE Affinity Maps, on page 365 section for information
on named interface link admin groups and SRv6-TE Affinity Maps.
• Disjoint — SRv6-TE computes a path that is disjoint from another path in the same disjoint-group.
Disjoint paths do not share network resources. Path disjointness may be required for paths between the
same pair of nodes, between different pairs of nodes, or a combination (only same head-end or only same
end-point).
• Segment protection-type behavior — You can control whether protected or unprotected segments are
used when encoding the SID-list of an SRv6 policy candidate path. The types of segments that could be
used when building a SID-list include uSIDs and adjacency SIDs (uA SID). See the Segment
Protection-Type Constraint, on page 220 for details and usage guidelines.
Note You can configure affinity constraints using attribute flags or the Flexible Name Based Policy Constraints
scheme; however, when configurations for both schemes exist, only the configuration pertaining to the new
scheme is applied.
Configure Named Interface Link Admin Groups and SRv6-TE Affinity Maps
Use the segment-routing traffic-eng interface interface affinity name NAME command to assign affinity
to interfaces. Configure this on routers with interfaces that have an associated admin group attribute.
Use the segment-routing traffic-eng affinity-map name NAME bit-position bit-position command to define
affinity maps. The bit-position range is from 0 to 255.
Configure affinity maps on the following routers:
• Routers with interfaces that have an associated admin group attribute.
• Routers that act as SRv6-TE head-ends for SR policies that include affinity constraints.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
219
Configure SRv6 Traffic Engineering
Segment Protection-Type Constraint
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# interface HundredGigE0/0/0/0
Router(config-sr-if)# affinity
Router(config-sr-if-affinity)# name brown
Router(config-sr-if-affinity)# exit
Router(config-sr-if)# exit
Router(config-sr-te)# affinity-map
Router(config-sr-te-affinity-map)# name brown bit-position 1
Running Config
segment-routing
traffic-eng
interface HundredGigE0/0/0/0
affinity
name brown
!
!
affinity-map
name brown bit-position 1
!
end
This feature introduces the ability to control whether protected or unprotected segments are used when encoding
the SID-list of an SRv6 policy candidate path. The types of segments that could be used when building a
SID-list include uSIDs and adjacency SIDs (uA SID).
A prefix SID is a global segment representing a prefix that identifies a specific node. A prefix SID is
programmed with a backup path computed by the IGP using TI-LFA.
An adjacency SID is a local segment representing an IGP adjacency. An adjacency SID can be programmed
with or without protection. Protected adjacency SIDs are programmed with a link-protectant backup path
computed by the IGP (TI-LFA) and are used if the link associated with the IGP adjacency fails.
Prefix SIDs and adjacency SIDs can be leveraged as segments in a SID-list in order to forward a packet along
a path traversing specific nodes and/or over specific interfaces between nodes. The type of segment used when
encoding the SID-list will determine whether failures along the path would be protected by TI-LFA. Depending
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
220
Configure SRv6 Traffic Engineering
Segment Protection-Type Constraint
on the offering, an operator may want to offer either unprotected or protected services over traffic engineered
paths.
The following behaviors are available with the segment protection-type constraint:
• protected-only — The SID-list must be encoded using protected segments.
• protected-preferred — The SID-list should be encoded using protected segments if available; otherwise,
the SID-list may be encoded using unprotected Adj-SIDs. This is the default behavior when no segment
protection-type constraint is specified.
• unprotected-only — The SID-list must be encoded using unprotected Adj-SID.
• unprotected-preferred — The SID-list should be encoded using unprotected Adj-SID if available,
otherwise SID-list may be encoded using protected segments.
The following example shows how to configure the SRv6 ODN policy that must be encoded using protected
segments:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# on-demand color 20
Router(config-sr-te-color)# constraints
Router(config-sr-te-color-const)# segments
Router(config-sr-te-color-const-seg)# protection protected-only
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
221
Configure SRv6 Traffic Engineering
Configure SRv6 Policy with Dynamic Path
Configuration
Create the SRv6-TE Policy
• Use the segment-routing traffic-eng policy policy srv6 color color end-point ipv6 ipv6-address
command to configure the SRv6-TE policy color and IPv6 end-point address.
Node1(config)# segment-routing traffic-eng policy pol_node1_node4_te srv6 color 50
end-point ipv6 cafe:0:4::4
• (Optional) Use the segment-routing traffic-eng policy policy source-address ipv6 ipv6-address
command to specify the customized IPv6 source address for candidate paths. If you do not specify a
customized per-policy source address, the policy will use the local IPv6 source address.
Node1(config)# segment-routing traffic-eng policy pol_node1_node4_te srv6 source-address
ipv6 cafe:0:1::1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
222
Configure SRv6 Traffic Engineering
Configure SRv6 Policy with Dynamic Path
• Use the segment-routing traffic-eng policy policy candidate-paths preference preference dynamic
metric type {igp | te | latency} command to configure the metric for use in path computation.
Node1(config)# segment-routing traffic-eng policy pol_node1_node4_te candidate-paths
preference 100 metric type te
• Use the segment-routing traffic-eng policy policy candidate-paths preference preference dynamic
metric margin {absolute value| relative percent} command to configure the dynamic path metric
margin. The range for value and percent is from 0 to 2147483647.
Node1(config)# segment-routing traffic-eng policy pol_node1_node4_te candidate-paths
preference 100 metric margin absolute 5
Note Disjoint-path and affinity constraints cannot be configured at the same time.
• Use the segment-routing traffic-eng policy policy candidate-paths preference preference constraints
affinity {exclude-any | include-all | include-any} name command to configure the affinity constraints.
Node1(config)# segment-routing traffic-eng policy pol_node1_node4_te candidate-paths
preference 100 constraints affinity exclude-any name brown
• Use the segment-routing traffic-eng policy policy candidate-paths preference preference constraints
disjoint-path group-id group-id type {link | node | srlg | srlg-node} [sub-id sub-id] command to
configure the disjoint-path constraints. The group-id and sub-id range is from 1 to 65535
Node1(config)# segment-routing traffic-eng policy pol_node1_node4_te candidate-paths
preference 100 constraints disjoint-path group-id 775 type link
• Use the segment-routing traffic-eng policy policy candidate-paths preference preference constraints
segments protection {protected-only | protected-preferred | unprotected-only |
unprotected-preferred} command to configure the segment protection-type behavior.
See Segment Protection-Type Constraint, on page 220 for details about the segment protection-type
constraint.
The following example shows how to configure the policy with a SID-list that must be encoded using
protected segments:
Node1(config)# segment-routing traffic-eng policy pol_node1_node4_te candidate-paths
preference 100 constraints segments protection protected-only
Examples
The following example shows a configuration of an SRv6 policy at an SRv6-TE head-end router using the
global locator and source address. The policy has a dynamic path with optimization objectives and affinity
constraints computed by the SR-PCE.
Node1(config)# segment-routing
Node1(config-sr)# traffic-eng
Node1(config-sr-te)# srv6
Node1(config-sr-te-srv6)# locator Node1 binding-sid dynamic behavior ub6-insert-reduced
Node1(config-sr-te-srv6)# exit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
223
Configure SRv6 Traffic Engineering
Configure SRv6 Policy with Dynamic Path
Node1(config-sr-te)# candidate-paths
Node1(config-sr-te-candidate-path)# all
Node1(config-sr-te-candidate-path-type)# source-address ipv6 cafe:0:1::1
Node1(config-sr-te-candidate-path-type)# exit
Node1(config-sr-te-candidate-path)# exit
Running Config
segment-routing
traffic-eng
srv6
locator Node1 binding-sid dynamic behavior ub6-insert-reduced
!
candidate-paths
all
source-address ipv6 cafe:0:1::1
!
!
policy pol_node1_node4_te
color 20 end-point ipv6 cafe:0:4::4
candidate-paths
preference 100
dynamic
pcep
!
metric
type te
!
!
constraints
affinity
exclude-any
name brown
!
!
!
!
!
!
!
!
The following example shows a configuration of a manual SRv6 policy at an SRv6-TE head-end router with
customized locator and source address. The policy has a dynamic path with optimization objectives and affinity
constraints computed by the SR-PCE.
Node1(config)# segment-routing
Node1(config-sr)# traffic-eng
Node1(config-sr-te)# policy pol_node1_node4_te
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
224
Configure SRv6 Traffic Engineering
Configure SRv6 Policy with Dynamic Path
Running Config
segment-routing
traffic-eng
policy pol_node1_node4_te
srv6
locator Node1 binding-sid dynamic behavior ub6-insert-reduced
!
source-address ipv6 cafe:0:1::1
color 20 end-point ipv6 cafe:0:4::4
candidate-paths
preference 100
dynamic
pcep
!
metric
type te
!
!
constraints
affinity
exclude-any
name brown
!
!
!
!
!
!
!
!
Verification
Node1# show segment-routing traffic-eng policy color 20
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
225
Configure SRv6 Traffic Engineering
Protocols
Protocols
Path Computation Element Protocol
The path computation element protocol (PCEP) describes a set of procedures by which a path computation
client (PCC) can report and delegate control of head-end label switched paths (LSPs) sourced from the PCC
to a PCE peer. The PCE can request the PCC to update and modify parameters of LSPs it controls. The stateful
model also enables a PCC to allow the PCE to initiate computations allowing the PCE to perform network-wide
orchestration.
Note Refer to the Usage Guidelines and Limitations, on page 202 section for information about SR-PCE compatibility
with different IOS XR releases.
A PCEP channel is established over TCP and has its own light-weight Keep-Alive (KA) mechanism
Upon configuring a PCE peer, a PCC opens a PCEP session to the PCE, and the PCE accepts the PCEP
sessions if the following conditions are satisfied:
• The total number of PCEP sessions does not exceed the limit on the total number of PCEP sessions on
the PCE.
• The KA interval indicated by PCC is acceptable to the PCE.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
226
Configure SRv6 Traffic Engineering
Configure the Head-End Router as PCEP PCC
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
227
Configure SRv6 Traffic Engineering
Configure the Head-End Router as PCEP PCC
TCP-AO is compatible with Master Key Tuple (MKT) configuration. TCP-AO also protects connections
when using the same MKT across repeated instances of a connection. TCP-AO protects the connections by
using traffic key that are derived from the MKT, and then coordinates changes between the endpoints.
Note TCP-AO and TCP MD5 are never permitted to be used simultaneously. TCP-AO supports IPv6, and is fully
compatible with the proposed requirements for the replacement of TCP MD5.
Use the timers deadtimer command to specify how long the remote peers wait before bringing down the
PCEP session if no PCEP messages are received from this PCC. The range is from 1 to 255 seconds; the
default value is 120.
Router(config-sr-te-pcc)# timers deadtimer seconds
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
228
Configure SRv6 Traffic Engineering
Configure the Head-End Router as PCEP PCC
Use the timers delegation-timeout command to specify how long a delegated SR policy can remain up
without an active connection to a PCE. The range is from 0 to 3600 seconds; the default value is 60.
Router(config-sr-te-pcc)# timers delegation-timeout seconds
Use the timers initiated state command to specify the amount of time that a PCE-initiated SR policy will
remain programmed while not being delegated to any PCE. The range is from 15 to 14440 seconds (24 hours);
the default value is 600.
To better understand how the PCE-Initiated SR policy timers operate, consider the following example:
• PCE A instantiates SR policy P at head-end N.
• Head-end N delegates SR policy P to PCE A and programs it in forwarding.
• If head-end N detects that PCE A is no longer reachable, then head-end N starts the PCE-initiated orphan
and state timers for SR policy P.
• If PCE A reconnects before the orphan timer expires, then SR policy P is automatically delegated back
to its original PCE (PCE A).
• After the orphan timer expires, SR policy P will be eligible for delegation to any other surviving PCE(s).
• If SR policy P is not delegated to another PCE before the state timer expires, then head-end N will
remove SR policy P from its forwarding.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
229
Configure SRv6 Traffic Engineering
Configure the Head-End Router as PCEP PCC
The default MSD value is equal to the maximum MSD supported by the platform (12 — 2 carriers, 6 uSIDs
per carrier).
Router(config-sr-te-srv6)# maximum-sid-depth value
For cases with path computation at PCE, a PCC can signal its MSD to the PCE in the following ways:
• During PCEP session establishment – The signaled MSD is treated as a node-wide property.
• MSD is configured under segment-routing traffic-eng maximum-sid-depth value command
• During PCEP LSP path request – The signaled MSD is treated as an LSP property.
• On-demand (ODN) SR Policy: MSD is configured using the segment-routing traffic-eng
on-demand color color maximum-sid-depth value command
• Local SR Policy: MSD is configured using the segment-routing traffic-eng policy WORD
candidate-paths preference preference dynamic metric sid-limit value command.
Note If the configured MSD values are different, the per-LSP MSD takes precedence
over the per-node MSD.
After path computation, the resulting uSID stack size is verified against the MSD requirement.
• If the uSID stack size is larger than the MSD and path computation is performed by PCE, then the PCE
returns a "no path" response to the PCC.
• If the uSID stack size is larger than the MSD and path computation is performed by PCC, then the PCC
will not install the path.
Note A sub-optimal path (if one exists) that satisfies the MSD constraint could be computed in the following cases:
• For a dynamic path with TE metric, when the PCE is configured with the pce segment-routing te-latency
command or the PCC is configured with the segment-routing traffic-eng te-latency command.
• For a dynamic path with LATENCY metric
• For a dynamic path with affinity constraints
For example, if the PCC MSD is 4 and the optimal path (with an accumulated metric of 100) requires 5 uSIDs,
but a sub-optimal path exists (with accumulated metric of 110) requiring 4 uSIDs, then the sub-optimal path
is installed.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
230
Configure SRv6 Traffic Engineering
Configure the Head-End Router as PCEP PCC
Note ECMP-aware path computation is enabled by default for IGP and LATENCY metrics.
Configuring Head-End Router as PCEP PCC and Customizing SR-TE Related Options: Example
The following example shows how to configure an SR-TE head-end router with the following functionality:
• Enable the SR-TE head-end router as a PCEP client (PCC) with 2 PCEP servers (PCE) with different
precedence values. The PCE with IP address cafe:0:2::2 is selected as BEST.
• Enable SR-TE related syslogs.
• Set the Maximum SID Depth (MSD) signaled during PCEP session establishment to 10.
• Enable PCEP reporting for all policies in the node.
Node1(config)# segment-routing
Node1(config-sr)# traffic-eng
Node1(config-sr-te)# pcc
Node1(config-sr-te-pcc)# source-address ipv6 cafe:0:1::1
Node1(config-sr-te-pcc)# pce address ipv6 cafe:0:2::2
Node1(config-pcc-pce)# precedence 10
Node1(config-pcc-pce)# exit
Node1(config-sr-te-pcc)# pce address ipv6 cafe:0:3::3
Node1(config-pcc-pce)# precedence 20
Node1(config-pcc-pce)# exit
Node1(config-sr-te-pcc)# report-all
Node1(config-sr-te-pcc)# exit
Node1(config-sr-te)# srv6
Node1(config-sr-te-srv6)# maximum-sid-depth 10
Node1(config-sr-te-srv6)# exit
Node1(config-sr-te)# logging
Node1(config-sr-te-log)# policy status
Node1(config-sr-te-log)# exit
Node1(config-sr-te)#
Running Config
segment-routing
traffic-eng
srv6
maximum-sid-depth 10
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
231
Configure SRv6 Traffic Engineering
Configure the Head-End Router as PCEP PCC
logging
policy status
!
pcc
source-address ipv6 cafe:0:1::1
pce address ipv6 cafe:0:2::2
precedence 10
!
pce address ipv6 cafe:0:3::3
precedence 20
!
report-all
!
!
!
Verification
Node1# show segment-routing traffic-eng pcc ipv6 peer brief
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
232
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
Error messages: rx 0 | tx 0
Report messages: rx 0 | tx 82
Update messages: rx 0 | tx 0
• UM model:
Cisco-IOS-XR-um-grpc-cfg.yang
SDN controllers and applications with SR traffic-engineering capabilities require a mechanism to create,
monitor, and control SRv6-TE (IPv6) policies with different properties, such as optimization objectives,
constraints, and segment-lists.
This feature introduces an API solution that simplifies building SR-TE controllers by defining gRPC API
services to request SR policy operations. These services allow for SR policy operations, potentially including
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
233
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
the creation, modification, or deletion of such policies. It's a more efficient and modernized approach to
managing and controlling SR-TE policies.
Google-defined remote procedure call (gRPC) is an open-source RPC framework. It is based on Protocol
Buffers (Protobuf), which is an open-source binary serialization protocol. gRPC provides a flexible, efficient,
automated mechanism for serializing structured data, like XML, but is smaller and simpler to use. You can
define the structure using protocol buffer message types in .proto files. Each protocol buffer message is a
small logical record of information, containing a series of name-value pairs.
The client applications use this protocol to request information from the router and make configuration changes
to the router. The process for using data models involves:
• Obtaining the data models.
• Establishing a connection between the router and the client using gRPC communication protocol.
• Managing the configuration of the router from the client using data models.
Note Refer to Use gRPC Protocol to Define Network Operations with Data Models in the Programmability
Configuration Guide for Cisco ASR 9000 Series Routers.
RP/0/RP0/CPU0:ios(config)# grpc
RP/0/RP0/CPU0:ios(config-grpc)# segment-routing
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
234
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
RP/0/RP0/CPU0:ios(config-grpc-sr)# traffic-eng
RP/0/RP0/CPU0:ios(config-grpc-sr-te)# policy-service
RP/0/RP0/CPU0:ios(config-grpc-sr-te)# commit
Note Refer to Use gRPC Protocol to Define Network Operations with Data Models in the Programmability
Configuration Guide for Cisco ASR 9000 Series Routers for other gRPC parameters.
Verify
Use the show segment-routing traffic-eng service-api clients command to display the SR-TE gRPC API client
and its status:
RP/0/RSP0/CPU0:ios# show segment-routing traffic-eng service-api clients
. . .
Examples
In the following examples, R1 is the SR-TE headend and the gRPC server. The headend router implements
the server-side of the gRPC communication, handling requests from gRPC clients.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
235
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
In these examples, an SR-TE gRPC client written in Python is used to emulate the controller node. These
clients send commands to create, modify, or delete SRTE policies, and the headend router executes these
commands and returns the responses.
Example 1: Programming an SRv6-TE Policy with Explicit Path via gRPC API
1. Configure the SRv6-TE policy.
In this example, the SRv6-TE policy uses explicit paths with a segment list. The following JSON file is
passed as an input to the SR-TE gRPC client to program an SRv6-TE policy with an explicit path at the
head-end router.
controller:grpc$ more sample_srv6_explicit_path_req.json
{
"policies": [
{
"key": {
"color": 6,
"endpoint": "2001:0:108::1",
"headend": "2001:0:101::1"
},
"CPs": [
{
"explicit": [
{
"segmentList": {
"name": "test-srv6",
"segments": {
"typeB": [
"fcbb:bb00:104::",
"fcbb:bb00:108::"
]
}
}
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
236
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
}
],
"preference": 10,
"dataplane": 1,
"key": {
"originatorID": {
"ASN": 64000,
"nodeID": "1.1.1.101"
},
"discriminator": 100,
"originatorProtocol": 40
}
}
],
"bindingSIDAllocation": 1,
"srv6BindingSID": {
"locatorName": "LOC_BEST_EFFORT",
"behavior": 71
}
}
]
}
Note Observe the console message indicating the policy state is “UP”:
RP/0/RP0/CPU0:Nov 15 15:11:23.784 PST: xtc_agent[1304]: %OS-XTC-5-SR_POLICY_UPDOWN :
SR policy 'srte_c_6_ep_2001:0:108::1' (color 6, end-point 2001:0:108::1) state changed to
UP
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
237
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
SID[1]: fcbb:bb00:108::/48
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
SRv6 Information:
Locator: LOC_BEST_EFFORT
Binding SID requested: Dynamic
Binding SID behavior: uB6 (Insert.Red)
Attributes:
Binding SID: fcbb:bb00:101:e005::
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
Weight distribution:
slot 0, weight 1, normalized_weight 1, class 0
slot 1, weight 1, normalized_weight 1, class 0
Load distribution: 0 1 (refcount 2)
Example 2: Programming an SRv6-TE Policy with Dynamic Path (Delegated to PCE) via gRPC API
1. Configure the SRv6-TE policy.
In this example, the SRv6-TE policy uses dynamic paths delegated to the PCE.
The following JSON file is passed as an input to the SR-TE gRPC client to program an SRv6-TE policy
with a dynamic path.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
238
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
Note Observe the console message indicating the policy state is “UP”:
RP/0/RP0/CPU0:Nov 15 15:25:23.671 PST: xtc_agent[1304]: %OS-XTC-5-SR_POLICY_UPDOWN :
SR policy 'srte_c_7_ep_2001:0:108::1' (color 7, end-point 2001:0:108::1) state changed to
UP
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
239
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
Candidate-paths:
Preference: 10 (gRPC) (active)
Requested BSID: dynamic
PCC info:
Symbolic name: gRPC_srte_c_7_ep_2001:0:108::1_c_7_ep_2001:0:108::1_discr_100
PLSP-ID: 3
Constraints:
Protection Type: protected-preferred
Maximum SID Depth: 7
Dynamic (pce 2001:0:109::1) (valid)
Metric Type: TE, Path Accumulated Metric: 44
SID[0]: fcbb:bb00:103::/48 Behavior: uN (PSP/USD) (48)
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
Address: 2001:0:103::1
SID[1]: fcbb:bb00:104::/48 Behavior: uN (PSP/USD) (48)
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
Address: 2001:0:104::1
SID[2]: fcbb:bb00:107::/48 Behavior: uN (PSP/USD) (48)
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
Address: 2001:0:107::1
SID[3]: fcbb:bb00:108::/48 Behavior: uN (PSP/USD) (48)
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
Address: 2001:0:108::1
SRv6 Information:
Locator: LOC_BEST_EFFORT
Binding SID requested: Dynamic
Binding SID behavior: uB6 (Insert.Red)
Attributes:
Binding SID: fcbb:bb00:101:e006::
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
240
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
Weight distribution:
slot 0, weight 1, normalized_weight 1, class 0
Load distribution: 0 (refcount 2)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
241
Configure SRv6 Traffic Engineering
SR-TE Application Programming Interface (API)
Note Observe the console message indicating the policy state is “DOWN”:
RP/0/RP0/CPU0:Nov 15 15:30:14.180 PST: xtc_agent[1304]: %OS-XTC-5-SR_POLICY_UPDOWN :
SR policy 'srte_c_6_ep_2001:0:108::1' (color 6, end-point 2001:0:108::1) state changed to
DOWN (path invalidated)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
242
CHAPTER 7
Configure Segment Routing Global Block and
Segment Routing Local Block
Local label allocation is managed by the label switching database (LSD). The Segment Routing Global Block
(SRGB) and Segment Routing Local Block (SRLB) are label values preserved for segment routing in the
LSD.
• About the Segment Routing Global Block, on page 243
• About the Segment Routing Local Block, on page 245
• Understanding Segment Routing Label Allocation, on page 246
• Setup a Non-Default Segment Routing Global Block Range, on page 249
• Setup a Non-Default Segment Routing Local Block Range, on page 250
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
243
Configure Segment Routing Global Block and Segment Routing Local Block
About the Segment Routing Global Block
To keep the configuration simple and straightforward, we strongly recommended that you use a homogenous
SRGB (meaning, the same SRGB range across all nodes). Using a heterogenous SRGB (meaning, a different
SRGB range of the same size across nodes) is also supported but is not recommended.
• Allocating an SRGB label range does not mean that all the labels in this range are programmed in the
forwarding table. The label range is just reserved for SR and not available for other purposes. Furthermore,
a platform may limit the number of local labels that can be programmed.
• We recommend that the non-default SRGB be configured under the segment-routing global configuration
mode. By default, all IGP instances and BGP use this SRGB.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
244
Configure Segment Routing Global Block and Segment Routing Local Block
About the Segment Routing Local Block
• You can also configure a non-default SRGB under the IGP, but it is not recommended.
To remove this conflict, you must reload the router to release the currently allocated labels and to allocate the
new SRGB.
After the system reloads, LSD does not accept any dynamic label allocation before IS-IS/OSPF/BGP have
registered with LSD. Upon IS-IS/OSPF/BGP registration, LSD allocates the requested SRGB (either the
default range or the customized range).
After IS-IS/OSPF/BGP have registered and their SRGB is allocated, LSD starts serving dynamic label requests
from other clients.
Note To avoid a potential router reload due to label conflicts, and assuming that the default SRGB size is large
enough, we recommend that you use the default IOS XR SRGB range.
Note Allocating a non-default SRGB in the upper part of the MPLS label space increases the chance that the labels
are available and a reload can be avoided.
Caution Modifying a SRGB configuration is disruptive for traffic and may require a reboot if the new SRGB is not
available entirely.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
245
Configure Segment Routing Global Block and Segment Routing Local Block
Understanding Segment Routing Label Allocation
Caution You can use the clear segment-routing local-block discrepancy all command to clear label conflicts.
However, using this command is disruptive for traffic since it forces all other MPLS applications with
conflicting labels to allocate new labels.
Note To avoid a potential router reload due to label conflicts, and assuming that the default SRGB size is large
enough, we recommend that you use the default IOS XR SRLB range.
Note Allocating a non-default SRLB in the upper part of the MPLS label space increases the chance that the labels
are available and a reload can be avoided.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
246
Configure Segment Routing Global Block and Segment Routing Local Block
Understanding Segment Routing Label Allocation
This preservation of the default SRLB/SRGB label range makes future Segment Routing activation possible
without a reboot. No labels are allocated from this preserved range. When you enable Segment Routing with
the default SRLB/SRGB in the future, these label ranges will be available and ready for use.
The LSD allocates dynamic labels starting from 24,000.
Note If an MPLS label range is configured and it overlaps with the default SRLB/SRGB label ranges (for example,
mpls label range 15000 1048575), then the default SRLB/SRGB preservation is disabled.
Example 2: LSD Label Allocation When SR is Configured with Default SRGB and Default SRLB
• Special use: 0-15
• MPLS static: 16 to 14,999
• SRLB (reserved): 15,000 to 15,999
• SRGB (reserved): 16,000 to 23,999
• Dynamic: 24,000 to max
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
247
Configure Segment Routing Global Block and Segment Routing Local Block
Understanding Segment Routing Label Allocation
Example 3: LSD Label Allocation When SR is Configured with Non-default SRGB and Non-default SRLB
• Special use: 0-15
• MPLS static: 16 to 14,999
• SRLB (preserved): 15,000 to 15,999
• SRGB (preserved): 16,000 to 23,999
• Dynamic: 24000 to 28,999
• SRLB (reserved): 29,000 to 29,999
• SRGB (reserved): 30,000 to 39,999
• Dynamic: 40,000 to max
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
248
Configure Segment Routing Global Block and Segment Routing Local Block
Setup a Non-Default Segment Routing Global Block Range
SUMMARY STEPS
1. configure
2. segment-routing global-block starting_value ending_value
3. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 segment-routing global-block starting_value ending_value Enter the lowest value that you want the SRGB range to
include as the starting value. Enter the highest value that
Example:
you want the SRGB range to include as the ending value.
RP/0/RSP0/CPU0:router(config)# segment-routing
global-block 16000 80000
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
249
Configure Segment Routing Global Block and Segment Routing Local Block
Setup a Non-Default Segment Routing Local Block Range
Use the show mpls label table [label label-value] command to verify the SRGB configuration:
What to do next
Configure prefix SIDs and enable segment routing.
SUMMARY STEPS
1. configure
2. segment-routing local-block starting_value ending_value
3. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
250
Configure Segment Routing Global Block and Segment Routing Local Block
Setup a Non-Default Segment Routing Local Block Range
Step 3 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
Use the show mpls label table [label label-value] [detail] command to verify the SRLB configuration:
No inconsistencies
The following example shows an SRLB label conflict in the range of 30000 and 30999. Note that the default
SRLB is active and the configured SRLB is pending:
for [30000,30999]. Use with caution 'clear segment-routing local-block discrepancy all'
command
to force srlb allocation'
Caution You can use the clear segment-routing local-block discrepancy all command to clear label conflicts.
However, using this command is disruptive for traffic since it forces all other MPLS applications with
conflicting labels to allocate new labels.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
251
Configure Segment Routing Global Block and Segment Routing Local Block
Setup a Non-Default Segment Routing Local Block Range
Reload the router to release the currently allocated labels and to allocate the new SRLB:
Router# reload
After the system is brought back up, verify that there are no label conflicts with the SRLB configuration:
No inconsistencies
What to do next
Configure adjacency SIDs and enable segment routing.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
252
CHAPTER 8
Configure Segment Routing for IS-IS Protocol
Integrated Intermediate System-to-Intermediate System (IS-IS), Internet Protocol Version 4 (IPv4), is a
standards-based Interior Gateway Protocol (IGP). The Cisco IOS XR software implements the IP routing
capabilities described in International Organization for Standardization (ISO)/International Engineering
Consortium (IEC) 10589 and RFC 1995, and adds the standard extensions for single topology and multitopology
IS-IS for IP Version 6 (IPv6).
This module provides the configuration information used to enable segment routing for IS-IS.
Note For additional information on implementing IS-IS on your Cisco ASR 9000 Series Router, see the Implementing
IS-IS module in the Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
253
Configure Segment Routing for IS-IS Protocol
Enabling Segment Routing for IS-IS Protocol
Note You must enter the commands in the following task list on every IS-IS router in the traffic-engineered portion
of your network.
SUMMARY STEPS
1. configure
2. router isis instance-id
3. address-family { ipv4 | ipv6 } [ unicast ]
4. metric-style wide [ level { 1 | 2 }]
5. router-id loopback loopback interface used for prefix-sid
6. segment-routing mpls [sr-prefer]
7. exit
8. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 router isis instance-id Enables IS-IS routing for the specified routing instance,
and places the router in router configuration mode.
Example:
Note
RP/0/RSP0/CPU0:router(config)# router isis isp You can change the level of routing to be performed by a
particular routing instance by using the is-type router
configuration command.
Step 3 address-family { ipv4 | ipv6 } [ unicast ] Specifies the IPv4 or IPv6 address family, and enters router
address family configuration mode.
Example:
RP/0/RSP0/CPU0:router(config-isis)# address-family
ipv4 unicast
Step 4 metric-style wide [ level { 1 | 2 }] Configures a router to generate and accept only wide link
metrics in the Level 1 area.
Example:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
254
Configure Segment Routing for IS-IS Protocol
Enabling Segment Routing for IS-IS Protocol
RP/0/RSP0/CPU0:router(config-isis-af)# metric-style
wide level 1
Step 5 router-id loopback loopback interface used for prefix-sid Configures router ID for each address-family (IPv4/IPv6).
Example: IS-IS advertises the router ID in TLVs 134 (for IPv4 address
RP/0/RSP0/CPU0:router(config-isis-af)# router-id family) and 140 (for IPv6 address family). Required when
loopback0 traffic engineering is used.
Step 6 segment-routing mpls [sr-prefer] Segment routing is enabled by the following actions:
Example: • MPLS forwarding is enabled on all interfaces where
IS-IS is active.
RP/0/RSP0/CPU0:router(config-isis-af)#
segment-routing mpls • All known prefix-SIDs in the forwarding plain are
programmed, with the prefix-SIDs advertised by
remote routers or learned through local or remote
mapping server.
• The prefix-SIDs locally configured are advertised.
Step 7 exit
Example:
RP/0/RSP0/CPU0:router(config-isis-af)# exit
RP/0/RSP0/CPU0:router(config-isis)# exit
Step 8 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
What to do next
Configure the prefix SID.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
255
Configure Segment Routing for IS-IS Protocol
Configuring a Prefix-SID on the IS-IS Enabled Loopback Interface
Note The same SRGB is used for both regular SIDs and strict-SPF SIDs.
The prefix SID is globally unique within the segment routing domain.
This task explains how to configure prefix segment identifier (SID) index or absolute value on the IS-IS
enabled Loopback interface.
SUMMARY STEPS
1. configure
2. router isis instance-id
3. interface Loopback instance
4. address-family { ipv4 | ipv6 } [ unicast ]
5. prefix-sid [strict-spf | algorithm algorithm-number] {index SID-index | absolute SID-value} [n-flag-clear]
[explicit-null ]
6. Use the commit or end command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
256
Configure Segment Routing for IS-IS Protocol
Configuring a Prefix-SID on the IS-IS Enabled Loopback Interface
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 router isis instance-id Enables IS-IS routing for the specified routing instance,
and places the router in router configuration mode.
Example:
• You can change the level of routing to be performed
RP/0/RSP0/CPU0:router(config)# router isis 1 by a particular routing instance by using the is-type
router configuration command.
Step 3 interface Loopback instance Specifies the loopback interface and instance.
Example:
RP/0/RSP0/CPU0:router(config-isis)# interface
Loopback0
Step 4 address-family { ipv4 | ipv6 } [ unicast ] Specifies the IPv4 or IPv6 address family, and enters router
address family configuration mode.
Example:
The following is an example for ipv4 address family:
RP/0/RSP0/CPU0:router(config-isis-if)#
address-family ipv4 unicast
Step 5 prefix-sid [strict-spf | algorithm algorithm-number] Configures the prefix-SID index or absolute value for the
{index SID-index | absolute SID-value} [n-flag-clear] interface.
[explicit-null ]
Specify strict-spf to configure the prefix-SID to use the
Example: SPF path instead of the SR-TE policy.
Specify algorithm algorithm-number to configure SR
RP/0/RSP0/CPU0:router(config-isis-if-af)#
prefix-sid index 1001 Flexible Algorithm.
Specify index SID-index for each node to create a prefix
SID based on the lower boundary of the SRGB + the index.
RP/0/RSP0/CPU0:router(config-isis-if-af)#
prefix-sid strict-spf index 101 Specify absolute SID-value for each node to create a
specific prefix SID within the SRGB.
By default, the n-flag is set on the prefix-SID, indicating
RP/0/RSP0/CPU0:router(config-isis-if-af)#
prefix-sid absolute 17001 that it is a node SID. For specific prefix-SID (for example,
Anycast prefix-SID), enter the n-flag-clear keyword.
IS-IS does not set the N flag in the prefix-SID sub Type
Length Value (TLV).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
257
Configure Segment Routing for IS-IS Protocol
Configuring a Prefix-SID on the IS-IS Enabled Loopback Interface
Step 6 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
258
Configure Segment Routing for IS-IS Protocol
Configuring an Adjacency SID
Manually allocated Adj-SIDs are persistent over reloads and restarts. They can be provisioned for multiple
adjacencies to the same neighbor or to different neighbors. You can specify that the Adj-SID is protected. If
the Adj-SID is protected on the primary interface and a backup path is available, a backup path is installed.
By default, manual Adj-SIDs are not protected.
Adjacency SIDs are advertised using the existing IS-IS Adj-SID sub-TLV. The S and P flags are defined for
manually allocated Adj-SIDs.
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|F|B|V|L|S|P| |
+-+-+-+-+-+-+-+-+
Field Description
S (Set) This flag is set if the same Adj-SID value has been provisioned on multiple
interfaces.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
259
Configure Segment Routing for IS-IS Protocol
Configuring an Adjacency SID
SUMMARY STEPS
1. configure
2. router isis instance-id
3. interface type interface-path-id
4. point-to-point
5. address-family { ipv4 | ipv6 } [ unicast ]
6. adjacency-sid {index adj-SID-index | absolute adj-SID-value } [protected ]
7. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 router isis instance-id Enables IS-IS routing for the specified routing instance,
and places the router in router configuration mode.
Example:
• You can change the level of routing to be performed
RP/0/RSP0/CPU0:router(config)# router isis 1 by a particular routing instance by using the is-type
router configuration command.
Step 3 interface type interface-path-id Specifies the interface and enters interface configuration
mode.
Example:
RP/0/RSP0/CPU0:router(config-isis)# interface
GigabitEthernet0/0/0/7
RP/0/RSP0/CPU0:router(config-isis-if)#
point-to-point
Step 5 address-family { ipv4 | ipv6 } [ unicast ] Specifies the IPv4 or IPv6 address family, and enters router
address family configuration mode.
Example:
The following is an example for ipv4 address family:
RP/0/RSP0/CPU0:router(config-isis-if)#
address-family ipv4 unicast
Step 6 adjacency-sid {index adj-SID-index | absolute Configures the Adj-SID index or absolute value for the
adj-SID-value } [protected ] interface.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
260
Configure Segment Routing for IS-IS Protocol
Configuring an Adjacency SID
Step 7 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
15010 AF IPv4
GigabitEthernet0/0/0/3: IPv4, Protected 1/65/N, Active
GigabitEthernet0/0/0/7: IPv4, Protected 2/66/N, Active
15100 AF IPv6
GigabitEthernet0/0/0/3: IPv6, Not protected 255/255/N, Active
Verify the labels are added to the MPLS Forwarding Information Base (LFIB):
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
261
Configure Segment Routing for IS-IS Protocol
Protected Adjacency SID Backup Timer
Configuration
Use the segment-routing protected-adjacency-sid-delay command in IS-IS address family configuration
mode. The range is from 30 to 3600 seconds; the default is 900 seconds (15 min).
Router(config)# router isis 1
Router(config-isis)# address-family ipv4 unicast
Router(config-isis-af)# segment-routing protected-adjacency-sid-delay 360
Running Configuration
router isis 1
address-family ipv4 unicast
segment-routing protected-adjacency-sid-delay 360
!
interface GigabitEthernet0/0/0/7
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
262
Configure Segment Routing for IS-IS Protocol
Manually Configure a Layer 2 Adjacency SID
the configured value of Layer 2 Adj-SID does not fall within the available SRLB, a Layer 2 Adj-SID
will not be programmed into forwarding information base (FIB).
Restrictions
• Adj-SID forwarding requires a next-hop, which can be either an IPv4 address or an IPv6 address, but
not both. Therefore, manually configured Layer 2 Adj-SIDs are configured per address-family.
• Manually configured Layer 2 Adj-SID can be associated with only one Layer 2 bundle member link.
• A SID value used for Layer 2 Adj-SID cannot be shared with Layer 3 Adj-SID.
• SR-TE using Layer 2 Adj-SID is not supported.
SUMMARY STEPS
1. configure
2. segment-routing
3. adjacency-sid
4. interface type interface-path-id
5. address-family { ipv4 | ipv6 } [ unicast ]
6. l2-adjacency sid {index adj-SID-index | absolute adj-SID-value } [next-hop {ipv4_address |
ipv6_address } ]
7. Use the commit or end command.
8. end
9. router isis instance-id
10. address-family { ipv4 | ipv6 } [ unicast ]
11. segment-routing bundle-member-adj-sid
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
263
Configure Segment Routing for IS-IS Protocol
Manually Configure a Layer 2 Adjacency SID
Router(config)# segment-routing
Step 4 interface type interface-path-id Specifies the interface and enters interface configuration
mode.
Example:
Router(config-sr-adj)# interface
GigabitEthernet0/0/0/3
Step 5 address-family { ipv4 | ipv6 } [ unicast ] Specifies the IPv4 or IPv6 address family, and enters router
address family configuration mode.
Example:
Step 6 l2-adjacency sid {index adj-SID-index | absolute Configures the Adj-SID index or absolute value for the
adj-SID-value } [next-hop {ipv4_address | interface.
ipv6_address } ]
Specify index adj-SID-index for each link to create an
Example: Ajd-SID based on the lower boundary of the SRLB + the
index.
Router(config-sr-adj-intf-af)# l2-adjacency sid
absolute 15015 next-hop 10.1.1.4
Specify absolute adj-SID-value for each link to create a
specific Ajd-SID within the SRLB.
For point-to-point interfaces, you are not required to
specify a next-hop. However, if you do specify the
next-hop, the Layer 2 Adj-SID will be used only if the
specified next-hop matches the neighbor address.
For LAN interfaces, you must configure the next-hop IPv4
or IPv6 address. If you do not configure the next-hop, the
Layer 2 Adj-SID will not be used for LAN interface.
Step 7 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
Step 8 end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
264
Configure Segment Routing for IS-IS Protocol
Configuring Bandwidth-Based Local UCMP
Step 10 address-family { ipv4 | ipv6 } [ unicast ] Specifies the IPv4 or IPv6 address family, and enters router
address family configuration mode.
Example:
Step 11 segment-routing bundle-member-adj-sid Programs the dynamic Layer 2 Adj-SIDs, and advertises
both manual and dynamic Layer 2 Adj-SIDs.
Example:
Note
Router(config-isis-af)# segment-routing This command is not required to program manual L2
bundle-member-adj-sid Adj-SID, but is required to program the dynamic Layer
2 Adj-SIDs and to advertise both manual and dynamic
Layer 2 Adj-SIDs.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
265
Configure Segment Routing for IS-IS Protocol
Configuring Bandwidth-Based Local UCMP
Bandwidth-based local UCMP is performed for prefixes, segment routing Adjacency SIDs, and Segment
Routing label cross-connects installed by IS-IS, and is supported on any physical or virtual interface that has
a valid bandwidth.
For example, if the capacity of a bundle interface changes due to the link or line card up/down event, traffic
continues to use the affected bundle interface regardless of the available provisioned bundle members. If some
bundle members were not available due to the failure, this behavior could cause the traffic to overload the
bundle interface. To address the bundle capacity changes, bandwidth-based local UCMP uses the bandwidth
of the local links to load balance traffic when bundle capacity changes.
SUMMARY STEPS
1. configure
2. router isis instance-id
3. address-family { ipv4 | ipv6 } [ unicast ]
4. apply-weight ecmp-only bandwidth
5. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 router isis instance-id Enables IS-IS routing for the specified routing instance,
and places the router in router configuration mode.
Example:
You can change the level of routing to be performed by a
RP/0/RSP0/CPU0:router(config)# router isis 1 particular routing instance by using the is-type router
configuration command.
Step 3 address-family { ipv4 | ipv6 } [ unicast ] Specifies the IPv4 or IPv6 address family, and enters IS-IS
address family configuration mode.
Example:
The following is an example for ipv4 address family:
RP/0/RSP0/CPU0:router(config-isis)# address-family
ipv4 unicast
Step 4 apply-weight ecmp-only bandwidth Enables UCMP functionality locally between ECMP paths
based on the bandwidth of the local links.
Example:
RP/0/RSP0/CPU0:router(config-isis-af)# apply-weight
ecmp-only bandwidth
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
266
Configure Segment Routing for IS-IS Protocol
IS-IS Prefix Attributes for Extended IPv4 and IPv6 Reachability
Note Prefix attributes are only added when wide metric is used.
0 1 2 3 4 5 6 7 ...
+-+-+-+-+-+-+-+-+...
|X|R|N| ...
+-+-+-+-+-+-+-+-+...
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
267
Configure Segment Routing for IS-IS Protocol
IPv4 and IPv6 Source Router ID
Field Description
X (External Prefix Flag) This flag is set if the prefix has been redistributed from another protocol. The
value of the flag is preserved when the prefix is propagated to another level.
R (Re-advertisement Flag) This flag is set to 1 by the Level 1-2 router when the prefix is propagated between
IS-IS levels (from Level 1 to Level 2, or from Level 2 to Level 1).
This flag is set to 0 when the prefix is connected locally to an IS-IS-enabled
interface (regardless of the level configured on the interface).
N (Node Flag) For prefixes that are propagated from another level:
1. Copy the N-flag from the prefix attribute sub-TLV, if present in the source
level.
2. Copy the N-flag from the prefix-SID sub-TLV, if present in the source level.
3. Otherwise, set to 0.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
268
Configure Segment Routing for IS-IS Protocol
Configuring Prefix Attribute N-flag-clear
SUMMARY STEPS
1. configure
2. router isis instance-id
3. interface Loopback instance
4. prefix-attributes n-flag-clear[Level-1|Level-2]
5. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
269
Configure Segment Routing for IS-IS Protocol
Configuring Prefix Attribute N-flag-clear
RP/0/RSP0/CPU0:router(config-if)# isis
prefix-attributes n-flag-clear
Step 5 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
270
Configure Segment Routing for IS-IS Protocol
IS-IS Multi-Domain Prefix SID and Domain Stitching: Example
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
271
Configure Segment Routing for IS-IS Protocol
Configure Common Router ID
Border nodes 5 and 9 each run two IS-IS instances (Domain1 and Domain2) and advertise their Loopback0
prefix and prefix SID in both domains.
Nodes in both domains can reach the border nodes by using the same prefix and prefix SID. For example,
Node 3 and Node 22 can reach Node 5 using prefix SID 16005.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
272
Configure Segment Routing for IS-IS Protocol
IS-IS Unreachable Prefix Announcement
Configure BGP Link-state (BGP-LS) on Node 13 and Node 14 to report their local domain to Node 10:
Example: Node 13
router isis Domain1
distribute link-state instance-id instance-id
Example: Node 14
router isis Domain2
distribute link-state instance-id instance-id
Link-state ID starts from 32. One ID is required per IGP domain. Different domain IDs are essential to identify
that the SR-TE TED belongs to a particular IGP domain.
Nodes 13 and 14 each reports its local domain in BGP-LS to Node 10.
Node 10 identifies the border nodes (Nodes 5 and 9) by their common advertised TE router ID, then combines
(stitches) the domains on these border nodes for end-to-end path computations.
IS-IS Unreachable Prefix Release 7.8.1 The Unreachable Prefix Announcement (UPA)
Announcement notifies the loss of prefix reachability between areas
or domains, for prefixes that are covered by the
summary address range during inter-area or
inter-domain summarization.
This feature helps in identifying the routers that are
facing prefix unreachability issues faster and fix it.
The new commands introduced for this feature are:
• summary-prefix
• prefix-unreachable
The organization of networks into levels or areas and/or IGP domains helps to limit the scope of link-state
information within certain boundaries. However, the state that is related to prefix reachability often requires
propagation across these areas (Level1/Level2) or domains (Autonomous System Boundary Router (ASBR)).
An Autonomous System Boundary Router (ASBR) is a router that is running multiple protocols and serves
as a gateway to routers outside the Open Shortest Path First (OSPF) domain and those operating with different
protocols.
Route summarization, also known as route aggregation, is a method to minimize the number of routing tables
in an IP network. It consolidates selected multiple routes into a single route advertisement.
Techniques such as summarization address the scale challenges associated with the advertizement of the
individual prefix state outside of local area/domain. MPLS architecture did not allow for the effective use of
the summarization due to its end-to-end Label Switched Path (LSP) requirement. With the introduction of the
SRv6, which does not have such requirement, the use of summarization has become important again.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
273
Configure Segment Routing for IS-IS Protocol
Configuration Steps
Summarization results in suppression of the individual prefix state that is useful for triggering fast-convergence
mechanisms outside of the Interior Gateway Routing Protocols (IGPs (for example - Border Gateway Protocol
- Prefix Independent Convergence (BGP PIC) Edge).
This feature enables the notification of the individual prefixes becoming unreachable in its area/domain, when
the summarization is used between areas/domains to advertise the reachability for these prefixes.
There are existing SRv6 deployments that use summarization and require fast detection of the egress Provider
Edge (PE) going down. To address these deployments in timely manner, we use the existing Protocol Data
Units (PDUs) and Tag-Length-Values (TLVs), which is based on the Prefix Unreachability Advertisement
(UPA).
Configuration Steps
The configuration steps that are required to set up the Unreachable Prefix Announcement (UPA) feature are
as follows:
• UPA Advertisement
An existing IS-IS address-family submode summary-prefix command was extended for UPA
advertisement.
Router(config)#router isis 1
Router(config-isis)#address-family ipv6 unicast
Router(config-isis-af)#summary-prefix beef:10::/32 level 2 adv-unreachable
Router(config-isis-af)#summary-prefix beef:11::/32 level 2 algorithm 128 adv-unreachable
unreachable-component-tag 777
Router(config-isis-af)#commit
• Prefix Unreachable
The new prefix-unreachable command includes new commands that control the UPA advertisement
such as, lifetime, metric, limit the maximum number if UPAs and UPA processing. For more details see,
prefix-unreachable
Router(config)#router isis 1
Router(config-isis)#address-family ipv6
Router(config-isis-af)#prefix-unreachable
Router(config-isis-prefix-unreachable)#adv-lifetime 500
Router(config-isis-prefix-unreachable)#adv-metric 4261412866
Router(config-isis-prefix-unreachable)#adv-maximum 77
Router(config-isis-prefix-unreachable)#rx-process-enable
Router(config-isis-prefix-unreachable)#commit
Running Configuration
Execute the following show commands to review the L1/L2 (area) or ASBR (domain) running configuration:
Run the show run router isis 1 address-family ipv6 unicast command to view the summary prefix
under as well as UPA parameters under it.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
274
Configure Segment Routing for IS-IS Protocol
Conditional Prefix Advertisement
adv-lifetime 300
!
summary-prefix 10::/64
summary-prefix beef:10::/32 adv-unreachable
summary-prefix beef:11::/32 algorithm 128 adv-unreachable
summary-prefix ceef:10::/32 adv-unreachable
propagate level 2 into level 1 route-policy L2_TO_L1
segment-routing srv6
locator USID_ALG0
!
locator USID_ALG128
!
!
!
!
Configuration
To use the conditional prefix advertisement in IS-IS, create a prefix-set to be tracked. Then create a route
policy that uses the prefix-set.
Router(config)# prefix-set prefix-set-name
Router(config-pfx)# prefix-address-1/length[, prefix-address-2/length,,,
prefix-address-16/length]
Router(config-pfx)# end-set
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
275
Configure Segment Routing for IS-IS Protocol
Conditional Prefix Advertisement
To advertise the loopback address in IS-IS conditionally, use the advertise prefix route-policy command
under IS-IS interface address-family configuration sub-mode.
Router(config)# router isis 1
Router(config-isis)# interface Loopback0
Router(config-isis-if)# address-family ipv4 unicast
Router(config-isis-if-af)# advertise prefix route-policy rpl-name
Router(config-isis-if-af)# commit
Example
Router(config)# prefix-set domain_2
Router(config-pfx)# 2.3.3.3/32, 2.4.4.4/32
Router(config-pfx)# end-set
Router(config)# route-policy track_domain_2
Router(config-rpl)# if rib-has-route async domain_2 then
Router(config-rpl-if)# pass
Router(config-rpl-if)# endif
Router(config-rpl)# end-policy
Router(config)# router isis 1
Router(config-isis)# interface Loopback0
Router(config-isis-if)# address-family ipv4 unicast
Router(config-isis-if-af)# advertise prefix route-policy track_domain-2
Router(config-isis-if-af)# commit
Running Configuration
prefix-set domain_2
2.3.3.3/32,
2.4.4.4/32
end-set
!
route-policy track_domain_2
if rib-has-route async domain_2 then
pass
endif
end-policy
!
router isis 1
interface Loopback0
address-family ipv4 unicast
advertise prefix route-policy track_domain_2
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
276
CHAPTER 9
Configure Segment Routing for OSPF Protocol
Open Shortest Path First (OSPF) is an Interior Gateway Protocol (IGP) developed by the OSPF working group
of the Internet Engineering Task Force (IETF). Designed expressly for IP networks, OSPF supports IP
subnetting and tagging of externally derived routing information. OSPF also allows packet authentication and
uses IP multicast when sending and receiving packets.
This module provides the configuration information to enable segment routing for OSPF.
Note For additional information on implementing OSPF on your Cisco ASR 9000 Series Router, see the Implementing
OSPF module in the Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide.
This section describes how to enable segment routing MPLS and MPLS forwarding in OSPF. Segment routing
can be configured at the instance, area, or interface level.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
277
Configure Segment Routing for OSPF Protocol
Enabling Segment Routing for OSPF Protocol
Note You must enter the commands in the following task list on every OSPF router in the traffic-engineered portion
of your network.
SUMMARY STEPS
1. configure
2. router ospf process-name
3. segment-routing mpls
4. segment-routing sr-prefer
5. area area
6. segment-routing mpls
7. exit
8. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 router ospf process-name Enables OSPF routing for the specified routing process and
places the router in router configuration mode.
Example:
Step 3 segment-routing mpls Enables segment routing using the MPLS data plane on the
routing process and all areas and interfaces in the routing
Example:
process.
RP/0/RSP0/CPU0:router(config-ospf)# segment-routing
mpls Enables segment routing fowarding on all interfaces in the
routing process and installs the SIDs received by OSPF in
the forwarding table.
Step 4 segment-routing sr-prefer Sets the preference of segment routing (SR) labels over
label distribution protocol (LDP) labels.
Example:
RP/0/RSP0/CPU0:router(config-ospf)# segment-routing
sr-prefer
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
278
Configure Segment Routing for OSPF Protocol
Configuring a Prefix-SID on the OSPF-Enabled Loopback Interface
Step 7 exit
Example:
RP/0/RSP0/CPU0:router(config-ospf-ar)# exit
RP/0/RSP0/CPU0:router(config-ospf)# exit
Step 8 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
What to do next
Configure the prefix SID.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
279
Configure Segment Routing for OSPF Protocol
Configuring a Prefix-SID on the OSPF-Enabled Loopback Interface
SUMMARY STEPS
1. configure
2. router ospf process-name
3. area value
4. interface Loopback interface-instance
5. prefix-sid [strict-spf|algorithm algorithm-number] {index SID-index | absolute SID-value }
[n-flag-clear] [explicit-null]
6. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 router ospf process-name Enables OSPF routing for the specified routing process,
and places the router in router configuration mode.
Example:
RP/0/RSP0/CPU0:router(config-ospf)# area 0
Step 4 interface Loopback interface-instance Specifies the loopback interface and instance.
Example:
RP/0/RSP0/CPU0:router(config-ospf-ar)# interface
Loopback0 passive
Step 5 prefix-sid [strict-spf|algorithm algorithm-number] {index Configures the prefix-SID index or absolute value for the
SID-index | absolute SID-value } [n-flag-clear] interface.
[explicit-null]
Specify strict-spf to configure the prefix-SID to use the
Example: SPF path instead of the SR-TE policy.
Specify algorithm algorithm-number to configure SR
RP/0/RSP0/CPU0:router(config-ospf-ar)# prefix-sid
index 1001
Flexible Algorithm.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
280
Configure Segment Routing for OSPF Protocol
Configuring a Prefix-SID on the OSPF-Enabled Loopback Interface
Step 6 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
281
Configure Segment Routing for OSPF Protocol
Configuring an Adjacency SID
Manually allocated Adj-SIDs are persistent over reloads and restarts. They can be provisioned for multiple
adjacencies to the same neighbor or to different neighbors. You can specify that the Adj-SID is protected. If
the Adj-SID is protected on the primary interface and a backup path is available, a backup path is installed.
By default, manual Adj-SIDs are not protected.
Adjacency SIDs are advertised using the existing OSPF Adj-SID sub-TLV. The P-flag is defined for manually
allocated Adj-SIDs.
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
|B|V|L|G|P| |
+-+-+-+-+-+-+-+-+
Field Description
SUMMARY STEPS
1. configure
2. router ospf process-name
3. area area
4. interface type interface-path-id
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
282
Configure Segment Routing for OSPF Protocol
Configuring an Adjacency SID
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 router ospf process-name Enables OSPF routing for the specified routing instance,
and places the router in router configuration mode.
Example:
Step 4 interface type interface-path-id Specifies the interface and enters interface configuration
mode.
Example:
RP/0/RSP0/CPU0:router(config-ospf-ar)# interface
HundredGigE0/0/0/1
Step 5 adjacency-sid {index adj-SID-index | absolute Configures the Adj-SID index or absolute value for the
adj-SID-value} [protected] interface.
Example: Specify index adj-SID-index for each link to create an
Ajd-SID based on the lower boundary of the SRLB + the
RP/0/RSP0/CPU0:router(config-config-ospf-ar-if)# index.
adjacency-sid index 10
Specify absolute adj-SID-value for each link to create a
specific Ajd-SID within the SRLB.
RP/0/RSP0/CPU0:router(config-config-ospf-ar-if)# Specify if the Adj-SID is protected. For each primary path,
adjacency-sid absolute 15010
if the Adj-SID is protected on the primary interface and a
backup path is available, a backup path is installed. By
default, manual Adj-SIDs are not protected.
Step 6 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
283
Configure Segment Routing for OSPF Protocol
Protected Adjacency SID Backup Timer
What to do next
Configure the SR-TE policy.
Configuration
Use the segment-routing protected-adjacency-sid-delay command in OSPF configuration mode. The range
is from 30 to 3600 seconds; the default is 900 seconds (15 min).
Router(config)# router ospf 1
Router(config-ospf)# segment-routing protected-adjacency-sid-delay 360
Running Configuration
router ospf 1
segment-routing protected-adjacency-sid-delay 360
area 1
interface HundredGigE0/0/0/1
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa enable
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
284
Configure Segment Routing for OSPF Protocol
Conditional Prefix Advertisement
In some situations, it’s beneficial to make the OSPF prefix advertisement conditional. For example, an Area
Border Router (ABR) or Autonomous System Boundary Router (ASBR) that has lost its connection to one
of the areas or autonomous systems (AS) might keep advertising a prefix. If an ABR or ASBR advertises the
Segment Routing (SR) SID with this prefix, the label stack of the traffic routed toward the disconnected area
or AS might use this SID, which would result in dropped traffic at the ABR or ASBR.
ABRs or ASBRs are often deployed in pairs for redundancy and advertise a shared Anycast prefix SID.
Conditional Prefix Advertisement allows an ABR or an ASBR to advertise its Anycast SID only when
connected to a specific area or domain. If an ABR or ASBR becomes disconnected from the particular area
or AS, it stops advertising the address for a specified interface (for example, Loopback).
Configure the conditional prefix advertisement under a specific interface. The prefix advertisement on this
interface is associated with the route-policy that tracks the presence of a set of prefixes (prefix-set) in the
Routing Information Base (RIB).
For faster convergence, the route-policy used for conditional prefix advertisement uses the new event-based
rib-has-route async condition to notify OSPF of the following situations:
• When the last prefix from the prefix-set is removed from the RIB.
• When the first prefix from the prefix-set is added to the RIB.
Configuration
To use the conditional prefix advertisement in OSPF, create a prefix-set to be tracked. Then create a route
policy that uses the prefix-set.
Router(config)# prefix-set prefix-set-name
Router(config-pfx)# prefix-address-1/length[, prefix-address-2/length,,,
prefix-address-16/length]
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
285
Configure Segment Routing for OSPF Protocol
Conditional Prefix Advertisement
Router(config-pfx)# end-set
To advertise the loopback address in OSPF conditionally, use the advertise prefix route-policy command
under OSPF interface address-family configuration sub-mode.
Router(config)# router ospf 1
Router(config-ospf)# area 0
Router(config-ospf-ar)# interface Loopback0
Router(config-ospf-ar-if)# advertise prefix route-policy rpl-name
Router(config-ospf-ar-if)# commit
Example
Router(config)# prefix-set domain_2
Router(config-pfx)# 2.3.3.3/32, 2.4.4.4/32
Router(config-pfx)# end-set
Router(config)# route-policy track_domain_2
Router(config-rpl)# if rib-has-route async domain_2 then
Router(config-rpl-if)# pass
Router(config-rpl-if)# endif
Router(config-rpl)# end-policy
Router(config)# router ospf 1
Router(config-ospf)# area 0
Router(config-ospf-ar)# interface Loopback0
Router(config-ospf-ar-if)# advertise prefix route-policy track_domain-2
Router(config-ospf-ar-if)# commit
Running Configuration
prefix-set domain_2
2.3.3.3/32,
2.4.4.4/32
end-set
!
route-policy track_domain_2
if rib-has-route async domain_2 then
pass
endif
end-policy
!
router ospf 1
area 0
interface Loopback0
advertise prefix route-policy track_domain_2
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
286
CHAPTER 10
Configure Segment Routing for BGP
Border Gateway Protocol (BGP) is an Exterior Gateway Protocol (EGP) that allows you to create loop-free
inter-domain routing between autonomous systems. An autonomous system is a set of routers under a single
technical administration. Routers in an autonomous system can use multiple Interior Gateway Protocols (IGPs)
to exchange routing information inside the autonomous system and an EGP to route packets outside the
autonomous system.
This module provides the configuration information used to enable Segment Routing for BGP.
Note For additional information on implementing BGP on your Cisco ASR 9000 Series Router, see the Implementing
BGP module in the Cisco ASR 9000 Series Aggregation Services Router Routing Configuration Guide.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
287
Configure Segment Routing for BGP
Configure BGP Prefix Segment Identifiers
simplifies the configuration, operation, and troubleshooting of the fabric. With segment routing for BGP, you
can enable traffic steering capabilities in the data center using a BGP prefix SID.
Note You must enable SR and explicitly configure the SRGB before configuring SR BGP. The SRGB must be
explicitly configured, even if you are using the default range (16000 – 23999). BGP uses the SRGB and the
index in the BGP prefix-SID attribute of a learned BGP-LU advertisement to allocate a local label for a given
destination.
If SR and the SRGB are enabled after configuring BGP, then BGP is not aware of the SRGB, and therefore
it allocates BGP-LU local labels from the dynamic label range instead of from the SRGB. In this case, restart
the BGP process in order to allocate BGP-LU local labels from the SRGB.
Note Because the values assigned from the range have domain-wide significance, we recommend that all routers
within the domain be configured with the same range of values.
To assign a BGP prefix SID, first create a routing policy using the set label-index index attribute, then associate
the index to the node.
Note A routing policy with the set label-index attribute can be attached to a network configuration or redistribute
configuration. Other routing policy language (RPL) configurations are possible. For more information on
routing policies, refer to the "Implementing Routing Policy" chapter in the Cisco ASR 9000 Series Aggregation
Services Router Routing Configuration Guide.
Example
The following example shows how to configure the SRGB, create a BGP route policy using a $SID parameter
and set label-index attribute, and then associate the prefix-SID index to the node.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
288
Configure Segment Routing for BGP
Segment Routing Egress Peer Engineering
BGP PeerSet SID Release 7.3.1 BGP peer SIDs are used to express
source-routed interdomain paths
and are of two types: Peer Node
SIDs and Peer Adjacency SIDs.
This release supports a new type of
BGP peering SID, called BGP Peer
Set SID. It is a group or set of BGP
peer SIDs, that can provide load
balancing over BGP neighbors
(nodes) or links (adjacencies). The
BGP peer Set SID can be associated
with any combination of Peer Node
SIDs or Peer Adjacency SIDs.
Segment routing egress peer engineering (EPE) uses a controller to instruct an ingress provider edge, or a
content source (node) within the segment routing domain, to use a specific egress provider edge (node) and
a specific external interface to reach a destination. BGP peer SIDs are used to express source-routed
inter-domain paths.
Below are the BGP-EPE peering SID types:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
289
Configure Segment Routing for BGP
Usage Guidelines and Limitations
• PeerNode SID—To an eBGP peer. Pops the label and forwards the traffic on any interface to the peer.
• PeerAdjacency SID—To an eBGP peer via interface. Pops the label and forwards the traffic on the related
interface.
• PeerSet SID—To a set of eBGP peers. Pops the label and forwards the traffic on any interface to the set
of peers. All the peers in a set might not be in the same AS.
Multiple PeerSet SIDs can be associated with any combination of PeerNode SIDs or PeerAdjacency
SIDs.
The controller learns the BGP peer SIDs and the external topology of the egress border router through BGP-LS
EPE routes. The controller can program an ingress node to steer traffic to a destination through the egress
node and peer node using BGP labeled unicast (BGP-LU).
EPE functionality is only required at the EPE egress border router and the EPE controller.
SUMMARY STEPS
1. router bgp as-number
2. neighbor ip-address
3. remote-as as-number
4. egress-engineering
5. exit
6. mpls static
7. interface type interface-path-id
8. Use the commit or end command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
290
Configure Segment Routing for BGP
Configure Segment Routing Egress Peer Engineering
DETAILED STEPS
Procedure
Step 2 neighbor ip-address Places the router in neighbor configuration mode for BGP
routing and configures the neighbor IP address as a BGP
Example:
peer.
RP/0/RSP0/CPU0:router(config-bgp)# neighbor
192.168.1.3
Step 3 remote-as as-number Creates a neighbor and assigns a remote autonomous system
number to it.
Example:
RP/0/RSP0/CPU0:router(config-bgp-nbr)# remote-as
3
Step 4 egress-engineering Configures the egress node with EPE for the eBGP peer.
Example:
RP/0/RSP0/CPU0:router(config-bgp-nbr)#
egress-engineering
Step 5 exit
Example:
RP/0/RSP0/CPU0:router(config-bgp-nbr)# exit
RP/0/RSP0/CPU0:router(config-bgp)# exit
RP/0/RSP0/CPU0:router(config)#
Step 6 mpls static Configure MPLS static on the egress interface connecting
to the eBGP peer.
Example:
Step 7 interface type interface-path-id Specifies the egress interface connecting to the eBGP peer.
Example:
RP/0/RSP0/CPU0:router(config-mpls-static)#
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
291
Configure Segment Routing for BGP
Configuring Manual BGP-EPE Peering SIDs
Step 8 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
Example
Running Config:
router bgp 1
neighbor 192.168.1.3
remote-as 3
egress-engineering
!
!
mpls static
interface GigabitEthernet0/0/1/2
!
!
Manual BGP-EPE Peer SIDs Release 7.3.1 BGP Peering SIDs that are
allocated dynamically are not
persistent and can be reallocated
after a reload or a process restart.
This feature allows you to manually
configure BGP Egress Peer
Engineering (EPE) Peering SIDs.
This functionality provides
predictability, consistency, and
reliability if there are system
reloads or process restarts.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
292
Configure Segment Routing for BGP
Configuring Manual BGP-EPE Peering SIDs
Configuring manual BGP-EPE Peer SIDs allows for persistent EPE label values. Manual BGP-EPE SIDs are
advertised through BGP-LS and are allocated from the Segment Routing Local Block (SRLB). See Configure
Segment Routing Global Block and Segment Routing Local Block, on page 243 for information about the
SRLB.
Each PeerNode SID, PeerAdjacency SID, and PeerSet SID is configured with an index value. This index
serves as an offset from the configured SRLB start value and the resulting MPLS label (SRLB start label +
index) is assigned to these SIDs. This label is used by CEF to perform load balancing across the individual
BGP PeerSet SIDs, BGP PeerNode SID, or ultimately across each first-hop adjacency associated with that
BGP PeerNode SID or BGP PeerSet SID.
Example
Topology
The example in this section uses the following topology.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
293
Configure Segment Routing for BGP
Configuring Manual BGP-EPE Peering SIDs
In this example, BGP-EPE peer SIDs are allocated from the default SRLB label range (15000 – 15999). The
BGP-EPE peer SIDs are configured as follows:
• PeerNode SIDs to 10.10.10.2 with index 600 (label 15600), and for 20.10.10.2 with index 700 (label
15700)
• PeerAdj SID to link 10.1.1.2 with index 500 (label 15500)
• PeerSet SID 1 to load balance over BGP neighbors 10.10.10.1 and 20.10.10.2 with SID index 300 (label
15300)
• PeerSet SID 2 to load balance over BGP neighbor 20.10.10.2 and link 10.1.1.2 with SID index 400 (label
15400)
Configuration on R1
router bgp 10
address-family ipv4 unicast
peer-set-id 1
peer-set-sid index 300
!
peer-set-id 2
peer-set-sid index 400
!
!
adjacencies
10.1.1.2
adjacency-sid index 500
peer-set 2
!
!
neighbor 10.10.10.2
remote-as 20
egress-engineering
peer-node-sid index 600
peer-set 1
!
neighbor 20.10.10.2
egress-engineering
peer-node-sid index 700
peer-set 1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
294
Configure Segment Routing for BGP
Configure BGP Link-State
peer-set 2
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
295
Configure Segment Routing for BGP
Configure BGP Link-State
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
296
Configure Segment Routing for BGP
Configure BGP Link-State
• The following table defines the supported extensions to the BGP-LS address family for carrying IGP
topology information (including SR information) via BGP. For more information on the BGP-LS TLVs,
refer to Border Gateway Protocol - Link State (BGP-LS) Parameters.
Table 41: IOS XR Supported BGP-LS Node Descriptor, Link Descriptor, Prefix Descriptor, and Attribute TLVs
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
297
Configure Segment Routing for BGP
Configure BGP Link-State
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
298
Configure Segment Routing for BGP
Configure BGP Link-State
Router# configure
Router(config)# router bgp 1
Router(config-bgp)# neighbor 10.0.0.2
Router(config-bgp-nbr)# remote-as 1
Router(config-bgp-nbr)# address-family link-state link-state
Router(config-bgp-nbr-af)# exit
Router# configure
Router(config)# router isis isp
Router(config-isis)# distribute link-state instance-id 32
To distribute OSPFv2 link-state data using BGP-LS, use the distribute link-state command in router
configuration mode.
Router# configure
Router(config)# router ospf 100
Router(config-ospf)# distribute link-state instance-id 32
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
299
Configure Segment Routing for BGP
Configurable Filters for IS-IS Advertisements to BGP-Link State
Configurable Filters for Release This feature allows you to configure a route map to filter IS-IS route
IS-IS Advertisements 7.10.1 advertisements to BGP-Link State (LS). It also provides a per-area
to BGP-Link State configuration knob to disable IS-IS advertisements for external and
propagated prefixes. This configuration of filters hence reduces the
amount of redundant data for external and interarea prefixes sent to
the BGP - LS clients.
The feature introduces exclude-external, exclude-interarea, and
route-policy name optional keywords in the distribute link-state
command.
In a large IS-IS network, there are multiple routers in different areas distributing their link-state databases
through BGP-LS. In addition, other protocols, such as OSPF do their own BGP-LS reporting and have routes
that are redistributed into IS-IS. This can result in substantial amounts of redundant data for external and
interarea prefixes which are sent to the BGP-LS clients only to be discarded.
Rather than sending redundant information, this feature provides the option of limiting the prefixes for which
IS-IS TLV information is sent to BGP-LS.
There are three options to filter prefix Type-Length-Values (TLVs) that are reported in BGP-LS and the
operators can specify these options on a per-level basis:
• exclude-external: Omits information for external prefixes that are redistributed from a different protocol
or instance. These are identified by the “X” bit set in its Extended Reachability Attribute Flags or the
‘X’ bit of TLVs 236 and 237.
• exclude-interarea: Omits information for interarea prefixes and summaries. These are identified by the
‘R’ bit set in their Extended Reachability Attribute Flags or the ‘up or down’ bit set in TLVs 135, 235,
236, and 237.
• route-policyname: Allows specification of a route-policy to provide filtering based on a set of destination
prefixes.
The filtering is implemented at the point where the individual prefix TLVs are read from a label-switched
path to generate updates to BGP-LS. It does not affect the advertisement of a node or the link information.
Router#config
Router(config)#router isis 1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
300
Configure Segment Routing for BGP
Use Case: Configuring SR-EPE and BGP-LS
Router#config
Router(config)#router isis 1
Router(config-isis)#ddistribute link-state exclude-interarea
Router(config-isis)#commit
Router# config
Router(config)# router isis 1
Router(config-isis)#distribute link-state route-policy isis-rp-1
Router(config-isis)#commit
Note This feature does not introduce any new failure modes to IS-IS.
Running Configuration
To check the filter for IS-IS advertisements to BGP-LS, you can run the following command:
router isis 1
distribute link-state exclude-interarea
commit
!
!
router isis 1
distribute link-state route-policy isis-rp-1
commit
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
301
Configure Segment Routing for BGP
Use Case: Configuring SR-EPE and BGP-LS
Procedure
Step 2 Configure node C to advertise peer node SIDs to the controller using BGP-LS.
Example:
Step 3 Configure MPLS static on the egress interfaces connecting to the eBGP peer.
Example:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
302
Configure Segment Routing for BGP
Use Case: Configuring SR-EPE and BGP-LS
RP/0/RSP0/CPU0:router_C(config)# commit
The output shows that node C has allocated peer SIDs for each eBGP peer.
Example:
The output shows that node C installed peer node SIDs in the Forwarding Information Base (FIB).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
303
Configure Segment Routing for BGP
Configure BGP Proxy Prefix SID
Configuration Example:
This example shows how to configure the BGP proxy prefix SID feature for the segment routing mapping
server.
RP/0/RSP0/CPU0:router(config)# segment-routing
RP/0/RSP0/CPU0:router(config-sr)# mapping-server
RP/0/RSP0/CPU0:router(config-sr-ms)# prefix-sid-map
RP/0/RSP0/CPU0:router(config-sr-ms-map)# address-family ipv4
RP/0/RSP0/CPU0:router(config-sr-ms-map-af)# 10.1.1.1/32 10 range 200
RP/0/RSP0/CPU0:router(config-sr-ms-map-af)# 192.168.64.1/32 400 range 300
This example shows how to configure the BGP proxy prefix SID feature for the segment-routing mapping
client.
RP/0/RSP0/CPU0:router(config)# router bgp 1
RP/0/RSP0/CPU0:router(config-bgp)# address-family ip4 unicast
RP/0/RSP0/CPU0:router(config-bgp-af)# segment-routing prefix-sid-map
Verification
These examples show how to verify the BGP proxy prefix SID feature.
RP/0/RSP0/CPU0:router# show segment-routing mapping-server prefix-sid-map ipv4 detail
Prefix
10.1.1.1/32
SID Index: 10
Range: 200
Last Prefix: 10.1.1.200/32
Last SID Index: 209
Flags:
Number of mapping entries: 1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
304
Configure Segment Routing for BGP
Configure BGP Proxy Prefix SID
Versions:
Process bRIB/RIB SendTblVer
Speaker 117 117
Local Label: 16400
Last Modified: Oct 25 01:02:28.562 for 00:11:45Paths: (2 available, best #1)
Advertised to peers (in unique update groups):
201.1.1.1
Path #1: Received by speaker 0 Advertised to peers (in unique update groups):
201.1.1.1
Local
20.0.101.1 from 20.0.101.1 (20.0.101.1) Received Label 61
Origin IGP, localpref 100, valid, internal, best, group-best, multipath, labeled-unicast
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
305
Configure Segment Routing for BGP
BGP-LU Inter-AS Option-C Interworking with LDP and IGP SR-MPLS using Proxy BGP-SR
BGP-LU Inter-AS Option-C Interworking with LDP and IGP SR-MPLS using
Proxy BGP-SR
Table 43: Feature History Table
BGP-LU Inter-AS Option-C Release 7.3.2 This feature extends the current
Interworking with LDP and IGP Proxy BGP-SR functionality by
SR-MPLS using Proxy BGP-SR allowing the BGP-LU ASBR router
with Proxy BGP-SR configured to
also interconnect attached LDP
domains.
The Proxy BGP-SR feature allows
interconnection of IGP SR-MPLS
domains and legacy domains via
BGP-LU Inter-AS option-C. It
provides a prefix-to-SID mapping
for BGP-LU prefixes that are
learned without a Prefix-SID.
The Proxy BGP-SR feature allows interconnection of IGP SR-MPLS domains and legacy domains via BGP-LU
Inter-AS option-C. It provides a prefix-to-SID mapping for BGP-LU prefixes that are learned without a
Prefix-SID. This new feature extends the current functionality by allowing the BGP-LU ASBR router
(configured with Proxy BGP-SR) to also interconnect attached LDP domains.
With this enhancement, when performing redistribution from BGP into IGP, LDP would use the same local
label assigned by BGP for a prefix learned by BGP-LU. The local label value is based on the SR mapping
server configuration (Proxy-BGP SR feature). This behavior allows incoming LDP traffic destined to a
redistributed prefix to be switched over to the BGP-LU Inter-AS LSP.
Use Case
In the following figure, Router A does the following:
• Is an ASBR for BGP AS 100 running BGP-LU with BGP AS 200
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
306
Configure Segment Routing for BGP
BGP-LU Inter-AS Option-C Interworking with LDP and IGP SR-MPLS using Proxy BGP-SR
• Interconnects two IS-IS processes: one running LDP and another running Segment Routing
• Redistributes prefixes learned by BGP-LU from AS 200 into both IS-IS instances
• Runs SR Mapping Server (SRMS) in order to assign mappings to prefixes learned by BGP LU from AS
200 without a prefix SID (proxy BGP-SR) and prefixes learned from the LDP domain
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
307
Configure Segment Routing for BGP
BGP-LU Inter-AS Option-C Interworking with LDP and IGP SR-MPLS using Proxy BGP-SR
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
308
Configure Segment Routing for BGP
BGP-LU Inter-AS Option-C Interworking with LDP and IGP SR-MPLS using Proxy BGP-SR
remote-as 200
address-family ipv4 labeled-unicast
route-policy Pass in
route-policy Pass out
!
!
!
mpls ldp
router-id 192.168.0.1
interface GigabitEthernet0/2/0/1
!
!
segment-routing
global-block 16000 23999
mapping-server
prefix-sid-map // SRMS configuration
address-family ipv4
100.1.1.8/32 108 range 1 // SRMS mapping - LU prefix 100.1.1.8/32 assigned prefix index
108
192.168.0.3/32 3 range 1 // SRMS mapping - LDP prefix Router C assigned prefix index
3
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
309
Configure Segment Routing for BGP
BGP-LU Inter-AS Option-C Interworking with LDP and IGP SR-MPLS using Proxy BGP-SR
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
310
Configure Segment Routing for BGP
BGP Best Path Computation using SR Policy Paths
BGP Best Path Computation using Release 7.5.2 BGP best-path selection is modified
SR Policy Paths for a prefix when at least one of its
Release 7.3.4
paths resolves over the next hop
using SR policies (SR policy in
“up” state). Under this condition,
paths not steered over an SR policy
(those using native next-hop
resolution) are considered ineligible
during best-path selection.
You can thus control the best path
selection in order to steer traffic,
preferably or exclusively, over SR
policies with the desired SLA.
This feature introduces the bgp
bestpath sr-policy {force | prefer}
command.
BGP selects the best path from the available pool of paths such as iBGP, eBGP, color, or noncolor paths with
native next hop and SR policy next hop. BGP uses either native next hop or an SR policy next hop for best
path computation. However, BGP might not consider SR policy next hop for best path computation due to
other factors in best path selection. By default, BGP considers a native next hop for the best path computation
during the failure.
For more information, see Best path calculation algorithm.
When multiple advertisements of the same BGP prefix are received where some have extended community
color, SRTE headend with BGP multi-path enabled installs multiple routes with or without extended community
color. It may be required to exclude the path resolving over native next hop SR policy paths from BGP best
path selection when a prefix has multiple paths in the presence of one BGP path with the extended community
color that is resolved over the SR policy.
You may want to use the egress PE to exit a domain using local preference or other attributes before the next
hop metric selection. In such scenarios, when SR policy of the primary path fails, the best path is resolved
over a regular IGP next hop that is the default mode of operation. Traffic doesn't select the backup path with
SR policy, instead traffic moves to native LSP on the primary path.
The BGP Best Path Computation using SR Policy Paths feature allows the BGP to use the path with SR policy
as the best-path, backup, and multipath.
When this feature is enabled, some paths are marked as an ineligible path for BGP best path selection. Existing
BGP best path selection order is applied to the eligible paths.
Use either of the following modes for the BGP to select the SR policy path as the best path for the backup
path:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
311
Configure Segment Routing for BGP
BGP Best Path Computation using SR Policy Paths
• Force mode: When force mode is enabled, only SR policy paths are considered for best path calculation.
Use the bgp bestpath sr-policy force command to enable this mode.
In a network, when at least one path has an active SR policy, the following paths are marked as ineligible
for best path selection:
• iBGP paths with noncolor or color paths with SR policy that isn't active.
• eBGP with color and SR policy isn't active.
• eBGP noncolor paths
Note Local and redistributed BGP paths are always eligible for best path selection.
• Prefer mode: When prefer mode is enabled, SR policy paths and eBGP noncolor paths are eligible for
best path calculation.
Use the bgp bestpath sr-policy prefer command to enable this mode.
In a network, when at least one path has an active SR policy, the following paths are marked as ineligible
for best path selection:
• iBGP paths with noncolor or color paths with SR policy that isn't active.
• eBGP with color and SR policy isn't active.
Note Local and redistributed BGP paths are always eligible for best path selection.
Configuration Example
Configure route policies on the egress PE router:
Router(config)#route-policy for9001
Router(config-rpl)#set extcommunity color color9001
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
312
Configure Segment Routing for BGP
BGP Best Path Computation using SR Policy Paths
Router(config-rpl)# pass
Router(config-rpl)#end-policy
Router(config)#route-policy for9002
Router(config-rpl)#set extcommunity color color9002
Router(config-rpl)#pass
Router(config-rpl)#end-policy
Router(config)#commit
Router#configure
Router(config)#route-policy add_path
Router(config-rpl)#set path-selection backup 1 install multipath-protect advertise
multipath-protect-advertise
Router(config-rpl)#end-policy
Router(config)#route-policy pass-all
Router(config-rpl)#pass
Router(config-rpl)#end-policy
Router(config)#commit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
313
Configure Segment Routing for BGP
BGP Best Path Computation using SR Policy Paths
Router(config-bgp-nbr-af)#commit
Router(config-bgp-nbr-af)#exit
Router(config-bgp)#neighbor 32::2
Router(config-bgp-nbr)#remote-as 2
Router(config-bgp-nbr)#address-family ipv6 unicast
Router(config-bgp-nbr-af)#route-policy for9002 in
Router(config-bgp-nbr-af)#route-policy pass-all out
Router(config-bgp-nbr-af)#commit
Verification
The following show output shows that when the force option is enabled, the configured SR policy path is
selected as the best path instead of the default best path.
Router#show bgp ipv6 unicast 2001:DB8::1 brief
Status codes: s suppressed, d damped, h history, * valid, > best
i - internal, r RIB-failure, S stale, N Nexthop-discard
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
* 2001:DB8::1 10:1:1::55 100 0 2 i
* i 10:1:1::55 100 0 2 i
* 30::2 0 2 I
*> 31::2 C:9001 0 2 I
* 32::2 C:9002 0 2 I
Router#
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
314
Configure Segment Routing for BGP
BGP Best Path Computation using SR Policy Paths
Flags2: 0x00
Advertised IPv6 Unicast paths to update-groups (with more than one peer):
0.4
Advertised IPv6 Unicast paths to peers (in unique update groups):
10.1.1.55
2
30::2 from 30::2 (198.51.100.1), if-handle 0x00000000
Origin IGP, localpref 100, weight 65534, valid, external, backup, add-path
Received Path ID 0, Local Path ID 2, version 7641
Origin-AS validity: (disabled)
Non SR-policy path is ignored due to config knob
Path #4: Received by speaker 0
Flags: 0xb000000001070001, import: 0x20
Flags2: 0x00
Advertised IPv6 Unicast paths to update-groups (with more than one peer):
0.3 0.4
Advertised IPv6 Unicast paths to peers (in unique update groups):
10.1.1.55
2
31::2 C:9001 (bsid:48900) from 31::2 (198.51.100.2), if-handle 0x00000000
Origin IGP, localpref 100, valid, external, best, group-best, multipath
Received Path ID 0, Local Path ID 1, version 7641
Extended community: Color[CO-Flag]:9001[01]
Origin-AS validity: (disabled)
SR policy color 9001, ipv6 null endpoint, up, not-registered, bsid 48900
Use the show bgp process command to verify which mode is enabled.
In the following example, you see that the force mode is enabled.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
315
Configure Segment Routing for BGP
BGP Best Path Computation using SR Policy Paths
Default keepalive: 60
Non-stop routing is enabled
Slow peer detection enabled
ExtComm Color Nexthop validation: RIB
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
316
CHAPTER 11
Configure SR-TE Policies
This module provides information about segment routing for traffic engineering (SR-TE) policies, how to
configure SR-TE policies, and how to steer traffic into an SR-TE policy.
• SR-TE Policy Overview, on page 317
• Usage Guidelines and Limitations, on page 318
• Instantiation of an SR Policy, on page 319
• SR-TE Policy Path Types, on page 362
• Protocols, on page 384
• Traffic Steering, on page 395
• Miscellaneous, on page 422
Every SR-TE policy has a color value. Every policy between the same node pairs requires a unique color
value.
An SR-TE policy uses one or more candidate paths. A candidate path is a single segment list (SID-list) or a
set of weighted SID-lists (for weighted equal cost multi-path [WECMP]). A candidate path is either dynamic
or explicit. See SR-TE Policy Path Types section for more information.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
317
Configure SR-TE Policies
Usage Guidelines and Limitations
Deep hashing for Release Load balancing of non-IP traffic with large label stacks (such as
payloads with large 7.3.1 L2VPN with FAT over SR-TE) is enhanced. With this enhancement,
MPLS label stacks ECMP/bundle hashing is performed on the innermost 3 labels for load
balancing, up to the 9th label. This results in the FAT flow label being
utilized in the hash calculation for L2VPN traffic with deep label
stacks. Prior to the 7.3.1 release, only labels up to the 5th were utilized.
L3VPN BGP PIC over SR-TE Release 7.3.2 This feature provides BGP PIC
support for L3VPN over SR
policies. BGP PIC provides fast
convergence when traffic switches
from a primary path to a backup
path.
BGP PIC over SR-TE is supported
when primary and backup paths are
of the same or different resolution
types.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
318
Configure SR-TE Policies
Instantiation of an SR Policy
• Head-end computed inter-domain SR policy with Flex Algo constraint and IGP redistribution is not
supported. This is supported with Flex Algo-aware path computation at SR-PCE, with or without IGP
redistribution. See SR-PCE Flexible Algorithm Multi-Domain Path Computation, on page 627.
• Single-hop SR-TE Policy with pop operation forwards packet with incorrect ethertype when receiving
labelled packets matching Binding SID, but works properly when plain IPv6 is sent.
Instantiation of an SR Policy
An SR policy is instantiated, or implemented, at the head-end router.
The following sections provide details on the SR policy instantiation methods:
• gRPC API Services
• On-Demand SR Policy – SR On-Demand Next-Hop , on page 319
• Manually Provisioned SR Policy, on page 357
• PCE-Initiated SR Policy, on page 357
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
319
Configure SR-TE Policies
On-Demand SR Policy – SR On-Demand Next-Hop
1. An egress PE (node H) advertises a BGP route for prefix T/t. This advertisement includes an SLA intent
encoded with a BGP color extended community. In this example, the operator assigns color purple (example
value = 100) to prefixes that should traverse the network over the delay-optimized path.
2. The route reflector receives the advertised route and advertises it to other PE nodes.
3. Ingress PEs in the network (such as node F) are pre-configured with an ODN template for color purple
that provides the node with the steps to follow in case a route with the intended color appears, for example:
• Contact SR-PCE and request computation for a path toward node H that does not share any nodes
with another LSP in the same disjointness group.
• At the head-end router, compute a path towards node H that minimizes cumulative delay.
4. In this example, the head-end router contacts the SR-PCE and requests computation for a path toward
node H that minimizes cumulative delay.
5. After SR-PCE provides the compute path, an intent-driven SR policy is instantiated at the head-end router.
Other prefixes with the same intent (color) and destined to the same egress PE can share the same
on-demand SR policy. When the last prefix associated with a given [intent, egress PE] pair is withdrawn,
the on-demand SR policy is deleted, and resources are freed from the head-end router.
An on-demand SR policy is created dynamically for BGP global or VPN (service) routes. The following
services are supported with SR-ODN:
• IPv4 BGP global routes
• IPv6 BGP global routes (6PE)
• VPNv4
• VPNv6 (6vPE)
• EVPN-VPWS (single-homing)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
320
Configure SR-TE Policies
SR-ODN/Automated Steering Support at ASBR for L3VPN Inter-AS Option B and L3VPN Inline Route Reflector
• EVPN-VPWS (multi-homing)
• EVPN (single-homing/multi-homing)
Note For EVPN single-homing, you must configure an EVPN Ethernet Segment
Identifier (ESI) with a non-zero value.
Note Colored per-ESI/per-EVI EVPN Ethernet Auto-Discovery route (route-type 1) and Inclusive Multicast Route
(route-type 3) are used to trigger instantiation of ODN SR-TE policies.
Note The following scenarios involving virtual Ethernet Segments (vES) are also supported with EVPN ODN:
• VPLS VFI as vES for single-active Multi-Homing to EVPN
• Active/backup Pseudo-wire (PW) as vES for Single-Homing to EVPN
• Static Pseudo-wire (PW) as vES for active-active Multi-Homing to EVPN
SR-ODN/Automated Steering Support at ASBR for L3VPN Inter-AS Option B and L3VPN Inline Route
Reflector
This feature augments support for SR-ODN and automated steering (AS) for the following scenarios:
• At ASBR nodes for L3VPN Inter-AS Option B
• At ABR nodes acting as L3VPN Inline Route Reflectors
With this feature, an ABR/ASBR node can trigger an on-demand SR policy used to steer traffic to remote
colored destinations.
Note This feature is not supported when the Inter-AS Option B Per Next-Hop Label Allocation feature is enabled
using the label mode per-nexthop-received-label command under the VPNv4 unicast address-family.
The below topology shows a network with different regions under a single BGP AS and with L3VPN services
end-to-end. Nodes B and C are ABRs configured with BGP next-hop-self (NHS) for L3VPN. These ABRs
program label cross connects for L3VPN destinations.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
321
Configure SR-TE Policies
SR-ODN/Automated Steering Support at ASBR for L3VPN Inter-AS Option B and L3VPN Inline Route Reflector
BGP advertises prefixes with SLA intent by attaching a color extended community. The objective is to steer
traffic towards colored VPN prefixes with SR policies in each region. As shown in the figure, this feature
allows ABR node B to steer traffic for remote BGP prefixes with color 10 over an SR policy with {color 10,
end-point C}.
Similar behaviors apply at ASBR nodes for L3VPN Inter-AS Option B scenarios.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
322
Configure SR-TE Policies
SR-ODN/Automated Steering Support at ASBR for L3VPN Inter-AS Option B and L3VPN Inline Route Reflector
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
323
Configure SR-TE Policies
SR-ODN/Automated Steering Support at ASBR for L3VPN Inter-AS Option B and L3VPN Inline Route Reflector
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
324
Configure SR-TE Policies
SR-ODN Configuration Steps
Note If you are on a release before Cisco IOS XR Release 7.4.1, you can configure SR-ODN with Flexible Algorithm
constraints using the segment-routing traffic-eng on-demand color color dynamic sid-algorithm
algorithm-number command.
Starting with Cisco IOS XR release 7.4.1, you can also configure SR-ODN with Flexible Algorithm constraints
using the new segment-routing traffic-eng on-demand color color constraints segments sid-algorithm
algorithm-number command.
From Cisco IOS XR Release 7.9.1, the segment-routing traffic-eng on-demand color color dynamic
sid-algorithm algorithm-number command is deprecated. Previous configurations stored in NVRAM will
be rejected at boot-up.
Hence, for Cisco IOS XR Release 7.9.1, you must reconfigure all SR-ODN configurations with Flexible
Algorithm constraints that use the on-demand dynamic sid-algorithm with the on-demand constraints command.
2. Define BGP color extended communities. Refer to the "Implementing BGP" chapter in the Routing
Configuration Guide for Cisco ASR 9000 Series Routers.
3. Define routing policies (using routing policy language [RPL]) to set BGP color extended communities.
Refer to the "Implementing Routing Policy" chapter in the Routing Configuration Guide for Cisco ASR
9000 Series Routers.
The following RPL attach-points for setting/matching BGP color extended communities are supported:
Note The following table shows the supported RPL match operations; however, routing policies are required
primarily to set BGP color extended community. Matching based on BGP color extended communities is
performed automatically by ODN's on-demand color template.
VRF export X X
VRF import – X
EVI export X –
EVI import X X
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
325
Configure SR-TE Policies
SR-ODN Configuration Steps
Neighbor-in X X
Neighbor-out X X
Inter-AFI export – X
Inter-AFI import – X
Default-originate X –
4. Apply routing policies to a service. Refer to the "Implementing Routing Policy" chapter in the Routing
Configuration Guide for Cisco ASR 9000 Series Routers.
• Use the on-demand color color dynamic command to associate the template with on-demand SR policies
with a locally computed dynamic path (by SR-TE head-end router utilizing its TE topology database) or
centrally (by SR-PCE). The head-end router will first attempt to install the locally computed path;
otherwise, it will use the path computed by the SR-PCE.
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# on-demand color 10 dynamic
• Use the on-demand color color dynamic pcep command to indicate that only the path computed by
SR-PCE should be associated with the on-demand SR policy. With this configuration, local path
computation is not attempted; instead the head-end router will only instantiate the path computed by the
SR-PCE.
Router(config-sr-te)# on-demand color 10 dynamic pcep
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
326
Configure SR-TE Policies
Configuring SR-ODN: Examples
• Use the metric margin {absolute value| relative percent} command to configure the On-Demand
dynamic path metric margin. The range for value and percent is from 0 to 2147483647.
Router(config-sr-te-color-dyn)# metric margin absolute 5
• Use the affinity {include-any | include-all | exclude-any} {name WORD} command to configure the
affinity constraints.
Router(config-sr-te-color-dyn)# affinity exclude-any name CROSS
• Use the maximum-sid-depth value command to customize the maximum SID depth (MSD) constraints
advertised by the router.
The default MSD value is equal to the maximum MSD supported by the platform (10).
Router(config-sr-te-color)# maximum-sid-depth 5
See Customize MSD Value at PCC, on page 385 for information about SR-TE label imposition capabilities.
• Use the constraints segments sid-algorithm algorithm-number command to configure the SR Flexible
Algorithm constraints. The algorithm-number range is from 128 to 255.
Router(config-sr-te-color)# constraints segments sid-algorithm 128
See Segment Protection-Type Constraint, on page 366 for information about Adj-SID protection behavior.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
327
Configure SR-TE Policies
Configuring SR-ODN: Layer-3 Services Examples
• color 22: minimization objective = te-metric; path computation at SR-PCE; constraints = affinity
• color 30: minimization objective = delay-metric
• color 128: constraints = flex-algo
segment-routing
traffic-eng
on-demand color 10
dynamic
metric
type te
!
!
!
on-demand color 20
dynamic
metric
type igp
!
!
!
on-demand color 21
dynamic
metric
type igp
!
affinity exclude-any
name CROSS
!
!
!
on-demand color 22
dynamic
pcep
!
metric
type te
!
affinity exclude-any
name CROSS
!
!
!
on-demand color 30
dynamic
metric
type latency
!
!
!
on-demand color 128
constraints
segments
sid-algorithm 128
!
!
!
end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
328
Configure SR-TE Policies
Configuring SR-ODN: Layer-3 Services Examples
Note In most common scenarios, egress PE routers that advertise BGP service routes apply (set) BGP color extended
communities. However, color can also be set at the ingress PE router.
prefix-set sample-set
88.1.0.0/24
end-set
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
329
Configure SR-TE Policies
Configuring SR-ODN: Layer-3 Services Examples
!
route-policy SET_COLOR_GLOBAL
if destination in sample-set then
set extcommunity color color10-te
else
pass
endif
end-policy
vrf vrf_cust1
address-family ipv4 unicast
export route-policy SET_COLOR_LOW_LATENCY_TE
!
address-family ipv6 unicast
export route-policy SET_COLOR_LOW_LATENCY_TE
!
!
vrf vrf_cust2
address-family ipv4 unicast
export route-policy SET_COLOR_HI_BW
!
address-family ipv6 unicast
export route-policy SET_COLOR_HI_BW
!
!
vrf vrf_cust3
address-family ipv4 unicast
export route-policy SET_COLOR_LOW_LATENCY
!
address-family ipv6 unicast
export route-policy SET_COLOR_LOW_LATENCY
!
!
vrf vrf_cust4
address-family ipv4 unicast
export route-policy SET_COLOR_FA_128
!
address-family ipv6 unicast
export route-policy SET_COLOR_FA_128
!
!
router bgp 100
neighbor-group BR-TO-RR
address-family ipv4 unicast
route-policy SET_COLOR_GLOBAL out
!
!
!
end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
330
Configure SR-TE Policies
Configuring SR-ODN: Layer-3 Services Examples
The following output displays the details for prefix 88.1.1.0/24. Note the presence of BGP extended color
community 10, and that the prefix is associated with an SR policy with color 10 and BSID value of 24036.
RP/0/RP0/CPU0:R4# show bgp vrf vrf_cust1 88.1.1.0/24
Source AFI: VPNv4 Unicast, Source VRF: default, Source Route Distinguisher: 10.1.1.8:101
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
331
Configure SR-TE Policies
Configuring SR-ODN: Layer-3 Services Examples
The following output displays CEF details for prefix 88.1.1.0/24. Note that the prefix is associated with an
SR policy with BSID value of 24036.
RP/0/RP0/CPU0:R4# show cef vrf vrf_cust1 88.1.1.0/24
88.1.1.0/24, version 51, internal 0x5000001 0x0 (ptr 0x98c60ddc) [1], 0x0 (0x0), 0x208
(0x98425268)
Updated May 20 09:23:34.216
Prefix Len 24, traffic index 0, precedence n/a, priority 3
via local-label 24036, 5 dependencies, recursive [flags 0x6000]
path-idx 0 NHID 0x0 [0x97091ec0 0x0]
recursion-via-label
next hop VRF - 'default', table - 0xe0000000
next hop via 24036/0/21
next hop srte_c_10_ep labels imposed {ImplNull 24012}
Verifying SR Policy
Use the show segment-routing traffic-eng policy command to display SR policy information.
The following outputs show the details of an on-demand SR policy that was triggered by prefixes with color
10 advertised by node 10.1.1.8.
RP/0/RP0/CPU0:R4# show segment-routing traffic-eng policy color 10 tabular
Color Endpoint
Admin Oper Binding
State State SID
------ -------------------- ------ ------ --------------------
10 10.1.1.8 up up 24036
The following outputs show the details of the on-demand SR policy for BSID 24036.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
332
Configure SR-TE Policies
Configuring SR-ODN: Layer-3 Services Examples
Note There are 2 candidate paths associated with this SR policy: the path that is computed by the head-end router
(with preference 200), and the path that is computed by the SR-PCE (with preference 100). The candidate
path with the highest preference is the active candidate path (highlighted below) and is installed in forwarding.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
333
Configure SR-TE Policies
Configuring SR-ODN: EVPN Services Examples
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
334
Configure SR-TE Policies
Configuring SR-ODN: EVPN Services Examples
if evpn-route-type is 3 then
set extcommunity color color-55
endif
end-policy
route-policy sample-import-rpl
if evpn-route-type is 1 then
set extcommunity color color-77
elseif evpn-route-type is 3 then
set extcommunity color color-88
else
pass
endif
end-policy
The following RPL example sets BGP color extended community while matching on the following:
• Route Distinguisher (RD)
• Ethernet Segment Identifier (ESI)
• Ethernet Tag (ETAG)
• EVPN route-types
route-policy sample-bgpneighbor-rpl
if rd in (10.1.1.1:3504) then
set extcommunity color color3504
elseif rd in (10.1.1.1:3505) then
set extcommunity color color3505
elseif rd in (10.1.1.1:3506) then
set extcommunity color color99996
elseif esi in (0010.0000.0000.0000.1201) and rd in (10.1.1.1:3508) then
set extcommunity color color3508
elseif etag in (30509) and rd in (10.1.1.1:3509) then
set extcommunity color color3509
elseif etag in (0) and rd in (10.1.1.1:2001) and evpn-route-type is 1 then
set extcommunity color color82001
elseif etag in (0) and rd in (10.1.1.1:2001) and evpn-route-type is 3 then
set extcommunity color color92001
endif
pass
end-policy
Note RPLs applied under EVI import or export attach-point also support matching on the following:
• Ethernet Segment Identifier (ESI)
• Ethernet Tag (ETAG)
• EVPN-Originator
evpn
evi 101
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
335
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
bgp
route-target 101:1
route-target import 100:1
route-target export 101:1
route-policy import sample-import-rpl
!
advertise-mac
!
!
evi 102
bgp
route-target 102:1
route-target import 100:2
route-target export 102:1
route-policy export sample-export-rpl
!
advertise-mac
!
!
!
The following example shows the RPL applied at the BGP neighbor-out attach-point.
Note RPLs defined under BGP neighbor-out attach-point also support matching on the following:
• EVPN-Originator
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
336
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
ODN BGP Color Extended Site 1 routers (Nodes A and B): Site 2 routers (Nodes C and D):
Communities
• set color 10000 • set color 11000
• match color 11000 • match color 10000
Note
These colors are associated with the EVPN route-type 1 routes of the EVPN-VPWS services.
PCEP LSP Disjoint-Path Site 1 to Site 2 LSPs (from Node A to Node C/from Site 2 to Site 1 LSPs (from Node C to Node A/from
Association Group ID Node B to Node D): Node D to Node B):
• group-id = 775 • group-id = 776
The use case provides configuration and verification outputs for all devices.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
337
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
Configuration Verification
Configuration: Site 1 Node A, on page 338 Verification: Site 1 Node A, on page 346
Configuration: Site 1 Node B, on page 339 Verification: Site 1 Node B, on page 349
Configuration: Site 2 Node C, on page 340 Verification: Site 2 Node C, on page 352
Configuration: Site 2 Node D, on page 341 Verification: Site 2 Node D, on page 354
Configuration: SR-PCE
For cases when PCC nodes support, or signal, PCEP association-group object to indicate the pair of LSPs in
a disjoint set, there is no extra configuration required at the SR-PCE to trigger disjoint-path computation.
Note SR-PCE also supports disjoint-path computation for cases when PCC nodes do not support PCEP
association-group object. See Configure the Disjoint Policy (Optional), on page 620 for more information.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
338
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
segment-routing
traffic-eng
on-demand color 11000
dynamic
pcep
!
metric
type igp
!
disjoint-path group-id 775 type link
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
339
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
segment-routing
traffic-eng
on-demand color 11000
dynamic
pcep
!
metric
type igp
!
disjoint-path group-id 775 type link
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
340
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
endif
pass
end-policy
!
router bgp 65000
neighbor 10.1.1.253
address-family l2vpn evpn
route-policy SET_COLOR_EVPN_VPWS out
!
!
!
segment-routing
traffic-eng
on-demand color 10000
dynamic
pcep
!
metric
type igp
!
disjoint-path group-id 776 type link
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
341
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
segment-routing
traffic-eng
on-demand color 10000
dynamic
pcep
!
metric
type igp
!
disjoint-path group-id 776 type link
!
!
!
!
Verification: SR-PCE
Use the show pce ipv4 peer command to display the SR-PCE’s PCEP peers and session status. SR-PCE
performs path computation for the 4 nodes depicted in the use-case.
RP/0/0/CPU0:SR-PCE# show pce ipv4 peer
Mon Jul 15 19:41:43.622 UTC
Use the show pce association group-id command to display information for the pair of LSPs assigned to a
given association group-id value.
Based on the goals of this use case, SR-PCE computes link-disjoint paths for the SR policies associated with
a pair of ELINE services between site 1 and site 2. In particular, disjoint LSPs from site 1 to site 2 are identified
by association group-id 775. The output includes high-level information for LSPs associated to this group-id:
• At Node A (10.1.1.5): LSP symbolic name = bgp_c_11000_ep_10.1.1.2_discr_100
• At Node B (10.1.1.6): LSP symbolic name = bgp_c_11000_ep_10.1.1.4_discr_100
In this case, the SR-PCE was able to achieve the desired disjointness level; therefore the Status is shown as
"Satisfied".
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
342
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
Use the show pce lsp command to display detailed information of an LSP present in the PCE's LSP database.
This output shows details for the LSP at Node A (10.1.1.5) that is used to carry traffic of EVPN VPWS EVI
100 towards node C (10.1.1.2).
RP/0/0/CPU0:SR-PCE# show pce lsp pcc ipv4 10.1.1.5 name bgp_c_11000_ep_10.1.1.2_discr_100
Thu Jul 11 03:58:45.903 UTC
This output shows details for the LSP at Node B (10.1.1.6) that is used to carry traffic of EVPN VPWS EVI
101 towards node D (10.1.1.4).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
343
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
Based on the goals of this use case, SR-PCE computes link-disjoint paths for the SR policies associated with
a pair of ELINE services between site 1 and site 2. In particular, disjoint LSPs from site 2 to site 1 are identified
by association group-id 776. The output includes high-level information for LSPs associated to this group-id:
• At Node C (10.1.1.2): LSP symbolic name = bgp_c_10000_ep_10.1.1.5_discr_100
• At Node D (10.1.1.4): LSP symbolic name = bgp_c_10000_ep_10.1.1.6_discr_100
In this case, the SR-PCE was able to achieve the desired disjointness level; therefore, the Status is shown as
"Satisfied".
RP/0/0/CPU0:SR-PCE# show pce association group-id 776
Thu Jul 11 03:52:24.370 UTC
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
344
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
Use the show pce lsp command to display detailed information of an LSP present in the PCE's LSP database.
This output shows details for the LSP at Node C (10.1.1.2) that is used to carry traffic of EVPN VPWS EVI
100 towards node A (10.1.1.5).
RP/0/0/CPU0:SR-PCE# show pce lsp pcc ipv4 10.1.1.2 name bgp_c_10000_ep_10.1.1.5_discr_100
Thu Jul 11 03:55:21.706 UTC
This output shows details for the LSP at Node D (10.1.1.4) used to carry traffic of EVPN VPWS EVI 101
towards node B (10.1.1.6).
RP/0/0/CPU0:SR-PCE# show pce lsp pcc ipv4 10.1.1.4 name bgp_c_10000_ep_10.1.1.6_discr_100
Thu Jul 11 03:55:23.296 UTC
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
345
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
LSPs:
LSP[0]:
source 10.1.1.4, destination 10.1.1.6, tunnel ID 14, LSP ID 1
State: Admin up, Operation up
Setup type: Segment Routing
Binding SID: 80047
Maximum SID Depth: 10
Absolute Metric Margin: 0
Relative Metric Margin: 0%
Preference: 100
Bandwidth: signaled 0 kbps, applied 0 kbps
PCEP information:
PLSP-ID 0x10, flags: D:1 S:0 R:0 A:1 O:1 C:0
LSP Role: Disjoint LSP
State-sync PCE: None
PCC: 10.1.1.4
LSP is subdelegated to: None
Reported path:
Metric type: IGP, Accumulated Metric 40
SID[0]: Node, Label 16001, Address 10.1.1.1
SID[1]: Node, Label 16006, Address 10.1.1.6
Computed path: (Local PCE)
Computed Time: Thu Jul 11 03:50:03 UTC 2019 (00:05:20 ago)
Metric type: IGP, Accumulated Metric 40
SID[0]: Node, Label 16001, Address 10.1.1.1
SID[1]: Node, Label 16006, Address 10.1.1.6
Recorded path:
None
Disjoint Group Information:
Type Link-Disjoint, Group 776
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
346
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
The following output displays the details for the incoming EVPN RT1. Note the presence of BGP extended
color community 11000, and that the prefix is associated with an SR policy with color 11000 and BSID value
of 80044.
RP/0/RSP0/CPU0:Node-A# show bgp l2vpn evpn rd 10.1.1.5:100
[1][0000.0000.0000.0000.0000][21]/120
Wed Jul 10 18:57:58.107 PST
BGP routing table entry for [1][0000.0000.0000.0000.0000][21]/120, Route Distinguisher:
10.1.1.5:100
Versions:
Process bRIB/RIB SendTblVer
Speaker 360 360
Last Modified: Jul 10 18:36:18.369 for 00:21:40
Paths: (1 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.1.1.2 C:11000 (bsid:80044) (metric 40) from 10.1.1.253 (10.1.1.2)
Received Label 80056
Origin IGP, localpref 100, valid, internal, best, group-best, import-candidate,
imported, rib-install
Received Path ID 0, Local Path ID 1, version 358
Extended community: Color:11000 RT:65000:100
Originator: 10.1.1.2, Cluster list: 10.1.1.253
SR policy color 11000, up, registered, bsid 80044, if-handle 0x00001b20
Source AFI: L2VPN EVPN, Source VRF: default, Source Route Distinguisher: 10.1.1.2:100
Use the show l2vpn xconnect command to display the state associated with EVPN-VPWS EVI 100 service.
RP/0/RSP0/CPU0:Node-A# show l2vpn xconnect group evpn_vpws_group
Wed Jul 10 18:58:02.333 PST
Legend: ST = State, UP = Up, DN = Down, AD = Admin Down, UR = Unresolved,
SB = Standby, SR = Standby Ready, (PP) = Partially Programmed
The following output shows the details for the service. Note that the service is associated with the on-demand
SR policy with color 11000 and end-point 10.1.1.2 (node C).
RP/0/RSP0/CPU0:Node-A# show l2vpn xconnect group evpn_vpws_group xc-name evpn_vpws_100
detail
Wed Jul 10 18:58:02.755 PST
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
347
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
EVPN: neighbor 10.1.1.2, PW ID: evi 100, ac-id 21, state is up ( established )
XC ID 0xa0000007
Encapsulation MPLS
Source address 10.1.1.5
Encap type Ethernet, control word enabled
Sequencing not set
Preferred path Active : SR TE srte_c_11000_ep_10.1.1.2, On-Demand, fallback enabled
Tunnel : Up
Load Balance Hashing: src-dst-mac
Use the show segment-routing traffic-eng policy command with tabular option to display SR policy summary
information.
The following output shows the on-demand SR policy with BSID 80044 that was triggered by EVPN RT1
prefix with color 11000 advertised by node C (10.1.1.2).
RP/0/RSP0/CPU0:Node-A# show segment-routing traffic-eng policy color 11000 tabular
Wed Jul 10 18:58:00.732 PST
Color Endpoint
Admin Oper Binding
State State SID
------ -------------------- ------ ------ --------------------
11000 10.1.1.2 up up 80044
The following output shows the details for the on-demand SR policy. Note that the SR policy's active candidate
path (preference 100) is computed by SR-PCE (10.1.1.207).
Based on the goals of this use case, SR-PCE computes link-disjoint paths for the SR policies associated with
a pair of ELINE services between site 1 and site 2. Specifically, from site 1 to site 2, LSP at Node A
(srte_c_11000_ep_10.1.1.2) is link-disjoint from LSP at Node B (srte_c_11000_ep_10.1.1.4).
RP/0/RSP0/CPU0:Node-A# show segment-routing traffic-eng policy color 11000
Wed Jul 10 19:15:47.217 PST
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
348
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
PLSP-ID: 19
Dynamic (invalid)
Preference: 100 (BGP ODN) (active)
Requested BSID: dynamic
PCC info:
Symbolic name: bgp_c_11000_ep_10.1.1.2_discr_100
PLSP-ID: 18
Dynamic (pce 10.1.1.207) (valid)
Metric Type: IGP, Path Accumulated Metric: 40
80003 [Adjacency-SID, 11.5.8.5 - 11.5.8.8]
16007 [Prefix-SID, 10.1.1.7]
16002 [Prefix-SID, 10.1.1.2]
Attributes:
Binding SID: 80044
Forward Class: 0
Steering BGP disabled: no
IPv6 caps enable: yes
The following output displays the details for the incoming EVPN RT1. Note the presence of BGP extended
color community 11000, and that the prefix is associated with an SR policy with color 11000 and BSID value
of 80061.
RP/0/RSP0/CPU0:Node-B# show bgp l2vpn evpn rd 10.1.1.6:101
[1][0000.0000.0000.0000.0000][22]/120
Wed Jul 10 19:08:55.039 PST
BGP routing table entry for [1][0000.0000.0000.0000.0000][22]/120, Route Distinguisher:
10.1.1.6:101
Versions:
Process bRIB/RIB SendTblVer
Speaker 322 322
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
349
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
Source AFI: L2VPN EVPN, Source VRF: default, Source Route Distinguisher: 10.1.1.4:101
Use the show l2vpn xconnect command to display the state associated with EVPN-VPWS EVI 101 service.
RP/0/RSP0/CPU0:Node-B# show l2vpn xconnect group evpn_vpws_group
Wed Jul 10 19:08:56.388 PST
Legend: ST = State, UP = Up, DN = Down, AD = Admin Down, UR = Unresolved,
SB = Standby, SR = Standby Ready, (PP) = Partially Programmed
The following output shows the details for the service. Note that the service is associated with the on-demand
SR policy with color 11000 and end-point 10.1.1.4 (node D).
RP/0/RSP0/CPU0:Node-B# show l2vpn xconnect group evpn_vpws_group xc-name evpn_vpws_101
Wed Jul 10 19:08:56.511 PST
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
350
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
Use the show segment-routing traffic-eng policy command with tabular option to display SR policy summary
information.
The following output shows the on-demand SR policy with BSID 80061 that was triggered by EVPN RT1
prefix with color 11000 advertised by node D (10.1.1.4).
RP/0/RSP0/CPU0:Node-B# show segment-routing traffic-eng policy color 11000 tabular
Wed Jul 10 19:08:56.146 PST
Color Endpoint
Admin Oper Binding
State State SID
------ -------------------- ------ ------ --------------------
11000 10.1.1.4 up up 80061
The following output shows the details for the on-demand SR policy. Note that the SR policy's active candidate
path (preference 100) is computed by SR-PCE (10.1.1.207).
Based on the goals of this use case, SR-PCE computes link-disjoint paths for the SR policies associated with
a pair of ELINE services between site 1 and site 2. Specifically, from site 1 to site 2, LSP at Node B
(srte_c_11000_ep_10.1.1.4) is link-disjoint from LSP at Node A (srte_c_11000_ep_10.1.1.2).
RP/0/RSP0/CPU0:Node-B# show segment-routing traffic-eng policy color 11000
Wed Jul 10 19:08:56.207 PST
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
351
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
The following output displays the details for the incoming EVPN RT1. Note the presence of BGP extended
color community 10000, and that the prefix is associated with an SR policy with color 10000 and BSID value
of 80058.
RP/0/RSP0/CPU0:Node-C# show bgp l2vpn evpn rd 10.1.1.2:100
[1][0000.0000.0000.0000.0000][11]/120
BGP routing table entry for [1][0000.0000.0000.0000.0000][11]/120, Route Distinguisher:
10.1.1.2:100
Versions:
Process bRIB/RIB SendTblVer
Speaker 20 20
Last Modified: Jul 10 18:36:20.503 for 00:45:21
Paths: (1 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.1.1.5 C:10000 (bsid:80058) (metric 40) from 10.1.1.253 (10.1.1.5)
Received Label 80040
Origin IGP, localpref 100, valid, internal, best, group-best, import-candidate,
imported, rib-install
Received Path ID 0, Local Path ID 1, version 18
Extended community: Color:10000 RT:65000:100
Originator: 10.1.1.5, Cluster list: 10.1.1.253
SR policy color 10000, up, registered, bsid 80058, if-handle 0x000006a0
Source AFI: L2VPN EVPN, Source VRF: default, Source Route Distinguisher: 10.1.1.5:100
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
352
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
Use the show l2vpn xconnect command to display the state associated with EVPN-VPWS EVI 100 service.
RP/0/RSP0/CPU0:Node-C# show l2vpn xconnect group evpn_vpws_group
Legend: ST = State, UP = Up, DN = Down, AD = Admin Down, UR = Unresolved,
SB = Standby, SR = Standby Ready, (PP) = Partially Programmed
The following output shows the details for the service. Note that the service is associated with the on-demand
SR policy with color 10000 and end-point 10.1.1.5 (node A).
RP/0/RSP0/CPU0:Node-C# show l2vpn xconnect group evpn_vpws_group xc-name evpn_vpws_100
Use the show segment-routing traffic-eng policy command with tabular option to display SR policy summary
information.
The following output shows the on-demand SR policy with BSID 80058 that was triggered by EVPN RT1
prefix with color 10000 advertised by node A (10.1.1.5).
RP/0/RSP0/CPU0:Node-C# show segment-routing traffic-eng policy color 10000 tabular
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
353
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
Color Endpoint
Admin Oper Binding
State State SID
------ -------------------- ------ ------ --------------------
10000 10.1.1.5 up up 80058
The following output shows the details for the on-demand SR policy. Note that the SR policy's active candidate
path (preference 100) is computed by SR-PCE (10.1.1.207).
Based on the goals of this use case, SR-PCE computes link-disjoint paths for the SR policies associated with
a pair of ELINE services between site 1 and site 2. Specifically, from site 2 to site 1, LSP at Node C
(srte_c_10000_ep_10.1.1.5) is link-disjoint from LSP at Node D (srte_c_10000_ep_10.1.1.6).
RP/0/RSP0/CPU0:Node-C# show segment-routing traffic-eng policy color 10000
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
354
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
The following output displays the details for the incoming EVPN RT1. Note the presence of BGP extended
color community 10000, and that the prefix is associated with an SR policy with color 10000 and BSID value
of 80047.
RP/0/RSP0/CPU0:Node-D# show bgp l2vpn evpn rd 10.1.1.4:101
[1][0000.0000.0000.0000.0000][12]/120
BGP routing table entry for [1][0000.0000.0000.0000.0000][12]/120, Route Distinguisher:
10.1.1.4:101
Versions:
Process bRIB/RIB SendTblVer
Speaker 569 569
Last Modified: Jul 10 18:42:12.455 for 00:45:38
Paths: (1 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
Local
10.1.1.6 C:10000 (bsid:80047) (metric 40) from 10.1.1.253 (10.1.1.6)
Received Label 80060
Origin IGP, localpref 100, valid, internal, best, group-best, import-candidate,
imported, rib-install
Received Path ID 0, Local Path ID 1, version 568
Extended community: Color:10000 RT:65000:101
Originator: 10.1.1.6, Cluster list: 10.1.1.253
SR policy color 10000, up, registered, bsid 80047, if-handle 0x00001720
Source AFI: L2VPN EVPN, Source VRF: default, Source Route Distinguisher: 10.1.1.6:101
Use the show l2vpn xconnect command to display the state associated with EVPN-VPWS EVI 101 service.
RP/0/RSP0/CPU0:Node-D# show l2vpn xconnect group evpn_vpws_group
Legend: ST = State, UP = Up, DN = Down, AD = Admin Down, UR = Unresolved,
SB = Standby, SR = Standby Ready, (PP) = Partially Programmed
The following output shows the details for the service. Note that the service is associated with the on-demand
SR policy with color 10000 and end-point 10.1.1.6 (node B).
RP/0/RSP0/CPU0:Node-D# show l2vpn xconnect group evpn_vpws_group xc-name evpn_vpws_101
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
355
Configure SR-TE Policies
Configuring SR-ODN for EVPN-VPWS: Use Case
Use the show segment-routing traffic-eng policy command with tabular option to display SR policy summary
information.
The following output shows the on-demand SR policy with BSID 80047 that was triggered by EVPN RT1
prefix with color 10000 advertised by node B (10.1.1.6).
RP/0/RSP0/CPU0:Node-D# show segment-routing traffic-eng policy color 10000 tabular
Color Endpoint
Admin Oper Binding
State State SID
------ -------------------- ------ ------ --------------------
10000 10.1.1.6 up up 80047
The following output shows the details for the on-demand SR policy. Note that the SR policy's active candidate
path (preference 100) is computed by SR-PCE (10.1.1.207).
Based on the goals of this use case, SR-PCE computes link-disjoint paths for the SR policies associated with
a pair of ELINE services between site 1 and site 2. Specifically, from site 2 to site 1, LSP at Node D
(srte_c_10000_ep_10.1.1.6) is link-disjoint from LSP at Node C (srte_c_10000_ep_10.1.1.5).
RP/0/RSP0/CPU0:Node-D# show segment-routing traffic-eng policy color 10000
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
356
Configure SR-TE Policies
Manually Provisioned SR Policy
PCE-Initiated SR Policy
An SR-TE policy can be configured on the path computation element (PCE) to reduce link congestion or to
minimize the number of network touch points.
The PCE collects network information, such as traffic demand and link utilization. When the PCE determines
that a link is congested, it identifies one or more flows that are causing the congestion. The PCE finds a suitable
path and deploys an SR-TE policy to divert those flows, without moving the congestion to another part of the
network. When there is no more link congestion, the policy is removed.
To minimize the number of network touch points, an application, such as a Network Services Orchestrator
(NSO), can request the PCE to create an SR-TE policy. PCE deploys the SR-TE policy using PCC-PCE
communication protocol (PCEP).
For more information, see the PCE-Initiated SR Policies, on page 626 section.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
357
Configure SR-TE Policies
Cumulative Metric Bounds (Delay-Bound Use-Case)
Cumulative Metric Release With this feature, SRTE calculates a shortest path that satisfies
Bounds (Delay-Bound 7.3.1 multiple metric bounds.
use-case)
This feature provides flexibility for finding paths within metric bounds,
for parameters such as latency, hop count, IGP and TE.
SRTE can calculate a shortest path with cumulative metric bounds. For example, consider these metric bounds:
• IGP metric <= 10
• TE metric <= 60
• Hop count <= 4
• Latency <= 55
When an SR policy is configured on a head-end node with these metric bounds, a path is finalized towards
the specified destination only if it meets each of these criteria.
You can set the maximum number of attempts for computing a shortest path that satisfies the cumulative
metric bounds criteria, by using the kshortest-paths command in SR-TE configuration mode.
Restrictions
• PCE-based cumulative metric bounds computations are not supported. You must use non-PCE (SR-TE
topology) based configuration for path calculation, for cumulative bounds.
• If you use PCE dynamic computation configuration with cumulative bounds, the PCE computes a path
and validates against cumulative bounds. If it is valid, then the policy is created with this path on PCC.
If the initial path doesn't respect the bounds, then the path is not considered, and no further K-shortest
path algorithm is executed to find the path.
SR Policy
SR Policy - A policy called fromAtoB_XTC is created towards destination IP address 192.168.0.2. Also,
the candidate-paths preference, and other attributes are enabled.
Router# configure terminal
Router(config)# segment-routing traffic-eng policy fromAtoB_XTC
Router(config-sr-te-policy)# color 2 end-point ipv4 192.168.0.2
Router(config-sr-te-policy)# candidate-paths preference 100
Router(config-sr-te-policy-path-pref)# dynamic metric type te
Cumulative Metric bounds – IGP, TE, hop count, and latency metric bounds are set. SRTE calculates paths
only when each criterion is satisfied.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
358
Configure SR-TE Policies
Cumulative Metric Bounds (Delay-Bound Use-Case)
ODN SR Policy
SR ODN Policy – An SR ODN policy with color 1000 is created. Also, the candidate-paths value is on-demand.
Router# configure terminal
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# on-demand color 1000 dynamic metric type te
Router(config-sr-te)# candidate-paths on-demand
Router(config-sr-te-candidate-path-type)# exit
Router(config-sr-te-candidate-path)# exit
Cumulative Metric bounds – IGP, TE, hop count, and latency metric bounds are set for the policy. SRTE
calculates paths, only when each criterion is satisfied.
Router(config-sr-te)# on-demand color 1000 dynamic bounds cumulative
Router(config-sr-te-odc-bounds-type)# type igp 100
Router(config-sr-te-odc-bounds-type)# type te 60
Router(config-sr-te-odc-bounds-type)# type hopcount 6
Router(config-sr-te-odc-bounds-type)# type latency 1000
Router(config-sr-te-odc-bounds-type)# commit
To set the maximum number of attempts for computing paths that satisfy the cumulative metric bounds criteria,
use the kshortest-paths command.
Router# configure terminal
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# kshortest-paths 120
Router(config-sr-te)# commit
Verification
Use this command to view SR policy configuration details. Pointers:
• The Number of K-shortest-paths field displays 4. It means that the K-shortest path algorithm took 4
computations to find the right path. The 4 shortest paths that are computed using K-shortest path algorithm
did not respect the cumulative bounds. The fifth shortest path is valid against the bounds.
• The values for the metrics of the actual path (TE, IGP, Cumulative Latency and Hop count values in
the Dynamic section) are within the configured cumulative metric bounds.
Candidate-paths:
Name: fromAtoB_XTC
Requested BSID: dynamic
Constraints:
Protection Type: protected-preferred
Affinity:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
359
Configure SR-TE Policies
SR-TE BGP Soft Next-Hop Validation For ODN Policies
exclude-any:
red
Maximum SID Depth: 10
IGP Metric Bound: 10
TE Metric Bound: 60
Latency Metric Bound: 55
Hopcount Metric Bound: 4
Dynamic (valid)
Attributes:
SR-TE BGP Soft Next-Hop Release 7.3.2 This feature addresses BGP
Validation For ODN Policies Next-Hop reachability issues
through BGP Next-Hop soft
validation, and also enhances BGP
best path selection.
New commands:
• nexthop validation
color-extcomm disable
• nexthop validation
color-extcomm sr-policy
• bgp bestpath igp-metric
sr-policy
Before a BGP router installs a route in the routing table, it checks its own reachability to the Next-Hop (NH)
IP address of the route. In an SR-TE domain, a NH address may not be redistributed within the AS, or to a
neighbor AS. So, BGP cannot reach the NH, and does not install the corresponding route into the routing
table. The following workarounds are available, but they are tedious and might impact scalability:
1. Enable a non-default, static route to null0 covering the routes
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
360
Configure SR-TE Policies
SR-TE BGP Soft Next-Hop Validation For ODN Policies
This feature introduces a more optimal design and solution - When you enable an SR policy on the SR-TE
headend router, configure the nexthop validation color-extcomm sr-policy command in BGP configuration
mode. It instructs BGP that, instead of NH reachability validation of BGP routes, the validation is done for
SR policy-installed color NH addresses. When the NH address of such a route is reachable, the route is added
to the routing table.
Also, this configuration on the ingress/headend PE router reduces the route scale for NH reachability, and
service (VPN) routes automatically get NH reachability.
RR configuration – For intermediate router configuration, enable the RR with the nexthop validation
color-extcomm disable command. When enabled, and L3VPN prefixes are associated with a color ID, BGP
skips NH validation on the RR.
When the RR has no reachability to the color-extcomm NH, either enable this command, or use a legacy static
route.
The following sequence occurs when the headend router receives L3VPN prefixes based on a color ID such
as purple, green, etc.
1. The router checks/learns the local SR policy, or requests the ODN SR policy for color ID and NH
2. BGP does validation of the SR policy routes’ NH addresses and applies the corresponding NH AD/metric.
For a NH with a specific BGP-based color attribute, SR-PCE provides the AD/metric
With BGP NH reachability, traffic is transported smoothly
3. On the RR, BGP does not validate NH reachability
Configurations
Configuring BGP Soft Next-Hop Validation (Headend Router)
Headend # configure
Headend (config) # router bgp 100
Headend (config-bgp)# nexthop validation color-extcomm sr-policy
Headend (config-bgp)# commit
Headend (config-bgp)# end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
361
Configure SR-TE Policies
SR-TE Policy Path Types
Configuring BGP Best Path Selection Based on SR Policy Metric (Headend Router)
Headend # configure
Headend (config) # router bgp 100
Headend (config-bgp)# bgp bestpath igp-metric sr-policy
Headend (config-bgp)# commit
Headend (config-bgp)# end
Verification
Use this command to view BGP Soft Next-Hop Validation details.
Headend # show bgp process detail | i Nexthop
Use SR-Policy admin/metric of color-extcomm Nexthop during path comparison: enabled ExtComm
Color Nexthop validation: SR-Policy then RIB
Use this command to view BGP Best Path Selection Based on SR Policy Metric.
Headend # show bgp vrf VRF1002 ipv4 unicast 207.77.2.0
BGP routing table entry for 207.77.2.0/24, Route Distinguisher: 18522:1002 Versions:
Process bRIB/RIB SendTblVer
Speaker 5232243 5232243 Paths: (1 available, best #1)
Advertised to CE peers (in unique update groups): 10.11.2.11 101.15.2.2
Path #1: Received by speaker 0
Details
• 10.1.1.33 C:1129 - BGP path is selected based on the SR policy with color ID C:1129
• If no SR policy is up, or if the SR policy metric is not configured, only the RIB metric is displayed
• admin 20 and metric 25 are SR policy references
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
362
Configure SR-TE Policies
Dynamic Paths
Note The protocol of the source is not relevant in the path selection logic.
Dynamic Paths
Behaviors and Limitations
For a dynamic path that traverses a specific interface between nodes (segment), the algorithm may encode
this segment using an Adj-SID. The SR-TE process prefers the protected Adj-SID of the link, if one is available.
In addition, the SR-TE process prefers a manual protected Adj-SID over a dynamic protected Adj-SID.
You can configure the path to prefer the protected or unprotected Adj-SID, or to use only protected or
unprotected Adj-SID. See Segment Protection-Type Constraint, on page 366.
Optimization Objectives
Optimization objectives allow the head-end router to compute a SID-list that expresses the shortest dynamic
path according to the selected metric type:
• IGP metric — Refer to the "Implementing IS-IS" and "Implementing OSPF" chapters in the Routing
Configuration Guide for Cisco ASR 9000 Series Routers.
• TE metric — See the Configure Interface TE Metrics, on page 364 section for information about configuring
TE metrics.
This example shows a dynamic path from head-end router 1 to end-point router 3 that minimizes IGP or TE
metric:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
363
Configure SR-TE Policies
Configure Interface TE Metrics
• The blue path uses the minimum IGP metric: Min-Metric (1 → 3, IGP) = SID-list <16003>; cumulative
IGP metric: 20
• The green path uses the minimum TE metric: Min-Metric (1 → 3, TE) = SID-list <16005, 16004, 16003>;
cumulative TE metric: 23
Constraints
Constraints allow the head-end router to compute a dynamic path according to the selected metric type:
• Affinity — You can apply a color or name to links or interfaces by assigning affinity bit-maps to them.
You can then specify an affinity (or relationship) between an SR policy path and link colors. SR-TE
computes a path that includes or excludes links that have specific colors,or combinations of colors. See
the Named Interface Link Admin Groups and SR-TE Affinity Maps, on page 365 section for information
on named interface link admin groups and SR-TE Affinity Maps.
• Disjoint — SR-TE computes a path that is disjoint from another path in the same disjoint-group. Disjoint
paths do not share network resources. Path disjointness may be required for paths between the same pair
of nodes, between different pairs of nodes, or a combination (only same head-end or only same end-point).
• Flexible Algorithm — Flexible Algorithm allows for user-defined algorithms where the IGP computes
paths based on a user-defined combination of metric type and constraint.
• Protection type — For a dynamic path that traverses a specific interface between nodes (segment), or
for an explicit path using IP addresses of intermediate links, the algorithm may encode this segment
using an Adj-SID. You can specify the path to prefer protected or unprotected Adj-SIDs, or to use only
protected or unprotected Adj-SIDs. See Segment Protection-Type Constraint, on page 366 for information
about configuring the protection type.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
364
Configure SR-TE Policies
Named Interface Link Admin Groups and SR-TE Affinity Maps
Note You can configure affinity constraints using attribute flags or the Flexible Name Based Policy Constraints
scheme; however, when configurations for both schemes exist, only the configuration pertaining to the new
scheme is applied.
Configure Named Interface Link Admin Groups and SR-TE Affinity Maps
Use the affinity name NAME command in SR-TE interface submode to assign affinity to interfaces. Configure
this on routers with interfaces that have an associated admin group attribute.
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# interface TenGigE0/0/1/2
Router(config-sr-if)# affinity
Router(config-sr-if-affinity)# name RED
Use the affinity-map name NAME bit-position bit-position command in SR-TE sub-mode to define affinity
maps. The bit-position range is from 0 to 255.
Configure affinity maps on the following routers:
• Routers with interfaces that have an associated admin group attribute.
• Routers that act as SR-TE head-ends for SR policies that include affinity constraints.
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# affinity-map
Router(config-sr-te-affinity-map)# name RED bit-position 23
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
365
Configure SR-TE Policies
Segment Protection-Type Constraint
!
interface TenGigE0/0/1/2
affinity
name RED
!
!
interface TenGigE0/0/2/0
affinity
name BLUE
!
!
affinity-map
name RED bit-position 23
name BLUE bit-position 24
name CROSS bit-position 25
!
end
This feature introduces the ability to control whether protected or unprotected segments are used when encoding
the SID-list of an SR policy candidate path. The types of segments that could be used when building a SID-list
include prefix SIDs and adjacency SIDs.
A prefix SID is a global segment representing a prefix that identifies a specific node. A prefix SID is
programmed with a backup path computed by the IGP using TI-LFA.
An adjacency SID is a local segment representing an IGP adjacency. An adjacency SID can be programmed
with or without protection. Protected adjacency SIDs are programmed with a link-protectant backup path
computed by the IGP (TI-LFA) and are used if the link associated with the IGP adjacency fails.
Prefix SIDs and adjacency SIDs can be leveraged as segments in a SID-list in order to forward a packet along
a path traversing specific nodes and/or over specific interfaces between nodes. The type of segment used when
encoding the SID-list will determine whether failures along the path would be protected by TI-LFA. Depending
on the offering, an operator may want to offer either unprotected or protected services over traffic engineered
paths.
The following behaviors are available with the segment protection-type constraint:
• protected-only — The SID-list must be encoded using protected segments.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
366
Configure SR-TE Policies
Configure SR Policy with Dynamic Path
• protected-preferred — The SID-list should be encoded using protected segments if available; otherwise,
the SID-list may be encoded using unprotected Adj-SIDs. This is the default behavior when no segment
protection-type constraint is specified.
• unprotected-only — The SID-list must be encoded using unprotected Adj-SID.
• unprotected-preferred — The SID-list should be encoded using unprotected Adj-SID if available,
otherwise SID-list may be encoded using protected segments.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
367
Configure SR-TE Policies
Configure SR Policy with Dynamic Path
Examples
The following example shows a configuration of an SR policy at an SR-TE head-end router. The policy has
a dynamic path with optimization objectives and affinity constraints computed by the head-end router.
segment-routing
traffic-eng
policy foo
color 100 end-point ipv4 10.1.1.2
candidate-paths
preference 100
dynamic
metric
type te
!
!
constraints
affinity
exclude-any
name RED
!
!
!
!
!
!
The following example shows a configuration of an SR policy at an SR-TE head-end router. The policy has
a dynamic path with optimization objectives and affinity constraints computed by the SR-PCE.
segment-routing
traffic-eng
policy baa
color 101 end-point ipv4 10.1.1.2
candidate-paths
preference 100
dynamic
pcep
!
metric
type te
!
!
constraints
affinity
exclude-any
name BLUE
!
!
!
!
!
!
The following example shows a configuration of an SR policy at an SR-TE head-end router. The policy has
a dynamic path with optimization objective and segment protection-type constraint computed by the head-end
router.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
368
Configure SR-TE Policies
Anycast SID-Aware Path Computation
segment-routing
traffic-eng
policy baa
color 101 end-point ipv4 10.1.1.2
candidate-paths
preference 100
dynamic
metric
type te
!
!
constraints
segments
protection protected-only
!
!
!
!
!
!
The following example shows a configuration of an SR policy at an SR-TE head-end router. The policy has
a dynamic path with optimization objective and segment protection-type constraint computed by the SR-PCE.
segment-routing
traffic-eng
policy baa
color 101 end-point ipv4 10.1.1.2
candidate-paths
preference 100
dynamic
pcep
!
metric
type te
!
!
constraints
segments
protection protected-only
!
!
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
369
Configure SR-TE Policies
Explicit Paths
Note For information on configuring Anycast SID, see Configuring a Prefix-SID on the IS-IS Enabled Loopback
Interface, on page 256 and Configuring a Prefix-SID on the OSPF-Enabled Loopback Interface, on page 279.
Explicit Paths
SR-TE Policy with Explicit Path
Table 51: Feature History Table
SR-TE Explicit Segment Lists with Release 7.9.1 This feature allows you to
Mix of IPv4 and IPv6 Segments configure an explicit segment list
with IPv4 addresses and include an
IPv6 address as a non-first SID.
You can thus deploy a centralized
BGP EPE solution for 6PE in an
SR-MPLS network where the last
segment is associated with an
EPE-enabled BGPv6 neighbor.
An explicit segment list is defined as a sequence of one or more segments. A segment can be configured as
an IP address or an MPLS label representing a node or a link.
An explicit segment list can be configured with the following:
• IP-defined segments
• MPLS label-defined segments
• A combination of IP-defined segments and MPLS label-defined segments
• The BGP prefix SID label of an IPv4 /32 prefix learned via BGP-LU can be configured as the first
segment of an explicit segment-list (see Explicit Path with a BGP Prefix SID as First Segment, on page
374).
• The segment must be specified as an MPLS label (the local BGP-LU label allocated at the head-end
for the target prefix).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
370
Configure SR-TE Policies
SR-TE Policy with Explicit Path
• The next-hop of the BGP Prefix SID advertisement must be reachable over a unipath route (either
BGP loopback-peering reachable over unipath, or BGP interface-peering).
• When a segment of the segment list is defined as an MPLS label, subsequent segments can only be
configured as MPLS labels.
• Prior to Cisco IOS XR release 7.2.1, a segment of an explicit segment list can be configured as an IPv4
address (representing a Node or a Link) using the index index address ipv4 address command.
Starting with Cisco IOS XR release 7.2.1, an IPv4-based segment (representing a Node or a Link) can
also be configured with the new index index mpls adjacency address command. The configuration is
stored in NVRAM in the same CLI format used to create it. There is no conversion from the old CLI to
the new CLI.
Starting with Cisco IOS XR release 7.9.1, the old CLI has been deprecated. Old configurations stored
in NVRAM will be rejected at boot-up.
As a result, explicit segment lists with IPv4-based segments using the old CLI must be re-configured
using the new CLI.
There are no CLI changes for segments configured as MPLS labels using the index index mpls label
label command.
• You can configure the path to prefer the protected or unprotected Adj-SID, or to use only protected or
unprotected Adj-SID. See Segment Protection-Type Constraint, on page 366.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
371
Configure SR-TE Policies
SR-TE Policy with Explicit Path
Running Configuration
Router# show running-configuration
segment-routing
traffic-eng
segment-list SIDLIST1
index 10 mpls adjacency 10.1.1.2
index 20 mpls adjacency 10.1.1.3
index 30 mpls adjacency 10.1.1.4
!
segment-list SIDLIST2
index 10 mpls label 16002
index 20 mpls label 16003
index 30 mpls label 16004
!
segment-list SIDLIST3
index 10 mpls adjacency 10.1.1.2
index 20 mpls label 16003
index 30 mpls label 16004
!
segment-list SIDLIST4
index 10 mpls adjacency 10.1.1.2
index 20 mpls adjacency 10.1.1.3
index 30 mpls adjacency 10.1.1.4
index 40 mpls adjacency 2001:db8:10:1:1::100
!
policy POLICY2
color 20 end-point ipv4 10.1.1.4
candidate-paths
preference 200
explicit segment-list SIDLIST2
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
372
Configure SR-TE Policies
SR-TE Policy with Explicit Path
!
preference 100
explicit segment-list SIDLIST1
!
!
!
!!
!
Verification
Improved Segment List Information for Inactive or Invalid Policies
Improved Segment List Information Release 7.3.3 This feature provides for displaying
for Inactive or Invalid Policies detailed segment list information,
and also lists information on invalid
and inactive policies. This allows
you to determine if the policies
have been received correctly, to the
SR-TE policies with explicit path.
This feature provides for displaying detailed segment list information. This is in addition to the current behavior
of displaying segment list information from active policies. For active candidate paths, the status of segment
list will either be valid or invalid. If the segment list is invalid, the reason for its invalidity along with the
entire label/IP stack of segment list is displayed. For inactive candidate paths, the status of segment list will
always be inactive. Since the validity of segment list under inactive path is not checked, it is always displayed
inactive.
Verify the SR-TE policy configuration using:
Router# show segment-routing traffic-eng policy name srte_c_20_ep_10.1.1.4
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
373
Configure SR-TE Policies
Explicit Path with a BGP Prefix SID as First Segment
SR-TE Explicit Path with a BGP Release 7.11.1 This feature allows you to
Prefix SID as First Segment configure an SR-TE policy with an
explicit path that uses a remote
BGP prefix SID as its first segment.
This path is achieved by leveraging
the recursive resolution of the first
SID, which is a BGP-Label Unicast
(BGP-LU) SID. BGP-LU labels are
used as the first SID in the SR
policy to determine the egress paths
for the traffic and program the
SR-TE forwarding chain
accordingly.
This allows users to enable
Segment Routing to leverage their
existing BGP infrastructure and
integrate it with the required
Segment Routing functionalities.
The figure below shows a network setup where a PE router (PE1) is using BGP-SR as the routing protocol
and is connected to a classic BGP-LU domain. The classic BGP-LU domain is also connected to other domains
running BGP-SR
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
374
Configure SR-TE Policies
Explicit Path with a BGP Prefix SID as First Segment
In BGP-SR, a BGP Prefix-SID is advertised along with a prefix in BGP Labeled Unicast (BGP-LU). This
Prefix-SID attribute contains information about the label value and index for the route. This allows for
interworking between the classic BGP-LU and BGP-SR domains.
The figure below illustrates a best-effort BGP-LU Label Switched Path (LSP) from PE1 to PE6, passing
through transit Label Switching Router (LSR) nodes 2, 3, and 5.
With this setup, the operator can create an alternate path using an SR-TE policy at the ingress BGP-SR PE
(PE1). The explicit path for this alternate path will follow a different transit node, using the BGP prefix SID
for that transit node as the first segment.
For example, in the figure below, the SID-list shows that the explicit path uses the BGP prefix SID of transit
LSR node 4 (16004) followed by the BGP prefix SID of PE6 (16006). The PE1 router resolves the first segment
of this explicit path to the outgoing interface towards Node 2, using the outgoing label advertised by Node 2
for the BGP-LU prefix 10.1.1.4/32.
Example
The following output shows the BGP-LU routes learned at the head-end (PE1 in the illustration above).
Consider the IP prefix 1.1.1.4/32. A BGP-LU local label is assigned from the SRGB with a prefix SID index
of 4, resulting in the value 16004. Additionally, the classic BGP-LU upstream neighbor (P2) advertises an
outgoing label of 78000 for this IP prefix.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
375
Configure SR-TE Policies
Explicit Path with a BGP Prefix SID as First Segment
...
The following output shows the corresponding label forwarding entry for BGP prefix SID 16004 with
corresponding outgoing label and outgoing interface.
The configuration below depicts an SR policy (color 100 and end-point 1.1.1.6) with an explicit path to PE6
using the BGP prefix SID of transit LSR node 4 (16004) as its first segment followed by the BGP prefix SID
of PE6 (16006).
RP/0/RP0/CPU0:R1# configure
RP/0/RP0/CPU0:R1(config)# segment-routing
RP/0/RP0/CPU0:R1(config-sr)# traffic-eng
RP/0/RP0/CPU0:R1(config-sr-te)# segment-list SL-R4-R6
RP/0/RP0/CPU0:R1(config-sr-te-sl)# index 10 mpls label 16004
RP/0/RP0/CPU0:R1(config-sr-te-sl)# index 20 mpls label 16006
RP/0/RP0/CPU0:R1(config-sr-te-sl)# exit
segment-routing
traffic-eng
segment-list SL-R4-R6
index 10 mpls label 16004
index 20 mpls label 16006
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
376
Configure SR-TE Policies
Explicit Path with a BGP Prefix SID as First Segment
policy POL-to-R6
color 100 end-point ipv4 1.1.1.6
candidate-paths
preference 100
explicit segment-list SL-R4-R6
!
!
!
!
!
!
The following output depicts the forwarding information for the SR policy including the outgoing interface
and outgoing label stack.
Observe how the first segment configured (MPLS label 16004) is replaced in the forwarding with the label
advertised by the BGP-LU neighbor of the SRTE head-end (MPLS label value 78000).
RP/0/RP0/CPU0:R1# show segment-routing traffic-eng forwarding policy color 100
With the SR-TE policy installed, the head-end can apply SR-TE automated steering principles when
programming BGP service overlay routes.
In the following output, BGP prefix 10.0.0.0/8 with next-hop 1.1.1.6 and color 100 is automatically steered
over the SR policy configured above (color 100 and end-point 1.1.1.6).
RP/0/RP0/CPU0:R1# show bgp
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
377
Configure SR-TE Policies
Configuring Explicit Path with Affinity Constraint Validation
. . .
/* Enter the global configuration mode and assign color names to numeric values
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# affinity-map
Router(config-sr-te-affinity-map)# blue bit-position 0
Router(config-sr-te-affinity-map)# green bit-position 1
Router(config-sr-te-affinity-map)# red bit-position 2
Router(config-sr-te-affinity-map)# exit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
378
Configure SR-TE Policies
Configuring Explicit Path with Affinity Constraint Validation
Running Configuration
Router# show running-configuration
segment-routing
traffic-eng
interface GigabitEthernet0/0/0/0
affinity
blue
!
!
interface GigabitEthernet0/0/0/1
affinity
blue
green
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
379
Configure SR-TE Policies
Explicit Path with Affinity Constraint Validation for Anycast SIDs
Note For information about configuring Anycast SIDs, see Configuring a Prefix-SID on the IS-IS Enabled Loopback
Interface, on page 256 or Configuring a Prefix-SID on the OSPF-Enabled Loopback Interface, on page 279.
Routers that are configured with the same Anycast SID, on the same Loopback address and with the same
SRGB, advertise the same prefix SID (Anycast).
The shortest path with the lowest IGP metric is then verified against the affinity constraints. If multiple nodes
have the same shortest-path metric, all their paths are validated against the affinity constraints. A path that is
not the shortest path is not validated against the affinity constraints.
segment-routing
traffic-eng
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
380
Configure SR-TE Policies
Explicit Path with Affinity Constraint Validation for Anycast SIDs
policy POLICY1
color 20 end-point ipv4 10.1.1.4
binding-sid mpls 1000
candidate-paths
preference 100
explicit segment-list SIDLIST1
constraints
affinity
exclude-any
red
segment-list name SIDLIST1
index 10 address ipv4 100.100.100.100
index 20 address ipv4 4.4.4.4
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
381
Configure SR-TE Policies
Configure Explicit Path with Segment Protection-Type Constraint
Note Even though parallel link (23) is marked with red, it is still considered valid since anycast traffic flows only
on the path to node 5.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
382
Configure SR-TE Policies
Configure Explicit Path with Segment Protection-Type Constraint
or unprotected) is determined by the segment protection-type constraint configured under the SR policy. See
the Segment Protection-Type Constraint, on page 366.
Running Configuration
Router# show running-configuration
segment-routing
traffic-eng
segment-list SIDLIST1
index 10 mpls adjacency 10.1.1.2
index 20 mpls adjacency 10.1.1.3
index 30 mpls adjacency 10.1.1.4
!
policy POLICY1
color 10 end-point ipv4 10.1.1.4
candidate-paths
preference 100
explicit segment-list SIDLIST1
!
constraints
segments
protection protected-only
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
383
Configure SR-TE Policies
Protocols
Protocols
Path Computation Element Protocol
The path computation element protocol (PCEP) describes a set of procedures by which a path computation
client (PCC) can report and delegate control of head-end label switched paths (LSPs) sourced from the PCC
to a PCE peer. The PCE can request the PCC to update and modify parameters of LSPs it controls. The stateful
model also enables a PCC to allow the PCE to initiate computations allowing the PCE to perform network-wide
orchestration.
Use the timers deadtimer command to specify how long the remote peers wait before bringing down the
PCEP session if no PCEP messages are received from this PCC. The range is from 1 to 255 seconds; the
default value is 120.
Router(config-sr-te-pcc)# timers deadtimer seconds
Use the timers delegation-timeout command to specify how long a delegated SR policy can remain up
without an active connection to a PCE. The range is from 0 to 3600 seconds; the default value is 60.
Router(config-sr-te-pcc)# timers delegation-timeout seconds
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
384
Configure SR-TE Policies
Configure the Head-End Router as PCEP PCC
Use the timers initiated orphans command to specify the amount of time that a PCE-initiated SR policy will
remain delegated to a PCE peer that is no longer reachable by the PCC. The range is from 10 to 180 seconds;
the default value is 180.
Router(config-sr-te-pcc)# timers initiated orphans seconds
Use the timers initiated state command to specify the amount of time that a PCE-initiated SR policy will
remain programmed while not being delegated to any PCE. The range is from 15 to 14440 seconds (24 hours);
the default value is 600.
Router(config-sr-te-pcc)# timers initiated state seconds
To better understand how the PCE-initiated SR policy timers operate, consider the following example:
• PCE A instantiates SR policy P at head-end N.
• Head-end N delegates SR policy P to PCE A and programs it in forwarding.
• If head-end N detects that PCE A is no longer reachable, then head-end N starts the PCE-initiated orphan
and state timers for SR policy P.
• If PCE A reconnects before the orphan timer expires, then SR policy P is automatically delegated back
to its original PCE (PCE A).
• After the orphan timer expires, SR policy P will be eligible for delegation to any other surviving PCE(s).
• If SR policy P is not delegated to another PCE before the state timer expires, then head-end N will
remove SR policy P from its forwarding.
For cases with path computation at PCE, a PCC can signal its MSD to the PCE in the following ways:
• During PCEP session establishment – The signaled MSD is treated as a node-wide property.
• MSD is configured under segment-routing traffic-eng maximum-sid-depth value command
• During PCEP LSP path request – The signaled MSD is treated as an LSP property.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
385
Configure SR-TE Policies
Configure the Head-End Router as PCEP PCC
Note If the configured MSD values are different, the per-LSP MSD takes precedence
over the per-node MSD.
After path computation, the resulting label stack size is verified against the MSD requirement.
• If the label stack size is larger than the MSD and path computation is performed by PCE, then the PCE
returns a "no path" response to the PCC.
• If the label stack size is larger than the MSD and path computation is performed by PCC, then the PCC
will not install the path.
Note A sub-optimal path (if one exists) that satisfies the MSD constraint could be computed in the following cases:
• For a dynamic path with TE metric, when the PCE is configured with the pce segment-routing te-latency
command or the PCC is configured with the segment-routing traffic-eng te-latency command.
• For a dynamic path with LATENCY metric
• For a dynamic path with affinity constraints
For example, if the PCC MSD is 4 and the optimal path (with an accumulated metric of 100) requires 5 labels,
but a sub-optimal path exists (with accumulated metric of 110) requiring 4 labels, then the sub-optimal path
is installed.
Note ECMP-aware path computation is enabled by default for IGP and LATENCY metrics.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
386
Configure SR-TE Policies
Configure the Head-End Router as PCEP PCC
• If the original PCE is reconnected, then the delegation fallback timer is started. When the timer expires,
the LSP is redelegated back to the original PCE, even if it has worse preference than the current PCE.
Configuring Head-End Router as PCEP PCC and Customizing SR-TE Related Options: Example
The following example shows how to configure an SR-TE head-end router with the following functionality:
• Enable the SR-TE head-end router as a PCEP client (PCC) with 3 PCEP servers (PCE) with different
precedence values. The PCE with IP address 10.1.1.57 is selected as BEST.
• Enable SR-TE related syslogs.
• Set the Maximum SID Depth (MSD) signaled during PCEP session establishment to 5.
• Enable PCEP reporting for all policies in the node.
segment-routing
traffic-eng
pcc
source-address ipv4 10.1.1.2
pce address ipv4 10.1.1.57
precedence 150
password clear <password>
!
pce address ipv4 10.1.1.58
precedence 200
password clear <password>
!
pce address ipv4 10.1.1.59
precedence 250
password clear <password>
!
!
logging
policy status
!
maximum-sid-depth 5
pcc
report-all
!
!
!
end
Verification
RP/0/RSP0/CPU0:Router# show segment-routing traffic-eng pcc ipv4 peer
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
387
Configure SR-TE Policies
Configure SR-TE PCE Groups
This feature allows an SR policy to be delegated or reported to a set of PCE servers configured under a PCE
group. Multiple PCE groups can be configured to allow different SR policies on the same head-end to be
delegated or reported to different sets of PCEs.
With this functionality, an operator can designate sets of PCEs for various purposes, such as
PCE-per-service-type or PCE-per-wholesale-customer.
In the figure below, Router A has a PCEP session with 5 PCEs. The PCEs are configured over 3 PCE groups.
PCE1 is in the “default” group. PCE2 and PCE3 are in the RED group. PCE4 and PCE5 are in the BLUE
group.
Figure 23: Example: PCE Groups
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
388
Configure SR-TE Policies
Configure SR-TE PCE Groups
In case of PCE failure, each candidate path is re-delegated to the next-best PCE within the same PCE group.
For example, if the best PCE in the RED group (PCE2) fails, then all candidate paths in the RED group fallback
to the secondary PCE in the RED group (PCE3). If all the PCEs in the RED group fail, then all candidate
paths in the RED group become undelegated; they are not delegated to the PCEs in the BLUE group. If there
are no more available PCEs in the given PCE group, then the outcome is the same as when there are no
available PCEs.
Verification
segment-routing
traffic-eng
pcc
pce address ipv4 10.1.1.1
precedence 10
!
pce address ipv4 2.2.2.2
precedence 20
pce-group red
!
pce address ipv4 3.3.3.3
precedence 30
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
389
Configure SR-TE Policies
Configure SR-TE PCE Groups
pce-group red
!
pce address ipv4 4.4.4.4
precedence 40
pce-group blue
!
pce address ipv4 5.5.5.5
precedence 50
pce-group blue
!
!
!
!
Note Only one PCE group can be attached to a given SR policy candidate path.
The following example shows how to configure a policy with all candidate paths delegated/reported to PCEs
in the default group:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# policy A
Router(config-sr-te-policy)# color 100 end-point ipv4 192.168.0.2
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-policy-path-pref)# dynamic
Router(config-sr-te-pp-info)# pcep
Router(config-sr-te-path-pcep)# exit
Router(config-sr-te-pp-info)# exit
Router(config-sr-te-policy-path-pref)# exit
Router(config-sr-te-policy-path)# exit
Router(config-sr-te-policy)# exit
The following example shows how to configure a policy with all candidate paths delegated/reported to PCEs
in the red group:
Router(config-sr-te)# policy B
Router(config-sr-te-policy)# color 100 end-point ipv4 192.168.0.3
Router(config-sr-te-policy)# pce-group red
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-policy-path-pref)# dynamic
Router(config-sr-te-pp-info)# pcep
Router(config-sr-te-path-pcep)# exit
Router(config-sr-te-pp-info)# exit
Router(config-sr-te-policy-path-pref)# exit
Router(config-sr-te-policy-path)# exit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
390
Configure SR-TE Policies
Configure SR-TE PCE Groups
Router(config-sr-te-policy)# exit
The following example shows how to configure a policy with a specific candidate path (explicit path) reported
to PCEs in the blue group:
Router(config-sr-te)# policy C
Router(config-sr-te-policy)# color 100 end-point ipv4 192.168.0.4
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-policy-path-pref)# pce-group blue
Router(config-sr-te-policy-path-pref)# explicit segment-list SLA
Router(config-sr-te-pp-info)# exit
Router(config-sr-te-policy-path-pref)# exit
Router(config-sr-te-policy-path)# exit
Router(config-sr-te-policy)# exit
The following example shows how to configure an ODN template with on-demand candidate paths
delegated/reported to PCEs in the blue group:
Router(config-sr-te)# on-demand color 10
Router(config-sr-te-color)# pce-group blue
Router(config-sr-te-color)# dynamic
Router(config-sr-te-color-dyn)#pcep
Router(config-sr-te-color-dyn-pce)#
Running Config
segment-routing
traffic-eng
on-demand color 10
dynamic
pcep
!
!
pce-group blue
!
policy A
color 100 end-point ipv4 192.168.0.2
candidate-paths
preference 100
dynamic
pcep
!
!
!
!
!
policy B
color 100 end-point ipv4 192.168.0.3
pce-group red
candidate-paths
preference 100
dynamic
pcep
!
!
!
!
!
policy C
color 100 end-point ipv4 192.168.0.4
candidate-paths
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
391
Configure SR-TE Policies
Configure SR-TE PCE Groups
preference 100
explicit segment-list SLA
!
pce-group blue
!
!
!
!
!
end
Verification
Router# show segment-routing traffic-eng pcc ipv4 peer
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
392
Configure SR-TE Policies
BGP SR-TE
BGP SR-TE
BGP may be used to distribute SR Policy candidate paths to an SR-TE head-end. Dedicated BGP SAFI and
NLRI have been defined to advertise a candidate path of an SR Policy. The advertisement of Segment Routing
policies in BGP is documented in the IETF drafthttps://datatracker.ietf.org/doc/
draft-ietf-idr-segment-routing-te-policy/
SR policies with IPv4 and IPv6 end-points can be advertised over BGPv4 or BGPv6 sessions between the
SR-TE controller and the SR-TE headend.
The Cisco IOS-XR implementation supports the following combinations:
• IPv4 SR policy advertised over BGPv4 session
• IPv6 SR policy advertised over BGPv4 session
• IPv4 SR policy advertised over BGPv6 session
• IPv6 SR policy advertised over BGPv6 session
SUMMARY STEPS
1. configure
2. router bgp as-number
3. bgp router-id ip-address
4. address-family {ipv4 | ipv6} sr-policy
5. exit
6. neighbor ip-address
7. remote-as as-number
8. address-family {ipv4 | ipv6} sr-policy
9. route-policy route-policy-name {in | out}
DETAILED STEPS
Procedure
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
393
Configure SR-TE Policies
Configure BGP SR Policy Address Family at SR-TE Head-End
Step 3 bgp router-id ip-address Configures the local router with a specified router ID.
Example:
Step 4 address-family {ipv4 | ipv6} sr-policy Specifies either the IPv4 or IPv6 address family and enters
address family configuration submode.
Example:
RP/0/RSP0/CPU0:router(config-bgp)# address-family
ipv4 sr-policy
Step 5 exit
Step 6 neighbor ip-address Places the router in neighbor configuration mode for BGP
routing and configures the neighbor IP address as a BGP
Example:
peer.
RP/0/RSP0/CPU0:router(config-bgp)# neighbor
10.10.0.1
Step 7 remote-as as-number Creates a neighbor and assigns a remote autonomous system
number to it.
Example:
RP/0/RSP0/CPU0:router(config-bgp-nbr)# remote-as
1
Step 8 address-family {ipv4 | ipv6} sr-policy Specifies either the IPv4 or IPv6 address family and enters
address family configuration submode.
Example:
RP/0/RSP0/CPU0:router(config-bgp-nbr)#
address-family ipv4 sr-policy
Step 9 route-policy route-policy-name {in | out} Applies the specified policy to IPv4 or IPv6 unicast routes.
Example:
RP/0/RSP0/CPU0:router(config-bgp-nbr-af)#
route-policy pass out
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
394
Configure SR-TE Policies
Traffic Steering
Traffic Steering
Automated Steering
Automated steering (AS) allows service traffic to be automatically steered onto the required transport SLA
path programmed by an SR policy.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
395
Configure SR-TE Policies
Color-Only Automated Steering
With AS, BGP automatically steers traffic onto an SR Policy based on the next-hop and color of a BGP service
route. The color of a BGP service route is specified by a color extended community attribute. This color is
used as a transport SLA indicator, such as min-delay or min-cost.
When the next-hop and color of a BGP service route matches the end-point and color of an SR Policy, BGP
automatically installs the route resolving onto the BSID of the matching SR Policy. Recall that an SR Policy
on a head-end is uniquely identified by an end-point and color.
When a BGP route has multiple extended-color communities, each with a valid SR Policy, the BGP process
installs the route on the SR Policy giving preference to the color with the highest numerical value.
The granularity of AS behaviors can be applied at multiple levels, for example:
• At a service level—When traffic destined to all prefixes in a given service is associated to the same
transport path type. All prefixes share the same color.
• At a destination/prefix level—When traffic destined to a prefix in a given service is associated to a
specific transport path type. Each prefix could be assigned a different color.
• At a flow level—When flows destined to the same prefix are associated with different transport path
types
See the Verifying BGP VRF Information, on page 331 and Verifying Forwarding (CEF) Table, on page 332
sections for sample output that shows AS implementation.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
396
Configure SR-TE Policies
Setting CO Flag
Note Every SR-TE policy with a NULL end-point must have an explicit path-option. The policy cannot have a
dynamic path-option (where the path is computed by the head-end or PCE) since there is no destination for
the policy.
You can also specify a color-only (CO) flag in the color extended community for overlay routes. The CO flag
allows the selection of an SR-policy with a matching color, regardless of endpoint Sub-address Family Identifier
(SAFI) (IPv4 or IPv6). See Setting CO Flag, on page 397.
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# policy P1
Router(config-sr-te-policy)# color 1 end-point ipv4 0.0.0.0
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# policy P2
Router(config-sr-te-policy)# color 2 end-point ipv6 ::0
Setting CO Flag
The BGP-based steering mechanism matches BGP color and next-hop with that of an SR-TE policy. If the
policy does not exist, BGP requests SR-PCE to create an SR-TE policy with the associated color, end-point,
and explicit paths. For color-only steering (NULL end-point), you can configure a color-only (CO) flag as
part of the color extended community in BGP.
Note See Color-Only Automated Steering, on page 396 for information about color-only steering (NULL end-point).
The behavior of the steering mechanism is based on the following values of the CO flags:
co-flag 00 1. The BGP next-hop and color <N, C> is matched with an SR-TE policy of same
<N, C>.
2. If a policy does not exist, then IGP path for the next-hop N is chosen.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
397
Configure SR-TE Policies
Address-Family Agnostic Automated Steering
co-flag 01 1. The BGP next-hop and color <N, C> is matched with an SR-TE policy of same
<N, C>.
2. If a policy does not exist, then an SR-TE policy with NULL end-point with the
same address-family as N and color C is chosen.
3. If a policy with NULL end-point with same address-family as N does not exist,
then an SR-TE policy with any NULL end-point and color C is chosen.
4. If no match is found, then IGP path for the next-hop N is chosen.
Configuration Example
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# policy P1
Router(config-sr-te-policy)# color 1 end-point ipv4 0.0.0.0
Router(config-sr-te-policy)# ipv6 disable
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
398
Configure SR-TE Policies
Per-Flow Automated Steering
Per-Flow Automated Steering Release 7.3.1 This feature lets you auto-steer
traffic on an SR policy based on the
attributes of incoming packets,
called Per-flow policy (PFP).
Packets are classified and marked
using forward classes (FCs). A
Per-Flow Policy (PFP) steers the
marked packets based on the
mapping between an FC and its
path. In effect, the feature
auto-steers traffic with SR PFP
based on its markings, and then
switches the traffic to an
appropriate path based on the
packet FCs.
Per-Flow Automated Steering: L2 Release 7.4.1 This feature introduces support for
EVPN BGP Services the following:
• BGP EVPN
(single-home/multi-homed)
over a per-flow policy (PFP)
• Packet classification using
Layer 2 class of service (CoS)
values
The steering of traffic through a Segment Routing (SR) policy is based on the candidate paths of that policy.
For a given policy, a candidate path specifies the path to be used to steer traffic to the policy’s destination.
The policy determines which candidate path to use based on the candidate path’s preference and state. The
candidate path that is valid and has the highest preference is used to steer all traffic using the given policy.
This type of policy is called a Per-Destination Policy (PDP).
Per-Flow Automated Traffic Steering using SR-TE Policies introduces a way to steer traffic on an SR policy
based on the attributes of the incoming packets, called a Per-Flow Policy (PFP).
A PFP provides up to 8 "ways" or options to the endpoint. With a PFP, packets are classified by a classification
policy and marked using internal tags called forward classes (FCs). The FC setting of the packet selects the
“way”. For example, this “way” can be a traffic-engineered SR path, using a low-delay path to the endpoint.
The FC is represented as a numeral with a value of 0 to 7.
A PFP defines an array of FC-to-PDP mappings. A PFP can then be used to steer traffic into a given PDP
based on the FC assigned to a packet.
As with PDPs, PFPs are identified by a {headend, color, endpoint} tuple. The color associated with a given
FC corresponds to a valid PDP policy of that color and same endpoint as the parent PFP. So PFP policies
contain mappings of different FCs to valid PDP policies of different colors. Every PFP has an FC designated
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
399
Configure SR-TE Policies
Per-Flow Automated Steering
as its default FC. The default FC is associated to packets with a FC undefined under the PFP or for packets
with a FC with no valid PDP policy.
The following example shows a per-flow policy from Node1 to Node4:
Figure 24: PFP Example
The same on-demand instantiation behaviors of PDPs apply to PFPs. For example, an edge node automatically
(on demand) instantiates Per-Flow SR Policy paths to an endpoint by service route signaling. Automated
Steering steers the service route in the matching SR Policy.
Figure 25: PFP with ODN Example
Like PDPs, PFPs have a binding SID (BSID). Existing SR-TE automated steering (AS) mechanisms for
labeled traffic (via BSID) and unlabeled traffic (via BGP) onto a PFP is similar to that of a PDP. For example,
a packet having the BSID of a PFP as the top label is steered onto that PFP. The classification policy on the
ingress interface marks the packet with an FC based on the configured class-map. The packet is then steered
to the PDP that corresponds to that FC.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
400
Configure SR-TE Policies
Per-Flow Automated Steering
• A color associated with a PFP SR policy cannot be used by a non-PFP SR policy. For example, if a
per-flow ODN template for color 100 is configured, then the system will reject the configuration of any
non-PFP SR policy using the same color. You must assign different color value ranges for PFP and
non-PFP SR policies.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
401
Configure SR-TE Policies
Per-Flow Automated Steering
segment-routing
traffic-eng
on-demand color 10
dynamic
metric
type igp
!
!
!
on-demand color 20
constraints
segments
sid-algorithm 128
!
!
!
on-demand color 30
constraints
segments
sid-algorithm 129
!
!
!
on-demand color 1000
per-flow
forward-class 0 color 10
forward-class 1 color 20
forward-class 2 color 30
segment-routing
traffic-eng
policy MyPerFlow
color 1000 end-point ipv4 10.1.1.4
candidate-paths
preference 100
per-flow
forward-class 0 color 10
forward-class 1 color 20
forward-class 2 color 30
!
policy MyLowIGP
color 10 end-point ipv4 10.1.1.4
candidate-paths
preference 100
dynamic
metric type igp
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
402
Configure SR-TE Policies
Per-Flow Automated Steering
!
policy MyLowTE
color 20 end-point ipv4 10.1.1.4
candidate-paths
preference 100
dynamic
metric type te
!
policy MyLowDelay
color 30 end-point ipv4 10.1.1.4
candidate-paths
preference 100
dynamic
metric type delay
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
403
Configure SR-TE Policies
Using Binding Segments
forward-class 2 color 20
Scenario 2—FC 1 is configured as the default FC, however it is not present in the FC mappings:
policy foo
color 1 end-point ipv4 10.1.1.1
per-flow
forward-class 0 color 10
forward-class 2 color 20
forward-class default 1
Note In Cisco IOS XR 6.3.2 and later releases, you can specify an explicit BSID for an SR-TE policy. See the
following Explicit Binding SID section.
BSID can be used to steer traffic into the SR-TE policy and across domain borders, creating seamless end-to-end
inter-domain SR-TE policies. Each domain controls its local SR-TE policies; local SR-TE policies can be
validated and rerouted if needed, independent from the remote domain’s head-end. Using binding segments
isolates the head-end from topology changes in the remote domain.
Packets received with a BSID as top label are steered into the SR-TE policy associated with the BSID. When
the BSID label is popped, the SR-TE policy’s SID list is pushed.
BSID can be used in the following cases:
• Multi-Domain (inter-domain, inter-autonomous system)—BSIDs can be used to steer traffic across
domain borders, creating seamless end-to-end inter-domain SR-TE policies.
• Large-Scale within a single domain—The head-end can use hierarchical SR-TE policies by nesting the
end-to-end (edge-to-edge) SR-TE policy within another layer of SR-TE policies
(aggregation-to-aggregation). The SR-TE policies are nested within another layer of policies using the
BSIDs, resulting in seamless end-to-end SR-TE policies.
• Label stack compression—If the label-stack size required for an SR-TE policy exceeds the platform
capability, the SR-TE policy can be seamlessly stitched to, or nested within, other SR-TE policies using
a binding segment.
• BGP SR-TE Dynamic—The head-end steers the packet into a BGP-based FIB entry whose next hop is
a binding-SID.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
404
Configure SR-TE Policies
Stitching SR-TE Polices Using Binding SID: Example
Use the binding-sid explicit {fallback-dynamic | enforce-srlb} command to specify how the BSID allocation
behaves if the BSID value is not available.
• Fallback to dynamic allocation – If the BSID is not available, the BSID is allocated dynamically and the
policy comes up:
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# binding-sid explicit fallback-dynamic
• Strict SRLB enforcement – If the BSID is not within the SRLB, the policy stays down:
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# binding-sid explicit enforce-srlb
This example shows how to configure an SR policy to use an explicit BSID of 1000. If the BSID is not
available, the BSID is allocated dynamically and the policy comes up.
segment-routing
traffic-eng
binding-sid explicit fallback-dynamic
policy goo
binding-sid mpls 1000
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
405
Configure SR-TE Policies
Stitching SR-TE Polices Using Binding SID: Example
Procedure
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
406
Configure SR-TE Policies
Stitching SR-TE Polices Using Binding SID: Example
b) Define an explicit binding-SID (mpls label 15900) allocated from SRLB for the SR-TE policy.
Example:
Node 3
segment-routing
traffic-eng
segment-list PATH-4_4-6_5_BSID
index 10 address ipv4 10.1.1.4
index 20 address ipv4 10.4.6.6
index 30 address ipv4 10.1.1.5
index 40 mpls label 15888
!
policy baa
binding-sid mpls 15900
color 777 end-point ipv4 10.1.1.5
candidate-paths
preference 100
explicit segment-list PATH-4_4-6_5_BSID
!
!
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
407
Configure SR-TE Policies
Stitching SR-TE Polices Using Binding SID: Example
Step 3 On node 1, define an SR-TE policy with an explicit path configured using the loopback interface IP address of node 3
and the binding-SID of the SR-TE policy defined in step 2 (mpls label 15900). This last segment allows the stitching of
these policies.
Example:
Node 1
segment-routing
traffic-eng
segment-list PATH-3_BSID
index 10 address ipv4 10.1.1.3
index 20 mpls label 15900
!
policy bar
color 777 end-point ipv4 10.1.1.3
candidate-paths
preference 100
explicit segment-list PATH-3_BSID
!
!
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
408
Configure SR-TE Policies
L2VPN Preferred Path
Configuration Example
The following example depicts a configuration of a static route for an IPv4 destination over an SR policy.
Router(config)# router static
Router(config-static)# address-family ipv4 unicast
Router(config-static-afi)# 10.1.100.100/32 sr-policy sample-policy
Running Configuration
Router# show run segment-routing traffic-eng
segment-routing
traffic-eng
segment-list sample-SL
index 10 mpls adjacency 10.1.1.102
index 20 mpls adjacency 10.1.1.103
!
policy sample-policy
color 777 end-point ipv4 10.1.1.103
candidate-paths
preference 100
explicit segment-list sample-SL
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
409
Configure SR-TE Policies
Static Route over Segment Routing Policy
router static
address-family ipv4 unicast
10.1.1.4/32 sr-policy srte_c_200_ep_10.1.1.4
!
!
Verification
Router# show segment-routing traffic-eng policy candidate-path name sample-policy
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
410
Configure SR-TE Policies
Autoroute Include
10.1.100.100/32, version 3169, internal 0x1000001 0x30 (ptr 0x8b1b95d8) [1], 0x0 (0x0), 0x0
(0x0)
Updated Jan 17 14:35:40.971
Prefix Len 32, traffic index 0, precedence n/a, priority 3
gateway array (0x8a92f228) reference count 1, flags 0x2010, source rib (7), 0 backups
[1 type 3 flags 0x48441 (0x8a9d1b68) ext 0x0 (0x0)]
LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
gateway array update type-time 1 Jan 17 14:35:40.971
LDI Update time Jan 17 14:35:40.972
via local-label 24006, 3 dependencies, recursive [flags 0x0]
path-idx 0 NHID 0x0 [0x8ac59f30 0x0]
recursion-via-label
next hop via 24006/1/21
Autoroute Include
You can configure SR-TE policies with Autoroute Include to steer specific IGP (IS-IS, OSPF) prefixes, or
all prefixes, over non-shortest paths and to divert the traffic for those prefixes on to the SR-TE policy.
The autoroute include all option applies Autoroute Announce functionality for all destinations or prefixes.
The autoroute include ipv4 address option applies Autoroute Destination functionality for the specified
destinations or prefixes. This option is supported for IS-IS only; it is not supported for OSPF.
The Autoroute SR-TE policy adds the prefixes into the IGP, which determines if the prefixes on the endpoint
or downstream of the endpoint are eligible to use the SR-TE policy. If a prefix is eligible, then the IGP checks
if the prefix is listed in the Autoroute Include configuration. If the prefix is included, then the IGP downloads
the prefix route with the SR-TE policy as the outgoing path.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
411
Configure SR-TE Policies
Autoroute Include
Note To prevent load-balancing over IGP paths, you can specify a metric that is lower
than the value that IGP takes into account for autorouted destinations (for example,
autoroute metric relative -1).
Configuration Examples
The following example shows how to configure autoroute include for all prefixes:
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)#policy P1
Router(config-sr-te-policy)# color 20 end-point ipv4 10.1.1.2
Router(config-sr-te-policy)# autoroute include all
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-pp-index)# explicit segment-list Plist-1
The following example shows how to configure autoroute include for the specified IPv4 prefixes:
Note This option is supported for IS-IS only; it is not supported for OSPF.
Router# configure
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)#policy P1
Router(config-sr-te-policy)# color 20 end-point ipv4 10.1.1.2
Router(config-sr-te-policy)# autoroute include ipv4 10.1.1.21/32
Router(config-sr-te-policy)# autoroute include ipv4 10.1.1.23/32
Router(config-sr-te-policy)# autoroute metric constant 1
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-pp-index)# explicit segment-list Plist-1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
412
Configure SR-TE Policies
Policy-Based Tunnel Selection for SR-TE Policy
Note Steps 1 through 4 are detailed in the "Implementing MPLS Traffic Engineering" chapter of the MPLS
Configuration Guide for Cisco ASR 9000 Series RoutersMPLS Configuration Guide.
Configuration Example
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# policy POLICY-PBTS
Router(config-sr-te-policy)# color 1001 end-point ipv4 10.1.1.20
Router(config-sr-te-policy)# autoroute
Router(config-sr-te-policy-autoroute)# include all
Router(config-sr-te-policy-autoroute)# forward-class 1
Router(config-sr-te-policy-autoroute)# exit
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 1
Router(config-sr-te-policy-path-pref)# explicit segment-list SIDLIST1
Router(config-sr-te-policy-path-pref)# exit
Router(config-sr-te-pp-info)# exit
Router(config-sr-te-policy-path-pref)# exit
Router(config-sr-te-policy-path)# preference 2
Router(config-sr-te-policy-path-pref)# dynamic
Router(config-sr-te-pp-info)# metric
Router(config-sr-te-path-metric)# type te
Router(config-sr-te-path-metric)# commit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
413
Configure SR-TE Policies
SR-TE Automated Steering Without BGP Prefix Path Label
Running Configuration
segment-routing
traffic-eng
policy POLICY-PBTS
color 1001 end-point ipv4 10.1.1.20
autoroute
include all
forward-class 1
!
candidate-paths
preference 1
explicit segment-list SIDLIST1
!
!
preference 2
dynamic
metric
type te
SR-TE Automated Steering Release 7.9.1 This feature allows traffic to a BGP
Without BGP Prefix Path Label service route to be steered over an
SR-TE policy using
automated-steering principles
without imposing the service
route’s prefix label.
This feature allows you to deploy
a centralized BGP EPE solution for
6PE in an SR-MPLS network.
This feature introduces the bgp
prefix-path-label ignore
command.
This feature allows traffic to a BGP service route to be steered over an SR-TE policy using automated-steering
principles without imposing the service route’s prefix label (see Automated Steering, on page 395). BGP
ignores the programming of the label associated with a prefix path (for example, 6PE/VPN label) when
recursing onto the BSID of an SR-TE policy with this feature enabled.
This feature allows you to deploy a Use Case: Centralized BGP EPE for 6PE in an SR-MPLS Network.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
414
Configure SR-TE Policies
SR-TE Automated Steering Without BGP Prefix Path Label
Configuration
Use the bgp prefix-path-label ignore command in SR-TE policy steering config mode to indicate BGP
ignores the programming of the label associated with a prefix path (for example, 6PE/VPN label) when
recursing onto the BSID of an SR-TE policy with this feature enabled.
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# policy FOO
Router(config-sr-te-policy)# steering
Router(config-sr-te-policy-steering)# bgp prefix-path-label ignore
Router(config-sr-te-policy-steering)# exit
Router(config-sr-te-policy)# color 100 end-point ipv4 0.0.0.0
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-policy-path-pref)# explicit segment-list sample-sl
Verification
The following output displays the SR-TE policy (SR policy color 100, IPv4 null end-point) details showing
the ignore prefix label steering behavior:
Router# show segment-routing traffic-eng policy candidate-path name FOO private
. . .
Attributes:
Binding SID: 24030
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
415
Configure SR-TE Policies
Use Case: Centralized BGP EPE for 6PE in an SR-MPLS Network
The following output shows that BGP received the ignore prefix label steering behavior for an SR policy color
100 and IPv4 null end-point:
Router# show bgp nexthops 0.0.0.0 color 100 | include "BGP prefix label"
The following output shows the details for a IPv6 BGP global route (151:1::/64) learned from an IPv4 next-hop
(6PE) that is steered over an SR policy (BSID 24030). BGP programs the prefix path ignoring its label.
Router# show bgp ipv6 labeled-unicast 151:1::/64 detail
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
416
Configure SR-TE Policies
Use Case: Centralized BGP EPE for 6PE in an SR-MPLS Network
Topology
The below topology shows a single-stack IPv4 SR-MPLS and BGP-free network that delivers Internet IPv6
connectivity using 6PE.
Peering routers 2 and 3 learn IPv6 reachability through transit AS's (ASBR routers 4, 5, 6) via eBGPv6
neighbors.
BGP EPE SIDs are enabled on external BGPv6 neighbors at router 2 (for example, EPE label 24024) and
router 3 (for example, EPE labels 24035 and 24036).
Figure 27: Network Setup
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
417
Configure SR-TE Policies
Use Case: Centralized BGP EPE for 6PE in an SR-MPLS Network
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
418
Configure SR-TE Policies
Use Case: Centralized BGP EPE for 6PE in an SR-MPLS Network
segment-routing
traffic-eng
segment-list sl-to_3-epe_36
index 10 mpls adjacency 10.1.1.3
index 20 mpls adjacency 2001:db8:20:3:6::3
!
policy FOO
steering
bgp prefix-path-label ignore
!
color 10 end-point ipv4 0.0.0.0
candidate-paths
preference 100
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
419
Configure SR-TE Policies
Use Case: Centralized BGP EPE for 6PE in an SR-MPLS Network
When a given IPv6 Internet destination needs to be steered over an intended egress peering router/egress AS,
the operator can perform one of the following:
• Advertise a new BGP prefix path from a Route Server that includes a color extended community value
equal to the color of the SR-TE policy for the intended egress peering router/egress AS, or
• Apply a color extended community value equal to the color of the SR-TE policy for the intended egress
peering router/egress AS at the peering router advertising the best path (for example, node 2), as shown
below.
Note The BGP color includes the color-only flag value of 01 in order to allow for
color-only automated steering.
The following output depicts the details of the SR-TE policy programmed at the ingress border router node
1 used to send traffic to the egress peering router node 3 and egress AS behind ASBR node 6:
Router1# show segment-routing traffic-eng policy candidate-path name FOO private
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
420
Configure SR-TE Policies
Use Case: Centralized BGP EPE for 6PE in an SR-MPLS Network
Name: srte_c_10_ep_0.0.0.0
Status:
Admin: up Operational: up for 00:10:07 (since Feb 2 12:58:43.554)
Candidate-paths:
Preference: 100 (configuration) (active)
Originator: ASN 0 node-address <None> discriminator: 100
Name: FOO
Requested BSID: dynamic
Constraints:
Protection Type: protected-preferred
Maximum SID Depth: 10
ID: 1
Source: 10.1.1.1
Stale: no
Checkpoint flags: 0x00000000
Steering:
Client: BGP
Disabled: no
Ignore prefix label: yes
Explicit: segment-list sl-to_3-epe_36 (valid)
Weight: 1, Metric Type: TE
IGP area: 2
SID[0]: 16003 [Prefix-SID: 10.1.1.3, Algorithm: 0]
SID[1]: 24036 [Adjacency-SID, 2001:db8:20:3:6::3 - 2001:db8:20:3:6::6]
LSPs:
. . .
Attributes:
Binding SID: 24030
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
Notification to clients:
Binding SID: 24030
Bandwidth : 0 Kbps (0 Kbps)
State: UP
Flags: [add] [ipv6_caps] [ignore_prefix_label]
Metric Type: NONE
Metric Value: 2147483647
Admin Distance: 100
ifhandle: 0x00000170
Source: 10.1.1.1
Transition count: 1
LSPs created count: 1
Reoptimizations completed count: 1
Retry Action Flags: 0x00000000, ()
Last Retry Timestamp: never (0 seconds ago)
Policy reference: 0x1f81e50
The following output depicts the details of the IPv6 BGP global route (2001:db8:abcd::/48) being steered
over the binding SID of the previoulsy shown SR-TE policy (24030):
Router1# show bgp ipv6 labeled-unicast 2001:db8:abcd::/48 detail
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
421
Configure SR-TE Policies
Miscellaneous
Flags: 0x003e1001+0x30010000;
Last Modified: Nov 23 16:59:17.891 for 00:00:03
Paths: (1 available, best #1)
Advertised IPv6 Unicast paths to update-groups (with more than one peer):
0.2
Advertised IPv6 Labeled-unicast paths to update-groups (with more than one peer):
0.3
Path #1: Received by speaker 0
Flags: 0xa480000001060205+0x01, import: 0x020
Advertised IPv6 Unicast paths to update-groups (with more than one peer):
0.2
Advertised IPv6 Labeled-unicast paths to update-groups (with more than one peer):
0.3
300, (Received from a RR-client)
10.1.1.2 C:10 (bsid:24030) (admin 100) (metric 2147483647) from 10.1.1.100 (10.1.1.2),
if-handle 0x00000170
Prefix Label not imposed due to SR policy config
Miscellaneous
SR Policy Liveness Monitoring
SR Policy liveness monitoring allows you to verify end-to-end traffic forwarding over an SR Policy candidate
path by periodically sending performance monitoring (PM) packets. The head-end router sends PM packets
to the SR policy's endpoint router, which sends them back to the head-end without any control-plane dependency
on the endpoint router.
For more information about this feature, see SR Policy Liveness Monitoring, on page 652.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
422
Configure SR-TE Policies
Programming Non-Active Candidate Paths of an SR Policy
An SR Policy is associated with one or more candidate paths (CP). A CP is selected as the active CP when it
is valid and it has the highest preference value among all the valid CPs of the SR Policy. By default, only the
active CP is programmed in the forwarding plane.
This feature allows the programming of multiple CPs of an SR policy in the forwarding plane. This minimizes
traffic loss when a new CP is selected as active.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
423
Configure SR-TE Policies
Programming Non-Active Candidate Paths of an SR Policy
• Programming of non-active CPs can be enabled for all SR policies (global), for a specific policy (local),
or ODN template.
If enabled globally and also locally or on ODN template, the local or ODN configuration takes precedence
over the global configuration.
• Programming of non-active CPs under global SR-TE and configuring policy path protection of an
SR policy is supported. In this case, policy path protection takes precedence.
• Programming of non-active CPs for a specific SR policy and configuring policy path protection of
an SR policy is not supported.
• The number of policies supported could be impacted by the number of non-active CPs per policy.
Programming non-active CPs in the forwarding plane consumes hardware resources (such as local label
and ECMP FEC) when more candidate paths are pre-programmed in forwarding than are actually carrying
traffic.
• The active CP will be in programmed state. The remaining CPs will be in standby programmed state.
• We recommend that you create separate PM sessions for active and standby candidate paths to monitor
the health of the paths end-to-end.
The recommended PM timers should be different for active and standby PM profiles. The PM timers
should be less aggressive for the standby PM profile compared to the active PM profile. See Configure
Performance Measurement, on page 647 for information about configuring PM sessions.
Note PM sessions for BGP-TE policies are not supported. PM profiles can be configured
only under configured policies at the head-end.
• The protected paths for each CP is programmed in the respective LSPs. The protected paths of active
CPs are programmed in the active LSP, and the protected paths of standby CPs are programmed in the
standby LSP.
• If a candidate path with higher preference becomes available, the traffic will switch to it in
Make-Before-Break (MBB) behavior.
Configuration
Programming of non-active CPs can be enabled for all SR policies (global), for a specific policy (local), or
ODN template. If enabled globally, the local or ODN configuration takes precedence over the global
configuration.
Global SR-TE
Use the max-install-standby-cpaths value command to configure standby candidate paths for all SR policies,
for a specific policy, or for an ODN template. The range for value is from 1 to 3. Use no
max-install-standby-cpaths command to return to the default behavior.
The following example shows how to configure standby candidate paths globally:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# max-install-standby-cpaths 2
Router(config-sr-te)#
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
424
Configure SR-TE Policies
Programming Non-Active Candidate Paths of an SR Policy
Running Config
segment-routing
traffic-eng
max-install-standby-cpaths 2
Local SR Policy
Use the max-install-standby-cpaths value command to configure standby candidate paths for a specific
policy. The range for value is from 0 (disable) to 3.
If programming of non-active CPs is enabled for all SR policies (global), you can disable programming of
non-active CPs for a specific policy using the max-install-standby-cpaths 0 command.
The following example shows how to configure standby candidate paths for a specific SR policy:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# policy MyBackupPolicy
Router(config-sr-te-policy)# max-install-standby-cpaths 2
Router(config-sr-te-policy)#
Running Config
segment-routing
traffic-eng
policy MyBackupPolicy
max-install-standby-cpaths 2
SR ODN
When you create an ODN template, two CPs are created by default (PCE-delegated and head-end computed)
with preference 100 and preference 200. You can use the max-install-standby-cpaths 1 command to program
the non-active CP in forwarding. If programming of non-active CPs is enabled for all SR policies (global),
you can disable programming of non-active CPs on ODN template using the max-install-standby-cpaths 0
command.
The following example shows how to configure standby candidate paths for an SR ODN template:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# on-demand color 10
Router(config-sr-te-color)# max-install-standby-cpaths 1
Router(config-sr-te-color)#
Running Config
segment-routing
traffic-eng
on-demand color 10
max-install-standby-cpaths 1
The following example shows how to enable three standby CPs globally and disable standby CPs on local
SR policy and ODN template:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# max-install-standby-cpaths 3
Router(config-sr-te)# policy MyBackupPolicy
Router(config-sr-te-policy)# max-install-standby-cpaths 0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
425
Configure SR-TE Policies
Programming Non-Active Candidate Paths of an SR Policy
Router(config-sr-te-policy)# exit
Router(config-sr-te)# on-demand color 10
Router(config-sr-te-color)# max-install-standby-cpaths 0
Router(config-sr-te-color)#
Verification
The following output shows the status of active and backup CPs:
Router# show segment-routing traffic-eng policy
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
426
Configure SR-TE Policies
Programming Non-Active Candidate Paths of an SR Policy
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
427
Configure SR-TE Policies
Programming Non-Active Candidate Paths of an SR Policy
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
428
Configure SR-TE Policies
LDP over Segment Routing Policy
Note Before you configure an LDP targeted adjacency over SR policy name, you need to create the SR policy under
Segment Routing configuration. The SR policy interface names are created internally based on the color and
endpoint of the policy. LDP is non-operational if SR policy name is unknown.
Configuration Example
/* Enter the SR-TE configuration mode and create the SR policy. This example corresponds
to a local SR policy with an explicit path. */
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# segment-list sample-sid-list
Router(config-sr-te-sl)# index 10 address ipv4 10.1.1.7
Router(config-sr-te-sl)# index 20 address ipv4 10.1.1.2
Router(config-sr-te-sl)# exit
Router(config-sr-te)# policy sample_policy
Router(config-sr-te-policy)# color 1000 end-point ipv4 10.1.1.2
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-policy-path-pref)# explicit segment-list sample-sid-list
Router(config-sr-te-pp-info)# end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
429
Configure SR-TE Policies
LDP over Segment Routing Policy
Note Do one of the following to configure LDP discovery for targeted hellos:
• Active targeted hellos (SR policy head end):
mpls ldp
interface GigabitEthernet0/0/0/0
!
!
Running Configuration
segment-routing
traffic-eng
segment-list sample-sid-list
index 10 address ipv4 10.1.1.7
index 20 address ipv4 10.1.1.2
!
policy sample_policy
color 1000 end-point ipv4 10.1.1.2
candidate-paths
preference 100
explicit segment-list sample-sid-list
!
!
!
!
!
!
mpls ldp
address-family ipv4
neighbor sr-policy srte_c_1000_ep_10.1.1.2 targeted
discovery targeted-hello accept
!
!
Verification
Router# show mpls ldp interface brief
Interface VRF Name Config Enabled IGP-Auto-Cfg TE-Mesh-Grp cfg
--------------- ------------------- ------ ------- ------------ ---------------
Te0/3/0/0/3 default Y Y 0 N/A
Te0/3/0/0/6 default Y Y 0 N/A
Te0/3/0/0/7 default Y Y 0 N/A
Te0/3/0/0/8 default N N 0 N/A
Te0/3/0/0/9 default N N 0 N/A
srte_c_1000_ default Y Y 0 N/A
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
430
Configure SR-TE Policies
LDP over Segment Routing Policy
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
431
Configure SR-TE Policies
Configure Seamless Bidirectional Forwarding Detection
NSR: Disabled
Clients: LDP over SR Policy
Capabilities:
Sent:
0x508 (MP: Point-to-Multipoint (P2MP))
0x509 (MP: Multipoint-to-Multipoint (MP2MP))
0x50a (MP: Make-Before-Break (MBB))
0x50b (Typed Wildcard FEC)
Received:
0x508 (MP: Point-to-Multipoint (P2MP))
0x509 (MP: Multipoint-to-Multipoint (MP2MP))
0x50a (MP: Make-Before-Break (MBB))
0x50b (Typed Wildcard FEC)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
432
Configure SR-TE Policies
Configure the SBFD Reflector
The initiator is an SBFD session on a network node that performs a continuity test to a remote entity by sending
SBFD packets. The initiator injects the SBFD packets into the segment-routing traffic-engineering (SRTE)
policy. The initiator triggers the SBFD session and maintains the BFD state and client context.
The reflector is an SBFD session on a network node that listens for incoming SBFD control packets to local
entities and generates response SBFD control packets. The reflector is stateless and only reflects the SBFD
packets back to the initiator.
A node can be both an initiator and a reflector, if you want to configure different SBFD sessions.
For SR-TE, SBFD control packets are label switched in forward and reverse direction. For SBFD, the tail-end
node is the reflector node; other nodes cannot be a reflector. When using SBFD with SR-TE, if the forward
and return directions are label-switched paths, SBFD need not be configured on the reflector node.
Discriminators
The BFD control packet carries 32-bit discriminators (local and remote) to demultiplex BFD sessions. SBFD
requires globally unique SBFD discriminators that are known by the initiator.
The SBFD control packets contain the discriminator of the initiator, which is created dynamically, and the
discriminator of the reflector, which is configured as a local discriminator on the reflector.
Router_5# configure
Router_5(config)# mpls oam
Router_5(config-oam)#
SUMMARY STEPS
1. configure
2. sbfd
3. local-discriminator {ipv4-address | 32-bit-value | dynamic | interface interface}
4. commit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
433
Configure SR-TE Policies
Configure the SBFD Reflector
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Router_5(config)# sbfd
Step 3 local-discriminator {ipv4-address | 32-bit-value | Configures the local discriminator. You can configure
dynamic | interface interface} multiple local discriminators.
Example:
Router_5(config-sbfd)# local-discriminator
interface Loopback0
Step 4 commit
Example
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
434
Configure SR-TE Policies
Configure the SBFD Initiator
What to do next
Configure the SBFD initiator.
SUMMARY STEPS
1. configure
2. bfd
3. multipath include location node-id
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Router_1(config)# bfd
Step 3 multipath include location node-id Configures BFD multiple path on specific line card. Any
of the configured line cards can be instructed to host a BFD
Example:
session.
Router_1(config-bfd)# multipath include location
0/1/CPU0
Router_1(config-bfd)# multipath include location
0/2/CPU0
Router_1(config-bfd)# multipath include location
0/3/CPU0
What to do next
Map a destination address to a remote discriminator.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
435
Configure SR-TE Policies
Map a Destination Address to a Remote Discriminator
SUMMARY STEPS
1. configure
2. sbfd
3. remote-target ipv4 ipv4-address
4. remote-discriminator remote-discriminator
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Router_1(config)# sbfd
Step 4 remote-discriminator remote-discriminator Maps the destination address (Target ID) to a remote
discriminator.
Example:
Router_1(config-sbfd-nnnn)# remote-discriminator
16843013
Example
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
436
Configure SR-TE Policies
Enable Seamless BFD Under an SR-TE Policy or SR-ODN Color Template
What to do next
Enable SBFD on an SR-TE policy.
Note Do not use BFD with disjoint paths. The reverse path might not be disjoint, causing a single link failure to
bring down BFD sessions on both the disjoint paths.
Enable BFD
• Use the bfd command in SR-TE policy configuration mode to enable BFD and enters BFD configuration
mode.
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# policy POLICY1
Router(config-sr-te-policy)# bfd
Router(config-sr-te-policy-bfd)#
Use the bfd command in SR-ODN configuration mode to enable BFD and enters BFD configuration
mode.
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# on-demand color 10
Router(config-sr-te-color)# bfd
Router(config-sr-te-color-bfd)#
• Use the multiplier multiplier command to set the number of times a packet is missed before BFD declares
the neighbor down. The range is from 2 to 10. The default is 3.
Router(config-sr-te-policy-bfd)# multiplier 2
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
437
Configure SR-TE Policies
Enable Seamless BFD Under an SR-TE Policy or SR-ODN Color Template
• Use the invalidation-action {down | none} command to set the action to be taken when BFD session
is invalidated.
• down: LSP can only be operationally up if the BFD session is up
• none: BFD session state does not affect LSP state, use for diagnostic purposes
• (SR-TE policy only) Use the reverse-path binding-label label command to specify BFD packets return
to head-end by using a binding label.
By default, the S-BFD return path (from tail-end to head-end) is via IPv4. You can use a reverse binding
label so that the packet arrives at the tail-end with the reverse binding label as the top label. This label
is meant to point to a policy that will take the BFD packets back to the head-end. The reverse binding
label is configured per-policy.
Note that when MPLS return path is used, BFD uses echo mode packets, which means the tail-end’s
BFD reflector does not process BFD packets at all.
The MPLS label value at the tail-end and the head-end must be synchronized by the operator or controller.
Because the tail-end binding label should remain constant, configure it as an explicit BSID, rather than
dynamically allocated.
Router(config-sr-te-policy-bfd)# reverse-path binding-label 24036
• Use the logging session-state-change command to log when the state of the session changes
Router(config-sr-te-policy-bfd)# logging session-state-change
Examples
This example shows how to enable SBFD on an SR-TE policy.
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# policy POLICY1
Router(config-sr-te-policy)# bfd
Router(config-sr-te-policy-bfd)# invalidation-action down
Router(config-sr-te-policy-bfd)# minimum-interval 50
Router(config-sr-te-policy-bfd)# multiplier 2
Router(config-sr-te-policy-bfd)# reverse-path binding-label 24036
Router(config-sr-te-policy-bfd)# logging session-state-change
segment-routing
traffic-eng
policy POLICY1
bfd
minimum-interval 50
multiplier 2
invalidation-action down
reverse-path
binding-label 24036
!
logging
session-state-change
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
438
Configure SR-TE Policies
SR-TE Head-End IPv4 Unnumbered Interface Support
!
!
segment-routing
traffic-eng
on-demand color 10
bfd
minimum-interval 50
multiplier 2
invalidation-action down
logging
session-state-change
!
!
!
!
!
• SR-PCE:
Note SR-PCE and path computation clients (PCCs) need to be running Cisco IOS XR
7.0.2 or later.
• Compute and return paths from a topology containing IPv4 unnumbered interfaces.
• Process reported SR policies from a head-end router that contain hops with IPv4 unnumbered
adjacencies.
PCEP extensions for IPv4 unnumbered interfaces adhere to IETF RFC8664 “PCEP Extensions for
Segment Routing” (https://datatracker.ietf.org/doc/rfc8664/). The unnumbered hops use a Node or
Adjacency Identifier (NAI) of type 5. This indicates that the segment in the explicit routing object
(ERO) is an unnumbered adjacency with an IPv4 ID and an interface index.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
439
Configure SR-TE Policies
SR-TE Head-End IPv4 Unnumbered Interface Support
Configuration Example
The following example shows how to configure an IPv4 unnumbered interface:
RP/0/0/CPU0:rtrA(config)# interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:rtrA(config-if)# ipv4 point-to-point
RP/0/0/CPU0:rtrA(config-if)# ipv4 unnumbered Loopback0
To bring up the IPv4 unnumbered adjacency under the IGP, configure the link as point-to-point under the
IGP configuration. The following example shows how to configure the link as point-to-point under the IGP
configuration:
RP/0/0/CPU0:rtrA(config)# router ospf one
RP/0/0/CPU0:rtrA(config-ospf)# area 0
RP/0/0/CPU0:rtrA(config-ospf-ar)# interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:rtrA(config-ospf-ar-if)# network point-to-point
Verification
Use the show ipv4 interface command to display information about the interface:
RP/0/0/CPU0:rtrA# show ipv4 interface GigabitEthernet0/0/0/0 brief
Tue Apr 2 12:59:53.140 EDT
Interface IP-Address Status Protocol
GigabitEthernet0/0/0/0 192.168.0.1 Up Up
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
440
Configure SR-TE Policies
Path invalidation drop
The output of the show segment-routing traffic-eng ipv4 topology command is enhanced to display the
interface index instead of the IP address for unnumbered interfaces:
RP/0/0/CPU0:rtrA# show segment-routing traffic-eng ipv4 topology
…
Link[2]: Unnumbered local index 6, remote index 4
Local node:
OSPF router ID: 192.168.0.1 area ID: 0 ASN: 0
Remote node:
TE router ID: 192.168.0.4
OSPF router ID: 192.168.0.4 area ID: 0 ASN: 0
Metric: IGP 1, TE 1, Latency 1 microseconds
Bandwidth: Total 125000000 Bps, Reservable 0 Bps
Admin-groups: 0x00000000
Adj SID: 24001 (unprotected)
The output of the show segment-routing traffic-eng policy detail command includes unnumbered hops:
RP/0/0/CPU0:rtrA# show segment-routing traffic-eng policy detail
…
Dynamic (pce 192.168.0.5) (valid)
Metric Type: TE, Path Accumulated Metric: 3
24001 [Adjacency-SID, unnumbered 192.168.0.1(6) - 192.168.0.4(4)]
24002 [Adjacency-SID, unnumbered 192.168.0.4(7) - 192.168.0.3(7)]
24000 [Adjacency-SID, unnumbered 192.168.0.3(5) - 192.168.0.2(5)]
…
By default, if an SR Policy becomes invalid, traffic would fall back to the native SR forwarding path.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
441
Configure SR-TE Policies
Path invalidation drop
In some scenarios, a network operator may require that certain traffic be only carried over the path associated
with an SR policy and never allow the native SR LSP to be used. The SR-TE path invalidation drop feature
is introduced to meet this requirement.
With the path invalidation drop feature enabled, an SR policy that would become invalid (for example, no
valid candidate path available) is programmed to drop traffic. At the same time, the SR policy stays up in the
control plane to prevent prefixes mapped to the SR policy from falling back to the native SR LSP.
Forwarding over the SR policy path resumes without dropping traffic, when the SR policy path becomes valid.
Note This feature applies to an SR policy that transitions from valid to invalid; it does not apply to an SR policy
that has never been declared valid.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
442
Configure SR-TE Policies
Path invalidation drop
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
443
Configure SR-TE Policies
SR-TE Reoptimization Timers
3. If no valid candidate path is found, the SR policy is kept UP in the control plane, but the traffic sent on
the SR policy is dropped.
For event-based re-optimization, you can specify various delay timers for path re-optimization. For example,
you can specify how long to wait before switching to a reoptimized path
Additionally, you can configure a timer to specify how often to perform reoptimization of policies. You can
also trigger an immediate reoptimization for a specific policy or for all policies.
SR-TE Reoptimization
To trigger an immediate SR-TE reoptimization, use the segment-routing traffic-eng reoptimization command
in Exec mode:
Use the all option to trigger an immediate reoptimization for all policies. Use the name policy option to trigger
an immediate reoptimization for a specific policy.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
444
Configure SR-TE Policies
Circuit-Style SR-TE Policies
Example Configuration
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# timers
Router(config-sr-te-timers)# candidate-path cleanup-delay 600
Router(config-sr-te-timers)# cleanup-delay 60
Router(config-sr-te-timers)# init-verify-restart 120
Router(config-sr-te-timers)# init-verify-startup 600
Router(config-sr-te-timers)# init-verify-switchover 30
Router(config-sr-te-timers)# install-delay 60
Router(config-sr-te-timers)# periodic-reoptimization 3000
Running Config
segment-routing
traffic-eng
timers
install-delay 60
periodic-reoptimization 3000
cleanup-delay 60
candidate-path cleanup-delay 600
init-verify-restart 120
init-verify-startup 600
init-verify-switchover 30
!
!
!
Circuit-Style Release 7.8.1 This solution allows Segment Routing to meet the requirements of
SR-TE Policies a connection-oriented transport network, which was historically
delivered over circuit-switched SONET/SDH networks.
Circuit-style SR-TE policies allow a common network infrastructure
to be used for both connection-oriented services and classic IP-based
transport. This eliminates the need for multiple parallel networks,
which greatly reduces both capital expenditures (CapEx) and
operating expenditures (OpEx).
Segment Routing provides an architecture that caters to both connectionless transport (such as IP) as well as
connection-oriented transport (such as TDM). IP-centric transport uses the benefits of ECMP and
automated/optimum protection from TI-LFA. On the other hand, connection-oriented transport, which was
historically delivered over circuit-switched SONET/SDH networks, requires the following:
• End-to-end bidirectional transport that provides congruent forward and reverse paths, predictable latency,
and disjointness
• Bandwidth commitment to ensure there is no impact on the SLA due to network load from other services
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
445
Configure SR-TE Policies
Circuit-Style SR-TE Policies
• Monitoring and maintenance of path integrity with end-to-end 50-msec path protection
• Persistent end-to-end paths regardless of control-plane state
An SR network can satisfy these requirements by leveraging Circuit-Style SR-TE policies (CS-SR policies).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
446
Configure SR-TE Policies
Circuit-Style SR-TE Policies
• Guaranteed Bandwidth
Most services carried over the CS-SR policy are constant-rate traffic streams. Any packet loss due to
temporary congestion leads to bit errors at the service layer. Therefore, bandwidth must be managed very
tightly and guaranteed to the services mapped to CS-SR policies.
A centralized controller manages the bandwidth reservation. The controller maintains the reserved
bandwidth on each link based on the traffic usage:
• Monitors amount of traffic forwarded to each CS-SR policy in the network
• Uses knowledge of the active path used by the policy
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
447
Configure SR-TE Policies
Circuit-Style SR-TE Policies
In addition, you can allocate one MPLS-EXP value for traffic steered over the CS SR-TE polices and
use QoS (interface queueing) configuration to isolate the circuit traffic from the rest:
• QoS on headend nodes:
• Define EXP value associated with CS services
• Enforce rate limiting and perform EXP marking on service ingress interfaces
Refer to Configuring Modular QoS Service Packet Classification chapter in the Modular QoS
Configuration Guide for Cisco ASR 9000 Series Routers.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
448
Configure SR-TE Policies
Circuit-Style SR-TE Policies
• Disjointness constraint:
• The working and protect paths under the CS SR policy must be configured with a disjointness
constraint using the same disjoint association ID and disjointness type.
• The disjointness association ID for a working and protect path pair in one direction must be
globally unique from the corresponding working and protect path pair in the opposite direction.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
449
Configure SR-TE Policies
Circuit-Style SR-TE Policies
• Working, protect, and restore paths must all be configured with Adj-SID-only segment type constraint.
• To ensure persistency throughout link failure events, manual adjacency SIDs allocated from the
SRLB range should be created on all interfaces used by CS policies.
• Revert/recovery behavior:
• When both working and protect paths are down, the restore path becomes active.
• The restore path remains active until the working or protect path recovers (partial recovery) and the
lock duration timer expires.
• The lock duration timer is configured under the protect and restore CPs.
The following example shows how to create a liveness profile for the working and protect paths.
Router_1(config)# performance-measurement
Router_1(config-perf-meas)# liveness-profile name profile-WORKING
Router_1(config-pm-ld-profile)# liveness-detection
Router_1(config-pm-ld-profile-ld)# multiplier 3
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
450
Configure SR-TE Policies
Circuit-Style SR-TE Policies
Router_1(config-pm-ld-profile-ld)# exit
Router_1(config-pm-ld-profile)# probe
Router_1(config-pm-ld-probe)# tx-interval 30000
Router_1(config-pm-ld-probe)# exit
Router_1(config-pm-ld-profile)# exit
Router_1(config-perf-meas)# liveness-profile name profile-PROTECT
Router_1(config-pm-ld-profile)# liveness-detection
Router_1(config-pm-ld-profile-ld)# multiplier 3
Router_1(config-pm-ld-profile-ld)# exit
Router_1(config-pm-ld-profile)# probe
Router_1(config-pm-ld-probe)# tx-interval 100000
Router_1(config)# segment-routing
Router_1(config-sr)# traffic-eng
Router_1(config-sr-te)# policy cs-srte-to-node7
Router_1(config-sr-te-policy)# bandwidth 10000
Router_1(config-sr-te-policy)# color 10 end-point ipv4 10.1.1.7
Router_1(config-sr-te-policy)# path-protection
Router_1(config-sr-te-path-pref-protection)# exit
Router_1(config-sr-te-policy)#
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
451
Configure SR-TE Policies
Circuit-Style SR-TE Policies
The following example shows how to enable liveness monitoring under SR Policy and associate the working
and protect (backup) liveness-profiles.
Router_1(config)# segment-routing
Router_1(config-sr)# traffic-eng
Router_1(config-sr-te)# policy cs-srte-to-node7
Router_1(config-sr-te-policy)# performance-measurement
Router_1(config-sr-te-policy-perf-meas)# liveness-detection
Router_1(config-sr-te-policy-live-detect)# liveness-profile name profile-WORKING
Router_1(config-sr-te-policy-live-detect)# liveness-profile backup name profile-PROTECT
Router_1(config-sr-te-policy-live-detect)# exit
Router_1(config-sr-te-policy-perf-meas)# exit
Router_1(config-sr-te-policy)#
Router_1(config)# segment-routing
Router_1(config-sr)# traffic-eng
Router_1(config-sr-te)# policy cs-srte-to-node7
Router_1(config-sr-te-policy)# candidate-paths
Router_1(config-sr-te-policy-path)# preference 100
Router_1(config-sr-te-policy-path-pref)# dynamic
Router_1(config-sr-te-pp-info)# pcep
Router_1(config-sr-te-path-pcep)# exit
Router_1(config-sr-te-pp-info)# metric
Router_1(config-sr-te-path-metric)# type te
Router_1(config-sr-te-path-metric)# exit
Router_1(config-sr-te-pp-info)# exit
Router_1(config-sr-te-policy-path-pref)# constraints
Router_1(config-sr-te-path-pref-const)# segments
Router_1(config-sr-te-path-pref-const-seg)# protection unprotected-only
Router_1(config-sr-te-path-pref-const-seg)# adjacency-sid-only
Router_1(config-sr-te-path-pref-const-seg)# exit
Router_1(config-sr-te-path-pref-const)# disjoint-path group-id 3 type node
Router_1(config-sr-te-path-pref-const)# exit
Router_1(config-sr-te-policy-path-pref)# bidirectional
Router_1(config-sr-te-path-pref-bidir)# co-routed
Router_1(config-sr-te-path-pref-bidir)# association-id 1100
Router_1(config-sr-te-path-pref-bidir)# exit
Router_1(config-sr-te-policy-path-pref)# exit
Router_1(config-sr-te-policy-path)#
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
452
Configure SR-TE Policies
Circuit-Style SR-TE Policies
• The protect path is associated with the candidate path of the second-highest preference.
• The protect CP uses unprotected-only Adj-SIDs in the segment list.
• The protect CP is bidirectional and co-routed.
• The protect CP in both directions must have the same bi-directional association ID value.
• The disjoint path constraint for the protect CP must have the same group ID and disjoint type as the
working CP.
• When the working path is invalid, the protect path becomes active. After the working path has recovered,
the protect path remains active until the default lock duration (300 seconds) expires. You can configure
a different lock duration using the lock duration duration command. The duration range is 0 (disabled)
to 3000 seconds. If the lock duration is 0 (disabled), then the working path becomes active as soon as it
recovers. If duration is not specified, the protect path remains active.
Router_1(config-sr-te-policy-path)# preference 50
Router_1(config-sr-te-policy-path-pref)# dynamic
Router_1(config-sr-te-pp-info)# pcep
Router_1(config-sr-te-path-pcep)# exit
Router_1(config-sr-te-pp-info)# metric
Router_1(config-sr-te-path-metric)# type te
Router_1(config-sr-te-path-metric)# exit
Router_1(config-sr-te-pp-info)# exit
Router_1(config-sr-te-policy-path-pref)# lock duration 30
Router_1(config-sr-te-policy-path-pref)# constraints
Router_1(config-sr-te-path-pref-const)# segments
Router_1(config-sr-te-path-pref-const-seg)# protection unprotected-only
Router_1(config-sr-te-path-pref-const-seg)# adjacency-sid-only
Router_1(config-sr-te-path-pref-const-seg)# exit
Router_1(config-sr-te-path-pref-const)# disjoint-path group-id 3 type node
Router_1(config-sr-te-path-pref-const)# exit
Router_1(config-sr-te-policy-path-pref)# bidirectional
Router_1(config-sr-te-path-pref-bidir)# co-routed
Router_1(config-sr-te-path-pref-bidir)# association-id 1050
Router_1(config-sr-te-path-pref-bidir)# exit
Router_1(config-sr-te-policy-path-pref)# exit
Router_1(config-sr-te-policy-path)#
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
453
Configure SR-TE Policies
Circuit-Style SR-TE Policies
• If both working and protect paths are unavailable, the restore path becomes active. After either the
working or protect path has recovered, the restore path remains active until the default lock duration (300
seconds) expires. You can configure a different lock duration using the lock duration duration command.
The duration range is 0 (disabled) to 3000 seconds. If the lock duration is 0 (disabled), then the working
or protect path becomes active as soon as either recovers. If duration is not specified, the restore path
remains active.
Router_1(config-sr-te-policy-path)# preference 10
Router_1(config-sr-te-policy-path-pref)# dynamic
Router_1(config-sr-te-pp-info)# pcep
Router_1(config-sr-te-path-pcep)# exit
Router_1(config-sr-te-pp-info)# metric
Router_1(config-sr-te-path-metric)# type te
Router_1(config-sr-te-path-metric)# exit
Router_1(config-sr-te-pp-info)# exit
Router_1(config-sr-te-policy-path-pref)# backup-ineligible
Router_1(config-sr-te-policy-path-pref)# lock duration 30
Router_1(config-sr-te-policy-path-pref)# constraints
Router_1(config-sr-te-path-pref-const)# segments
Router_1(config-sr-te-path-pref-const-seg)# protection unprotected-only
Router_1(config-sr-te-path-pref-const-seg)# adjacency-sid-only
Router_1(config-sr-te-path-pref-const-seg)# exit
Router_1(config-sr-te-path-pref-const)# exit
Router_1(config-sr-te-policy-path-pref)# bidirectional
Router_1(config-sr-te-path-pref-bidir)# co-routed
Router_1(config-sr-te-path-pref-bidir)# association-id 1010
Router_1(config-sr-te-path-pref-bidir)# exit
Router_1(config-sr-te-policy-path-pref)# exit
Router_1(config-sr-te-policy-path)#
Running Configuration
Router_1# show running-config
. . .
segment-routing
traffic-eng
policy cs-srte-to-node7
bandwidth 10000
color 10 end-point ipv4 10.1.1.7
path-protection
!
candidate-paths
preference 10
dynamic
pcep
!
metric
type te
!
!
lock
duration 30
!
backup-ineligible
!
constraints
segments
protection unprotected-only
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
454
Configure SR-TE Policies
Circuit-Style SR-TE Policies
adjacency-sid-only
!
!
bidirectional
co-routed
association-id 1010
!
!
preference 50
dynamic
pcep
!
metric
type te
!
!
lock
duration 30
!
constraints
segments
protection unprotected-only
adjacency-sid-only
!
disjoint-path group-id 3 type node
!
bidirectional
co-routed
association-id 1050
!
!
preference 100
dynamic
pcep
!
metric
type te
!
!
constraints
segments
protection unprotected-only
adjacency-sid-only
!
disjoint-path group-id 3 type node
!
bidirectional
co-routed
association-id 1100
!
!
!
performance-measurement
liveness-detection
liveness-profile backup name profile-PROTECT
liveness-profile name profile-WORKING
invalidation-action down
!
!
!
!
!
root
performance-measurement
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
455
Configure SR-TE Policies
Circuit-Style SR-TE Policies
Verification
Use the show segment-routing traffic-eng policy detail command to display the details of the CS SR policy
on node 1:
Router_1# show segment-routing traffic-eng policy detail
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
456
Configure SR-TE Policies
Circuit-Style SR-TE Policies
Reverse path:
SID[0]: 24000 [Adjacency-SID, 10.10.10.2 - 10.10.10.1]
Protection Information:
Role: WORKING
Path Lock: Timed
Lock Duration: 300(s)
Preference: 50 (configuration) (protect)
Name: cs-srte-to-node7
Requested BSID: 8000
PCC info:
Symbolic name: cfg_cs-srte-to-node7_discr_50
PLSP-ID: 1
Constraints:
Protection Type: unprotected-only
Maximum SID Depth: 10
Adjacency SIDs Only: True
Performance-measurement:
Reverse-path Label: Not Configured
Delay-measurement: Disabled
Liveness-detection: Enabled
Profile: profile-PROTECT
Invalidation Action: down
Logging:
Session State Change: No
Statistics:
Session Create : 0
Session Update : 9
Session Delete : 0
Session Up : 1
Session Down : 0
Delay Notification: 0
Session Error : 0
Dynamic (pce 192.168.0.5) (valid)
Metric Type: TE, Path Accumulated Metric: 10
SID[0]: 24002 [Adjacency-SID, 11.11.11.1 - 11.11.11.2]
Reverse path:
SID[0]: 24003 [Adjacency-SID, 11.11.11.2 - 11.11.11.1]
Protection Information:
Role: PROTECT
Path Lock: Timed
Lock Duration: 30(s)
Preference: 10 (configuration) (inactive)
Name: cs-srte-to-node7
Requested BSID: 8000
Constraints:
Protection Type: unprotected-only
Maximum SID Depth: 10
Adjacency SIDs Only: True
Performance-measurement:
Reverse-path Label: Not Configured
Delay-measurement: Disabled
Liveness-detection: Enabled
Profile: working
Invalidation Action: down
Logging:
Session State Change: No
Statistics:
Session Create : 0
Session Update : 0
Session Delete : 0
Session Up : 0
Session Down : 0
Delay Notification: 0
Session Error : 0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
457
Configure SR-TE Policies
Circuit-Style SR-TE Policies
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
458
Configure SR-TE Policies
Reporting of SR-TE Policies Using BGP- Link State
Reporting of SR-TE Release 7.10.1 BGP- Link State (LS) is a mechanism by which
Policies Using LS and Traffic Engineering (TE) information can
BGP-Link State for be collected from networks and shared with
SR-MPLS external components (such as, Segment Routing
Path Computation Element (SR-PCE) or
Crossword Optimization Engine (COE)) using the
BGP routing protocol.
This feature gathers the Traffic Engineering Policy
information that is locally available in a node and
advertises it in BGP-LS for SR-MPLS.
The operators can now take informed decisions
based on the information that is gathered on their
network's path computation, reoptimization,
service placement, network visualization, and so
on.
The feature introduces these changes:
CLI:
• distribute link-state
This function is achieved using a BGP Network Layer Reachability Information (NLRI) encoding format.
BGP-LS consumes structured IGP data (for example, router-id, remote-IP-address of a link, local-IP address
of a link, link identifier, and so on). and creates BGP-LS (NLRI) or attributes that BGP or other components
like Cisco IOS XR Traffic Controller (XTC) can consume. Current implementation of BGP-LS can report
topology using Nodes, Links, and Prefixes.
Modern Segment Routing (SR) networks often use SR Traffic Engineering (SR-TE) to influence the path that
each specific traffic takes over the network. SR-TE tunnels can be provisioned manually on the tunnel head,
but often they are calculated and provisioned by the central controller. Often operator of the network wants
the ability to force the traffic over specific nodes and links.
Now the operators have the option to collect reports of the SR-TE and Policy information that is locally
available in a node and advertise it into BGP-LS updates, which can be used by external components. Refer
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
459
Configure SR-TE Policies
Restrictions to Reporting of SRTE Policies using BGP-LS
the IEFT for examples. This feature is implemented so that the operators have control over their network's
path computation, reoptimization, service placement, network visualization, and so on.
Note Circuit Style (CS) SR policies are reported but without the CS policies' specific attributes, like the bidirectional
constraints, per-hop behavior, and so on.
Note When SR policies that are reporting in BGP-LS are enabled by the operator, the Head End only reports the
Active Candidate Path (CPs) (CPs installed in the forwarding). There are monitoring use cases that require
reporting of inactive CPs. The following CLI is needed to report inactive CPs.
For both SR-TE and SR-PCE, you need to use the global CLI to enable the reporting of policies or Circuit
Style (CS) to BGP-LS:
Configuration Example
Configure the following command to enable reporting and syncing of SR policies in BGP-LS at the Head
End:
Router# config
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# distribute link-state
Router(config-sr-te-distribute-ls)# report-candidate-path-inactive
Router(config-sr-te-distribute-ls)# commit
Router(config-sr-te-distribute-ls)# exit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
460
Configure SR-TE Policies
Configure Reporting of SRTE Policies using BGP-LS
Running Configuration
This is a sample running configuration which shows that you have configured BGP-LS reporting feature.
segment-routing
traffic-eng
distribute link-state
report-candidate-path-inactive
!
!
!
Verification
Use the show pce segment-routing traffic-eng policy private and show pce distributed-ls events to verify
the configuration.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
461
Configure SR-TE Policies
Configure Reporting of SRTE Policies using BGP-LS
Constraints:
Bitfield: 0x0020 flags: 0x4000 (protected-only) MT-ID: 0
Algorithm: 0
Bandwidth: 0 kbps
Metric constraints[0]:
Type: 0 flags: 0x80 (optimization)
Margin: 0 bound: 0
Metric constraints[1]:
Type: 4 flags: 0x10 (bound)
Margin: 0 bound: 10
Segment lists:
Segment list[0]:
Flags: 0x3800 (computed, verified, first-seg-resolved) MT-ID: 0 algorithm:
0 weight: 0
Metric[0]:
Type: 0 flags: 0x10 (value)
Margin: 0 bound: 0 value: 10
Segments:
Segment[0]:
Bitfield: 0x0000 type: 3 flags: 0x8000 (sid-present)
SID: 102000
Descriptor:
Algorithm: 0
Local address: 192.0.2.1 [0] remote address: 0.0.0.0 [0]
Distribute LS events:
----------------
Event history (oldest first):
Time Event
Apr 11 01:50:48.985 [UID: 0] SR CP NLRI: node ID: SR RID 192.0.2.1, ls_id 0, asn 0,
bitf 0x00000200 policy ID: endpoint: 192.168.0.2 color: 100 CP ID: originator: config 0.0.0.0
asn: 0 discriminator: 100 (oper: add)
Apr 11 01:50:50.046 [UID: 1] SR CP NLRI: node ID: SR RID 192.0.2.1, ls_id 0, asn 0,
bitf 0x00000200 policy ID: endpoint: 192.168.0.2 color: 100 CP ID: originator: config 0.0.0.0
asn: 0 discriminator: 100 (oper: add)
RP/0/0/CPU0:rtrX#show pce distribute-ls summary
Tue Apr 11 02:03:36.289 PDT
Distribution enabled: yes
Connected to LS-LIB: yes
Encode queue size: 0
Estimated encoding rate: 17280/s
NLRIs encoded to LS-LIB:
SR candidate path: 2 added, 0 removed, 0 errored, 0 replaced
Element stats:
SR candidate path: 1 (watermark: 2)
Throttle timer:
Running: no
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
462
Configure SR-TE Policies
Configure Reporting of SRTE Policies using BGP-LS
Name: bar
Requested BSID: dynamic
PCC info:
Symbolic name: cfg_bar_discr_100
PLSP-ID: 2
Is orphan: no
State timer:
Running: no
Constraints:
Protection Type: protected-preferred
Maximum SID Depth: 10
ID: 1
Source: 192::1
Stale: no
Checkpoint flags: 0x00000000
Path Type: SRV6
Performance-measurement:
Reverse-path segment-list:
Delay-measurement: Disabled
Liveness-detection: Disabled
Dynamic (pce 192.168.0.3) (valid)
Metric Type: IGP, Path Accumulated Metric: 10
IGP area: 0
SID[0]: fccc:ccc1:2::/48 Behavior: uN (PSP/USD) (48)
Format: f3216
LBL:32 LNL:16 FL:0 AL:80
Address: 192::2
SRv6 Information:
Locator: loc1Algo0
Binding SID requested: Dynamic
Binding SID behavior: uB6 (Insert.Red)
Cached distribute LS element:
Sense: TRUE
Refcount: 1
Is on queue: FALSE
Node identifiers:
Protocol: 9 router ID: 192::1
Policy identifiers:
Color: 200 Endpoint: 192::2
Flags: 0x80 (endpoint-v6)
Candidate path identifiers:
Originator: 0.0.0.0 protocol: 3 ASN: 0
Flags: 0x00
Discriminator: 100
Candidate path attributes:
Name: bar
Policy name: srte_c_200_ep_192::2
State:
Priority: 0 flags: 0x5A00 (active, evaluated, valid-sid-list, delegated)
Preference: 100
SRv6 BSID:
Flags: 0x8000 (alloc)
BSID: fccc:ccc1:1:e018::
Specified BSID: ::
Endpoint:
Endpoint function: 71 flags: 0x00 algorithm: 0
Structure:
Locator block length: 32 locator node length: 16 function length: 16 arguments
length: 0
Constraints:
Bitfield: 0x0020 flags: 0xC000 (dataplane-v6, protected) MT-ID: 0
Algorithm: 0
Bandwidth: 0 kbps
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
463
Configure SR-TE Policies
Configure Reporting of SRTE Policies using BGP-LS
Metric constraints[0]:
Type: 0 flags: 0x80 (optimization)
Margin: 0 bound: 0
Metric constraints[1]:
Type: 4 flags: 0x10 (bound)
Margin: 0 bound: 10
Segment lists:
Segment list[0]:
Flags: 0xB800 (dataplane-v6, computed, verified, first-seg-resolved) MT-ID:
0 algorithm: 0 weight: 1
Metric[0]:
Type: 0 flags: 0x10 (value)
Margin: 0 bound: 0 value: 10
Segments:
Segment[0]:
Bitfield: 0x0003 type: 9 flags: 0x8000 (sid-present)
SID: fccc:ccc1:2::
Descriptor:
Algorithm: 0
Local address: 192::2 [0] remote address: :: [0]
Endpoint:
Endpoint function: 48 flags: 0x00 algorithm: 0
Structure:
Locator block length: 32 locator node length: 16 function length: 0
arguments length: 80
LSPs:
LSP[0]:
LSP-ID: 2 policy ID: 2 (active)
State: Programmed
Binding SID: fccc:ccc1:1:e018::
Install timer:
Running: no
Cleanup timer:
Running: no
Delete timer:
Running: no
Revert timer:
Running: no
SM chain:
Init -> Egress paths
Egress paths pending -> BSID RW
BSID rewrite pending -> Success
Forwarding flags: 0x00000008
Candidate path ID: 1
Flags:
SL-ID:
Sent/Received/Transferred: 1/1/0
SLs:
SL[0]:
Name: dynamic
Type: Dynamic PCE
Checkpoint id: 1
NH SRV6 SID: fccc:ccc1:2::
SL ID: 0xa000001
Flags:
Normalized Weight: 1
ENS: 1
Paths:
Path[0]:
Interface version: 1
Flags:
Outgoing interface: Gi0/2/0/0
Weight: 1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
464
Configure SR-TE Policies
Configure Reporting of SRTE Policies using BGP-LS
SID stack:
Total SID count: 0
Underlay Normalized Weight: 1
Path[1]:
Interface version: 1
Flags:
Outgoing interface: Gi0/2/0/1
Weight: 1
SID stack:
Total SID count: 0
Underlay Normalized Weight: 1
Path[2]:
Interface version: 1
Flags:
Outgoing interface: Gi0/2/0/2
Weight: 1
SID stack:
Total SID count: 0
Underlay Normalized Weight: 1
Attributes:
Binding SID: fccc:ccc1:1:e018::
Forward Class: Not Configured
Steering labeled-services disabled: no
Steering BGP disabled: no
IPv6 caps enable: yes
Invalidation drop enabled: no
Max Install Standby Candidate Paths: 0
Path Type: SRV6
Notification to clients:
Binding SID: fccc:ccc1:1:e018::
Bandwidth : 0 Kbps (0 Kbps)
State: UP
Flags: [add] [ipv6_caps]
Metric Type: IGP
Metric Value: 10
Admin Distance: 30
ifhandle: 0x00000000
Source: 192::1
Transition count: 1
LSPs created count: 1
Reoptimizations completed count: 1
Retry Action Flags: 0x00000000, ()
Last Retry Timestamp: never (0 seconds ago)
Policy reference: 0x1222c10
Event history (oldest first):
Time Event
Mar 6 11:17:40.563 POLICY CREATE
Mar 6 11:17:40.564 (x3) CP PCRPT: 1 hops:
Mar 6 11:17:41.071 CP PCUPD: CP-ID: 1, path change: true, notify: true, hops:
fccc:ccc1:2::
Mar 6 11:17:41.072 CP PCRPT: 1 hops: fccc:ccc1:2::
Mar 6 11:17:41.072 LSP CREATE: 2, need BSID RW: true, BSID: ::
Mar 6 11:17:41.072 CP CHANGE: PREF: 100 [PROTO: 30, ORIGIN: 0/<None>, DISC: 100]
Mar 6 11:17:42.579 SRv6 BSID RW REQ: ID 2
Mar 6 11:17:42.580 SRv6 BSID RW RES: ID 2 Status: success
Mar 6 11:17:42.580 LSP PCRPT: 2, hops: fccc:ccc1:2::
Mar 6 11:17:42.580 CP PCRPT REMOVE: 1
Mar 6 11:17:42.580 IM STATE CHANGE: UNKNOWN to UP, count: 0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
465
Configure SR-TE Policies
Configure Reporting of SRTE Policies using BGP-LS
----------------------
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
466
Configure SR-TE Policies
Configure Reporting of SRTE Policies using BGP-LS
Descriptor:
Algorithm: 0
Local address: 192::2 [0] remote address: :: [0]
Endpoint:
Endpoint function: 48 flags: 0x00 algorithm: 0
Structure:
Locator block length: 32 locator node length: 16 function length: 0
arguments length: 80
*>i[SP][SR][I0x0][N[c100][b0.0.0.0][q192.168.0.1][te192::1]][C[po0x3][f0x80][e192::2][cl0xc8][as0][oa0.0.0.0][di100]]/792
*>
[SP][SR][I0x0][N[c100][b0.0.0.0][q192.168.0.3][te192::1]][C[po0x3][f0x80][e192::2][cl0xc8][as0][oa0.0.0.0][di100]]/792
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
467
Configure SR-TE Policies
SR-TE Policy Path Protection
SR-TE Policy Release 7.4.2 You can now configure pre-programmed SR-TE policy Working and Protect
Path Protection candidate paths, and provide fast failure detection through SR Policy
Liveness Monitoring probes. If there is a liveness failure on the Working
candidate path, the headend triggers a switchover to the Protect candidate
path.
With this release, you can operate IP-centric (with ECMP and TI-LFA)
and TDM-centric (with circuits and path protection) services over a common
SR network. This eliminates the need for multiple parallel networks and
reduces capital expenditures (CapEx) and operating expenditures (OpEx).
For this feature, the following commands/keywords are added:
• policy candidate-paths preference lock duration
• policy path-protection
• backup keyword is added to the performance-measurement
liveness-detection command.
To provide SR policy path protection, headend router and liveness monitoring functions are introduced. The
functions are explained with the 1:1 (one-to-one) path protection with SR policy liveness monitoring use case
for TDM-centric networks. Pointers:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
468
Configure SR-TE Policies
SR-TE Policy Path Protection
Note Path protection and local TI-LFA FRR are mutually exclusive functions.
• An SR-TE policy is enabled on the headend router. The headend router 1 sends traffic to endpoint router
7. The Working candidate path Blue spans routers 1-2-3-7, and the Protect candidate path Green spans
routers 1-4-5-6-7.
• The headend Router maintains an independent liveness session on each candidate path using loopback
measurement mode. After verifying liveness, it pre-programs Working and Protect paths in forwarding.
• The paths are manually configured in explicit segment lists using MPLS labels to ensure that unprotected
adjacency SIDs are utilized.
• The headend router sends traffic over the Working candidate path, and detects any liveness failure. When
there is a failure, it sends direct switchover notifications to the FIB, and triggers a switchover to the
protected path.
• In 1:1 (one-to-one) path protection, when the Working candidate path fails, the Protect candidate path
sends traffic.
Note SR-TE policy path protection and SR-TE path invalidation drop inter-working is not supported.
Liveness Monitoring
• SR PM Liveness probes are performed over Working and Protect candidate paths.
• TWAMP Light (RFC 5357) is used for performance measurement and liveness monitoring.
• Separate PM liveness monitoring sessions are created for working and protect candidate-paths.
• Independent PM sessions are created at both endpoints of the SR Policy.
• Loopback measurement-mode (timestamps t1/t4) is used for liveness monitoring. Probe packets are not
punted on the responder node. Round-trip delay is computed as (t4 – t1).
• From headend router 1, PM probe query packets are sent with forward and reverse (7->3->2->1) direction
paths of the SR Policy’s candidate-path in the header of the probe packet. Similarly, PM probe query
packets are sent along the Protect path.
• For liveness monitoring:
• Liveness is declared UP as soon as one probe packet is received back on all segment-lists of the
candidate-path.
• Liveness failure is detected when last N (user-configured value) consecutive probe packets are lost
on any segment-list.
• Fault in the forward and reverse direction of the segment-list (co-routed path) triggers liveness
failure notification to SRTE and FIB. FIB triggers protection switchover upon PM notification
(running on high priority thread).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
469
Configure SR-TE Policies
SR-TE Policy Path Protection
Configuration
• In this example, an SR-TE policy foo is created on the headend router and path-protection is enabled for
the policy.
RP/0/RSP0/CPU0:ios# configure
RP/0/RSP0/CPU0:ios(config)# segment-routing traffic-eng policy foo
RP/0/RSP0/CPU0:ios(config-sr-te-policy)# color 10 end-point ipv4 192.168.0.3
RP/0/RSP0/CPU0:ios(config-sr-te-policy)# path-protection
RP/0/RSP0/CPU0:ios(config-sr-te-path-pref-protection)#exit
• Under candidate-paths, the Protect and Working paths are specified through explicit segment lists.
• The Protect path’s preference is 50, and it is lower than the Working path preference of 100. The forward
(1->4->5->6->7) and reverse (7->6->5->4->1) Protect paths, and the forward (1->2->3->7) and reverse
(7->3->2->1) Working paths are enabled as explicit segment lists.
• When the Working path is invalid, the Protect path becomes active. After the Working path has recovered,
the Protect path remains active until the default lock duration (of 300 seconds) expires. You can configure
a different lock duration using the lock duration command.
The duration range is 0 (disabled) to 3000 seconds. If the lock duration is 0 (disabled), then the Working
path becomes active as soon as it recovers. If the duration is not specified, the Protect path remains active.
RP/0/RSP0/CPU0:ios(config-sr-te-policy)# candidate-paths
RP/0/RSP0/CPU0:ios(config-sr-te-policy-path)#preference 50
RP/0/RSP0/CPU0:ios(config-sr-te-policy-path-pref)#lock duration 30
RP/0/RSP0/CPU0:ios(config-sr-te-policy-path-pref)# explicit segment-list sl-protect-fwd
Note Segment lists must use only unprotected (dynamic or manual) Adjacency SID and BSIDs (as non-first-SID).
RP/0/RSP0/CPU0:ios# configure
RP/0/RSP0/CPU0:ios(config)# segment-routing traffic-eng
RP/0/RSP0/CPU0:ios(config-sr-te)# segment-list sl-working-fwd
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# index 1 mpls label 24000
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# index 2 mpls label 24004
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# exit
RP/0/RSP0/CPU0:ios(config-sr-te)# segment-list sl-working-bck
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# index 1 mpls label 24002
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# index 2 mpls label 24006
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# exit
RP/0/RSP0/CPU0:ios(config-sr-te)# segment-list sl-protect-fwd
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# index 1 mpls label 24000
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# index 2 mpls label 30201
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# exit
RP/0/RSP0/CPU0:ios(config-sr-te)# segment-list sl-protect-bck
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# index 1 mpls label 24002
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# index 2 mpls label 30201
RP/0/RSP0/CPU0:ios(config-sr-te-sl)# commit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
470
Configure SR-TE Policies
SR-TE Policy Path Protection
RP/0/RSP0/CPU0:ios# configure
RP/0/RSP0/CPU0:ios(config)# segment-routing traffic-eng policy foo
RP/0/RSP0/CPU0:ios(config-sr-te-policy)#performance-measurement
RP/0/RSP0/CPU0:ios(config-sr-te-policy-perf-meas)#liveness-detection
RP/0/RSP0/CPU0:ios(config-sr-te-policy-live-detect)# liveness-profile backup name
profile-PROTECT
RP/0/RSP0/CPU0:ios(config-sr-te-policy-live-detect)# liveness-profile name profile-WORKING
• The default Invalidation action is Down and it triggers path protection switching. The other action is
None, which is enabled here.
RP/0/RSP0/CPU0:ios(config-sr-te-policy-live-detect)#invalidation-action none
RP/0/RSP0/CPU0:ios(config-sr-te-policy-live-detect)#commit
RP/0/RSP0/CPU0:ios(config)#performance-measurement
RP/0/RSP0/CPU0:ios(config-perf-meas)#liveness-profile sr-policy name profile-WORKING
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy)# probe
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-probe)# measurement-mode loopback
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-probe)# tx-interval 30000
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-probe)# commit
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-probe)# exit
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy)# liveness-detection multiplier 4
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy)# commit
Verification
Use the show segment-routing traffic-eng policy candidate-path command to display Working and Protect
candidate-path details.
RP/0/RSP0/CPU0:ios# show segment-routing traffic-eng policy candidate-path name foo
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
471
Configure SR-TE Policies
Sharing the Extended Label Switch Path Array
Candidate-paths:
Preference: 100 (configuration) (active)
Name: foo
Requested BSID: dynamic
Protection Type: protected-preferred
Maximum SID Depth: 10
Explicit: segment-list sl-working-fwd (active)
Weight: 1, Metric Type: TE
24000
24004
Protection Information:
Role: WORKING
Path Lock: Timed
Lock Duration: 300(s)
Preference: 50 (configuration) (active)
Name: foo
Requested BSID: dynamic
Protection Type: protected-preferred
Maximum SID Depth: 10
Explicit: segment-list sl-protect-fwd (active)
Weight: 1, Metric Type: TE
24000
30201
Protection Information:
Role: PROTECT
Path Lock: Timed
Lock Duration: 30(s)
..
Sharing the Extended Label Switch Release 7.5.4 The Cisco ASR 9000 series routers
Path Array with third-generation and later line
cards can experience scaling
limitations with scaled labelled
IPv6 prefixes.
This feature enables the extended
label switch path array
(EXT_LSPA) resource to be shared
per-path-list rather than per-prefix,
which reduces the risk of an
out-of-resources (OOR) condition.
This feature introduces the
following command:
• hw-module l3 feature
sharedlspa enable
On third-generation Cisco ASR 9000 series line cards, a leaf node can store up to four per-prefix labels. On
fourth-generation and fifth-generation ASR 9000 series line cards, a leaf node can store up to two per-prefix
labels.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
472
Configure SR-TE Policies
Sharing the Extended Label Switch Path Array
Note See the Cisco ASR 9000 Series Aggregation Services Router Ethernet Line Card Installation Guide for
information about the different generations of ASR 9000 series line cards.
ASR 9000 series routers use extended label switch path array (EXT_LSPA) objects to store additional per-prefix
labels. Each EXT_LSPA object stores four labels on third-generation line cards and six labels on
fourth-generation and fifth-generation line cards.
There is a limited pool of EXT_LSPA objects in hardware. If per-prefix labels are allocated, then with prefix
scale it is possible to run out of the EXT_LSPA hardware resource, resulting in an out of resources (OOR)
condition.
This feature enables the EXT_LSPA resource to be shared per-path-list rather than per-prefix. If there is a
path list that is shared across multiple prefixes, the same set of EXT_LSPA resources can be shared for all
the prefixes.
Example
Consider the following scenario, where there are 24 SR-TE policy paths between nodes A and B, with each
path having one next hop (NH).
Each IPv6 prefix has a unique extended color community attribute, mapped to a different SR-TE policy. In
this scenario, each IPv6 prefix has the same set of 24 labels from node A to node B. These labels are stored
partly in the prefix leaf object and the rest are stored in the EXT_LSPA object.
Note The EXT_LSPA objects are allocated using the power of 2 (for example, 1, 2, 4, 8, etc).
For example:
• On third-generation line cards, four labels are stored on the leaf node. The remaining 20 labels are stored
on EXT_LSPA object. Each EXT_LSPA object can store four labels, so five EXT_LSPA objects are
needed (20 labels / 4 labels stored per EXT_LSPA object); however, eight EXT_LSPA objects are
allocated. In our scenario, the number of EXT_LSPA objects required is 160 (20 labels x 8 EXT_LSPA
objects).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
473
Configure SR-TE Policies
Sharing the Extended Label Switch Path Array
• On fourth-generation and fifth-generation line cards, two labels are stored on the leaf node. The remaining
22 labels are stored on EXT_LSPA object. Each EXT_LSPA object can store six labels, so four
EXT_LSPA objects are needed. In our scenario, the number of EXT_LSPA objects required is 88 (22
labels x 4 EXT_LSPA objects).
When you enable EXT_LSPA resource sharing, the EXT_LSPA resource is shared per-path-list rather than
per-prefix. Since the path lists are shared across multiple prefixes, the same set of EXT_LSPA resources can
be shared for all the prefixes.
For example, on third-generation line cards with 24 paths, only five EXT_LSPA objects are required:
• Paths 1 - 4: labels are stored on the leaf node
• Paths 5 - 8: labels are stored on EXT_LSPA_1
• Paths 9 - 12: labels are stored on EXT_LSPA_2
• Paths 13 - 16: labels are stored on EXT_LSPA_3
• Paths 17 - 20: labels are stored on EXT_LSPA_4
• Paths 21 - 24: labels are stored on EXT_LSPA_5
On fourth-generation and fifth-generation line cards with 24 paths, four different EXT_LSPA objects are
allocated:
• Paths 1 - 2: labels are stored on the leaf node
• Paths 3 - 8: labels are stored on EXT_LSPA_1
• Paths 9 - 14: labels are stored on EXT_LSPA_2
• Paths 15 - 20: labels are stored on EXT_LSPA_3
• Paths 21 - 24: labels are stored on EXT_LSPA_4
Configuration
To enable this feature, use the hw-module l3 feature sharedlspa enable command, then reload the router or
line card.
Verification
The following output shows the hardware EXT_LSPA usage on the linecard:
Router# show cef platform resource summary location 0/1/CPU0 | i EXT
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
474
Configure SR-TE Policies
Sharing the Extended Label Switch Path Array
The following output shows LSPA object pointer for prefix 1 (23::1/128):
Router# show cef ipv6 23::1/128 internal location 0/1/CPU0
. . .
The following output shows LSPA object pointer for prefix 2 (24::1/128):
Router# show cef ipv6 24::1/128 internal location 0/1/CPU0
. . .
Observe that the LSPA pointer for both prefixes is the same (0x9965e0a8). If LSPA sharing is not enabled,
the pointer will be different for both prefixes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
475
Configure SR-TE Policies
Sharing the Extended Label Switch Path Array
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
476
CHAPTER 12
Segment Routing Tree Segment Identifier
Tree Segment Identifier (Tree-SID) is an SDN controller-based approach to build label switched multicast
(LSM) Trees for efficient delivery of multicast traffic in an SR domain and without the need for multicast
protocol running in the network. With Tree SID, trees are centrally computed and controlled by a path
computation element (SR-PCE).
A Replication segment (as specified in IETF draft "SR Replication segment for Multi-point Service Delivery")
is a type of segment which allows a node (Replication node) to replicate packets to a set of other nodes
(Downstream nodes) in a Segment Routing Domain.
A Replication segment includes the following:
• Replication SID: The Segment Identifier of a Replication segment. This is an SR-MPLS label (Tree SID
label).
• Downstream nodes: Set of nodes in Segment Routing domain to which a packet is replicated by the
Replication segment.
A Point-to-Multipoint (P2MP) tree is formed by stitching Replication segments on the Root node, intermediate
Replication nodes, and Leaf nodes. This is referred to as an SR P2MP Policy (as specified in IETF draft
"Segment Routing Point-to-Multipoint Policy").
An SR P2MP policy works on existing MPLS data-plane and supports TE capabilities and single/multi routing
domains. At each node of the tree, the forwarding state is represented by the same Replication segment (using
a global Tree-SID specified from the SRLB range of labels).
An SR P2MP policy request contains the following:
• Policy name
• SID for the P2MP Tree (Tree-SID)
• Address of the root node
• Addresses of the leaf nodes
• Optimization objectives (TE, IGP, delay metric)
• Constraints (affinity, Flexible Algorithm)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
477
Segment Routing Tree Segment Identifier
2. Learning the Root and Leaves of a Tree - describe dynamic and static Tree SIDs (16-17) - Tree SID
Policy Types and Behaviors
3. Computing the Tree
4. Allocating MPLS label for the Tree
5. Signaling Tree forwarding state to the routers
6. Re-optimizing Tree
Caution With this method, SR-PCE HA is not supported. For this reason, this configuration
method is not recommended.
• Tree SID parameters are provided by mVPN PEs via PCEP to the PCE. This method allows for
SR-PCE High Availability (HA).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
478
Segment Routing Tree Segment Identifier
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
479
Segment Routing Tree Segment Identifier
4. The Root node encapsulates the multicast traffic, replicates it, and forwards it to the Transit nodes.
5. The Transit nodes replicate the multicast traffic and forward it to the Leaf nodes.
6. The Leaf nodes decapsulate the multicast traffic and forward it to the multicast receivers.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
480
Segment Routing Tree Segment Identifier
Usage Guidelines and Limitations
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
481
Segment Routing Tree Segment Identifier
Bud Node Support
The tree computation algorithm on SR-PCE has been enhanced to detect a Bud node based on knowledge of
the Leaf set, and to handle Leaf/Transit node transitions to Bud node. The role of the Bud node is also explicitly
signaled in PCEP.
Caution With this configuration method, SR-PCE HA is not supported. For this reason, this configuration method is
not recommended.
To configure static Segment Routing Tree-SID for Point-to-Multipoint (P2MP) SR policies, complete the
following configurations:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
482
Segment Routing Tree Segment Identifier
Configure Static Segment Routing Tree-SID via CLI at SR-PCE
1. Configure Path Computation Element Protocol (PCEP) Path Computation Client (PCC) on all nodes
involved in the Tree-SID path (root, mid-point, leaf)
2. Configure Affinity Maps on the SR-PCE
3. Configure P2MP SR Policy on SR-PCE
4. Configure Multicast on the Root and Leaf Nodes
Use the policy policy command to configure the P2MP policy name and enter P2MP Policy sub-mode.
Configure the source address, endpoint-set color, Tree-SID label, affinity constraints, and metric type.
Router(config-pce-sr-te-p2mp)# policy FOO
Router(config-pce-p2mp-policy)# source ipv4 10.1.1.6
Router(config-pce-p2mp-policy)# color 10 endpoint-set BAR
Router(config-pce-p2mp-policy)# treesid mpls 15200
Router(config-pce-p2mp-policy)# candidate-paths
Router(config-pce-p2mp-policy-path)# constraints
Router(config-pce-p2mp-path-const)# affinity
Router(config-pce-p2mp-path-affinity)# exclude BLUE
Router(config-pce-p2mp-path-affinity)# exit
Router(config-pce-p2mp-path-const)# exit
Router(config-pce-p2mp-policy-path)# preference 100
Router(config-pce-p2mp-policy-path-preference)# dynamic
Router(config-pce-p2mp-path-info)# metric type te
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
483
Segment Routing Tree Segment Identifier
Running Config
Router(config-pce-p2mp-path-info)# root
Router(config)#
Note Enter this configuration only on an SR P2MP segment. Multicast traffic cannot be steered into a P2P policy.
On the root and leaf nodes of the SR P2MP tree, use the mdt static segment-routing command to configure
the multicast distribution tree (MDT) core as Tree-SID from the multicast VRF configuration submode.
Router(config)# multicast-routing
Router(config-mcast)# vrf TEST
Router(config-mcast-TEST)# address-family ipv4
Router(config-mcast-TEST-ipv4)# mdt static segment-routing
On the leaf nodes of an SR P2MP segment, use the static sr-policy p2mp-policy command to configure the
static SR P2MP Policy from the multicast VRF configuration submode to statically decapsulate multicast
flows.
Router(config)# multicast-routing
Router(config-mcast)# vrf TEST
Router(config-mcast-TEST)# address-family ipv4
Router(config-mcast-TEST-ipv4)# static sr-policy FOO
Running Config
The following example shows how to configure the end point addresses and P2MP SR policy with affinity
constraints on SR-PCE.
pce
segment-routing
traffic-eng
affinity bit-map
RED 23
BLUE 24
CROSS 25
!
p2mp
endpoint-set BAR
ipv4 10.1.1.2
ipv4 10.1.1.3
ipv4 10.1.1.4
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
484
Segment Routing Tree Segment Identifier
Running Config
policy FOO
source ipv4 10.1.1.6
color 10 endpoint-set BAR
treesid mpls 15200
candidate-paths
preference 100
dynamic
metric
type te
!
!
!
constraints
affinity
exclude
BLUE
!
!
!
!
!
!
!
!
!
The following example shows how to statically decapsulate multicast flows on the leaf nodes.
multicast-routing
vrf TEST
address-family ipv4
static sr-policy FOO
!
!
!
The following example shows to configure the multicast distribution tree (MDT) core as Tree-SID on the root
and leaf nodes.
multicast-routing
vrf TEST
address-family ipv4
mdt static segment-routing
!
!
!
The following example shows how to steer traffic to the SR P2MP policy on the root node.
router pim
vrf TEST
address-family ipv4
sr-p2mp-policy FOO
static-group 232.1.1.5 10.1.1.6
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
485
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
Multicast VPN: Release With this feature, you can use SR and MVPN for optimally
Dynamic Tree-SID 7.3.1 transporting IP VPN multicast traffic over the SP network, using
MVPN (with TI-LFA) SR-PCE as a controller.
With SR’s minimal source router configuration requirement, its ability
to implement policies with specific optimization objectives and
constraints, protect against network failures using TI-LFA FRR
mechanism, and use SR-PCE to dynamically generate optimal
multicast trees (including when topology changes occur in the
multicast tree), the SR-enabled SP network can transport IP multicast
traffic efficiently.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
486
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
To enable the Multicast VPN: Tree-SID MVPN With TI-LFA feature, the following protocols and software
applications are used.
OSPF/IS-IS - The underlay network is created with OSPF/IS-IS routing protocol, and reachability is established
across the network. See Configure Segment Routing for IS-IS Protocolor Configure Segment Routing for
OSPF Protocol chapter for details.
BGP Multicast VPN (MVPN) – The PE routers (A, D, and E) are IP VPN end-points for IP multicast traffic
arriving at the SP network (at PE router A) and exiting the SP network (at PE routers D and E). So, BGP
MVPN is enabled on the PE routers. NSO is used to configure BGP MVPN on the PE routers.
BGP Auto-Discovery (AD) - To enable distributed VPN end-point discovery and C-multicast flow mapping
and signalling, BGP AD function is configured on the PE routers. A BGP Auto-Discovery route contains
multicast router (loopback IP address) and tree identity (segment ID) information. It carries the information
in the Provider Multicast Service Interface (PMSI) Tunnel Attribute (PTA).
C-multicast states are signaled using BGP.
SR - To transport IP multicast traffic between the VPN end-points (PE routers A, D, and E), Provider (or P-)
tunnels are used. In a P-tunnel, the PE devices are the tunnel end-points. P-tunnels can be generated using
different technologies (RSVP-TE, P2MP LSPs, PIM trees, mLDP P2MP LSPs, and mLDP MP2MP LSPs).
In this use case, Segment Routing (SR) is used for its benefits that were noted earlier.
With SR and SR-PCE, a Tree-SID Point-to-Multipoint (P2MP) segment is used to create P-Tunnels for MVPN.
You can specify SR policy optimization objectives (such as metrics) and constraints (such as affinity) in an
SR policy and send it to the SR-PCE controller, so that it can dynamically create SR multicast trees for traffic
flow.
SR-PCE - This is a controller which, based on the provided SR policy information, computes optimal paths
for a multicast tree, and deploys the tree forwarding state on the multicast routers. When a topology change
occurs, SR-PCE automatically computes a new, optimal multicast tree, and deploys the new tree forwarding
state on the multicast routers.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
487
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
TI-LFA - In SR-TE, Topology-Independent Loop-Free Alternate (TI-LFA) fast reroute (FRR) function is
used to reduce link and node failure reaction time. When the primary next-hop (router link) fails, a pre-computed
alternate next hop is used to send traffic. TI-LFA FRR is used when transporting IP VPN multicast traffic.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
488
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
6. SR-PCE assigns an SID for the SR multicast tree policy, and deploys the multicast tree forwarding state
on the multicast routers.
7. When IP multicast traffic is sent from VPN1-SiteA to PE router A, it steers it into the SR policy, and
sends it towards D and E, which forward it to multicast traffic receivers in the sites VPN1-SiteB and
VPN1-SiteC.
8. When a leaf/multicast router is added or removed, PE router A updates the SR multicast policy and sends
it to SR-PCE. SR-PCE computes new multicast routes, and deploys the multicast tree forwarding state
information on the multicast routers.
2. IP multicast traffic arrives at A which steers the flow onto the tree.
3. A encapsulates and replicates to B, but the link to B is down.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
489
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
490
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
1. A assigns Tree-ID 10 and invokes a Create an SR multicast tree request by sending the multicast router
and tree ID information (A, 10) towards SR-PCE.
2. A announces BGP AD Inclusive PMSI (I-PMSI) route with the PTA (A, 10). Inclusive PMSI - Traffic
that is multicast by a PE router on an I-PMSI is received by all other PEs in the MVPN. I-PMSIs are
generated by Inclusive P-tunnels .
3. A discovers VPN endpoints D and E from their BGP AD Type I-PMSI route messages.
4. A invokes an Add SR multicast leaf router request (for D and E) to SR-PCE.
5. SR-PCE computes and generates the multicast tree forwarding state information on all the routers that
are part of the tree.
1. A assigns Tree-ID 20 and invokes a Create an SR multicast tree request by sending the multicast router
and tree ID information (A, 20) towards SR-PCE.
2. A announces BGP AD Selective PMSI (or S-PMSI) route with PTA (A, 20). A sets the leaf-info-required
to discover endpoint interest set.
Selective PMSI - Traffic multicast by a PE on an S-PMSI is received by some PEs in the MVPN. S-PMSIs
are generated by Selective P-tunnels.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
491
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
3. E has a receiver behind it, and announces a BGP-AD leaf route towards A. A discovers service endpoint
E for the on-demand tree.
4. A invokes an Add SR multicast leaf router request (for E) to SR-PCE.
5. SR-PCE computes and generates the multicast tree information for all the routers that are part of the tree.
1. A decides to optimize a flow and assigns Tree-ID 30 and invokes a Create an SR multicast tree request
by sending the multicast router and tree ID information (A, 30) towards SR-PCE.
2. A announces BGP AD I-PMSI route with PTA (A,30). A sets the leaf-info-required to discover endpoint
interest set.
3. D has a receiver behind it, and announces a BGP-AD leaf route towards A. A discovers service endpoint
D for optimized flow.
4. A invokes an Add SR multicast leaf router request (for D) to SR-PCE.
5. SR-PCE computes and generates the multicast tree information for all the routers that are part of the tree.
Configurations
Head End Router Configuration (Router A) - The following configuration is specific to the head end router.
Configure TE Constraints and Optimization Parameters
Router# configure terminal
Router(config)# segment-routing traffic-engineering
An affinity (or relationship) is created between the SR policy path and the link color so that SR-TE computes
a path that includes or excludes links, as specified. The head-end router automatically follows the actions
defined in the ODN template (for color 10) upon the arrival of VPN routes with a BGP color extended
community that matches color 10.
Router(config)# segment-routing traffic-engineering
Router(config-sr-te)# on-demand color 10 dynamic
Router(config-sr-te-color-dyn)# affinity include-all name red
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
492
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
The SR policy configuration on the head-end router A will be sent to the SR-PCE server, after a connection
is established between A and SR-PCE.
Multicast Router Configuration
Configure PCEP Client on Multicast Routers
Associate each multicast router as a client of the SR-PCE server. The pce address ipv4 command specifies
the SR-PCE server’s IP address.
Router# configure terminal
Router(config)# segment-routing traffic-engineering
Router(config-sr-te)# pcc pce address ipv4 3.3.3.3
Router(config-pcc-pce)# commit
Configure FRR
The following configurations enable FRR for all SR multicast (P2MP) trees, including dynamic and static
implementations.
The lfa keyword enables LFA FRR on the PCE server.
Router(config)# pce segment-routing traffic-eng p2mp fast-reroute lfa
Router(config)# commit
Alternatively, you can configure FRR for each individual tree using the following configuration. The lfa
keyword under a specific multicast policy (tree1 in this example) enables LFA FRR function for the specified
SR multicast P2MP tree.
For dynamic trees, L-flag in LSP Attributes PCEP object controls FRR on a tree.
Router(config)# pce
Router(config-pce)# address ipv4 192.168.0.5
Router(config-pce)# segment-routing traffic-eng p2mp policy tree1 fast-reroute lfa
Router(config-pce)# commit
You can create FRR node sets using the frr-node-set from ipv4 address and frr-node-set to ipv4 address
commands to specify the from and to paths on a multicast router that requires FRR protection. In this
configuration, the PCE server is configured to manage the FRR function for traffic from 192.168.0.3 sent
towards 192.168.0.4 and 192.168.0.5.
Router(config)# pce
Router(config-pce)# address ipv4 192.168.0.5
Router(config-pce)# segment-routing traffic-eng
Router(config-pce-sr-te)# p2mp
Router(config-pce-sr-te-p2mp)# frr-node-set from ipv4 192.168.0.3
Router(config-pce-sr-te-p2mp)# frr-node-set to ipv4 192.168.0.4
Router(config-pce-sr-te-p2mp)# frr-node-set to ipv4 192.168.0.5
Router(config-pce-sr-te-p2mp)# commit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
493
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
You can also create FRR node sets to disable FRR protection on specific parent and child nodes:
• exclude-all-from: Parent nodes from which all adjacencies to other nodes are not protected.
• exclude-from: Parent nodes from which an adjacency to another node is not protected.
• exclude-all-to: Child nodes to which all adjacencies from other nodes are not protected.
• exclude-to: Child nodes to which an adjacency from another node is not protected.
If a parent node of a replication is in "exclude-all-from" set, then all replications (to any child) are disabled
for FRR. If a child node of a replication is in "exclude-all-from" set, then all replications (from any parent
node) are disabled for FRR. If a parent node and child node are in "exclude-from" and "exclude-to" sets
respectively, then FRR is disabled between the specific parent and child.
FRR nodes sets are evaluated in the following order:
1. If parent node is in an "exclude-all-from" node set, FRR is disabled.
2. If child node is in an "exclude-all-to" node set, FRR is disabled.
3. If parent node is in an "exclude-from" node set and child node is in an "exclude-to" node set, FRR is
disabled.
4. If parent node is in an "from" node set, FRR is enabled.
5. If child node is in a "to" node set, FRR is enabled.
Note If child node is not in a "to" node set, FRR is disabled between parent and child even if parent node is in a
"from" node set.
Router(config)# pce
Router(config-pce)# address ipv4 192.168.0.5
Router(config-pce)# segment-routing traffic-eng
Router(config-pce-sr-te)# p2mp
Router(config-pce-sr-te-p2mp)# frr-node-set from ipv4 192.168.0.3
Router(config-pce-sr-te-p2mp)# frr-node-set exclude-all-to ipv4 192.168.0.4
Router(config-pce-sr-te-p2mp)# frr-node-set to ipv4 192.168.0.5
Router(config-pce-sr-te-p2mp)# commit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
494
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
You can also specify the FRR LFA function with the mdt default segment-routing mpls fast-reroute lfa
command.
Router(config)# multicast-routing vrf cust1
Router(config-mcast-cust1)# address-family ipv4
Router(config-mcast-cust1-ipv4)# mdt default segment-routing mpls color 10
Router(config-mcast-cust1-ipv4)# commit
The following Data MVPN configuration is required at the Ingress PE (router A) where the multicast flows
need to be steered onto the data MDT for SR multicast traffic flow.
Note - Data MDT can be configured for Default and Partitioned profiles.
Configure Data MDT for SR P2MP MVPN
In this configuration, an MDT profile of the type data is created, and the SR multicast policy with color 10
will be used to send IP multicast traffic, as per the constraints and optimizations of the policy, through the
multicast tree.
• You can enable the FRR LFA function with the mdt data segment-routing mpls fast-reroute lfa
command. This enables LFA FRR for SR multicast trees created for all data MDT profiles.
• As an alternative to the color keyword, you can specify a route policy in the route-policy command, and
define the route policy separately (as mentioned in the next configuration).
• The threshold command specifies the threshold above which a multicast flow is switched onto the data
MDT. The immediate-switch keyword enables an immediate switch of a multicast flow to the data
MDT, without waiting for threshold limit to be crossed.
• The customer-route-acl keyword specifies an ACL to enable specific multicast flows to be put on to
the data MDT.
• color and fast-reroute lfa keywords are mutually exclusive with the route-policy configuration. The
objective is to apply constraints (through color) or FRR (through LFA protection) to either all data MDTs,
or apply them selectively per data MDT, using the set on-demand-color and set fast-reroute lfa options
in the route policy (configured in the mdt data configuration).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
495
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
• With this configuration, IP multicast flows for the 232.0.0.1 multicast group are steered into the SR
multicast policy created with the on-demand color 10, while flows for 232.0.0.2 are steered into the
policy created with color 20.
• The data MDT SR multicast tree created for the 232.0.0.2 multicast group is enabled with FRR LFA
protection.
• Route policies can also be used to match other parameters, such as source address.
Verification
View MVPN Context Information - You can view MVPN VRF context information with these commands.
View Default MDT Configuration
This command displays SR multicast tree information, including the MDT details (of default type, etc), and
customer VRF information (route target, route distinguisher, etc).
Router# show mvpn vrf vpn1 context
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
496
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
This command displays SR multicast tree information, including the MDT details (of partitioned type, etc),
and customer VRF information (route target, route distinguisher, etc).
Router# show mvpn vrf vpn1 context
VRF : vpn1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
497
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
498
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
Tree: sr_p2mp_root_192.168.0.1_tree_id_524290
Label: 18000 Operational: up Admin: up
Metric Type: TE
Transition count: 3
Uptime: 00:00:03 (since Fri Jan 24 14:57:51 PST 2020)
Source: 192.168.0.1
Destinations: 192.168.0.4
Nodes:
Node[0]: 192.168.0.2 (rtrM)
Role: Transit
Hops:
Incoming: 18000 CC-ID: 4
Outgoing: 18000 CC-ID: 4 (17.17.17.4) [rtrR]
Node[1]: 192.168.0.1 (rtrL1)
Role: Ingress
Hops:
Incoming: 18000 CC-ID: 5
Outgoing: 18000 CC-ID: 5 (12.12.12.2) [rtrM]
Node[2]: 192.168.0.4 (rtrR)
Role: Egress
Hops:
Incoming: 18000 CC-ID: 6
For dynamic SR multicast trees created for MVPN, the show command has filters to view root multicast
router and Tree-ID information. When the root router is specified, all multicast trees from that root are
displayed. When root and Tree-ID are specified, only the specified tree information is displayed.
Router# show pce lsp p2mp root ipv4 10.1.1.1 524289
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
499
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
Metric Type: TE
Transition count: 11
Uptime: 00:03:37 (since Mon May 11 12:53:33 PDT 2020)
Destinations: 10.1.1.3, 10.1.1.4, 10.1.1.5
Nodes:
Node[0]: 10.1.1.1 (root1)
Role: Ingress
Hops:
Incoming: 20000 CC-ID: 26
Outgoing: 20000 CC-ID: 26 (192.168.114.4) [mid-4]
Outgoing: 20000 CC-ID: 26 (192.168.112.2) [mid-2]
Node[1]: 10.1.1.4 (mid-4)
Role: Egress
Hops:
Incoming: 20000 CC-ID: 27
Node[2]: 10.1.1.2 (mid-2)
Role: Transit
Hops:
Incoming: 20000 CC-ID: 28
Outgoing: 20000 CC-ID: 28 (192.168.123.3) [leaf-3]
Outgoing: 20000 CC-ID: 28 (192.168.125.5) [leaf-5]
Node[3]: 10.1.1.3 (leaf-3)
Role: Egress
Hops:
Incoming: 20000 CC-ID: 29
Node[4]: 10.1.1.5 (leaf-5)
Role: Egress
Hops:
Incoming: 20000 CC-ID: 30
The following output shows that LFA FRR is enabled on the hop from rtrR to rtrM. Unlike typical multicast
replication where the address displayed is the remote address on the link to a downstream router, the IP address
192.168.0.3 (displayed with an exclamation mark) is the router-ID of the downstream router rtrM. The output
also displays the LFA FRR state for the multicast tree.
Router# show pce lsp p2mp
Tree: sr_p2mp_root_192.168.0.4_tree_id_524290
Label: 18000 Operational: up Admin: up
LFA FRR: Enabled
Metric Type: TE
Transition count: 1
Uptime: 3d19h (since Thu Feb 13 13:43:40 PST 2020)
Source: 192.168.0.4
Destinations: 192.168.0.1, 192.168.0.2
Nodes:
Node[0]: 192.168.0.3 (rtrM)
Role: Transit
Hops:
Incoming: 18000 CC-ID: 1
Outgoing: 18000 CC-ID: 1 (12.12.12.1) [rtrL1]
Outgoing: 18000 CC-ID: 1 (15.15.15.2) [rtrL2]
Node[1]: 192.168.0.4 (rtrR)
Role: Ingress
Hops:
Incoming: 18000 CC-ID: 2
Outgoing: 18000 CC-ID: 2 (192.168.0.3!) [rtrM]
Node[2]: 192.168.0.1 (rtrL1)
Role: Egress
Hops:
Incoming: 18000 CC-ID: 3
Node[3]: 192.168.0.2 (rtrL2)
Role: Egress
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
500
Segment Routing Tree Segment Identifier
Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA)
Hops:
Incoming: 18000 CC-ID: 4
For SR multicast policies originated locally on the router (root router of a dynamic MVPN multicast policy)
additional policy information is displayed. The information includes color, end points, and whether LFA FRR
is requested by the local application. When the SR-PCE server enables LFA FRR on a specific hop, the
outgoing information shows the address of the next router with an exclamation mark and None is displayed
for the outgoing interface.
For dynamic SR multicast trees created for MVPN, the show command has filters for displaying root multicast
router and Tree-ID information. When the root router is specified, all multicast trees for that root are displayed.
When root and Tree-ID are specified, only the specified tree information is displayed.
Router# show segment-routing traffic-eng p2mp policy root ipv4 1.1$
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
501
Segment Routing Tree Segment Identifier
Multicast VPN IPv6: Dynamic Tree-SID Multicast VPN IPv6
Multicast VPN: Release This feature allows Dynamic Tree Segment Identifier (Tree-SID)
Dynamic Tree-SID 7.10.1 deployment where IPv6 Multicast payload is used for optimally
Multicast VPN IPv6 transporting IP VPN multicast traffic over the provider network, using
SR-PCE as a controller. This implementation supports IPv6 only for
the Dynamic Tree-SID. Currently, the Static Tree-SID supports IPV4
payloads only, not the IPv6 payloads.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
502
Segment Routing Tree Segment Identifier
Multicast VPN IPv6: Dynamic Tree-SID Multicast VPN IPv6
To enable the Multicast VPN: Tree-SID multicast VPN feature, the following protocols and software applications
are used:
• OSPF/IS-IS - The underlay network is created with OSPF/IS-IS routing protocol, and reachability is
established across the network. See Configure Segment Routing for IS-IS Protocol or Configure Segment
Routing for OSPF Protocol chapter for details, within this Guide.
• BGP Multicast VPN (multicast VPN) – The PE routers (A, D, and E) are IP VPN endpoints for IP
Multicast traffic arriving at the provider network (at PE router A) and exiting the provider network (at
PE routers D and E). So, BGP multicast VPN is enabled on the PE routers. NSO is used to configure
BGP multicast VPN on the PE routers. See, Configure Segment Routing for BGP chapter for details,
within this guide
• BGP Auto-Discovery (AD) - To enable distributed VPN endpoint discovery and C-multicast flow
mapping and signaling, BGP AD function is configured on the PE routers. A BGP Auto-Discovery route
contains multicast router (loopback IP address) and tree identity (segment ID) information. It carries the
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
503
Segment Routing Tree Segment Identifier
Multicast VPN IPv6: Dynamic Tree-SID Multicast VPN IPv6
information in the Provider Multicast Service Interface (PMSI) Tunnel Attribute (PTA). See, Configure
Segment Routing for BGP chapter for details, within this guide
• C-multicast states are signaled using BGP. See, Configure Segment Routing for BGP chapter for details,
within this guide
• SR - To transport IP Multicast traffic between the VPN endpoints (PE routers A, D, and E), Provider (or
P-) tunnels are used. In a P-tunnel, the PE devices are the tunnel endpoints. P-tunnels can be generated
using different technologies (RSVP-TE, point-to-multipoint LSPs, PIM trees, mLDP point-to-multipoint
LSPs, and mLDP MP2MP LSPs). In this use case, Segment Routing (SR) is used for its benefits that
were noted earlier.
• With SR and SR-PCE, a Tree-SID point-to-multipoint (P2MP) segment is used to create P-Tunnels for
multicast VPN. You can specify SR policy optimization objectives (such as metrics) and constraints
(such as affinity) in an SR policy and send it to the SR-PCE controller, so that it can dynamically create
SR multicast trees for traffic flow.
• SR-PCE - This is a controller which, based on the provided SR policy information, computes optimal
paths for a multicast tree, and deploys the tree forwarding state on the multicast routers. When a topology
change occurs, SR-PCE automatically computes a new, optimal multicast tree, and deploys the new tree
forwarding state on the multicast routers.
•
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
504
Segment Routing Tree Segment Identifier
Multicast VPN IPv6: Dynamic Tree-SID Multicast VPN IPv6
4. When the headend router SR policy is created on A, and PCEP configurations are enabled on the SR-PCE
server and all multicast routers, SR-PCE receives the SR policy and leaf router identity information from
A.
5. Based on the policy information it receives, including traffic engineering objectives and constraints,
SR-PCE builds multicast distribution trees in the underlay for efficient VPN traffic delivery.
6. SR-PCE assigns an SID for the SR multicast tree policy, and deploys the multicast tree forwarding state
on the multicast routers.
7. When IP Multicast traffic is sent from VPN1-SiteA to PE router A, it steers it into the SR policy, and
sends it toward D and E, which forward it to multicast traffic receivers in the sites VPN1-SiteB and
VPN1-SiteC.
8. When a leaf or multicast router is added or removed, PE router A updates the SR multicast policy and
sends it to SR-PCE. SR-PCE computes new multicast routes, and deploys the multicast tree forwarding
state information on the multicast routers.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
505
Segment Routing Tree Segment Identifier
Multicast VPN IPv6: Dynamic Tree-SID Multicast VPN IPv6
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
506
Segment Routing Tree Segment Identifier
Multicast VPN IPv6: Dynamic Tree-SID Multicast VPN IPv6
1. A assigns Tree-ID 10 and invokes a Create an SR multicast tree request by sending the multicast
router and tree ID information (A, 10) toward SR-PCE.
2. A announces BGP AD Inclusive PMSI (I-PMSI) route with the PTA (A, 10). Inclusive PMSI - Traffic
that is multicast by a PE router on an I-PMSI is received by all other PEs in the multicast VPN.
I-PMSIs are generated by Inclusive P-tunnels.
3. A discovers VPN endpoints D and E from their BGP AD Type I-PMSI route messages.
4. A invokes an Add SR multicast leaf router request (for D and E) to SR-PCE.
5. SR-PCE computes and generates the multicast tree forwarding state information on all the routers
that are part of the tree.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
507
Segment Routing Tree Segment Identifier
Multicast VPN IPv6: Dynamic Tree-SID Multicast VPN IPv6
1. A assigns Tree-ID 20 and invokes a Create an SR multicast tree request by sending the multicast
router and tree ID information (A, 20) toward SR-PCE.
2. A announces BGP AD Selective PMSI (or S-PMSI) route with PTA (A, 20). A sets the
leaf-info-required to discover endpoint interest set.
Selective PMSI - Traffic multicast by a PE on an S-PMSI is received by some PEs in the multicast
VPN. S-PMSIs are generated by Selective P-tunnels.
3. E has a receiver behind it, and announces a BGP-AD leaf route toward A. A discovers service endpoint
E for the on-demand tree.
4. A invokes an Add SR multicast leaf router request (for E) to SR-PCE.
5. SR-PCE computes and generates the multicast tree information for all the routers that are part of the
tree.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
508
Segment Routing Tree Segment Identifier
Prerequisites for Tree-SID mVPN IPv6
1. A decides to optimize a flow and assigns Tree-ID 30 and invokes a Create an SR multicast tree
request by sending the multicast router and tree ID information (A, 30) toward SR-PCE.
2. A announces BGP AD I-PMSI route with PTA (A, 30). A sets the leaf-info-required to discover
endpoint interest set.
3. D has a receiver behind it, and announces a BGP-AD leaf route toward A. A discovers service
endpoint D for optimized flow.
4. A invokes an Add SR multicast leaf router request (for D) to SR-PCE.
5. SR-PCE computes and generates the multicast tree information for all the routers that are part of the
tree.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
509
Segment Routing Tree Segment Identifier
Restrictions to Tree-SID mVPN IPv6
An affinity (or relationship) is created between the SR policy path and the link color so that SR-TE
computes a path that includes or excludes links, as specified. The headend router automatically
follows the actions that are defined in the ODN template (for color 10) upon the arrival of VPN
routes with a BGP color extended community that matches color 10.
Router(config)# segment-routing traffic-engineering
Router(config-sr-te)# on-demand color 10 dynamic
Router(config-sr-te-color-dyn)# affinity include-all name red
Router(config-sr-te-color-dyn)# affinity include-any name blue
Router(config-sr-te-color-dyn)# affinity exclude-any name green
Router(config-sr-te-color-dyn)# metric type te
Router(config-sr-te-color-dyn)# commit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
510
Segment Routing Tree Segment Identifier
Configure Tree-SID mVPN IPv6
The SR policy configuration on the headend router A will be sent to the SR-PCE server, after a
connection is established between A and SR-PCE.
• • Configure FRR
The following configurations enable FRR for all SR multicast (point-to-multipoint) trees, including
dynamic and static implementations.
The lfa keyword enables LFA FRR on the PCE server.
Router(config)# pce segment-routing traffic-eng p2mp fast-reroute lfa
Router(config)# commit
Alternatively, you can configure FRR for each individual tree using the following configuration.
The lfa keyword under a specific multicast policy (tree1 in this example) enables LFA FRR function
for the specified SR multicast point-to-multipoint tree.
For dynamic trees, L-flag in label-switched path Attributes, a PCEP object controls FRR on a tree.
Router(config)# pce
Router(config-pce)# address ipv6 192.168.0.5
Router(config-pce)# segment-routing traffic-eng p2mp policy tree1 fast-reroute lfa
Router(config-pce)# commit
The frr-node-set from ipv6 address and frr-node-set to ipv6 address commands specify the from
and to paths on a multicast router that requires FRR protection. In this configuration, the PCE server
is configured to manage the FRR function for traffic from 192.168.0.3 sent toward 192.168.0.4 and
192.168.0.5.
Router(config)# pce
Router(config-pce)# address ipv6 192.168.0.5
Router(config-pce)# segment-routing traffic-eng p2mp frr-node-set from ipv6
192.168.0.3
Router(config-pce)# commit
Router(config)# pce
Router(config-pce)# address ipv6 192.168.0.5
Router(config-pce)# segment-routing traffic-eng p2mp frr-node-set to ipv6 192.168.0.4
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
511
Segment Routing Tree Segment Identifier
Configure Tree-SID mVPN IPv6
• • Disable ECMP load splitting - To disable ECMP load splitting of different trees on the SR-PCE
server, configure the multipath-disable command.
Router(config)# pce segment-routing traffic-eng p2mp multipath-disable
Router(config)# commit
• Multicast Routing Configuration On PE Routers - The following multicast VPN configurations are
required for VPN endpoints, the 3 PE routers.
• Configure Default MDT SR point-to-multipoint multicast VPN Profile - In this configuration,
an MDT profile of the type default is created, and the SR multicast policy with color 10 will be used
to send Cisco IOS IP Multicast traffic, as per the constraints and optimizations of the policy, through
the multicast tree.
You can also specify the FRR LFA function with the mdt default segment-routing mpls
fast-reroute lfa command.
Router(config)# multicast-routing vrf cust1
Router(config-mcast-cust1)# address-family ipv6
Router(config-mcast-cust1-ipv6)# mdt default segment-routing mpls color 10
Router(config-mcast-cust1-ipv6)# commit
The following Data multicast VPN configuration is required at the Ingress PE (router A) where the
multicast flows need to be steered onto the data MDT for SR multicast traffic flow.
Note - Data MDT can be configured for Default and Partitioned profiles.
Configure Data MDT for SR point-to-multipoint multicast VPN - In this configuration, an
MDT profile of the type data is created, and the SR multicast policy with color 10 will be used to
send Cisco IOS IP Multicast traffic, as per the constraints and optimizations of the policy, through
the multicast tree.
• You can enable the FRR LFA function with the mdt data segment-routing mpls fast-reroute
lfa command. This enables LFA FRR for SR multicast trees that are created for all data MDT
profiles.
• As an alternative to the color keyword, you can specify a route policy in the route-policy
command, and define the route policy separately (as mentioned in the next configuration).
• The threshold command specifies the threshold above which a multicast flow is switched onto
the data MDT. The immediate-switch keyword enables an immediate switch of a multicast
flow to the data MDT, without waiting for threshold limit to be crossed.
• The customer-route-acl keyword specifies an access control list to enable specific multicast
flows to be put on to the data MDT.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
512
Segment Routing Tree Segment Identifier
Verify Tree-SID mVPN IPv6
• color and fast-reroute lfa keywords are mutually exclusive with the route-policy configuration.
The objective is to apply constraints (through color) or FRR (through LFA protection) to either
all data MDTs, or apply them selectively per data MDT, using the set on-demand-color and
set fast-reroute lfa options in the route policy (configured in the mdt data configuration).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
513
Segment Routing Tree Segment Identifier
Verify Tree-SID mVPN IPv6
• View Partitioned MDT Configuration - This command displays SR multicast tree information, including
the MDT details (of partitioned type, and so on), and customer virtual routing and forwarding information
(route target, route distinguisher, and so on).
Router# show mvpn vrf vpn1 context
• View Partitioned MDT Ingress PE Configuration - This command displays SR multicast tree
information on the PE router that receives the multicast traffic on the provider network. The information
includes PE router details, MDT details, Tree-SID details, and the specified customer virtual routing and
forwarding information.
Router# show mvpn vrf vpn1 pe
VRF : vpn1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
514
Segment Routing Tree Segment Identifier
Verify Tree-SID mVPN IPv6
• View Partitioned MDT Egress PE Configuration - This command displays SR multicast tree information
on the multicast VPN egress PE router that sends multicast traffic from the provider network toward
multicast receivers in the destination sites. The information includes PE router, Tree-SID, MDT, and the
specified customer virtual routing and forwarding details.
Router# show mvpn vrf vpn1 pe
• View Data MDT Information - The commands in this section display SR multicast tree information
for data MDTs. The information includes cache, router-local, and remote MDT information.
• View Data MDT Cache Information
Router# show pim vrf vpn1 mdt cache
Core Source Cust (Source, Group) Core Data Expires
192.168.0.3 (10.3.233.1, 203.0.0.1) [tree-id 524292] never
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
515
Segment Routing Tree Segment Identifier
Verify Tree-SID mVPN IPv6
• View MRIB MPLS Forwarding Information - This command displays labels that are used for
transporting Cisco IOS IP Multicast traffic, on a specified router.
Router# show mrib mpls forwarding
Tree: sr_p2mp_root_192.168.0.1_tree_id_524290
Label: 18000 Operational: up Admin: up
Metric Type: TE
Transition count: 3
Uptime: 00:00:03 (since Fri Jan 24 14:57:51 PST 2020)
Source: 192.168.0.1
Destinations: 192.168.0.4
Nodes:
Node[0]: 192.168.0.2 (rtrM)
Role: Transit
Hops:
Incoming: 18000 CC-ID: 4
Outgoing: 18000 CC-ID: 4 (17.17.17.4) [rtrR]
Node[1]: 192.168.0.1 (rtrL1)
Role: Ingress
Hops:
Incoming: 18000 CC-ID: 5
Outgoing: 18000 CC-ID: 5 (12.12.12.2) [rtrM]
Node[2]: 192.168.0.4 (rtrR)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
516
Segment Routing Tree Segment Identifier
Verify Tree-SID mVPN IPv6
Role: Egress
Hops:
Incoming: 18000 CC-ID: 6
For dynamic SR multicast trees created for multicast VPN, the show command has filters to view
root multicast router and Tree-ID information. When the root router is specified, all multicast trees
from that root are displayed. When root and Tree-ID are specified, only the specified tree information
is displayed.
Router# show pce lsp p2mp root ipv6 10.1.1.1 524289
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
517
Segment Routing Tree Segment Identifier
Multicast: Cisco Nonstop Forwarding for Tree-SID
Endpoints:
192.168.0.1, 192.168.0.2
For SR multicast policies originated locally on the router (root router of a dynamic multicast VPN
multicast policy) additional policy information is displayed.
For dynamic SR multicast trees created for multicast VPN, the show command has filters for displaying
root multicast router and Tree-ID information. When the root router is specified, all multicast trees for
that root are displayed. When root and Tree-ID are specified, only the specified tree information is
displayed.
Router# show segment-routing traffic-eng p2mp policy root ipv6 1.1$
Multicast: Cisco Release Starting from this release, Multicast Nonstop Forwarding supports
Nonstop Forwarding 7.10.1 Tree-SID (Tree Segment Identifier). This ensures that traffic
for Tree-SID forwarding continues without interruptions whenever the active RSP
fails over to the standby RSP.
This feature prevents hardware or software failures on the control
plane from disrupting the forwarding of existing packet flows through
the router for Tree-SID. Thus, ensuring improved network availability,
network stability, preventing routing flaps, and no loss of user sessions
while the routing protocol information is being restored.
The feature modifies the show mrib nsf private command.
Note This section captures only the Cisco Nonstop Forwarding feature in relation with Tree-SID. For more
information on the Cisco Nonstop Forwarding feature, see Multicast Nonstop Forwarding.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
518
Segment Routing Tree Segment Identifier
Multicast: Cisco Nonstop Forwarding for Tree-SID
Multicast now supports hitless Route Processor Fail Over (RPFO). During RPFO, the software deletes IP
routes from the Static Tree-SID profile in the headend router. The Dynamic Tree-SID does not have this issue,
because in this case, the BGP advertises the states that supports Nonstop Routing (NSR). To overcome this
problem for static Tree-SID, there are checkpoints to check the feature in Protocol Independent Multicast
(PIM). On switchover, the checkpoint reads to check if the feature is there or not and push Protocol Independent
Multicast (PIM) to Cisco Nonstop Forwarding state.
Verification Steps
The show mrib nsf private command is enhanced to display the XTC info as well.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
519
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
High Availability Support Release 7.8.1 We have introduced more resilience for building
for Dynamic Tree-SID multicast VPN (mVPN) dynamic tree-SIDs by
(Multicast VPN) providing High Availability (HA) for the Segment
Routing Path Computation Element (SR-PCE). This
HA is made possible by adding another SR-PCE to
the network.
As a result, there’s a noncompute or standby PCE for
the mVPN dynamic policies. The root Path
Computation Element Client (PCC) elects the active
SR-PCE. If an active PCE failure occurs, the root PCC
delegates the compute role for the mVPN dynamic
Tree-SID to the standby SR-PCE.
Segment Routing Point-to-Multipoint policy (SR-P2MP) in Tree-SID is the solution for carrying multicast
traffic in the Segment Routing Domain but it works in the presence of just one SR-PCE in the network.
However, the SR-PCE HA feature supports the mVPN dynamic Tree-SID with more than one SR-PCE to
manage the network.
For example, when PCE1 is unavailable due to a system failure or reboot, PCE2 uses the PCReport packet
information sent by PCC and assumes the role of PCE1 ensuring the following:
• Avoid failure of the cluster with no or minimal data loss.
• PCE2 is a hot-standby PCE that detects the failure as they occur ensuring high availability of the cluster
always.
• Recovery of the network occurs with minimal or with no data loss.
Network Handling
Understanding how each PCE operates in different states helps in configuring the SR-PCE HA and ensuring
steady operability without any data loss. Following sections describe each state:
• Steady State
In steady state, the following events occur:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
520
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
5. PCE1 forwards all the reports with D-bit set from PCCs to PCE2.
• PCE Failure
When PCE fails, the following events occur:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
521
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
1. PCE1 fails.
2. Root re-delegate to PCE2 immediately and sends the PCReport with D-bit Set to 1
• With the PCC-centric approach, Mid and Leaf nodes PCCs also re-delegate to PCE2 immediately
and sends the PCReport with D-bit set to 1
3. PCE2 becomes the Compute PCE, recomputes Tree-SID and sends the update to PCCs.
• PCE Restore
Image
When PCE restores, the following events occur:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
522
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
1. PCE1 is restored.
2. Root redelegates to PCE1 after the delegation timer expires:
• Sends the PCReport to PCE1 with D-bit set to 1
• Sends the PCReport to PCE2 with D-bit set to 0
3. With the PCC-Centric approach, Mid and Leaf nodes PCCs also re-delegate to PCE1 after the
Delegation timer expires.
• Sends the PCReport to PCE2 with D-bit set to 0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
523
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
1. When the backup PCE fails or is down, it is a "No-Operation" event from the Tree's point of view.
2. When the backup PCE is back up then all the PCCs resend the PCReports with D-bit set to 0.
3. PCE1 syncs all the delegated reports and locally computed Tree states with PCE2.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
524
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
1. PCEP session from the Root to PCE1 is down but the Mid and Leaf nodes continue to have the
session with PCE1.
2. Root redelegates to PCE2 immediately and sends the PCReport with D-bit set to 1.
3. PCE2 takes the responsibility of the compute PCE, recomputes Tree, and sends the PCUpdate.
Note Mid or leaf nodes are still delegated to PCE1, any updates to these nodes are done
through PCE1.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
525
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
3. PCE1 reclaims the responsibility of the compute PCE, recomputes Tree, and sends the PCUpdate.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
526
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
1. PCEP session from Mid to PCE1 is down but the Root and Leaf node still has session to PCE1
• PCE1 is still responsible for Tree compute.
• PCE1 holds LSP state for Mid for sometime to allow redelegation and Report from PCE2 (60
seconds Tree-SID Peer Down Timer on PCE).
2. With PCC-Centric approach, Mid redelegates immediately to PCE2 and sends a PCReport with D-bit
set to 1.
3. PCE2 forwards PCReport to PCE1.
4. PCE1 sends PCUpdate to PCE2 for Mid immediately.
5. PCE2 always forwards the PCUpdate to Mid (PCC) if the PCE2 still has delegation of LSP from the
PCC.
Note A node, which does not have PCEP session is considered for P2PM path compute
for new Tree.
In this example, a new Tree from the Root to the same set of Leaf nodes cannot
be brought up because PCE1 does not have a PCEP session to the Mid node.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
527
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
2. With PCC-centric approach, Mid node redelegates to PCE1 after the delegation timer expires.
• Sends a PCReport with D-bit set to 1.
Note Even after the session between PCE1 and Mid node is restored, PCE1 keeps
pushing updates to PCE2 until the "interest" from LSP is withdrawn. The PCE
to which the LSP is delegated push the update down to PCC.
It is possible that both OCEs have the D-bit set for the LSP momentarily. In such
a case, both PCEs will push down the Updates. The PCC accepts the update from
the PCE to which it has delegated to.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
528
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability (HA) Support for Dynamic Tree-SID (mVPN)
When there is a PCC Initiated - Existing Tree Change with Split PCEP Session, the following events
occur:
Root and Leaf node have PCEP session with PCE1 and the Mid-1 node has PCEP session restored and
hence delegated to PCE2. The new mid node (Mid2) is introduced with PCEP sessions to both PCEs.
1. Root updates Tree to add Leaf1
• Sends PCReport to PCE1 with D-bitset
• Option 2 (Preferred): PCE1 will consider reachability through Mid-1 node because it knows
Mid-1 node is part of the Tree and delegated to PCE2 (Over State-Sync channel)
• Sends PCUpdate to Mid-1 node through PCE2
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
529
Segment Routing Tree Segment Identifier
Limitations and Guidelines
Root, Mid-2, and Leaf nodes have PCEP session with PCE1 and the Mid-1 node has PCEP session UP
with PCE2.
1. Root creates a new Tree to Leaf1 and Leaf2
• Sends PCReport to PCE1 with D-bit set
Note Con: Another (Existing) tree to the same Endpoints may be programmed through
Mid-1 node.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
530
Segment Routing Tree Segment Identifier
Configuration Steps
Configuration Steps
Captured below are the configuration steps required to set up the TreeSID PCE HA feature.
1. Configuration on forwarding device
This section guides you to configure the forwarding device.
a. PCE configuration on a PCC
The following configuration is required on the PCC routers to configure the PCE’s that will provide
the redundancy.
Router(config)# segment-routing
Router(config-sr)# traffic-eng
Router(config-sr-te)# pcc
Router(config-pcc)# pce address ipv4 2.2.2.1
Router(config-pcc)# precedence 200
Router(config-pcc)# pce-group pce-ha-group
Router(config-sr-te-pce)# pce address ipv4 4.4.4.2
Router(config-pce)# precedence 0
Router(config-pce)# pce-group pce-ha-group
Note To elect a Compute PCE, you must set the precedence. In the example above there are 2 PCEs configured
with 200 and 0. The PCE with a lower precedence takes up the compute role.
• Associating a PCE group with on-demand color: With a PCE now associated with a PCE
group, the PCE group can be associated with an on-demand color (which you later associate with
a P2MP policy) using the following configuration.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
531
Segment Routing Tree Segment Identifier
Configuration Steps
Note Note: While the same PCE group can be used across many on-demand colors,
there can only be one PCE group associated with one on-demand color
configuration.
• Associating a dynamic MVPN policy with color: A dynamic SR P2MP policy is associated
with an on-demand color, which provides an abstraction to the constraints or metrics that the
policy must satisfy. The same structure will be used to associate a PCE group to the dynamic SR
P2MP policy.
Default TreeSID
Router(config)# vrf vpn1
Router(config-vrf)# address-family ipv4
Router(config-vrf-af)# bgp auto-discovery segment-routing
Router(config-vrf-af)# mdt default segment-routing mpls color 10
Router(config-vrf-af)# mdt data segment-routing mpls 10 route-policy treesid
threshold 0
Partitioned TreeSID
Router(config)# vrf vpn2
Router(config-vrf)# address-family ipv4
Router(config-vrf-af)# bgp auto-discovery segment-routing
Router(config-vrf-af)# mdt partitioned segment-routing mpls color 10
2. Configuration on SR-PCE
Note PCE state-sync configuration: The following configuration must be done on all PCEs participating in PCE
state-sync. Configuring it on only one PCE will only enable that PCE to sync state uni-directionally.
Running Configuration
Run the show command to review the running configuration:
pce
====
address ipv4 192.168.0.5
api
user admin
password encrypted 094D4A04100B464058
!
authentication basic
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
532
Segment Routing Tree Segment Identifier
Configuration Steps
!
state-sync ipv4 192.168.0.6
segment-routing
traffic-eng
p2mp
timers reoptimization 60
frr-node-set from
ipv4 192.168.0.2
!
frr-node-set to
ipv4 192.168.0.1
ipv4 192.168.0.3
!
label-range min 18000 max 19000
multipath-disable
!
affinity bit-map
red 1
blue 3
black 31
green 2
!
!
!
!
PCC
====
segment-routing
traffic-eng
pcc
pce address ipv4 192.168.0.5
!
pce address ipv4 192.168.0.6
!
redundancy pcc-centric
timers initiated state 60
timers initiated orphan 30
!
!
!
Verification
Run the following show commands to verify if the PCE compute role is set:
• This is an example of the command run on a Compute SR-PCE:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
533
Segment Routing Tree Segment Identifier
Configuration Steps
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
534
Segment Routing Tree Segment Identifier
Configuration Steps
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
535
Segment Routing Tree Segment Identifier
Configuration Steps
• This is an example of the show command to verify the policy information in PCC:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
536
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability Support for Static Tree-SID
For carrying multicast traffic in the Segment Routing domain, the current available solution is the Segment
Routing Point-to-Multipoint policy Tree (SR-P2MP) also known as the Tree-SID. In the Tree-SID
implementation, one type is the Static Tree-SID and the other is the Dynamic Tree-SID, which is explained
in the previous section.
The Tree-SID categorization is based on the way the tree root, mid, and the leaf switches are learnt in the
network. In the Static Tree-SID, the trees are created by the network operator. The network operator statically
defines the SR-P2MP policy (root and the leaf set) on the Path Computation Element (PCE). The SID value
is also statically defined by the network operator.
The SR-PCE HA support for Static Tree-SID feature enables multiple SR-PCE instances to work together to
provide reliable path computation for the network. In case of a disruption or failure of the primary SR-PCE,
it provides a failover mechanism, ensuring that the multicast traffic is not disrupted.
This feature is useful in large and complex networks where reliable path computation function is critical.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
537
Segment Routing Tree Segment Identifier
Multicast: SR-PCE High Availability Support for Static Tree-SID
In this topology, all nodes participating in the SR-P2MP forwarding have a PCEP session with all SR-PCEs
responsible for managing the tree. Additionally, the SR-PCEs also establish and maintain a PCEP session
among themselves. This PCEP session between the PCEs is referred to as the PCE state-sync channel.
For REST initiated TreeSID, when a Crosswork Optimization Engine (COE) client sends a policy creation
request, SR-PCE which receives the request acts as a compute PCE, creates a tree, and synchronizes the
request with the peer PCE through the PCEP-sync channel.
The SR-PCEs should have a consistent view of the topology to allow for hitless switchover in the event of
PCEP session failures between the PCC and the SR-PCEs.
For client-initiated TreeSID, the tree is created after receiving a request from Client at the SR-PCE. This
install request contains information about the root, interested endpoints, and the constraints to be satisfied for
the tree.
When a request is received on SR-PCE, that PCE is set as a compute PCE and the create request is forwarded
to the peer PCE through the PCEP sync channel.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
538
Segment Routing Tree Segment Identifier
Network Handling
You should configure the state-sync channel on all SR-PCEs participating in PCE state-sync. TreeSID PCE
HA is supported only over IPv4 PCEP state-sync sessions.
When the state-sync session is configured, the SR-PCE establishes a PCEP session with the peer mentioned
in the configuration and performs an initial sync for SR-P2MP tree state. This process involves synchronizing
all delegated SR-P2MP LSPs with the peer PCE.
PCReport State-Sync
A delegated PCReport shows that the LSP is delegated to a particular SR-PCE. For TreeSID PCE-HA, all
such delegated reports are forwarded over the state-sync channel. The PCReport is forwarded to let the
state-sync SR-PCEs know which SR-PCE a PCC has delegated the LSP to.
Network Handling
Understanding how each PCE operates in different states helps in configuring the SR-PCE HA and ensuring
steady operability without any data loss. Following sections describe each state:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
539
Segment Routing Tree Segment Identifier
Network Handling
Steady State
In Steady state, the following events occur:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
540
Segment Routing Tree Segment Identifier
Network Handling
• This information also helps in deciding which is the PCE a Tree Update/Delete request must be sent
to.
PCE Failure
When PCE fails, the following events occur:
1. PCE1 fails.
2. All Tree nodes re-delegate to PCE2 immediately and sends PCReport with the D-bit set to 1.
3. PCE2 becomes the primary Compute PCE when it receives the re-delegated LSP from the Root, recomputes
Tree-SID, and sends the update to PCCs.
PCE Restore
When PCE restores, the following events occur:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
541
Segment Routing Tree Segment Identifier
Network Handling
1. PCE1 is restored.
PCE1 is the 'creator' and hence the preferred PCE.
2. All Tree nodes redelegate to PCE1 after the delegation timer expires.
• Sends PCReport with D-bit set to 1
• Sends PCReport to PCE2 with D-bit set to 0
3. PCE1 becomes the primary Compute PCE when it receives the re-delegated LSP from the Root, recomputes
Tree-SID, and sends update to PCCs.
Note Different PCCs can be delegated to different PCEs for a brief period. Any tree-update during this period is
pushed to the sibling PCE over the state-sync channel to be forwarded to the delegated PCCs.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
542
Segment Routing Tree Segment Identifier
Network Handling
Note Updates to the Mid and Leaf PCCs are sent through the sibling PCE.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
543
Segment Routing Tree Segment Identifier
Network Handling
PCE1 becomes the primary-compute PCE, recomputes Tree-SID, and sends the PCUpdate.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
544
Segment Routing Tree Segment Identifier
Network Handling
Note Need the ability to send PCInitiate with R-flag to sibling PCE to remove state from a PCC.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
545
Segment Routing Tree Segment Identifier
Limitations and Guidelines
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
546
Segment Routing Tree Segment Identifier
Configuration on Forwarding Router
Note To choose a Compute PCE, you must set the precedence. In this example, two PCEs are configured with 200
and 0. The PCE with a lower precedence picks the compute role.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
547
Segment Routing Tree Segment Identifier
Verifying the PCE Configurations
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
548
Segment Routing Tree Segment Identifier
Verifying the PCE Configurations
On a non-compute SR-PCE
The following is an example of the command run on a non-compute SR-PCE:
Tree: sr_p2mp_root_192.168.0.4_tree_id_524289, Root: 192.168.0.4 ID: 524289
PCC: 192.168.0.4
Label: 19000
Operational: standby Admin: up Compute: No
Local LFA FRR: Enabled
Metric Type: IGP
Transition count: 0
Destinations: 192.168.0.1, 192.168.0.3
Nodes:
Node[0]: 192.168.0.4+ (rtrR)
Delegation: PCE 192.168.0.5
PLSP-ID: 1
Role: None
State Changes: 0x3 (New Node,New Hops)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
549
Segment Routing Tree Segment Identifier
Verifying the PCE Configurations
Hops:
Incoming: 19000 CC-ID: 2
Outgoing: 19000 CC-ID: 2 (16.16.16.2)
Node[1]: 192.168.0.2+ (rtrM)
Delegation: PCE 192.168.0.5
PLSP-ID: 1
Role: None
State Changes: 0x3 (New Node,New Hops)
Hops:
Incoming: 19000 CC-ID: 1
Outgoing: 19000 CC-ID: 1 (13.13.13.3)
Outgoing: 19000 CC-ID: 1 (10.10.10.1)
Node[2]: 192.168.0.3+ (rtrL2)
Delegation: PCE 192.168.0.5
PLSP-ID: 1
Role: None
State Changes: 0x3 (New Node,New Hops)
Hops:
Incoming: 19000 CC-ID: 4
Node[3]: 192.168.0.1+ (rtrL1)
Delegation: PCE 192.168.0.5
PLSP-ID: 2
Role: None
State Changes: 0x3 (New Node,New Hops)
Hops:
Incoming: 19000 CC-ID: 5
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
550
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Flexible Algorithm Release 7.11.1 This feature introduces support for mVPN/Dynamic
Constraint for Tree-SID TreeSID with Flexible Algorithm constraint. It allows
Path Computation the SR-PCE to compute a P2MP tree that adheres to
the definition and topology of a user-defined Flex
Algo.
This feature introduces these changes:
CLI
• The sid-algorithm algo keyword is introduced
in the pce segment-routing traffic-eng p2mp
policy command.
• The output of the show pce lsp p2mp command
is modified to display Flex-Algo associated with
a Tree, the Metric Type from Flex-Algo
definition at Root, and the hop node-SIDs.
• The output of the show segment-routing
traffic-eng p2mp policy command is modified
to display Flex-Algo associated with Tree SID
state, and the hop node-SIDs.
Segment Routing Flexible Algorithm is a traffic engineering solution part of the SR architecture. It allows
for user-defined algorithms where the IGP computes paths for unicast traffic based on a user-defined
combination of metric type and constraint (FA definition).
Note For more info, refer to Enabling Segment Routing Flexible Algorithm, on page 583.
The Flexible Algorithm Constraint for Tree-SID Path Computation feature expands the traffic engineering
options for multicast transport. It allows the SR-PCE to compute a P2MP tree that adheres to the definition
and topology of a user-defined Flex Algo.
Some use-cases include:
• Disjoint Trees for Live-Live Multicast scenarios
• Trees with affinity inclusion/exclusion constraints
• Delay-optimized trees
In addition, a tree based on a Flex Algo constraint provides link-level fast re-route (FRR), guaranteeing that
the primary and backup paths chosen by a node along the tree follow the same traffic engineering constraints
specified by the Flex Algo. The signaling includes Flex-Algo information to enable Fast Re-Route (FRR).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
551
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
The SR-PCE uses the Central Controller Instructions (CCI) object format as defined in RFC9050 in order to
signal both the link/node address as well as the Flex Algo node-SID. This allows a node in the tree to program
as a backup the backup path associated with the Flex Algo node-SID.
SR-PCE computes the P2MP tree with an associated Flex-Algo constraint as described below:
• Flex-Algo Definition (FAD) – SR-PCE uses the algorithm's FAD to determine the optimization metric
type and constraint used in tree path computation.
• Flex Algo Topology – SR-PCE only considers nodes that advertise the Flex Algo SID for the desired
algorithm in tree path computation.
• A node must be configured with a Flex-Algo prefix SID for it to be considered for Flex-Algo
Tree-SID computation.
1. Considering an mVPN scenario, a Root PE discovers the Leaf PEs using BGP mVPN autodiscovery
procedures.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
552
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
2. The root PE signals via PCEP to the SR-PCE a request to create an SR P2MP policy with a Flex-Algo
constraint reaching the Leaf nodes.
3. The SR-PCE computes the tree based on Flex-Algo definition (optimization objective and constraints).
4. The SR-PCE allocates a Tree SID MPLS label for the policy.
5. The SR-PCE signals the forwarding state to all routers in the Tree using PCEP.
Figure 43: SR-PCE Computes and Signals Tree SID
6. Routers in the tree install the corresponding forwarding entries. The figure below depicts two trees rooted
at nodes R1 and B1 with leafs [R5, R6] and [B5, B6] respectively.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
553
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
7. Multicast traffic from the source is encapsulated with the Tree SID label at the Root node.
The transit nodes forward traffic based on the Tree SID label.
The leaf nodes decapsulate and forward multicast traffic to the receivers.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
554
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Figure 45: Multicast Traffic Forwarded Over the Tree to Multicast Receivers
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
555
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
• When a Flex-Algo constraint is associated with a Tree-SID, then any metric type/affinity constraint
specified outside of the Flex Algo are ignored.
• Inter-AS Tree SID is not supported.
Note For more info, refer to Multicast VPN: Dynamic Tree-SID MVPN (with TI-LFA).
2. Configure default MDT with Tree SID with Flexible Algorithm Constraint MVPN profile:
Router(config)# multicast-routing
Router(config-mcast)# vrf red
Router(config-mcast-red)# address-family ipv4
Router(config-mcast-red-ipv4)# mdt default segment-routing mpls color 128
3. Configure partitioned MDT with Tree SID with Flexible Algorithm Constraint MVPN profile:
Router(config)# multicast-routing
Router(config-mcast)# vrf red
Router(config-mcast-red)# address-family ipv4
Router(config-mcast-red-ipv4)# mdt partitioned segment-routing mpls color 128
4. Configure data MDT with Tree SID with Flexible Algorithm Constraint:
Router(config)# multicast-routing
Router(config-mcast)# vrf red
Router(config-mcast-red)# address-family ipv4
Router(config-mcast-red-ipv4)# mdt data segment-routing mpls 10 color 128
5. Configure Route Policy for Data MDT with Tree SID with flexible algorithm constraint:
Router# configure
Router(config)# multicast-routing
Router(config-mcast)# vrf red
Router(config-mcast-red)# address-family ipv4
Router(config-mcast-red-ipv4)# mdt data segment-routing mpls 10 color 128 route-policy
sample-rpl
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
556
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Caution A static Tree SID may be instantiated via CLI at the SR-PCE. However, this is
not the recommended deployment model. Instead, configure the static Tree SID
instantiated via CoE or dynamic Tree SID. These deployment models support
SR-PCE High Availability.
Configuration: mVPN and Dynamic Tree SID with Flex Algo Constraint Use Case
The example below shows the configurations for each node in the following topology:
• Node 6 – SR-PCE
• PE node 1 – Root node
• P nodes 2 and 3 – Transit nodes
• PE nodes 4 and 5 – Leaf nodes
• Node 9 – BGP route reflector
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
557
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Nodes are configured with TI-LFA. Root and Leaf nodes are also configured with Flex Algo with metric type
delay.
SR-PCE
ipv4 access-list acl-allow-pcep
10 permit ipv4 host 1.1.1.101 any
20 permit ipv4 host 1.1.1.102 any
30 permit ipv4 host 1.1.1.103 any
40 permit ipv4 host 1.1.1.104 any
50 permit ipv4 host 1.1.1.105 any
!
pce
address ipv4 1.1.1.106
peer-filter ipv4 access-list acl-allow-pcep
segment-routing
traffic-eng
p2mp
label-range min 15400 max 15600
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
558
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
PE Node 1 - Root
vrf sample-mvpn1
address-family ipv4 unicast
import route-target
100:10000
!
export route-target
100:10000
!
!
!
interface Loopback200
vrf sample-mvpn1
ipv4 address 3.3.3.1 255.255.255.255
!
!
route-policy TREESID-CORE
set core-tree sr-p2mp
end-policy
!
router isis 100
net 49.0000.0000.0000.0001.00
address-family ipv4 unicast
metric-style wide
router-id Loopback0
segment-routing mpls
!
flex-algo 128
metric-type delay
advertise-definition
!
interface Loopback0
passive
address-family ipv4 unicast
prefix-sid absolute 100101
prefix-sid algorithm 128 absolute 128101
!
!
interface TenGigE0/0/0/0
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
interface TenGigE0/0/0/1
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
!
router bgp 64000
bgp router-id 1.1.1.1
address-family vpnv4 unicast
!
address-family ipv4 mvpn
!
address-family l2vpn evpn
!
address-family vpnv4 multicast
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
559
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
neighbor-group iBGP-v4_neigh-vpn
remote-as 64000
update-source Loopback0
address-family vpnv4 unicast
!
address-family ipv4 mvpn
!
address-family l2vpn evpn
!
address-family vpnv4 multicast
!
!
neighbor 1.1.1.109
use neighbor-group iBGP-v4_neigh-vpn
!
vrf sample-mvpn1
rd auto
address-family ipv4 unicast
redistribute connected
!
address-family ipv4 mvpn
!
!
!
multicast-routing
address-family ipv4
interface Loopback0
enable
!
mdt source Loopback0
!
vrf sample-mvpn1
address-family ipv4
interface all enable
bgp auto-discovery segment-routing
!
mdt default segment-routing mpls color 128 fast-reroute lfa
mdt data segment-routing mpls 20 color 128 fast-reroute lfa immediate-switch
!
!
!
multicast-routing
!
segment-routing
traffic-eng
on-demand color 128
dynamic
!
constraints
segments
sid-algorithm 128
!
!
!
pcc
source-address ipv4 1.1.1.101
pce address ipv4 1.1.1.106
!
!
!
!
router pim
vrf sample-mvpn1
address-family ipv4
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
560
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
P Node 2 - Transit
router isis 100
net 49.0000.0000.0000.0002.00
address-family ipv4 unicast
metric-style wide
router-id loopback0
segment-routing mpls
!
flex-algo 128
metric-type delay
advertise-definition
!
interface Loopback0
passive
circuit-type level-2-only
address-family ipv4 unicast
prefix-sid absolute 16002
prefix-sid algorithm 128 absolute 18002
!
!
interface TenGigE0/0/0/0
circuit-type level-2-only
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
interface TenGigE0/0/0/1
circuit-type level-2-only
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
interface TenGigE0/0/0/2
circuit-type level-2-only
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
interface TenGigE0/0/0/3
circuit-type level-2-only
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
//multicast-routing – is there any mcast routing config?
!
segment-routing
traffic-eng
pcc
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
561
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
P Node 3 - Transit
router isis 100
net 49.0000.0000.0000.0003.00
address-family ipv4 unicast
metric-style wide
router-id loopback0
segment-routing mpls
!
flex-algo 128
metric-type delay
advertise-definition
!
interface Loopback0
passive
circuit-type level-2-only
address-family ipv4 unicast
prefix-sid absolute 16003
prefix-sid algorithm 128 absolute 18003
!
!
interface TenGigE0/0/0/0
circuit-type level-2-only
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
interface TenGigE0/0/0/1
circuit-type level-2-only
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
interface TenGigE0/0/0/2
circuit-type level-2-only
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
interface TenGigE0/0/0/3
circuit-type level-2-only
point-to-point
address-family ipv4 unicast
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
!
!
//multicast-routing – is there any mcast routing config?
!
segment-routing
traffic-eng
pcc
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
562
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
563
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
564
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
traffic-eng
on-demand color 128
dynamic
!
constraints
segments
sid-algorithm 128
!
!
!
pcc
source-address ipv4 1.1.1.104
pce address ipv4 1.1.1.106
precedence 40
!
!
!
!
router pim
vrf sample-mvpn1
address-family ipv4
rpf topology route-policy TREESID-CORE
mdt c-multicast-routing bgp
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
565
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
566
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
vrf sample-mvpn1
address-family ipv4
interface all enable
bgp auto-discovery segment-routing
!
mdt default segment-routing mpls color 128 fast-reroute lfa
mdt data segment-routing mpls 20 color 128 fast-reroute lfa immediate-switch
!
!
!
multicast-routing
!
router igmp
vrf sample-mvpn1
interface Loopback200
static-group 232.0.0.1 3.3.3.1
!
!
!
router igmp
!
segment-routing
traffic-eng
on-demand color 128
dynamic
!
constraints
segments
sid-algorithm 128
!
!
!
pcc
source-address ipv4 1.1.1.105
pce address ipv4 1.1.1.106
precedence 40
!
!
!
!
router pim
vrf sample-mvpn1
address-family ipv4
rpf topology route-policy TREESID-CORE
mdt c-multicast-routing bgp
!
!
!
!
Node 9 - BGP RR
router bgp 64000
bgp router-id 9.9.9.9
address-family vpnv4 unicast
!
address-family ipv4 mvpn
!
address-family vpnv4 multicast
!
neighbor-group iBGP-v4_neigh-vpn_RRC
remote-as 64000
update-source Loopback0
address-family vpnv4 unicast
route-reflector-client
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
567
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
!
address-family ipv4 mvpn
route-reflector-client
!
address-family vpnv4 multicast
route-reflector-client
!
!
neighbor 1.1.1.101
use neighbor-group iBGP-v4_neigh-vpn_RRC
!
neighbor 1.1.1.104
use neighbor-group iBGP-v4_neigh-vpn_RRC
!
neighbor 1.1.1.105
use neighbor-group iBGP-v4_neigh-vpn_RRC
!
Verification
SR-PCE
The following output shows the paths calculated at the SR-PCE for the tree rooted at PE node 1, with leaf
nodes at 4 and 5:
RP/0/RP0/CPU0:R6# show pce lsp p2mp root ipv4 1.1.1.101
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
568
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Role: Egress
Hops:
Incoming: 15600 CC-ID: 4
The following output shows the paths calculated at the SR-PCE for the tree rooted at PE node 4, with leaf
nodes at 1 and 5:
RP/0/RP0/CPU0:R6# show pce lsp p2mp root ipv4 1.1.1.104
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
569
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Role: Ingress
Hops:
Incoming: 15598 CC-ID: 1
Outgoing: 15598 CC-ID: 1 (1.1.1.105!) N-SID: 128105 [R5]
Outgoing: 15598 CC-ID: 1 (1.1.1.102!) N-SID: 128102 [R2]
Node[1]: 1.1.1.105 (R5)
Delegation: PCC
PLSP-ID: 5
Role: Egress
Hops:
Incoming: 15598 CC-ID: 2
Node[2]: 1.1.1.102 (R2)
Delegation: PCC
PLSP-ID: 1
Role: Transit
Hops:
Incoming: 15598 CC-ID: 3
Outgoing: 15598 CC-ID: 3 (1.1.1.101!) N-SID: 128101 [R1]
Node[3]: 1.1.1.101 (R1)
Delegation: PCC
PLSP-ID: 8
Role: Egress
Hops:
Incoming: 15598 CC-ID: 4
The following output shows the paths calculated at the SR-PCE for the tree rooted at PE node 5, with leaf
nodes at 1 and 4:
RP/0/RP0/CPU0:R6# show pce lsp p2mp root ipv4 1.1.1.105
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
570
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
PE Node 1 - Root
The following ouput from PE node 1 shows the mVPN routes that are learned in the VRF sample-mvpn-1:
RP/0/RP0/CPU0:R1# show bgp vrf sample-mvpn1 ipv4 mvpn
BGP VRF sample-mvpn1, state: Active
BGP Route Distinguisher: 1.1.1.1:2
VRF ID: 0x6000000a
BGP router identifier 1.1.1.1, local AS number 64000
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0 RD version: 14
BGP table nexthop route policy:
BGP main routing table version 14
BGP NSR Initial initsync version 2 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
The following ouput from PE node 1 shows the mVPN context information for VRF sample-mvpn1:
RP/0/RP0/CPU0:R1# show mvpn vrf sample-mvpn1 context
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
571
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
The following ouput from PE node 1 shows the SR ODN information for VRF sample-mvpn1:
RP/0/RP0/CPU0:R1# show mvpn vrf sample-mvpn1 database segment-routing
The following ouput from PE node 1 shows the mVPN PE information of nodes 4 and 5 (leaf nodes) for VRF
sample-mvpn1:
RP/0/RP0/CPU0:R1# show mvpn vrf sample-mvpn1 pe
VRF : sample-mvpn1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
572
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
MS-PMSI: (0x0)
Bidir-PMSI: (0x0)
Remote Bidir-PMSI: (0x0)
BSR-PMSI: (0x0)
A-Disc-PMSI: (0x0)
A-Ann-PMSI: (0x0)
RIB Dependency List: 0x0
Bidir RIB Dependency List: 0x0
Sources: 0, RPs: 0, Bidir RPs: 0
The following ouput from PE node 1 shows the data MDT cache information for the protocol independent
multicast (PIM) for VRF sample-mvpn1:
RP/0/RP0/CPU0:R1# show pim vrf sample-mvpn1 mdt sr-p2mp cache
The following ouput from PE node 1 shows the local data MDT information on the root PE for VRF
sample-mvpn1:
RP/0/RP0/CPU0:R1# show pim vrf sample-mvpn1 mdt sr-p2mp local
The following ouput from PE node 1 shows the PIM topology table information for VRF sample-mvpn1:
RP/0/RP0/CPU0:R1# show pim vrf sample-mvpn1 topology
The following ouput from PE node 1 shows all Multicast Routing Information Base (MRIB) information for
VRF sample-mvpn1:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
573
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
(*,224.0.0.0/24) Flags: D P
Up: 02:26:26
(*,224.0.1.39) Flags: S P
Up: 02:26:26
(*,224.0.1.40) Flags: S P
Up: 02:26:26
(*,232.0.0.0/8) Flags: D P
Up: 02:26:26
The following ouput from PE node 1 shows the Multicast Routing Information Base (MRIB) information for
Loopback200 (232.0.0.1) for VRF sample-mvpn1:
RP/0/RP0/CPU0:R1# show mrib vrf sample-mvpn1 route 232.0.0.1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
574
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
The following ouput from PE node 1 shows the SR-TE process for the tree, showing the tree rooted at node
1, the default MDT (524289) and the data MDT (524290):
RP/0/RP0/CPU0:R1# show segment-routing traffic-eng p2mp policy root ipv4 1.1.1.101
The following ouput from PE node 1 shows the primary and backup interfaces for Flex Algo 128 to P node
3 (1.1.1.103):
RP/0/RP0/CPU0:R1# show isis fast-reroute flex-algo 128 1.1.1.103/32
L2 1.1.1.103/32 [12/115]
via 20.1.3.3, TenGigE0/0/0/1, R3, SRGB Base: 100000, Weight: 0
Backup path: LFA, via 20.1.2.2, TenGigE0/0/0/0, R2, SRGB Base: 100000, Weight: 0,
Metric: 24
The following ouput from PE node 1 shows the interfaces to connect to P node 3 using the Flex Algo label
of P node 3 (128103):
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
575
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
The following ouput from PE node 1 shows the MRIB MPLS forwarding entry for Tree SID label 15599,
showing the primary and backup interfaces:
RP/0/RP0/CPU0:R1# show mrib mpls forwarding labels 15599
The following ouput from PE node 1 shows the MPLS forwarding entry showing the primary interface to P
node 3 for Tree SID label 15599:
RP/0/RP0/CPU0:R1# show mpls forwarding labels 15599
The following ouput from PE node 1 shows the MRIB MPLS forwarding entry for Tree SID label 15600,
showing the primary and backup interfaces:
RP/0/RP0/CPU0:R1# show mrib mpls forwarding labels 15600
The following ouput from PE node 1 shows the MPLS forwarding entry showing the primary interface for
Tree SID label 15600:
RP/0/RP0/CPU0:R1# show mpls forwarding labels 15600
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
576
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
P Node 3 (Transit)
The following ouput from P node 3 (transit) shows the SR-TE process for the tree, showing the tree rooted
at node 1, the default MDT (524289) and the data MDT (524290):
RP/0/RP0/CPU0:R3# show segment-routing traffic-eng p2mp policy root ipv4 1.1.1.101
The following ouput from P node 3 (transit) shows the MRIB MPLS forwarding entry for Tree SID label
15599, showing the primary and backup interfaces:
RP/0/RP0/CPU0:R3# show mrib mpls forwarding
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
577
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
The following ouput from P node 3 shows the primary and backup interfaces to connect to PE node 4 using
the Flex Algo label of PE node 4 (128104):
RP/0/RP0/CPU0:R3# show mpls forwarding labels 128104
The following ouput from P node 3 shows the primary and backup interfaces to connect to PE node 5 using
the Flex Algo label of PE node 5 (128105):
RP/0/RP0/CPU0:R3# show mpls for labels 128105
PE Node 4 (Leaf)
The following output from PE node 4 shows the mVPN routes that are learned in the VRF sample-mvpn-1:
RP/0/RP0/CPU0:R4# show bgp vrf sample-mvpn1 ipv4 mvpn
BGP VRF sample-mvpn1, state: Active
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
578
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
The following ouput from PE node 4 shows the remote data MDT information on the root PE for VRF
sample-mvpn1:
RP/0/RP0/CPU0:R4# show pim vrf sample-mvpn1 mdt sr-p2mp remote
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
579
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
The following ouput from PE node 4 shows the PIM topology table information for VRF sample-mvpn1:
RP/0/RP0/CPU0:R4# show pim vrf sample-mvpn1 topology
The following ouput from PE node 4 shows the SR-TE process for the tree, showing the tree rooted at node
1, the default MDT (524289) and the data MDT (524290):
RP/0/RP0/CPU0:R4# show segment-routing traffic-eng p2mp policy root ipv4 1.1.1.101
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
580
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Replication:
Incoming label: 15599 CC-ID: 3
PE Node 5 (Leaf)
The following output from PE node 5 shows the mVPN routes that are learned in the VRF sample-mvpn-1:
RP/0/RP0/CPU0:R5# show bgp vrf sample-mvpn1 ipv4 mvpn
BGP VRF sample-mvpn1, state: Active
BGP Route Distinguisher: 5.5.5.5:0
VRF ID: 0x60000003
BGP router identifier 5.5.5.5, local AS number 64000
Non-stop routing is enabled
BGP table state: Active
Table ID: 0x0 RD version: 11
BGP table nexthop route policy:
BGP main routing table version 11
BGP NSR Initial initsync version 8 (Reached)
BGP NSR/ISSU Sync-Group versions 0/0
The following ouput from PE node 4 shows the remote data MDT information on the root PE for VRF
sample-mvpn1:
RP/0/RP0/CPU0:R5# show pim vrf sample-mvpn1 mdt sr-p2mp remote
The following ouput from PE node 5 shows the SR-TE process for the tree, showing the tree rooted at node
1, the default MDT (524289) and the data MDT (524290):
RP/0/RP0/CPU0:R5# show segment-routing traffic-eng p2mp policy root ipv4 1.1.1.101
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
581
Segment Routing Tree Segment Identifier
Flexible Algorithm Constraint for Tree-SID Path Computation
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
582
CHAPTER 13
Enabling Segment Routing Flexible Algorithm
Segment Routing Flexible Algorithm allows operators to customize IGP shortest path computation according
to their own needs. An operator can assign custom SR prefix-SIDs to realize forwarding beyond link-cost-based
SPF. As a result, Flexible Algorithm provides a traffic engineered path automatically computed by the IGP
to any destination reachable by the IGP.
The SR architecture associates prefix-SIDs to an algorithm which defines how the path is computed. Flexible
Algorithm allows for user-defined algorithms where the IGP computes paths based on a user-defined
combination of metric type and constraint.
This document describes the IS-IS and OSPF extensions to support Segment Routing Flexible Algorithm on
an MPLS data-plane.
• Prerequisites for Flexible Algorithm, on page 583
• Building Blocks of Segment Routing Flexible Algorithm, on page 583
• Configuring Flexible Algorithm, on page 592
• Example: Configuring IS-IS Flexible Algorithm, on page 609
• Example: Configuring OSPF Flexible Algorithm, on page 609
• Example: Traffic Steering to Flexible Algorithm Paths, on page 610
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
583
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Membership
by the user. When all the routers in the domain have the common understanding what the particular algorithm
value represents, the computation for such algorithm is consistent and the traffic is not subject to looping.
Here, since the meaning of the algorithm is not defined by any standard, but is defined by the user, it is called
a Flexible Algorithm.
To enable the router to advertise the definition for the particular Flexible Algorithm, advertise-definition
command is used. At least one router in the area, preferably two for redundancy, must advertise the Flexible
Algorithm definition. Without the valid definition being advertised, the Flexible Algorithm will not be
functional.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
584
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Prefix-SID Advertisement
OSPF: Microloop Avoidance for Release 7.4.1 This feature extends the current
Flexible Algorithm OSPF Flexible Algorithm
functionality to support Microloop
Avoidance.
OSPF: Microloop Avoidance for Release 7.3.2 This feature extends the current
Flexible Algorithm OSPF Flexible Algorithm
functionality to support Microloop
Avoidance.
OSPF: TI-LFA for Flexible Release 7.3.1 This feature extends the current
Algorithm OSPF Flexible Algorithm
functionality to support TI-LFA.
A router may compute path for multiple Flexible Algorithms. A router must be configured to support particular
Flexible Algorithm before it can compute any path for such Flexible Algorithm. A router must have a valid
definition of the Flexible Algorithm before Flexible Algorithm is used.
The router uses the following rules to prune links from the topology during the Flexible Algorithm computation:
• All nodes that don't advertise support for Flexible Algorithm are pruned from the topology.
• Affinities:
• Check if any exclude affinity rule is part of the Flexible Algorithm Definition. If such exclude rule
exists, check if any color that is part of the exclude rule is also set on the link. If such a color is set,
the link must be pruned from the computation.
• Check if any include-any affinity rule is part of the Flexible Algorithm Definition. If such include-any
rule exists, check if any color that is part of the include-any rule is also set on the link. If no such
color is set, the link must be pruned from the computation.
• Check if any include-all affinity rule is part of the Flexible Algorithm Definition. If such include-all
rule exists, check if all colors that are part of the include-all rule are also set on the link. If all such
colors are not set on the link, the link must be pruned from the computation
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
585
Enabling Segment Routing Flexible Algorithm
Calculation of Flexible Algorithm Path
• If the Flexible Algorithm definition includes an "exclude SRLG" rule, then all links that are part of such
SRLG are pruned from the topology.
Note See Flexible Algorithm with Exclude SRLG Constraint, on page 598.
• If the minimum bandwidth constraint is configured, any link that does not meet the minimum link
bandwidth threshold is pruned from the topology.
• If the maximum delay constraint is configured, any link that exceeds the maximum unidirectional link
delay is pruned from the topology.
• Router uses the metric that is part of the Flexible Algorithm definition. If the metric isn't advertised for
the particular link, the link is pruned from the topology.
Loop Free Alternate (LFA) paths, TI-LFA backup paths, and Microloop Avoidance paths for particular Flexible
Algorithm are computed using the same constraints as the calculation of the primary paths for such Flexible
Algorithm. These paths use Prefix-SIDs advertised specifically for such Flexible Algorithm in order to enforce
a backup or microloop avoidance path.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
586
Enabling Segment Routing Flexible Algorithm
Calculation of Flexible Algorithm Path
IS-IS: Flexible Algorithm Reverse Release 7.9.1 This feature enhances the IS-IS
Affinity Flexible Algorithm link admin
group (affinity) constraint to
include link colors on links in the
reverse direction toward the
calculating router.
The ability to apply affinity
constraints in the reverse direction
provides additional control for
IS-IS Flexible Algorithm path
computation.
This feature intoduces the reverse
keyword to the router isis instance
flex-algo algo affinity command.
You can apply a color or name to links or interfaces by assigning affinity bit-maps to them. You can then
specify an affinity (or relationship) between a Flexible Algorithm path and link colors in the forwarding
direction. Flexible Algorithm computes a path that includes or excludes links that have specific colors, or
combinations of colors.
• Affinity “blue” is assigned to interface on node A; exclude affinity "blue": Link A-B is pruned from path
calculation
In Cisco IOS XR release 7.9.1, for IS-IS Flexible Algorithm, you can also specify a reverse affinity between
a Flexible Algorithm path and link colors (in the direction toward the computing router). Flexible Algorithm
computes a path that includes or excludes links in the reverse direction that have specific colors, or combinations
of colors.
For example, on a point-to-point link between endpoints A and B and for the traffic flowing in the direction
from A to B, the input errors can only be detected at node B. You may measure the rate of such input errors
and set certain 'color' on a link locally on node B when the input error rate crosses a certain threshold.
• Affinity “blue” is assigned to interface on node B; exclude affinity "blue": Link A-B is not pruned from
path calculation
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
587
Enabling Segment Routing Flexible Algorithm
Installation of Forwarding Entries for Flexible Algorithm Paths
With IS-IS Flexible Algorithm Reverse Affinity, when Flex-Algorithm calculation processes link A to B, it
may look at the 'colors' of the link in the reverse direction (link B to A). This enables you to exclude this link
from the Flex-Algorithm topology.
• Affinity “blue” is assigned to interface on node B; exclude reverse-affinity "blue": Link A-B is pruned
from path calculation
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
588
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Prefix-SID Redistribution
Flexible Algorithm Prefix-SID Release 7.5.2 You can now propagate flexible
Redistribution for External Route algorithm prefix-SIDs and their
Propagation algorithm-specific metric between
different IGP domains, such as
OSPF to IS-IS RIP to OSPF. With
this functionality enabling
interdomain traffic engineering, you
can export flexible algorithm labels
from the OSPF domain to other
domains and import the labels from
other domains into OSPF.
The show ospf route flex-algo
command has been modified to
include additional attributes to
indicate the external routes.
Prefix redistribution from IS-IS to another IS-IS instance or protocol was limited to SR algorithm 0 (regular
SPF) prefix SIDs; SR algorithm 1 (Strict SPF) and SR algorithms 128-255 (Flexible Algorithm) prefix SIDs
were not redistributed along with the prefix. The Segment Routing IS-IS Flexible Algorithm Prefix SID
Redistribution feature allows redistribution of strict and flexible algorithms prefix SIDs from IS-IS to another
IS-IS instance or protocols. This feature is enabled automatically when you configure redistribution of IS-IS
Routes with strict or flexible algorithm SIDs.
Prefix redistribution from OSPF to another AS was limited to SR algorithm 0 (regular SPF) prefix SIDs; SR
algorithm 1 (Strict SPF) and SR algorithms 128-255 (Flexible Algorithm) prefix SIDs were not redistributed
along with the prefix. Starting from Cisco IOS XR Release 7.5.2, the Flexible Algorithm Prefix-SID
Redistribution for External Route Propagation feature allows redistribution of strict and flexible algorithm
prefixes SIDs from OSPF to another AS and also from another AS into OSPF.
Configuration Example
The following example shows how to configure redistribute and flexible algorithm to enable external routes.
RP/0/RP0/CPU0:ios(config)#router ospf 1
RP/0/RP0/CPU0:ios(config-ospf)#segment-routing mpls
RP/0/RP0/CPU0:ios(config-ospf)#segment-routing forwarding mpls
RP/0/RP0/CPU0:ios(config-ospf)#redistribute isis 2 route-policy loopback-type
RP/0/RP0/CPU0:ios(config-ospf)#flex-algo 240
RP/0/RP0/CPU0:ios(config-ospf-flex-algo)#metric-type delay
RP/0/RP0/CPU0:ios(config-ospf-flex-algo)#prefix-metric
RP/0/RP0/CPU0:ios(config-ospf-flex-algo)#advertise-definition
Verification
This following show output displays the route-type as 'Extern' for the external routes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
589
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Prefix-SID Redistribution
Algorithm 240
Route entry for 192.168.4.3/32, Metric 220, SID 536, Label 16536
Priority : Medium
Route entry for 192.168.4.5/32, Metric 120, SID 556, Label 16556
Priority : Medium
The following show output displays label information for flexible algorithm and its corresponding metric as
added in RIB:
RP/0/RP0/CPU0:ios# show route 192.168.0.2/32 detail
Wed Apr 6 16:24:46.021 IST
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
590
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Prefix Metric
Prefix Metric support for OSPF Release 7.5.1 This feature extends the current
Flexible Algorithm OSPF Flexible Algorithm
functionality to introduce a Flexible
Algorithm-specific prefix-metric in
the OSPF prefix advertisement. The
prefix-metric provides a way to
compute the best end-to-end
Flexible Algorithm optimized paths
across multiple areas or domains.
A limitation of the existing Flexible Algorithm functionality in IS-IS and OSPF is the inability to compute
the best path to a prefix in a remote area or remote IGP domain. Prefixes are advertised between IS-IS areas,
OSPF processes, or between protocol domains, but the existing prefix metric does not reflect any of the
constraints used for Flexible Algorithm path. Although the best Flexible Algorithm path can be computed to
the inter-area or redistributed prefix inside the area, the path may not represent the overall best path through
multiple areas or IGP domains.
The Flexible Algorithm Prefix Metric feature introduces a Flexible Algorithm-specific prefix-metric in the
IS-IS and OSPF prefix advertisement. The prefix-metric provides a way to compute the best end-to-end
Flexible Algorithm optimized paths across multiple areas or domains.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
591
Enabling Segment Routing Flexible Algorithm
Configuring Flexible Algorithm
Note The Flexible Algorithm definition must be consistent between domains or areas. Refer to section 8 and section
9 in IETF draft https://datatracker.ietf.org/doc/draft-ietf-lsr-flex-algo/.
TE Metric Support for IS-IS Flex Release 7.4.1 Flexible Algorithm allows for
Algo user-defined algorithms where the
IGP computes paths based on a
user-defined combination of metric
type (path optimization objective)
and constraint.
This feature adds support for TE
metric as a metric type for IS-IS
Flexible Algorithm. This allows the
TE metric, along with IGP and
delay metrics, to be used when
running shortest path computations.
The following IS-IS and OSPF configuration sub-mode is used to configure Flexible Algorithm:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
592
Enabling Segment Routing Flexible Algorithm
Configuring Flexible Algorithm
Note By default the IGP metric is used. If delay or TE metric is enabled, the advertised
delay or TE metric on the link is used as a metric for Flexible Algorithm
computation.
Note See Flexible Algorithm Link Attribute Advertisement Behavior, on page 595 for
TE metric behaviors.
Note See Flexible Algorithm Affinity Constraint, on page 587 for information about
affinity constraint behaviors.
The following command is used to to include the Flexible Algorithm prefix metric in the advertised Flexible
Algorithm definition in IS-IS and OSPF :
The following command is used to enable advertisement of the Flexible Algorithm definition in IS-IS:
router isis instance flex-algo algo advertise-definition
Configuring Affinity
The following command is used for defining the affinity-map. Affinity-map associates the name with the
particular bit positions in the Extended Admin Group bitmask.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
593
Enabling Segment Routing Flexible Algorithm
Configuring Flexible Algorithm
router isis instance flex-algo algo affinity-map name bit-position bit number
router ospf process flex-algo algo affinity-map name bit-position bit number
With the IOS XR Release 7.8.1, the new optional keyword anomaly is introduced to the interface submode
of affinity flex-algo. This keyword option helps to advertise flex-algo affinity on PM anomaly. The following
command is used to associate the affinity with an interface:
router isis instance interface type interface-path-id affinity flex-algo anomaly name 1,
name 2, …
router ospf process area area interface type interface-path-id affinity flex-algo anomaly
name 1, name 2, …
Router# configure
Router(config)# router isis 1
Router(config-isis)#flex-algo 128
Router(config-isis-flex-algo)# interface GigabitEthernet0/0/0/2
Router(config-isis-flex-algo)# affinity flex-algo blue
Router(config-isis-flex-algo)# affinity flex-algo anomaly red
router ospf process area area interface Loopback interface-instance prefix-sid [strict-spf
| algorithm algorithm-number] [index | absolute] sid value
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
594
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Link Attribute Advertisement Behavior
The following tables explain the behaviors for advertising (transmitting) and processing (receiving) Flexible
Algorithm link attributes.
Link Delay Metric IOS XR OSPF Flex Algo IOS XR OSPF only uses the link
implementation advertises the link delay metric advertised in the
delay metric value using the OSPF ASLA sub-TLV for Flex Algo.
ASLA sub-TLV with the F-bit set.
ASLA sub-TLV is supported with
non-zero-length or with zero-length
Application Identifier Bit Masks.
Link TE Metric IOS XR OSPF Flex Algo IOS XR OSPF only uses the TE
implementation advertises the link metric advertised in the ASLA
TE metric value using the OSPF sub-TLV for Flex Algo.
ASLA sub-TLV with the F-bit set.
ASLA sub-TLV is supported with
The link TE metric values non-zero-length or with zero-length
advertised are configured under Application Identifier Bit Masks.
SR-TE.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
595
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Link Attribute Advertisement Behavior
Link Admin Group/Extended IOS XR OSPF Flex Algo IOS XR OSPF only uses the
Admin Group implementation advertises the link AG/EAG (either one or both)
admin group value using both link advertised in the ASLA sub-TLV
admin group (AG) and link for Flex Algo.
extended admin group (EAG)
ASLA sub-TLV is supported with
encoding using the OSPF ASLA
non-zero-length or with zero-length
sub-TLV with the F-bit set.
Application Identifier Bit Masks.
The link admin group values
advertised can be configured
directly under the IGP and are
therefore FA-specific. Otherwise,
they will be derived from the link
admin group values configured
under SR-TE.
Link TE Metric IOS XR IS-IS Flex Algo IOS XR IS-IS Flex Algo implementation processes
implementation advertises the link TE the link TE metric value received in the IS-IS
metric value using the IS-IS ASLA. ASLA.
The link TE metric values advertised ASLA sub-TLV is supported with non-zero-length
can be configured directly under the IGP or with zero-length Application Identifier Bit
and are therefore FA-specific. Masks.
Otherwise, they will be derived from
If incoming ASLA includes the L-Flag,
the link TE metric values configured
implementation derives the link TE metric value
under SR-TE.
from the IS-IS Extended Reachability TLV.
See Flexible Algorithm-Specific TE
Metric, on page 597.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
596
Enabling Segment Routing Flexible Algorithm
Strict IS-IS ASLA Link Attribute
Link SRLG IOS XR IS-IS LFA implementation IOS XR IS-IS LFA implementation processes the
advertises the link SRLG value in the link SRLG value received in the IS-IS ASLA.
IS-IS ASLA.
If incoming ASLA includes the L-Flag,
implementation derives the link SRLG value from
the IS-IS Extended Reachability TLV.
The following example shows how to configure the IS-IS Flexible Algorithm-specific TE metric value to 50:
Use the following command to configure the Flexible Algorithm-specific TE metric value under OSPF, where
metric_value is from 1 to 2147483647:
• router ospf process-name area area interface type interface-path-id te-metric flex-algo metric_value
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
597
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm with Exclude SRLG Constraint
The following example shows how to configure the OSPF Flexible Algorithm-specific TE metric value to
50:
Flexible Algorithm to Exclude Release 7.5.2 You can now configure the flexible
SRLGs for OSPF algorithm to exclude any link
belonging to the Shared Risk Link
Groups (SRLGs) from the path
computation for OSPF. The ability
to exclude the at-risk links ensures
that the rest of the links in the
network remain unaffected.
IS-IS Flexible Algorithm: Release 7.5.1 This feature allows the Flexible
Exclude-SRLG Constraint Algorithm definition to specify
Shared Risk Link Groups (SRLGs)
that the operator wants to exclude
during the Flex-Algorithm path
computation. The ability to exclude
the at-risk links ensures that the rest
of the links in the network remain
unaffected.
This allows the setup of disjoint
paths between two or more Flex
Algos by leveraging deployed
SRLG configurations.
This feature allows the Flexible Algorithm definition to specify Shared Risk Link Groups (SRLGs) that the
operator wants to exclude during the Flex-Algorithm path computation. A set of links that share a resource
whose failure can affect all links in the set constitute a SRLG. An SRLG provides an indication of which links
in the network might be at risk from the same failure.
This allows the setup of disjoint paths between two or more Flex Algos by leveraging deployed SRLG
configurations. For example, multiple Flex Algos could be defined by excluding all SRLGs except one. Each
FA will prune the links belonging to the excluded SRLGs from its topology on which it computes its paths.
This provides a new alternative to creating disjoint paths with FA, in addition to leveraging FA with link
admin group (affinity) constraints.
The Flexible Algorithm definition (FAD) can advertise SRLGs that you want to exclude during the Flexible
Algorithm path computation. The IS-IS Flexible Algorithm Exclude SRLG Sub-TLV (FAESRLG) is used to
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
598
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm with Exclude SRLG Constraint
advertise the exclude rule that is used during the Flexible Algorithm path calculation, as specified in IETF
draft https://datatracker.ietf.org/doc/draft-ietf-lsr-flex-algo/
The Flexible Algorithm path computation checks if an “exclude SRLG” rule is part of the FAD. If an “exclude
SRLG” rule exists, it then checks if the link is part of an SRLG that is also part of the “exclude SRLG” rule.
If the link is part of an excluded SRLG, the link is pruned from the path computation.
The figure below shows a topology configured with the following flex algos:
• Flex algo 128: metric IGP and exclude SRLG X constraint
• Flex algo 129: metric IGP and exclude SRLG Y constraint
The horizontal links between nodes 3 and 4 and between 2 and 5 are part of SRLG group X. The diagonal
links between nodes 3 and 5 and between 2 and 4 are part of SRLG group Y. As a result, traffic from node 1
to node 6's FA 128 prefix SID (16806) avoids interfaces part of SRLG X. While traffic from node 1 to node
6's FA 129 prefix SID (16906) avoids interfaces part of SRLG Y.
Note See Constraints, on page 364 section in the Configure SR-TE Policies chapter for information about configuring
SR policies with Flex-Algo constraints.
Configuration
Use the router isis instance address-family ipv4 unicast advertise application flex-algo link-attributes
srlg command to enable the Flexible Algorithm ASLA-specific advertisement of SRLGs.
Use the router isis instance flex-algo algo srlg exclude-any srlg-name . . . srlg-name command to configure
the SRLG constraint which is advertised in the Flexible Algorithm definition (FAD) if the FAD advertisement
is enabled under the flex-algo sub-mode. You can specify up to 32 SRLG names.
The SRLG configuration (value and port mapping) is performed under the global SRLG sub-mode. Refer to
MPLS Traffic Engineering Shared Risk Link Groups for more information.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
599
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm with Exclude SRLG Constraint
Example
The following example shows how to enable the Flexible Algorithm ASLA-specific advertisement of SRLGs
and to exclude SRLG groups from Flexible Algorithm path computation:
RP/0/RP0/CPU0:router(config)# srlg
RP/0/RP0/CPU0:router(config-srlg)# interface HunGigE0/0/0/0
RP/0/RP0/CPU0:router(config-srlg-if)# name groupX
RP/0/RP0/CPU0:router(config-srlg-if)# exit
RP/0/RP0/CPU0:router(config-srlg)# interface TenGigE0/0/0/1
RP/0/RP0/CPU0:router(config-srlg-if)# name groupX
RP/0/RP0/CPU0:router(config-srlg-if)# exit
The following example shows how to enable the Flexible Algorithm ASLA-specific advertisement of SRLGs
and to exclude SRLG groups from Flexible Algorithm path computation for OSPF:
RP/0/RP0/CPU0:router(config)# srlg
RP/0/RP0/CPU0:router(config-srlg)# interface HunGigE0/0/0/0
RP/0/RP0/CPU0:router(config-srlg-if)# name groupX
RP/0/RP0/CPU0:router(config-srlg-if)# exit
RP/0/RP0/CPU0:router(config-srlg)# interface TenGigE0/0/0/1
RP/0/RP0/CPU0:router(config-srlg-if)# name groupX
RP/0/RP0/CPU0:router(config-srlg-if)# exit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
600
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm with Exclude SRLG Constraint
RP/0/0/CPU0:r1(config)#router ospf 1
RP/0/0/CPU0:r1(config-ospf)#flex-algo 128
RP/0/0/CPU0:r1(config-ospf-flex-algo)#srlg exclude-any
RP/0/0/CPU0:r(config-ospf-flex-algo-srlg-exclude-any)#groupX
RP/0/0/CPU0:r(config-ospf-flex-algo-srlg-exclude-any)#groupY
RP/0/0/CPU0:r(config-ospf-flex-algo-srlg-exclude-any)#commit
Verification
The following example shows how to verify the number of SRLGs excluded for OSPF:
Area 0
Number of Nodes : 6
Algo 128
FAD Advertising Router : 192.168.0.1
FAD Area ID : 0
Algo Type : 0
Metric Type : 0
Number of Exlclude SRLGs : (2)
[1]: 100 [2]: 200
FAPM supported : No
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
601
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm with Exclude Minimum Bandwidth Constraint
IS-IS Flexible Algorithm with Release 7.11.1 Traffic engineering in networks can
Exclude Minimum Bandwidth be optimized by avoiding
Constraint low-bandwidth links that may not
be capable of handling high
volumes of traffic.
This feature allows you to use
Flexible Algorithm to create
topologies in your network that
explicitly exclude high bandwidth
traffic from utilizing links below a
specified capacity. This constraint
is achieved by introducing a new
bandwidth-based metric type within
the Flexible Algorithm framework.
Links that do not satisfy the
constraint are ignored when
computing the associated Flexible
Algorithm topology.
This feature introduces these
changes:
CLI:
• The router isis instance
flex-algo algo command is
modified with the new
minimum-bandwidth value
option.
This feature allows you to configure a minimum bandwidth value for computing a Flexible Algorithm path.
The IS-IS Flex-Algorithm Exclude Minimum Bandwidth sub-TLV (FAEMB) is a way to set a minimum
bandwidth requirement for links in the Flex-Algorithm topology.
To determine if a link should be excluded based on this minimum bandwidth requirement, we compare the
Minimum Bandwidth specified in the FAEMB sub-TLV with the Maximum Link Bandwidth advertised in
the Area Supported by the Link Attribute (ASLA) sub-TLV.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
602
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm with Exclude Minimum Bandwidth Constraint
If the Maximum Link Bandwidth is lower than the Minimum bandwidth specified, the link is excluded from
the Flex-Algorithm topology. However, if the FAD includes the FAEMB sub-TLV but the Maximum Link
Bandwidth is not advertised for the link, it should not be excluded based on the Minimum Bandwidth constraint.
Use the router isis instance flex-algo algo minimum-bandwidth value command to configure the minimum
bandwidth value in kbps.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
603
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm with Exclude Maximum Delay Constraint
IS-IS Flexible Algorithm with Release 7.11.1 This feature enables you to
Exclude Maximum Delay configure topologies that exclude
Constraint links that have delays over a
specific threshold. This is
especially critical for
high-frequency trading
applications, in satellite networks,
or wherever there are fluctuations
in link delays.
This feature introduces these
changes:
CLI:
• The router isis instance
flex-algo algo command is
modified with the new
maximum-delay value
option.
This feature allows you to configure a maximum delay value for computing a Flexible Algorithm path.
The Flexible Algorithm Exclude Minimum Delay (FAEMD) sub-TLV is used to specify the maximum delay
requirement for links in a Flex-Algorithm topology. To ensure proper functioning, the FAEMD sub-TLV
must appear only once in the FAD sub-TLV (Flexible Algorithm Definition). If it appears more than once, it
should be ignored by the receiver. The maximum link delay advertised in the FAEMD sub-TLV is compared
with the minimum unidirectional link delay advertised in the ASLA sub-TLV.
If the minimum unidirectional link delay is higher than the maximum link delay advertised in the FAEMD
sub-TLV, the link must be excluded from the Flex-Algorithm topology.
However, if a link does not have the minimum unidirectional link delay advertised but the FAD contains the
FAEMD sub-TLV, then based on the maximum delay constraint, that link should not be excluded from the
topology.
Use the router isis instance flex-algo algo maximum-delay delay command to configure the maximum delay
value in microseconds.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
604
Enabling Segment Routing Flexible Algorithm
Maximum Paths Per IS-IS Flexible Algorithm
IS-IS: Maximum Paths Per Flexible Release 7.8.1 This feature introduces a new
Algorithm subcommand under flex-algo
command. This feature allows for
maximum number of Equal-Cost
Multi-path (ECMP) to be set for
individual Flex Algorithms
Note For information on IS-IS Algo0 Maximum Paths, refer to the "Implementing IS-IS" chapter in the Routing
Configuration Guide for Cisco ASR 9000 Series Routers.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
605
Enabling Segment Routing Flexible Algorithm
Maximum Paths Per IS-IS Flexible Algorithm
The new subcommands allow for maximum number of Equal-Cost Multi-path (ECMP) to be set for individual
algorithms. The value that is configured on a per-flex-algo per address-family basis overrides any value that
is configured under the IS-IS global address-family submode.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
606
Enabling Segment Routing Flexible Algorithm
Maximum Paths Per IS-IS Flexible Algorithm Per Prefix
Maximum Paths Per IS-IS Flexible Release 7.11.1 Previously, you could configure a
Algorithm Per Prefix maximum number of Equal-Cost
Multi-path (ECMP) to be set for
individual Flex Algorithms.
This feature provides additional
granularity to the IS-IS Maximum
Paths Per-Algorithm feature by
allowing you to specify a set of
prefixes for Flexible Algorithm.
Now you can achieve a balance
between path diversity and
computational and memory
requirements by controlling the
number of paths for each specific
algorithm and destination prefix
combination.
This feature introduces these
changes:
CLI:
• maximum-paths
route-policy name
Previously, you could set the maximum paths for a Flexible Algorithm per address-family.
With this feature, you can further refine the maximum paths configuration by associating it with specific
prefixes for each Flexible Algorithm. The existing maximum-paths command is extended to include a
route-policy qualifier to configure the maximum paths per algorithm per prefix-list.
When installing paths into the Routing Information Base (RIB) for Segment Routing with IPv6 (SRv6) or the
Label Switched Database (LSD) for Segment Routing with MPLS (SR-MPLS), the system checks if a maximum
paths value has been configured for the algorithm and the associated prefix. If such a configuration exists, it
will be used instead of the existing address-family value to determine the number of paths to be installed.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
607
Enabling Segment Routing Flexible Algorithm
Maximum Paths Per IS-IS Flexible Algorithm Per Prefix
Note Route policies that have the attribute set maximum-paths number are supported.
Note For information on maximum paths per prefix for IS-IS algo 0 (SPF), refer to the "Implementing IS-IS" chapter
in the Routing Configuration Guide for Cisco ASR 9000 Series Routers.
Example
The following example shows how to configure the maximum paths for Flex Algo 128:
• Define a Prefix Set:
prefix-set isis-ipv4-L1
10.1.0.101/32
end-set
Verification
Router# show isis route flex-algo 128
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
608
Enabling Segment Routing Flexible Algorithm
Example: Configuring IS-IS Flexible Algorithm
L1 10.1.0.101/32 [121/115]
via 15.15.15.2, GigabitEthernet0/0/0/5, hare, SRGB Base: 16000, Weight: 0
via 16.16.16.2, GigabitEthernet0/0/0/6, hare, SRGB Base: 16000, Weight: 0
flex-algo 128
advertise-definition
affinity exclude-any red
affinity include-any blue
!
flex-algo 129
affinity exclude-any green
!
!
address-family ipv4 unicast
segment-routing mpls
!
interface Loopback0
address-family ipv4 unicast
prefix-sid algorithm 128 index 100
prefix-sid algorithm 129 index 101
!
!
interface GigabitEthernet0/0/0/0
affinity flex-algo red
!
interface GigabitEthernet0/0/0/1
affinity flex-algo blue red
!
interface GigabitEthernet0/0/0/2
affinity flex-algo blue
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
609
Enabling Segment Routing Flexible Algorithm
Example: Traffic Steering to Flexible Algorithm Paths
!
!
interface Loopback0
prefix-sid index 10
prefix-sid strict-spf index 40
prefix-sid algorithm 128 absolute 16128
prefix-sid algorithm 129 index 129
prefix-sid algorithm 200 index 20
prefix-sid algorithm 210 index 30
!
!
interface GigabitEthernet0/0/0/0
flex-algo affinity
color red
color blue
!
!
affinity-map
color red bit-position 10
color blue bit-position 11
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
610
Enabling Segment Routing Flexible Algorithm
BGP Routes on PE – Color Based Steering
129
end-set
!
route-policy PASS
pass
end-policy
!
route-policy SET_COLOR_RED_HI_BW
set extcommunity color color129-red-igp
pass
end-policy
!
router isis 1
is-type level-2-only
net 49.0001.0000.0000.0002.00
log adjacency changes
affinity-map RED bit-position 28
flex-algo 128
priority 228
!
address-family ipv4 unicast
metric-style wide
advertise link attributes
router-id 2.2.2.2
segment-routing mpls
!
interface Loopback0
address-family ipv4 unicast
prefix-sid index 2
prefix-sid algorithm 128 index 282
!
!
interface TenGigE0/1/0/3/0
point-to-point
address-family ipv4 unicast
!
!
!
router bgp 65000
bgp router-id 2.2.2.2
address-family ipv4 unicast
!
address-family vpnv4 unicast
retain route-target all
!
neighbor-group RR-services-group
remote-as 65000
update-source Loopback0
address-family ipv4 unicast
!
address-family vpnv4 unicast
!
!
neighbor 4.4.4.4
use neighbor-group RR-services-group
!
vrf Test
rd auto
address-family ipv4 unicast
redistribute connected
!
segment-routing
traffic-eng
logging
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
611
Enabling Segment Routing Flexible Algorithm
BGP Routes on PE – Color Based Steering
policy status
!
segment-list sl-cxr1
index 10 mpls label 16294
!
policy pol-foo
color 129 end-point ipv4 4.4.4.4
candidate-paths
preference 100
explicit segment-list sl-cxr1
!
!
!
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
612
Enabling Segment Routing Flexible Algorithm
BGP Routes on PE – Color Based Steering
metric-style wide
advertise link attributes
router-id 4.4.4.4
segment-routing mpls
!
interface Loopback0
address-family ipv4 unicast
prefix-sid index 4
prefix-sid algorithm 128 index 284
prefix-sid algorithm 129 index 294
prefix-sid algorithm 130 index 304
!
!
interface GigabitEthernet0/0/0/0
point-to-point
address-family ipv4 unicast
!
!
interface TenGigE0/1/0/1
point-to-point
address-family ipv4 unicast
!
!
router bgp 65000
bgp router-id 4.4.4.4
address-family ipv4 unicast
!
address-family vpnv4 unicast
!
neighbor-group RR-services-group
remote-as 65000
update-source Loopback0
address-family ipv4 unicast
!
address-family vpnv4 unicast
!
!
neighbor 10.1.1.1
use neighbor-group RR-services-group
!
neighbor 2.2.2.2
use neighbor-group RR-services-group
!
vrf Test
rd auto
address-family ipv4 unicast
redistribute connected
!
neighbor 25.1.1.2
remote-as 4
address-family ipv4 unicast
route-policy PASS in
route-policy PASS out
!
!
!
!
segment-routing
!
end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
613
Enabling Segment Routing Flexible Algorithm
BGP Routes on PE – Color Based Steering
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
614
CHAPTER 14
Configure Segment Routing Path Computation
Element
The Segment Routing Path Computation Element (SR-PCE) provides stateful PCE functionality by extending
the existing IOS-XR PCEP functionality with additional capabilities. SR-PCE is supported on the MPLS data
plane and IPv4 control plane.
Note The Cisco IOS XRv 9000 is the recommended platform to act as the SR-PCE. Refer to the Cisco IOS XRv
9000 Router Installation and Configuration Guide for more information.
SR-PCE: Single PCE scale Release 7.5.1 With this feature, support for a
enhancement single PCE is enhanced to 50000
nodes, 100000 LSPs, 500000 links,
and 2000 PCEP sessions.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
615
Configure Segment Routing Path Computation Element
About SR-PCE
About SR-PCE
Table 85: Feature History Table
TCP Authentication Release This feature introduces support for TCP Authentication Option
Option 7.3.1 (TCP-AO), which replaces the TCP Message Digest 5 (MD5) option,
which was used for authenticating PCEP (TCP) sessions by using a
clear text or encrypted password.
The path computation element protocol (PCEP) describes a set of procedures by which a path computation
client (PCC) can report and delegate control of head-end label switched paths (LSPs) sourced from the PCC
to a PCE peer. The PCE can request the PCC to update and modify parameters of LSPs it controls. The stateful
model also enables a PCC to allow the PCE to initiate computations allowing the PCE to perform network-wide
orchestration.
Note For more information on PCE, PCC, and PCEP, refer to the Path Computation Element section in the MPLS
Configuration Guide for Cisco ASR 9000 Series Routers.
SR-PCE learns topology information by way of IGP (OSPF or IS-IS) or through BGP Link-State (BGP-LS).
SR-PCE is capable of computing paths using the following methods:
• TE metric—SR-PCE uses the TE metric in its path calculations to optimize cumulative TE metric.
• IGP metric—SR-PCE uses the IGP metric in its path calculations to optimize reachability.
• LSP Disjointness—SR-PCE uses the path computation algorithms to compute a pair of disjoint LSPs.
The disjoint paths can originate from the same head-end or different head-ends. Disjoint level refers to
the type of resources that should not be shared by the two computed paths. SR-PCE supports the following
disjoint path computations:
• Link – Specifies that links are not shared on the computed paths.
• Node – Specifies that nodes are not shared on the computed paths.
• SRLG – Specifies that links with the same SRLG value are not shared on the computed paths.
• SRLG-node – Specifies that SRLG and nodes are not shared on the computed paths.
When the first request is received with a given disjoint-group ID, the first LSP is computed, encoding
the shortest path from the first source to the first destination. When the second LSP request is received
with the same disjoint-group ID, information received in both requests is used to compute two disjoint
paths: one path from the first source to the first destination, and another path from the second source to
the second destination. Both paths are computed at the same time.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
616
Configure Segment Routing Path Computation Element
Usage Guidelines and Limitations
TCP-AO is compatible with Master Key Tuple (MKT) configuration. TCP-AO also protects connections
when using the same MKT across repeated instances of a connection. TCP-AO protects the connections by
using traffic key that are derived from the MKT, and then coordinates changes between the endpoints.
Note TCP-AO and TCP MD5 are never permitted to be used simultaneously. TCP-AO supports IPv6, and is fully
compatible with the proposed requirements for the replacement of TCP MD5.
Configure SR-PCE
This task explains how to configure SR-PCE.
SUMMARY STEPS
1. configure
2. pce
3. address ipv4 address
4. state-sync ipv4 address
5. tcp-buffer size size
6. password {clear | encrypted} password
7. tcp-ao key-chain [include-tcp-options] [accept-ao-mismatch-connection]
8. segment-routing {strict-sid-only | te-latency}
9. timers
10. keepalive time
11. minimum-peer-keepalive time
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
617
Configure Segment Routing Path Computation Element
Configure SR-PCE
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# pce
Step 4 state-sync ipv4 address Configures the remote peer for state synchronization.
Example:
Step 5 tcp-buffer size size Configures the transmit and receive TCP buffer size for
each PCEP session, in bytes. The default buffer size is
Example:
256000. The valid range is from 204800 to 1024000.
RP/0/RSP0/CPU0:router(config-pce)# tcp-buffer size
1024000
Step 6 password {clear | encrypted} password Enables TCP MD5 authentication for all PCEP peers. Any
TCP segment coming from the PCC that does not contain
Example:
a MAC matching the configured password will be rejected.
Specify if the password is encrypted or clear text.
RP/0/RSP0/CPU0:router(config-pce)# password
encrypted pwd1 Note
TCP-AO and TCP MD5 are never permitted to be used
simultaneously.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
618
Configure Segment Routing Path Computation Element
Configure SR-PCE
Note
TCP-AO and TCP MD5 are never permitted to be used
simultaneously.
Step 8 segment-routing {strict-sid-only | te-latency} Configures the segment routing algorithm to use strict SID
or TE latency.
Example:
Note
RP/0/RSP0/CPU0:router(config-pce)# segment-routing This setting is global and applies to all LSPs that request
strict-sid-only a path from this controller.
RP/0/RSP0/CPU0:router(config-pce)# timers
Step 10 keepalive time Configures the timer value for locally generated keep-alive
messages. The default time is 30 seconds.
Example:
RP/0/RSP0/CPU0:router(config-pce-timers)#
keepalive 60
Step 11 minimum-peer-keepalive time Configures the minimum acceptable keep-alive timer that
the remote peer may propose in the PCEP OPEN message
Example:
during session establishment. The default time is 20
seconds.
RP/0/RSP0/CPU0:router(config-pce-timers)#
minimum-peer-keepalive 30
Step 12 reoptimization time Configures the re-optimization timer. The default timer is
1800 seconds.
Example:
RP/0/RSP0/CPU0:router(config-pce-timers)#
reoptimization 600
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
619
Configure Segment Routing Path Computation Element
Configure the Disjoint Policy (Optional)
RP/0/RSP0/CPU0:router(config-pce-timers)# exit
SUMMARY STEPS
1. disjoint-path
2. group-id value type {link | node | srlg | srlg-node} [sub-id value]
3. strict
4. lsp {1 | 2} pcc ipv4 address lsp-name lsp_name [shortest-path]
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router(config-pce)# disjoint-path
Step 2 group-id value type {link | node | srlg | Configures the disjoint group ID and defines the preferred
srlg-node} [sub-id value] level of disjointness (the type of resources that should not
be shared by the two paths):
Example:
• link—Specifies that links are not shared on the
RP/0/RSP0/CPU0:router(config-pce-disjoint)# computed paths.
group-id 1 type node sub-id 1
• node—Specifies that nodes are not shared on the
computed paths.
• srlg—Specifies that links with the same SRLG value
are not shared on the computed paths.
• srlg-node—Specifies that SRLG and nodes are not
shared on the computed paths.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
620
Configure Segment Routing Path Computation Element
Global Maximum-delay Constraint
Step 4 lsp {1 | 2} pcc ipv4 address lsp-name lsp_name Adds LSPs to the disjoint group.
[shortest-path]
The shortest-path keyword forces one of the disjoint paths
Example: to follow the shortest path from the source to the destination.
This option can only be applied to the the first LSP
RP/0/RSP0/CPU0:router(config-pce-disjoint)# lsp 1 specified.
pcc ipv4 192.168.0.1 lsp-name rtrA_t1
shortest-path
RP/0/RSP0/CPU0:router(config-pce-disjoint)# lsp 2
pcc ipv4 192.168.0.5 lsp-name rtrE_t2
pce
constraints
bounds
cumulative
type
latency <1-4294967295> Bound metric value in microseconds
Configuration
To configure a PCE for specifying maximum cumulative latency metric, you must complete the following
configurations:
RP/0/RSP0/CPU0:ios(config)# pce
RP/0/RSP0/CPU0:ios(config-pce)# constraints
RP/0/RSP0/CPU0:ios(config-pce-constr)# bounds
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
621
Configure Segment Routing Path Computation Element
PCE Override of PCC Initiated Policies
RP/0/RSP0/CPU0:ios(config-pce-constr-bounds)# cumulative
RP/0/RSP0/CPU0:ios(config-pce-constr-bounds-type)# type latency 1000000
RP/0/RSP0/CPU0:ios(config-pce-constr-bounds-type)#
Verification
Verify using the show command:
RP/0/RSP0/CPU0:ios(config-pce-constr-bounds-type)# show
Wed Oct 12 22:18:22.962 UTC
pce
constraints
bounds
cumulative
type latency 1000000
!
!
!
!
PCE Override of Release You can now override the Label Switched Paths (LSP) attributes in
PCC-Initiated Policies 7.7.1 the Path Computation Elements (PCEs) to improve the path
computation of the Path Computation Client (PCC)-Initiated policies.
The overriding is based on the matching criteria of the Path
Computation Element Protocol (PCEP) Peer and LSP attributes.
You can configure the PCE override rule for one, many, or all PCCs.
This feature introduces the following commands:
• override-rules (PCE)
• pce try-regex
• show pce override-rules detail
There are fewer PCEs in the network compared to the PCCs. However, PCE versions may be newer than the
PCC version because it is easy to update the lesser PCEs than the higher number of PCCs. This ensures PCE
supports more features with the latest Internet Assigned Numbers Authority (IANA) code points than PCCs.
IOS-XR PCE implementation is based on the Path Computation Element Protocol (PCEP) standards and the
implementations of the PCEP vary leading to interoperability challenges. To overcome these challenges, you
can configure PCE with the override-rules (OVR). These OVRs have a filter part and an overriding part. The
matching criteria filter matches all the (Segment Routing) SR policies against these OVRs, suppose they
match, then the overriding part applies to these SR policies attributes.
Matching is done when the LSP is created in the PCE LSP database and the LSP is not re-evaluated after
receiving the next PCEP report message for the same LSP. Based on these matching criteria, you can override
the values of the LSP attributes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
622
Configure Segment Routing Path Computation Element
PCE Override of PCC Initiated Policies
For example, suppose that a PCC is outdated and does not support reporting the latency metric type. In that
case, PCC reports to the LSP with the metric-type that it supports and the PCE applies the OVRs that you
configure to update the metric-type upon reception.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
623
Configure Segment Routing Path Computation Element
PCE Override of PCC Initiated Policies
Note Before you apply the configuration you can use the try-regex utility to test the regexes. This utility is an
optional step and does not alter the system. This example shows how to verify if the override-rule for the
matching-criteria lsp name <regex> works:
Rounter(config)# pce
Router(config-pce)# override-rules
Router(config-pce-ovr-rule)# Sequence 100
Router(config-pce-ovr-rule-seq)# matching-criteria
Router(config-pce-ovr-rule-crit)# peer
Router(config-pce-ovr-rule-peer)# all
Router(config-pce-ovr-rule-peer)# exit
Router(config-pce-ovr-rule-crit)# lsp colors 0-50
Router(config-pce-ovr-rule-crit)# exit
Router(config-pce-ovr-rule-seq)# override metric type igp
Router(config-pce-ovr-rule-seq)# override constraints bandwidth 1000
Router(config-pce-ovr-rule-seq)# commit
Running configuration
• Match all LSPs from all peers and modify metric type to latency:
pce
override-rules
sequence 1
matching-criteria
peer
all
lsp
all
override
metric
type latency
!
• Match LSP name using regex and peer based on provided ACL and change metric type to IGP:
pce
override-rules
sequence 1
matching-criteria
peer
access-list ipv4 PCC1
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
624
Configure Segment Routing Path Computation Element
PCE Override of PCC Initiated Policies
lsp
name ^cfg_test2_.*$
!
override
metric
type igp
!
• Match policy using specified Segment Routing (SR) policy color from all peers and change bandwidth
to 1000 kbps:
pce
override-rules
sequence 1
matching-criteria
peer
all
!
lsp
colors 10
!
override
constraints
bandwidth 1000
!
Verification
Show command displays operational values, which are applied during the override. For example, a bandwidth
value is converted into IEEE float format. The value that is displayed in the show command may not be equal
to the value configured, because of the limited precision of IEEE format used in PCEP.
Verify using the show command show pce override-rules [sequence <sequence>]
Show command output with two override rules that are configured and each matched one LSP are:
Router# show pce override-rules details
Sequence number: 2
Matching criteria:
Peer:
IPv4 ACL name: PCC1
LSP
Regex: ^cfg_test2_.*$
Override:
Metric type: IGP
Constraints:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
625
Configure Segment Routing Path Computation Element
PCE-Initiated SR Policies
Matching LSPs:
Peer: 192.168.0.1, Tunnel name: cfg_test2_xxx_discr_5
PCE-Initiated SR Policies
Use cases based on centralized optimization, such as congestion mitigation solutions, rely on the ability of
the PCE to signal and instantiate SR-TE policies in the network. We refer to this as PCE-initiated SR-TE
policies.
PCE-initiated SR-TE policies can be triggered via Crossworks Network Controller (recommended approach)
or via CLI at the PCE.
For more information on configuring SR-TE policies, see the SR-TE Policy Overview, on page 317.
The PCE deploys the SR-TE policy using PCC-PCE communication protocol (PCEP).
1. PCE sends a PCInitiate message to the PCC.
2. If the PCInitiate message is valid, the PCC sends a PCRpt message; otherwise, it sends PCErr message.
3. If the PCInitiate message is accepted, the PCE updates the SR-TE policy by sending PCUpd message.
You can achieve high-availability by configuring multiple PCEs with SR-TE policies. If the head-end (PCC)
loses connectivity with one PCE, another PCE can assume control of the SR-TE policy.
Note When configuring an explicit path using IP addresses of intermediate links, the SR-TE process prefers the
protected Adj-SID of the link, if one is available.
/* Enter PCE configuration mode and create the SR-TE segment lists */
Router# configure
Router(config)# pce
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
626
Configure Segment Routing Path Computation Element
SR-PCE Flexible Algorithm Multi-Domain Path Computation
Running Config
pce
segment-routing
traffic-eng
segment-list name addr2a
index 10 address ipv4 10.1.1.2
index 20 address ipv4 10.2.3.2
index 30 address ipv4 10.1.1.4
!
peer ipv4 10.1.1.1
policy P1
color 2 end-point ipv4 2.2.2.2
candidate-paths
preference 50
explicit segment-list addr2a
!
!
SR-PCE Flexible Algorithm Release 7.3.1 With this feature, SR-PCE can use
Multi-Domain Path Computation Flexible Algorithms to compute
multi-domain paths.
Flexible Algorithm provides a traffic engineered path automatically computed by the IGP to any destination
reachable by the IGP. With the SR-PCE Flexible Algorithm Multi-Domain Path Computation feature, SR-PCE
can use Flexible Algorithms to compute multi-domain paths. See the Enabling Segment Routing Flexible
Algorithm, on page 583 chapter for information about Segment Routing Flexible Algorithm.
The SR-PCE Flexible Algorithm Multi-Domain Path Computation feature incorporates the following
functionality:
• BGP-LS has been augmented to allow selected nodes to advertise the Flexible Algorithm definition
(FAD) to the SR-PCE
• PCEP has been augmented (vendor-specific object) to allow a PCC to indicate SR policy constraint based
on the Flexible Algorithm instance number
• SR-PCE algorithms have been augmented to compute paths based on a Flexible Algorithm constraint
The SR-PCE Flexible Algorithm multi-domain path computation requires the following:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
627
Configure Segment Routing Path Computation Element
Example: SR-PCE Flexible Algorithm Multi-Domain Path Computation Use Case
For example, considering a multi-domain topology (Domain 1 and Domain 2), the following scenarios meet
the requirements listed above:
Scenario 1 Flexible Algorithm 128, metric delay Flexible Algorithm 128, metric delay
Scenario 2 Flexible Algorithm 128, metric delay Flexible Algorithm 128, metric delay, exclude
affinity blue
Scenario 3 Flexible Algorithm 128, metric delay, exclude Flexible Algorithm 128, metric delay, exclude
affinity yellow affinity blue
Scenario 4 Flexible Algorithm 128, metric delay Flexible Algorithm 128, metric delay
Flexible Algorithm 129, metric IGP Flexible Algorithm 129, metric IGP
Note The use of a Flexible Algorithm constraint in a multi-domain SR topology does not preclude the use of an
SR policy that are optimized for a particular metric type. For example, a policy can request a PCE for a Multi
Domain policy based on metric delay. SR-PCE computes the path and encodes it with regular prefix SIDs
and Adj-SIDs as required. Alternatively, a policy can request to have a constraint for a Flexible Algorithm
instance X, which is defined in multiple domains and it minimizes based on metric delay. In this case, the
SR-PCE computes the multi-domain path and encodes it using only Flexible Algorithm prefix SIDs. This
case benefits from the optimized label stack size that Flexible Algorithm provides (1 label per domain).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
628
Configure Segment Routing Path Computation Element
Example: SR-PCE Flexible Algorithm Multi-Domain Path Computation Use Case
Configuration on Node 8
IS-IS and Flexible Algorithm Configuration
router isis 2
is-type level-2-only
net 49.0002.0000.0000.0008.00
distribute link-state
flex-algo 128
metric-type delay
advertise-definition
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
629
Configure Segment Routing Path Computation Element
Example: SR-PCE Flexible Algorithm Multi-Domain Path Computation Use Case
interface Loopback0
passive
address-family ipv4 unicast
prefix-sid absolute 16004
prefix-sid algorithm 128 absolute 16804
!
router isis 2
is-type level-2-only
net 49.0002.0000.0000.0004.00
distribute link-state instance-id 200
flex-algo 128
metric-type delay
advertise-definition
BGP-LS Configuration
router bgp 65000
bgp router-id 10.1.1.4
address-family link-state link-state
!
neighbor-group AS65000-LS-group
remote-as 65000
update-source Loopback0
address-family link-state link-state
!
!
neighbor 10.1.1.10
use neighbor-group AS65000-LS-group
description *** To SR-PCE ***
!
!
!
Configuration on Node 1
IS-IS and Flexible Algorithm Configuration
router isis 1
is-type level-2-only
net 49.0001.0000.0000.0001.00
distribute link-state
flex-algo 128
metric-type delay
advertise-definition
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
630
Configure Segment Routing Path Computation Element
Example: SR-PCE Flexible Algorithm Multi-Domain Path Computation Use Case
interface Loopback0
passive
address-family ipv4 unicast
prefix-sid absolute 16001
prefix-sid algorithm 128 absolute 16801
!
SR Policy Configuration
segment-routing
traffic-eng
policy FOO
color 100 end-point ipv4 10.1.1.8
candidate-paths
preference 100
dynamic
pcep
!
!
constraints
segments
sid-algorithm 128
!
!
!
!
!
!
!
PCC Configuration
segment-routing
traffic-eng
pcc
source-address ipv4 10.1.1.1
pce address ipv4 10.1.1.10
precedence 10
!
report-all
!
!
!
Configuration on PCE
pce
address ipv4 10.1.1.10
rest
!
!
router bgp 65000
bgp router-id 10.1.1.10
address-family link-state link-state
!
neighbor-group AS65000-LS-group
remote-as 65000
update-source Loopback0
address-family link-state link-state
!
!
neighbor 10.1.1.4
use neighbor-group AS65000-LS-group
description *** To Node-4 ***
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
631
Configure Segment Routing Path Computation Element
ACL Support for PCEP Connection
!
!
neighbor 10.1.1.5
use neighbor-group AS65000-LS-group
description *** To Node-5 ***
!
!
!
pce
address ipv4 10.1.1.5
peer-filter ipv4 access-list sample-peer-filter
!
ipv4 access-list sample-peer-filter
10 permit ipv4 host 10.1.1.6 any
20 permit ipv4 host 10.1.1.7 any
30 deny ipv4 any any
!
Note For information on configuring Anycast SID, see Configuring a Prefix-SID on the IS-IS Enabled Loopback
Interface, on page 256 and Configuring a Prefix-SID on the OSPF-Enabled Loopback Interface, on page 279.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
632
Configure Segment Routing Path Computation Element
Anycast SID-Aware Path Computation
This example shows how Anycast SIDs are inserted into a computed SID list.
The following figure shows 3 isolated IGP domains without redistribution and without BGP 3107. Each Area
Border Router (ABR) 1 through 4 is configured with a node SID. ABRs 1 and 2 share Anycast SID 16012
and ABRs 3 and 4 share Anycast SID 16034.
Consider the case where nodes A and Z are provider edge (PE) routers in the same VPN. Node A receives a
VPN route with BGP next-hop to node Z. Node A resolves the SR path to node Z based on ODN behaviors
with delegation of path computation to SR-PCE.
Before considering Anycast SIDs, the head-end router or SR-PCE computes the SID list.
Assume that the computed path from node A to node Z traverses node 2 and node 4. This translates to SID
list {16002, 16004, 1600Z} when node SIDs are leveraged to encode the path.
When an Anycast SID-aware path is requested, the path computation algorithm performs the following:
• Path Computation—Computes the path according to optimization objectives and constraints
• Path Encoding—Encodes the path in a SID list leveraging node-SIDs and adj-SIDs as applicable
• Anycast SID Replacement—Reiterates the original SID list by replacing node SIDs with Anycast SIDs
present on the nodes along the computed path.
If a node has multiple Anycast SIDs, the algorithm considers them according to their weights. See
Weighted Anycast SIDs, on page 636.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
633
Configure Segment Routing Path Computation Element
Anycast SID-Aware Path Computation
• Optimality Validation—The new paths are validated against the original optimization objectives and
constraints (maintain same cumulative metric as original SID list and do not violate path constraints).
• Anycast SID Promotion—If the optimality validation is successful, then the Anycast-encoded SID list
is signaled and instantiated in the forwarding.
The following figure depicts cumulative metrics between nodes in the network.
Under these conditions, the optimality check is met, and therefore, the Anycast-encoded SID list from node
A to node Z is {16012,16034,1600Z}.
The Anycast SID aware path computation also provides resiliency. For example, if one of the ABRs (in this
case, ABR 1) becomes unavailable or unreachable, the path from node A to node Z {16012,16034,1600Z}
will still be valid and usable.
Configuration Examples
1. Configure Prefix SIDs on the ABR nodes.
a. Configure each node with a node SID.
b. Configure each group of nodes with a shared Anycast SID.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
634
Configure Segment Routing Path Computation Element
Anycast SID-Aware Path Computation
See Configuring a Prefix-SID on the IS-IS Enabled Loopback Interface, on page 256 and Configuring a
Prefix-SID on the OSPF-Enabled Loopback Interface, on page 279.
2. Configure SR policies to include Anycast SIDs for path computation using the anycast-sid-inclusion
command.
This example shows how to configure a local SR policy to include Anycast SIDs for PCC-initiated path
computation at the head-end router:
Router(config)# segment-routing traffic-eng
Router(config-sr-te)# policy FOO
Router(config-sr-te-policy)# color 10 end-point ipv4 10.1.1.10
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-policy-path-pref)# dynamic
Router(config-sr-te-pp-info)# anycast-sid-inclusion
Running Configuration
Use the anycast-sid-inclusion command to request Anycast SID-aware path computation for the following
SR policy types:
• Local SR policy with PCC-initiated path computation at the head-end router:
segment-routing
traffic-eng
policy FOO
color 10 end-point ipv4 10.1.1.10
candidate-paths
preference 100
dynamic
anycast-sid-inclusion
• On-demand SR policies with a locally computed dynamic path at the head-end, or centrally computed
dynamic path at the SR-PCE:
segment-routing
traffic-eng
on-demand color 10
dynamic
anycast-sid-inclusion
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
635
Configure Segment Routing Path Computation Element
Anycast SID-Aware Path Computation
Weighted Anycast SID-Aware Path Release 7.3.1 This feature extends Anycast SIDs
Computation with weighted nodes.
Weighted Anycast nodes advertise
a cost (weight) along with the
Anycast SID. Traffic is then
distributed according to the
weights.
Weighted Anycast SIDs allow for
highly available paths with node
redundancy and path optimality that
provide Fast Re-Route (FRR) for
node failure of service provider
edge (PE) routers and ABR/ASBRs
nodes in multi-domain networks.
Weighted Anycast nodes advertise a cost along with the Anycast SID. This cost serves as a weight. The native
SR path computation algorithms are augmented to compute optimum paths relying on Weighted Anycast
SIDs during path encoding. Traffic to the SID is then distributed according to the weights.
The following example shows how node SID, Anycast SID, and Weighted Anycast SID are applied on node
1:
router isis 1
interface Loopback0
address-family ipv4 unicast
prefix-sid absolute 16001 // Node SID
!
!
interface Loopback1
prefix-attributes anycast
address-family ipv4 unicast
prefix-sid absolute 16012 // Anycast SID – (prefer node 1 or 2)
!
!
interface Loopback2
prefix-attributes anycast
address-family ipv4 unicast
weight 1
prefix-sid absolute 17012 // Weighted Anycast SID (prefer node 1)
!
!
interface Loopback3
prefix-attributes anycast
address-family ipv4 unicast
weight 100000
prefix-sid absolute 18012 // Weighted Anycast SID (prefer node 2)
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
636
Configure Segment Routing Path Computation Element
SR-PCE IPv4 Unnumbered Interface Support
• SR-PCE:
Note SR-PCE and path computation clients (PCCs) need to be running Cisco IOS XR
7.0.2 or later.
• Compute and return paths from a topology containing IPv4 unnumbered interfaces.
• Process reported SR policies from a head-end router that contain hops with IPv4 unnumbered
adjacencies.
PCEP extensions for IPv4 unnumbered interfaces adhere to IETF RFC8664 “PCEP Extensions for
Segment Routing” (https://datatracker.ietf.org/doc/rfc8664/). The unnumbered hops use a Node or
Adjacency Identifier (NAI) of type 5. This indicates that the segment in the explicit routing object
(ERO) is an unnumbered adjacency with an IPv4 ID and an interface index.
Configuration Example
The following example shows how to configure an IPv4 unnumbered interface:
RP/0/0/CPU0:rtrA(config)# interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:rtrA(config-if)# ipv4 point-to-point
RP/0/0/CPU0:rtrA(config-if)# ipv4 unnumbered Loopback0
To bring up the IPv4 unnumbered adjacency under the IGP, configure the link as point-to-point under the
IGP configuration. The following example shows how to configure the link as point-to-point under the IGP
configuration:
RP/0/0/CPU0:rtrA(config)# router ospf one
RP/0/0/CPU0:rtrA(config-ospf)# area 0
RP/0/0/CPU0:rtrA(config-ospf-ar)# interface GigabitEthernet0/0/0/0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
637
Configure Segment Routing Path Computation Element
SR-PCE IPv4 Unnumbered Interface Support
Verification
Use the show ipv4 interface command to display information about the interface:
RP/0/0/CPU0:rtrA# show ipv4 interface GigabitEthernet0/0/0/0 brief
Tue Apr 2 12:59:53.140 EDT
Interface IP-Address Status Protocol
GigabitEthernet0/0/0/0 192.168.0.1 Up Up
The output of the show pce ipv4 topology command is enhanced to display the interface index instead of the
IP address for unnumbered interfaces:
RP/0/0/CPU0:sr-pce# show pce ipv4 topology
…
Link[2]: unnumbered local index 6, remote index 4
Local node:
OSPF router ID: 192.168.0.1 area ID: 0 ASN: 0
Remote node:
TE router ID: 192.168.0.4
OSPF router ID: 192.168.0.4 area ID: 0 ASN: 0
Metric: IGP 1, TE 1, Latency 1 microseconds
Bandwidth: Total 125000000 Bps, Reservable 0 Bps
Admin-groups: 0x00000000
Adj SID: 24001 (unprotected)
The output of show pce lsp detail command includes unnumbered hops:
RP/0/0/CPU0:sr-pce# show pce lsp detail
…
Reported path:
Metric type: TE, Accumulated Metric 3
SID[0]: Adj unnumbered, Label 24001, local 192.168.0.1(6), remote 192.168.0.4(4)
SID[1]: Adj unnumbered, Label 24002, local 192.168.0.4(7), remote 192.168.0.3(7)
SID[2]: Adj unnumbered, Label 24000, local 192.168.0.3(5), remote 192.168.0.2(5)
Computed path: (Local PCE)
Computed Time: Wed Apr 03 11:01:46 EDT 2019 (00:01:06 ago)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
638
Configure Segment Routing Path Computation Element
Inter-Domain Path Computation Using Redistributed SID
A Path Computation Element (PCE) computes SR-TE paths based on SR topology database that stores
connectivity, state, and TE attributes of SR network nodes and links. BGP Labeled Unicast (BGP-LU) provides
MPLS transport across IGP boundaries by advertising loopbacks and label binding of impact edge and border
routers across IGP boundaries.
This feature adds new functionality to the SR-PCE that enables it to compute a path for remote non-SR
end-point device distributed by BGP-LU.
The remote end-point device in the BGP-LU domain is unknown to the SR-PCE. For the SR-PCE to know
about the end-point device, the gateway ABR/ASBR learns the end-point prefix via BGP-LU. The prefix is
then redistributed to SR-PCE topology database from the gateway ABR/ASBR. SR-PCE then can compute
the best path from the head-end device to the selected gateway router.
The following topology shows an SR domain and a BGP-LU domain, with a gateway ABR/ASBR between
the two domains.
1. The gateway ABR/ASBR is configured with BGP/IGP helper to learn the remote prefix through BGP-LU
and redistribute the remote prefix to the IGP helper, then to SR-PCE.
2. The SR-PCE selects the best gateway node to BGP-LU domain and computes the path to reach the remote
prefix through the gateway node.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
639
Configure Segment Routing Path Computation Element
Example: Inter-Domain Path Computation Using Redistributed SID
3. The head-end device in the SR domain requests a path to the remote destination and signals the SR profile
interworking with the BGP-LU domain.
The BGP-LU prefix advertisement to SR-PCE Traffic Engineer Database (TED) is done by creating an IGP
helper on the ABR/ASBR to redistribute BGP-LU prefix information to IGP. IGP then sends the prefix
information to the SR-PCE via BGP-LS.
If there are multiple ABR/ASBRs advertising the same remote BGP-LU prefix, the SR-PCE selects the best
gateway node to the BGP-LU domain using the accumulative metric from the head-end device to the gateway
and the advertised metric from the gateway to the destination.
route-policy bgplu-com
set community (65002:999)
end-policy
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
640
Configure Segment Routing Path Computation Element
Example: Inter-Domain Path Computation Using Redistributed SID
prefix-set bgplu
1.0.0.7/32,
1.0.0.8/32,
1.0.0.101/32,
1.0.0.102/32
end-set
!
route-policy bgp2isis
if destination in bgplu then
pass
else
drop
endif
end-policy
!
end
3. Configure the gateway proxy BGP-SR and SR Mapping Server to allocate SR labels:
router bgp 3107
address-family ipv4 unicast
segment-routing prefix-sid-map
allocate-label all
segment-routing
global-block 16000 23999
mapping-server
prefix-sid-map
address-family ipv4
1.0.0.7/32 2007
1.0.0.8/32 2008
1.0.0.101/32 2101
1.0.0.102/32 2102
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
641
Configure Segment Routing Path Computation Element
Configuring the North-Bound API on SR-PCE
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
642
Configure Segment Routing Path Computation Element
Configuring the North-Bound API on SR-PCE
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
643
Configure Segment Routing Path Computation Element
Configuring the North-Bound API on SR-PCE
The SR-PCE provides a north-bound HTTP-based API to allow communication between SR-PCE and external
clients and applications.
Over this API, an external application can leverage the SR-PCE for topology discovery, SR policy discovery,
and SR policy instantiation.
The Cisco Crosswork Optimization Engine is an application that leverages the SR-PCE. For more information,
refer to the Cisco Crosswork Optimization Engine User Guides.
Use the following commands under PCE configuration mode to configure the API to allow communication
between SR-PCE and external clients or applications.
Command Description
rest username password {clear | encrypted} Add credentials when connecting to API.
password
Note
This command is used only if authentication is
configured.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
644
Configure Segment Routing Path Computation Element
Configuring the North-Bound API on SR-PCE
Command Description
Command Description
api username password {clear | encrypted} Add credentials when connecting to API.
password
api sibling ipv4 address Opens a synchronization channel to another PCE in
the same high availability (HA) pair.
Note
For more information regarding SR-PCE HA pairs,
refer to the Multiple Cisco SR-PCE HA Pairs chapter
of the Cisco Crosswork Optimization Engine 1.2.1
User Guide.
pce
address ipv4 10.1.1.100
rest
user admin
password encrypted 1304131F0202
!
authentication basic
sibling ipv4 10.1.1.200
!
!
end
pce
address ipv4 10.1.1.100
api
user admin
password encrypted 1304131F0202
!
authentication digest
sibling ipv4 10.1.1.200
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
645
Configure Segment Routing Path Computation Element
Configuring the North-Bound API on SR-PCE
!
end
The first and fourth entries show the API server listening for IPv4 and IPv6 connections.
The second and third entries show the established sibling connection between PCE1 (10.1.1.100) and PCE2
(10.1.1.200).
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
646
CHAPTER 15
Configure Performance Measurement
Network performance metrics is a critical measure for traffic engineering (TE) in service provider networks.
Network performance metrics include the following:
• Packet loss
• Delay
• Delay variation
• Bandwidth utilization
These network performance metrics provide network operators information about the performance characteristics
of their networks for performance evaluation and help to ensure compliance with service level agreements.
The service-level agreements (SLAs) of service providers depend on the ability to measure and monitor these
network performance metrics. Network operators can use Segment Routing Performance Measurement
(SR-PM) feature to monitor the network metrics for links and end-to-end TE label switched paths (LSPs).
The following table explains the functionalities supported by performance measurement feature for measuring
delay for links or SR policies.
Functionality Details
Profiles You can configure different default profiles for different types of delay
measurements. Use the "interfaces" delay profile type for link-delay measurement.
The "sr-policy" delay profile type is used for SR policy delay measurements.
Delay profile allows you to schedule probe and configure metric advertisement
parameters for delay measurement.
Probe and burst Schedule probes and configure metric advertisement parameters for delay
scheduling measurement.
Metric advertisements Advertise measured metrics periodically using configured thresholds. Also
supports accelerated advertisements using configured thresholds.
Measurement history and Maintain packet delay and loss measurement history, session counters, and packet
counters advertisement counters.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
647
Configure Performance Measurement
Liveness Monitoring
The following are the means by which you can measure the performance of your network:
• Liveness Monitoring, on page 648
• Delay Measurement, on page 666
• Path Tracing in SRv6 Network, on page 703
• Two-Way Active Measurement Protocol Light Source Address Filtering, on page 708
Liveness Monitoring
Liveness refers to the ability of the network to confirm that a specific path, segment, or a node is operational
and capable of forwarding packets. Liveness checks are essential for maintaining network availability and
reliability. See Configure PTP in System Management Configuration Guide for more information on configuring
PTP.
Benefits
• Fault Detection: You can quickly identify if a device is down, which allows for immediate response
and troubleshooting.
• Load Balancing: You can identify if the devices in a network are live, so work can be distributed more
evenly across the network, preventing overloading of specific components and improving overall
performance.
• System Health: You can provide an ongoing snapshot of a system's health, helping to identify potential
issues before they become significant problems.
• Maintenance Planning: Liveness information can also help with maintenance planning, as system
administrators can understand which components are live or down and plan maintenance and downtime
accordingly without significant disruption to services.
• Security: Regular liveness checks can also play a role in maintaining network security. Administrators
can take proactive steps to mitigate the damage and prevent future incidents by identifying unusual
activity that might indicate a security breach or attack.
IP Endpoint Delay Release This feature measures the end-to-end delay and monitors liveness
Measurement and 7.4.1 of a specified IP endpoint node, including VRF-aware (awareness
Liveness Monitoring of multiple customers belonging to different VRFs).
Release
7.3.2 This feature is supported on IPv4, IPv6, and MPLS data planes.
The Segment Routing Performance Measurement (SR-PM) for IP endpoint liveness is a type of node liveness
that involves testing whether an IP endpoint or a device identified by an IP address is available to send and
receive data.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
648
Configure Performance Measurement
IP Endpoint Liveness Monitoring
IP endpoint liveness is verified by sending a request to the IP address of the endpoint and waiting for a response.
The probe could be an ICMP echo request (Ping), a TCP packet, a UDP packet, or any other type of packet
that the endpoint would respond to.
• If a response is received, the endpoint is considered live.
• If no response is received within a certain time frame, the endpoint is considered down or unreachable.
IP endpoint dynamically measures the liveness towards a specified IP endpoint. IP endpoints can be located
in a default or nondefault VRFs. IP endpoint is any device in the network a device identified by an IP address.
Liveness of an IP endpoint is verified by sending a request to the IP address of the endpoint and waiting for
a response, which is referred to as a probe.
The endpoint of a probe is defined by an IP address, which can be either IPv4 or IPv6. This IP address can
be any address that the sender can reach, such as a local interface or a remote node or host, either within an
operator's network or accessible via a VRF.
The endpoint of a probe can be any IP address reachable by the sender. For example, a local interface or a
remote node or host located within an operator's network or reachable through a VRF.
The IP address of the endpoint can be reached through an IP path, MPLS, LSP , or IP tunnel (GRE).
• When the endpoint is reachable using an MPLS LSP (for example, SR, LDP, RSVP-TE, SR Policy), the
forwarding stage imposes the corresponding MPLS transport labels.
• When the endpoint is reachable via a GRE tunnel, the forwarding stage imposes the corresponding GRE
header.
• When the endpoint is reachable via a VRF in an MPLS network, the forwarding stage imposes the
corresponding MPLS service labels. In the forward path, the sender node uses the configured VRF for
the endpoint address. In the return path, the reflector node derives the VRF based on which incoming
VRF label the probe packet is received with.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
649
Configure Performance Measurement
IP Endpoint Liveness Detection in an SR MPLS Network
• PE to PE probes
• PE to PE (source from PE-CE interface) probes
• Source address: You can define the source of the endpoint using the endpoint specific source address
and the global source address.
Global source address configuration is applied to all the endpoints when the endpoint specific source
address configuration isn’t specified. endpoint specific configuration overrides all the global source
address configuration for those specific endpoints for which source addresses are configured.
For Micro-SID configuration for IPv4 endpoint sessions, if IPv6 global source address is configured,
then it applies the configured global IPv6 source address for the IPv6 header in the SRv6 packet. If IPv6
global address is not configured, then It does not form a valid SRv6 packet.
You can use the source-address keyword under the performance-measurement command to define
the global source address or use the keyword under performance-measurement endpoint to define
endpoint specific source address.
To mitigate this issue, you must configure the GRE tunnel on querier and responder. The following
example shows how to configure GRE tunnel:
• Liveness session without segment list for an endpoint in a non-default VRF is not supported.
• SR Performance Measurement endpoint session over BVI interface is not supported.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
650
Configure Performance Measurement
IP Endpoint Liveness Detection in an SR MPLS Network
The probe packet is encapsulated with the label corresponding to the endpoint.
2. The network delivers the PM probe packets following the LSP toward the endpoint.
3. The end-point receives the PM probe packets.
Packets are forwarded back to the sender based on the forwarding entry associated with the IP DA of the
PM probe packet. If an LSP exists, the probe packet is encapsulated with the label of the sender.
4. The sender node receives the PM probe packets.
The received timestamp (T4) stored.
If the sender node doesn't receive the specified number of probe packets (based on the configured
multiplier), the sender node declares the PM session as down.
The following figure illustrates a liveness detection probe toward an IP endpoint learned by the IGP. The
network interconnecting the sender and reflector provides MPLS connectivity with Segment Routing.
The liveness detection multiplier is set to 5 to specify the number of consecutive missed probe packets before
the PM session is declared as down.
Figure 49: IP Endpoint Liveness Detection
Configuration Example
RouterA(config)# performance-measurement
RouterA(config-perf-meas)# endpoint ipv4 10.1.1.5
RouterA(config-pm-ep)# source-address ipv4 10.1.1.1
RouterA(config-pm-ep)# liveness-detection
RouterA(config-pm-ep-ld)# exit
RouterA(config-pm-ep)# exit
RouterA(config-perf-meas)# liveness-profile endpoint default
RouterA(config-pm-ld-ep)# liveness-detection
RouterA(config-pm-ld-ep-ld)# multiplier 5
RouterA(config-pm-ld-ep-ld)# exit
RouterA(config-pm-ld-ep)# probe
RouterA(config-pm-ld-ep-probe)# measurement-mode loopback
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
651
Configure Performance Measurement
SR Policy Liveness Monitoring
Running Configuration
performance-measurement
endpoint ipv4 10.1.1.5
source-address ipv4 10.1.1.1
liveness-detection
!
!
liveness-profile endpoint default
liveness-detection
multiplier 5
!
probe
measurement-mode loopback
!
!
!
end
Verification
RouterA# show performance-measurement endpoint ipv4 10.1.1.5
--------------------------------------------------------------------------------
0/RSP0/CPU0
--------------------------------------------------------------------------------
Segment-list : None
Session State: Down
Missed count: 0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
652
Configure Performance Measurement
SR Policy Liveness Monitoring
SR Performance Measurement Release 7.3.1 You can use this feature to create
Named Profiles specific performance measurement
delay and liveness profiles, and
associate it with an SR policy.
This way, a delay or liveness
profile can be associated with a
policy for which the performance
measurement probes are enabled,
and performance measurement is
precise, and enhanced.
The performance-measurement
delay-profile sr-policy command
was updated with the name profile
keyword-argument combination.
The performance-measurement
liveness-profile sr-policy
command was updated with the
name profile keyword-argument
combination.
The performance-measurement
delay-measurement command was
updated with delay-profile name
profile.
The performance-measurement
liveness-detection command was
updated with liveness-profile name
profile
SR Policy Liveness Monitoring Release 7.3.1 This feature allows you to verify
end-to-end traffic forwarding over
an SR Policy candidate path by
periodically sending performance
monitoring packets.
SR Policy liveness monitoring allows you to verify end-to-end traffic forwarding over an SR Policy candidate
path by periodically sending performance monitoring (PM) packets. The head-end router sends PM packets
to the SR policy's endpoint router, which sends them back to the head-end without any control-plane dependency
on the endpoint router.
For more information about the segment routing over IPv6, see Segment Routing over IPv6 Overview topic.
The following are benefits to using SR-PM liveness monitoring:
• Allows both liveness monitoring and delay measurement using a single-set of PM packets as opposed
to running separate monitoring sessions for each purpose. This improves the overall scale by reducing
the number of PM sessions required.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
653
Configure Performance Measurement
SR Policy Liveness Monitoring
• Eliminates network and device complexity by reducing the number of monitoring protocols on the network
(for example, no need for Bidirectional Failure Detection [BFD]). It also simplifies the network and
device operations by not requiring any signaling to bootstrap the performance monitoring session.
• Improves interoperability with third-party nodes because signaling protocols aren't required. In addition,
it leverages the commonly supported TWAMP protocol for packet encoding.
• Improves liveness detection time because PM packets aren't punted on remote nodes
• Provides a common solution that applies to data-planes besides MPLS, including IPv4, IPv6, and SRv6.
How it works?
The workflow associated with liveness detection over SR policy is described in the following sequence.
Consider an SR policy programmed at head-end node router 1 towards end-point node router 5. This SR policy
is enabled for liveness detection using the loopback measurement-mode.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
654
Configure Performance Measurement
Configure SR Policy Liveness Monitoring in an MPLS Network
If the head-end node doesn't receive the specified number of consecutive probe packets (based on
configured multiplier), the head-end node assumes the candidate path is down and a configured action
is trigerred.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
655
Configure Performance Measurement
Configure SR Policy Liveness Monitoring in an MPLS Network
Note The destination IPv4 headendaddress 127.x.x.x – 127.y.y.y is used in the Probe
messages to take advantages of 3-tuple IP hashing (source-address,
destination-address, and local router ID) for ECMP paths of SR-MPLS Policy.
The destination IPv4 address must be 127/8 range (loopback), otherwise it will
be rejected.
Note One PM session is always created for the actual endpoint address of the SR Policy.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
656
Configure Performance Measurement
Configure SR Policy Liveness Monitoring in an MPLS Network
• None: When the PM liveness session goes down, no action is taken. If logging is enabled, the failure
is logged but the SR Policy operational state isn’t modified.
• logging session-state-change: Enables Syslog messages when the session state changes.
• reverse-path label {BSID-value | NODE-SID-value}: Specifies the MPLS label to be used for the reverse
path for the reply. If you configured liveness detection with ECMP hashing, you must specify the reverse
path. The default reverse path uses IP Reply.
• BSID-value: The Binding SID (BSID) label for the reverse SR Policy. (This is practical for manual
SR policies with a manual BSID.)
• NODE-SID-value: The absolute SID label of the (local) Sender Node to be used for the reverse path
for the reply.
Configuration Examples
Configure a Default SR-Policy PM Liveness-Profile
The following example shows a default sr-policy liveness-profile:
RP/0/RSP0/CPU0:ios(config)# performance-measurement
RP/0/RSP0/CPU0:ios(config-perf-meas)# liveness-profile sr-policy default
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy)# probe
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-probe)# measurement-mode loopback
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-probe)# burst-interval 1500
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-probe)# tos dscp 52
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-probe)# exit
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy)# liveness-detection
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-ld)# multiplier 5
Running Configuration:
performance-measurement
liveness-profile sr-policy default
liveness-detection
multiplier 5
!
probe
tos dscp 52
measurement-mode loopback
burst-interval 1500
!
!
!
end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
657
Configure Performance Measurement
Configure SR Policy Liveness Monitoring in an MPLS Network
RP/0/RSP0/CPU0:ios(config-pm-ld-srpolicy-ld)# multiplier 5
Running Configuration:
performance-measurement
liveness-profile sr-policy name sample-profile
liveness-detection
multiplier 5
!
probe
tos dscp 52
measurement-mode loopback
burst-interval 1500
!
!
!
end
Running Configuration
performance-measurement
liveness-profile sr-policy name sample-profile
liveness-detection
multiplier 5
!
probe
tos dscp 52
sweep
destination ipv4 127.0.0.1 range 25
!
measurement-mode loopback
burst-interval 1500
!
!
!
end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
658
Configure Performance Measurement
Configure SR Policy Liveness Monitoring in an MPLS Network
Running Config
segment-routing
traffic-eng
policy FOO
performance-measurement
liveness-detection
liveness-profile name sample-profile
invalidation-action none
!
!
!
!
!
end
Running Config
segment-routing
traffic-eng
policy BAA
performance-measurement
liveness-detection
logging
session-state-change
!
liveness-profile name sample-profile
invalidation-action down
!
reverse-path
label 16001
!
!
!
!
!
end
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
659
Configure Performance Measurement
Configure Segment Lists to Activate Candidate Paths in SRv6 for PM Liveness
Configure Segment Lists to Release 7.11.1 You can now enable a candidate
Activate Candidate Paths in SRv6 path to be up by configuring the
for PM Liveness minimum number of active segment
lists associated with the candidate
path. The head-end router
determines that a candidate path is
up based on the minimum number
of active segment lists configured.
In earlier releases, the head-end
router identified a candidate path
as up only when all the segment
lists associated with the path were
active.
The feature introduces these
changes:
CLI:
• The validation-cp
minimum-active
segment-lists option is
introduced in the
performance-measurement
liveness-detection command.
The state of the segment lists in a candidate path determines whether a candidate path is up or down. You can
now configure the minimum number of active segment lists associated with a candidate path. The head-end
router identifies a candidate path as up when one or more segment lists are active.
Note If the configured minimum number of active segment lists is greater than the number of available segment
lists in a candidate path, the head-end router determines the candidate path as up only when all the segment
lists are active.
In earlier releases, the router identified a candidate path as up only when all the segment lists associated with
the path were active.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
660
Configure Performance Measurement
Configure Segment Lists to Activate Candidate Paths in SRv6 for PM Liveness
Configuration Example
Configure the minimum number of segment lists in SRv6
Perform this task to activate three segment lists to have the PM liveness session up:
Router(config)#segment-routing
Router(config-sr)#traffic-eng
Router(config-sr-te)#policy po-103
Router(config-sr-te-policy)#performance-measurement
Router(config-sr-te-policy-perf-meas)#liveness-detection
Router(config-sr-te-policy-live-detect)#validation-cp minimum-active segment-lists 3
Verification
The following example shows three active segment-lists to have the PM liveness session up:
Router#show performance-measurement sr-policy liveness color 103 detail verbose private
Mon Oct 30 15:10:51.863 EDT
----------------------------------------------------------------------------------------------------------------------------------------------------------------
0/1/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Candidate-Path:
Instance : 5
Preference : 300
Protocol-origin : Configured
Discriminator : 300
Profile Keys:
Profile name : default
Profile type : SR Policy Liveness Detection
Candidate path to be deleted: False
Source address : 1::1
Local label : Not set
Fast notification for session down: Disabled
No fast notifications have been sent
Number of segment-lists : 3
Liveness Detection: Enabled
Minumum SL Up Required: 1
Session State: Up
Last State Change Timestamp: Oct 30 2023 15:10:16.322
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
661
Configure Performance Measurement
Configure Segment Lists to Activate Candidate Paths in SRv6 for PM Liveness
Missed count: 0
Segment-List : sl-1041
fccc:cc00:1:fe10:: (Local Adjacency SID)
fccc:cc00:2:fe41::/64
Format: f3216
Segment List ID: 0
Reverse path segment-List: Not configured
Segment-list to be deleted: False
Number of atomic paths : 1
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 30 2023 15:10:16.322
Missed count: 0
Atomic path:
Flow Label : 0
Session ID : 4198
Trace ID : 738913600
Atomic path to be deleted: False
NPU Offloaded session : False
Timestamping Enabled : True
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 30 2023 15:10:16.322
Missed count: 0
Responder IP : 1::1
Number of Hops : 3
Segment-List : sl-1042
fccc:cc00:1:fe10:: (Local Adjacency SID)
fccc:cc00:2:fe42::/64
Format: f3216
Segment List ID: 0
Reverse path segment-List: Not configured
Segment-list to be deleted: False
Number of atomic paths : 1
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 30 2023 15:10:16.322
Missed count: 0
Atomic path:
Flow Label : 0
Session ID : 4199
Trace ID : 954039677
Atomic path to be deleted: False
NPU Offloaded session : False
Timestamping Enabled : True
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 30 2023 15:10:16.322
Missed count: 0
Responder IP : 1::1
Number of Hops : 3
Segment-List : sl-1043
fccc:cc00:1:fe10:: (Local Adjacency SID)
fccc:cc00:2:fe43::/64
Format: f3216
Segment List ID: 0
Reverse path segment-List: Not configured
Segment-list to be deleted: False
Number of atomic paths : 1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
662
Configure Performance Measurement
Configure Flow Labels in SRv6 Header for PM Liveness
Atomic path:
Flow Label : 0
Session ID : 4200
Trace ID : 1119107116
Atomic path to be deleted: False
NPU Offloaded session : False
Timestamping Enabled : True
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 30 2023 15:10:16.322
Missed count: 0
Responder IP : 1::1
Number of Hops : 3
----------------------------------------------------------------------------------------------------------------------------------------------------------------
0/RSP0/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Configure Flow Labels in SRv6 Release 7.11.1 You can now monitor the
Header for PM Liveness activeness of multiple paths for a
given segment list using flow labels
in the SRv6 header.
In earlier releases, the SRv6 header
didn't include flow labels.
The feature introduces these
changes:
CLI:
• The flow-label keyword is
introduced in the
performance-measurement
liveness-profile command.
To monitor the activeness of multiple paths for a given a segment list, you can configure the SRv6 header to
include flow labels as the packet travels in the network. When there are multiple paths, different traffic flows
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
663
Configure Performance Measurement
Configure Flow Labels in SRv6 Header for PM Liveness
may use different paths. A flow label is a flow identifier and you can use different flow labels to monitor
different ECMP paths. It's only used for IPv6 probe packets. Flow labels are 20-bit fields in the SRv6 header.
Running Configuration
performance-measurement
liveness-profile name name1
probe
flow-label from 0 to 1000000 increment 10
!
!
!
Verification
The following example shows an SR-policy configured with flow labels:
Router#show performance-measurement sr-policy liveness color 1001 detail verbose private
----------------------------------------------------------------------------------------------------------------------------------------------------------------
0/1/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Candidate-Path:
Instance : 3
Preference : 300
Protocol-origin : Configured
Discriminator : 300
Profile Keys:
Profile name : profile-scale
Profile type : Generic Liveness Detection
Candidate path to be deleted: False
Source address : 1::1
Local label : Not set
Fast notification for session down: Disabled
No fast notifications have been sent
Number of segment-lists : 2
Liveness Detection: Enabled
Minumum SL Up Required: 2
Session State: Up
Last State Change Timestamp: Oct 26 2023 15:31:43.478
Missed count: 0
Segment-List : sl-1041
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
664
Configure Performance Measurement
Configure Flow Labels in SRv6 Header for PM Liveness
Atomic path:
Flow Label : 0
Session ID : 4178
Trace ID : 280178832
Atomic path to be deleted: False
NPU Offloaded session : False
Timestamping Enabled : True
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 26 2023 15:31:43.478
Missed count: 0
Responder IP : 1::1
Number of Hops : 3
Atomic path:
Flow Label : 10
Session ID : 4179
Trace ID : 1866227171
Atomic path to be deleted: False
NPU Offloaded session : False
Timestamping Enabled : True
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 26 2023 15:31:43.478
Missed count: 0
Responder IP : 1::1
Number of Hops : 3
Segment-List : sl-scale
fccc:cc00:1:fe10:: (Local Adjacency SID)
fccc:cc00:2:fed1::/64
Format: f3216
Segment List ID: 0
Reverse path segment-List: Not configured
Segment-list to be deleted: False
Number of atomic paths : 2
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 26 2023 15:31:43.478
Missed count: 0
Atomic path:
Flow Label : 0
Session ID : 4180
Trace ID : 2609815826
Atomic path to be deleted: False
NPU Offloaded session : False
Timestamping Enabled : True
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 26 2023 15:31:43.478
Missed count: 0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
665
Configure Performance Measurement
Delay Measurement
Responder IP : 1::1
Number of Hops : 3
Atomic path:
Flow Label : 10
Session ID : 4181
Trace ID : 170501506
Atomic path to be deleted: False
NPU Offloaded session : False
Timestamping Enabled : True
Liveness Detection: Enabled
Session State: Up
Last State Change Timestamp: Oct 26 2023 15:31:43.478
Missed count: 0
Responder IP : 1::1
Number of Hops : 3
----------------------------------------------------------------------------------------------------------------------------------------------------------------
0/RSP0/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Delay Measurement
Delay measurement is a mechanism used to measure the latency or delay experienced by data packets when
they traverse a network.
The PM for delay measuremnt uses the IP/UDP packet format defined in for probes. Two-Way Active
Measurement Protocol (TWAMP) adds two-way or round-trip measurement capabilities. TWAMP employs
time stamps applied at the echo destination (reflector) to enable greater accuracy. In the case of TWAMP
Light, the Session-Reflector doesn’t necessarily know about the session state. The Session-Reflector simply
copies the Sequence Number of the received packet to the Sequence Number field of the reflected packet.
The controller receives the reflected test packets and collects two-way metrics. This architecture allows for
collection of two-way metrics.
Benefits
• Network Troubleshooting: You can quickly and easily identify areas in your network with high delay
and resolve network problems using delay measurement.
• Network Planning and Optimization: You can easily understand the performance of your network under
various conditions and design a network that can handle expected traffic loads.
• Quality of Service (QoS): You can ensure quality of service standards are being met by continuously
monitoring the delay in your network.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
666
Configure Performance Measurement
Measurement Modes
• SR Policy End-to-End Delay Measurement , on page 695: Use to to monitor the end-to-end delay
experienced by the traffic sent over an SR policy.
Measurement Modes
The following table compares the different hardware and timing requirements for the measurement modes
that are supported in SR PM.
The PM query and response for one-way delay measurement can be described in the following steps:
1. The local-end router sends PM query packets periodically to the remote side once the egress line card on
the router applies timestamps on packets.
2. The ingress line card on the remote-end router applies time-stamps on packets as soon as they are received.
3. The remote-end router sends the PM packets containing time-stamps back to the local-end router.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
667
Configure Performance Measurement
Measurement Modes
The PM query and response for two-way delay measurement can be described in the following steps:
1. The local-end router sends PM query packets periodically to the remote side once the egress line card on
the router applies timestamps on packets.
2. Ingress line card on the remote-end router applies time-stamps on packets as soon as they are received.
3. The remote-end router sends the PM packets containing time-stamps back to the local-end router. The
remote-end router time-stamps the packet just before sending it for two-way measurement.
4. The local-end router time-stamps the packet as soon as the packet is received for two-way measurement.
5. Delay is measured using the time-stamp values in the PM packet.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
668
Configure Performance Measurement
Link Delay Measurement
The PM query and response for Loopback delay measurement can be described in the following steps:
1. The local-end router sends PM probe packets periodically on the SR Policy.
2. The probe packets are loopback on the endpoint node (not punted), with no timestamping on endpoint
node.
3. Round-trip Delay = T4 – T1.
Link Delay Measurement with IPv6 Release 7.3.1 The performance measurement for
Link Local Address link delay determines the source
and destination IP addresses used
in the OAM packet based on the IP
address of the interface, where the
delay measurement operation is
enabled. This feature enables using
the IPv6 link-local address as the
OAM packet source IP address,
when no IPv4 or IPv6 address is
configured in the interface.
The PM for link delay uses the IP/UDP packet format defined in RFC 5357 (TWAMP-Light) for probes.
Two-Way Active Measurement Protocol (TWAMP) adds two-way or round-trip measurement capabilities.
TWAMP employs time stamps applied at the echo destination (reflector) to enable greater accuracy. In the
case of TWAMP Light, the Session-Reflector doesn’t necessarily know about the session state. The
Session-Reflector simply copies the Sequence Number of the received packet to the Sequence Number field
of the reflected packet. The controller receives the reflected test packets and collects two-way metrics. This
architecture allows for collection of two-way metrics.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
669
Configure Performance Measurement
Link Delay Measurement
• For link bundles, the hashing function may select a member link for forwarding but the reply may come
from the remote line card on a different member link of the bundle.
• For one-way delay measurement, clocks should be synchronized on two end-point nodes of the link using
PTP.
• Link delay measurement is supported on IPv4 unnumbered interfaces. An IPv4 unnumbered interface is
identified by a node ID (a loopback address) and the local SNMP index assigned to the interface. Note
that the reply messages could be received on any interface, since the packets are routed at the responder
based on the loopback address used to identify the link.
• protocol: Interface delay measurement using RFC 5357 with IP/UDP encap (TWAMP-Light).
• burst interval: Interval for sending probe packet. The default value is 3000 milliseconds and the range
is from 30 to 15000 milliseconds.
• computation interval: Interval for metric computation. Default is 30 seconds; range is 1 to 3600 seconds.
• periodic advertisement: Periodic advertisement is enabled by default.
• periodic-advertisement interval: The default value is 120 seconds and the interval range is from 30 to
3600 seconds.
• periodic-advertisement threshold: Checks the minimum-delay metric change for threshold crossing
for periodic advertisement. The default value is 10 percent and the range is from 0 to 100 percent.
• periodic-advertisement minimum change: The default value is 1000 microseconds (usec) and the range
is from 0 to 100000 microseconds.
• accelerated advertisement: Accelerated advertisement is disabled by default.
• accelerated-advertisement threshold: Checks the minimum-delay metric change for threshold crossing
for accelerated advertisement. The default value is 20 percent and the range is from 0 to 100 percent.
• accelerated-advertisement minimum change: The default value is 500 microseconds and the range is
from 0 to 100000 microseconds.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
670
Configure Performance Measurement
Link Delay Measurement
RP/0/0/CPU0:router(config-pm-dm-intf-probe)# burst-interval 60
RP/0/0/CPU0:router(config-pm-dm-intf-probe)# computation-interval 60
RP/0/0/CPU0:router(config-pm-dm-intf-probe)# exit
Note The same UDP destination port is used for delay measurement for links and SR Policy.
This example shows how to configure the UDP destination port for delay.
Router(config)# performance-measurement
Router(config-perf-meas)# protocol twamp-light
Router(config-pm-protocol)# measurement delay unauthenticated
Router(config-pm-proto-mode)# querier-dst-port 12000
The source and destination IP addresses used in the OAM packet are determined by the IP address present on
the interface where the delay-measurement operation is enabled and the setting of the optional next-hop
address.
When the next-hop address is not specified, the following rules apply to determine the source and destination
IP addresses used in the OAM packet:
• If an IPv4 address is configured under the interface, then:
• OAM packet source IP address = Interface's IPv4 address
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
671
Configure Performance Measurement
Link Delay Measurement
When the next-hop {ipv4 | ipv6} address is configured, the following rules apply to determine the source
and destination IP addresses used in the OAM packet:
• If a next-hop IPv4 address is configured, then:
• OAM packet source IP address = Interface's IPv4 address
• OAM packet destination IP address = Configured next-hop IPv4 address
Note If there is no IPv4 address configured under the interface, then the
delay-measurement probe does not send OAM packets.
Note If there is no IPv6 global address configured under the interface, then the
delay-measurement probe does not send OAM packets.
This example shows how to enable PM for link delay over an interface with IPv4 address configured:
interface TenGigE0/0/0/0
ipv4 address 10.10.10.1 255.255.255.0
performance-measurement
interface TenGigE0/0/0/0
delay-measurement
This example shows how to enable PM for link delay over an interface IPv6 address configured:
interface TenGigE0/0/0/0
ipv6 address 10:10:10::1/64
performance-measurement
interface TenGigE0/0/0/0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
672
Configure Performance Measurement
Link Delay Measurement
delay-measurement
This example shows how to enable PM for link delay over an interface with a specified next-hop IPv4 address:
interface TenGigE0/0/0/0
ipv4 address 10.10.10.1 255.255.255.0
performance-measurement
interface TenGigE0/0/0/0
next-hop ipv4 10.10.10.2
delay-measurement
This example shows how to enable PM for link delay over an interface with a specified next-hop IPv6 address:
interface TenGigE0/0/0/0
ipv6 address 10:10:10::1/64
performance-measurement
interface TenGigE0/0/0/0
next-hop ipv6 10:10:10::2
delay-measurement
This example shows how to enable PM for link delay over an interface with only IPv6 link-local address:
interface TenGigE0/0/0/0
ipv6 enable
performance-measurement
interface TenGigE0/0/0/0
delay-measurement
Verification
RP/0/0/CPU0:router# show performance-measurement profile interface
Thu Dec 12 14:13:16.029 PST
-------------------------------------------------------------------------------
0/0/CPU0
-------------------------------------------------------------------------------
Interface Delay-Measurement:
Profile configuration:
Measurement Type : Two-Way
Probe computation interval : 30 (effective: 30) seconds
Type of services : Traffic Class: 6, DSCP: 48
Burst interval : 3000 (effective: 3000) mSec
Burst count : 10 packets
Encap mode : UDP
Payload Type : TWAMP-light
Destination sweeping mode : Disabled
Periodic advertisement : Enabled
Interval : 120 (effective: 120) sec
Threshold : 10%
Minimum-Change : 500 uSec
Advertisement accelerated : Disabled
Threshold crossing check : Minimum-delay
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
673
Configure Performance Measurement
Link Delay Measurement
-------------------------------------------------------------------------------
0/2/CPU0
-------------------------------------------------------------------------------
Total interfaces : 1
Total SR Policies : 0
Total RSVP-TE tunnels : 0
Total Maximum PPS : 2000 pkts/sec
Total Interfaces PPS : 0 pkts/sec
Maximum Allowed Multi-hop PPS : 2000 pkts/sec
Multi Hop Requested PPS : 0 pkts/sec (0% of max allowed)
Dampened Multi Hop Requested PPS : 0% of max allowed
Inuse Burst Interval Adjustment Factor : 100% of configuration
Interface Delay-Measurement:
Total active sessions : 1
Counters:
Packets:
Total sent : 26
Total received : 26
Errors:
TX:
Reason interface down : 0
Reason no MPLS caps : 0
Reason no IP address : 0
Reason other : 0
RX:
Reason negative delay : 0
Reason delay threshold exceeded : 0
Reason missing TX timestamp : 0
Reason missing RX timestamp : 0
Reason probe full : 0
Reason probe not started : 0
Reason control code error : 0
Reason control code notif : 0
Probes:
Total started : 3
Total completed : 2
Total incomplete : 0
Total advertisements : 0
SR Policy Delay-Measurement:
Total active sessions : 0
Counters:
Packets:
Total sent : 0
Total received : 0
Errors:
TX:
Reason interface down : 0
Reason no MPLS caps : 0
Reason no IP address : 0
Reason other : 0
RX:
Reason negative delay : 0
Reason delay threshold exceeded : 0
Reason missing TX timestamp : 0
Reason missing RX timestamp : 0
Reason probe full : 0
Reason probe not started : 0
Reason control code error : 0
Reason control code notif : 0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
674
Configure Performance Measurement
Link Delay Measurement
Probes:
Total started : 0
Total completed : 0
Total incomplete : 0
Total advertisements : 0
RSVP-TE Delay-Measurement:
Total active sessions : 0
Counters:
Packets:
Total sent : 0
Total received : 0
Errors:
TX:
Reason interface down : 0
Reason no MPLS caps : 0
Reason no IP address : 0
Reason other : 0
RX:
Reason negative delay : 0
Reason delay threshold exceeded : 0
Reason missing TX timestamp : 0
Reason missing RX timestamp : 0
Reason probe full : 0
Reason probe not started : 0
Reason control code error : 0
Reason control code notif : 0
Probes:
Total started : 0
Total completed : 0
Total incomplete : 0
Total advertisements : 0
-------------------------------------------------------------------------------
0/0/CPU0
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
0/2/CPU0
-------------------------------------------------------------------------------
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
675
Configure Performance Measurement
Link Delay Measurement
Last advertisement:
Advertised at: Dec 12 2019 14:10:43.138 (326.782 seconds ago)
Advertised reason: First advertisement
Advertised delays (uSec): avg: 839, min: 587, max: 8209, variance: 297
Next advertisement:
Threshold check scheduled in 1 more probe (roughly every 120 seconds)
Aggregated delays (uSec): avg: 751, min: 589, max: 905, variance: 112
Rolling average (uSec): 756
Current Probe:
Started at Dec 12 2019 14:15:43.154 (26.766 seconds ago)
Packets Sent: 9, received: 9
Measured delays (uSec): avg: 795, min: 631, max: 1199, variance: 164
Next probe scheduled at Dec 12 2019 14:16:13.132 (in 3.212 seconds)
Next burst packet will be sent in 0.212 seconds
Burst packet sent every 3.0 seconds
Probe samples:
Packet Rx Timestamp Measured Delay (nsec)
Dec 12 2019 14:15:43.156 689223
Dec 12 2019 14:15:46.156 876561
Dec 12 2019 14:15:49.156 913548
Dec 12 2019 14:15:52.157 1199620
Dec 12 2019 14:15:55.156 794008
Dec 12 2019 14:15:58.156 631437
Dec 12 2019 14:16:01.157 656440
Dec 12 2019 14:16:04.157 658267
Dec 12 2019 14:16:07.157 736880
You can also use the following commands for verifying the PM for link delay on the local-end router.
Command Description
show performance-measurement history probe Displays the PM link-delay probe history for
interfaces [interface] interfaces.
You can also use the following commands for verifying the PM for link-delay configuration on the remote-end
router.
Command Description
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
676
Configure Performance Measurement
Link Delay Measurement
Command Description
Running Configuration
performance-measurement
interface GigabitEthernet0/0/0/0
delay-measurement
advertise-delay 1000
!
!
!
Verification
RP/0/RSP0/CPU0:ios# show performance-measurement interfaces detail
--------------------------------------------------------------------------------
0/0/CPU0
--------------------------------------------------------------------------------
. . .
Last advertisement:
Advertised at: Nov 29 2021 21:53:00.656 (7.940 seconds ago)
Advertised reason: Advertise delay config
Advertised delays (uSec): avg: 1000, min: 1000, max: 1000, variance: 0
. . .
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
677
Configure Performance Measurement
Link Delay Measurement
Note The default performance measurement delay and liveness profiles configured
using the performance-measurement {delay-profile | liveness-profile}
{sr-policy | endpoint | interface} default commands are still valid and are not
affected.
• Prior to Cisco IOS XR release 7.6.1, performance measurement delay and liveness probes can be
configured using the burst-interval milliseconds command.
Starting with Cisco IOS XR release 7.6.1, performance measurement delay and liveness probes can also
be configured using the tx-interval microseconds command.
Starting with Cisco IOS XR release 7.10.1, the burst-interval milliseconds CLI has been deprecated.
Old configurations stored in NVRAM will be rejected at boot-up.
As a result, performance measurement delay and liveness probes using the old CLI must be re-configured
using the new CLI.
• In Cisco IOS XR release 7.10.1 and 7.11.1, the measurement-mode loopback CLI for delay profile has
been deprecated.
You can create a named performance measurement profile for delay or liveness.
Delay Profile
This example shows how to create a named SR performance measurement delay profile.
Router(config)# performance-measurement delay-profile sr-policy profile2
Router(config-pm-dm-srpolicy)# probe
Router(config-pm-dm-srpolicy-probe)# burst-interval 60
Router(config-pm-dm-srpolicy-probe)# computation-interval 60
Router(config-pm-dm-srpolicy-probe)# protocol twamp-light
Router(config-pm-dm-srpolicy-probe)# tos dscp 63
Router(config-pm-dm-srpolicy)# advertisement
Router(config-pm-dm-srpolicy-adv)# periodic
Router(config-pm-dm-srpolicy-adv-per)# interval 60
Router(config-pm-dm-srpolicy-adv-per)# minimum-change 1000
Router(config-pm-dm-srpolicy-adv-per)# threshold 20
Router(config-pm-dm-srpolicy-adv-per)# commit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
678
Configure Performance Measurement
Link Delay Measurement
Router(config-sr-te-policy)# candidate-paths
Router(config-sr-te-policy-path)# preference 100
Router(config-sr-te-policy-path-pref)# explicit segment-list LIST1
Router(config-sr-te-pp-info)# weight 2
Running Configuration
Router# show run segment-routing traffic-eng policy TEST
segment-routing
traffic-eng
policy TEST
color 4 end-point ipv4 10.10.10.10
candidate-paths
preference 100
explicit segment-list LIST1
weight 2
!
explicit segment-list LIST2
weight 3
!
!
!
performance-measurement
delay-measurement
delay-profile name profile2
Verification
Router# show performance-measurement profile named-profile delay sr-policy name profile2
----------------------------
0/RSP0/CPU0
----------------------------
SR Policy Delay Measurement Profile Name: profile2
Profile configuration:
Measurement mode : One-way
Protocol type : TWAMP-light
Encap mode : UDP
Type of service:
PM-MPLS traffic class : 6
TWAMP-light DSCP : 63
Probe computation interval : 60 (effective: 60) seconds
Burst interval : 60 (effective: 60) mSec
Packets per computation interval : 1000
Periodic advertisement : Enabled
Interval : 60 (effective: 60) sec
Threshold : 20%
Minimum-change : 1000 uSec
Advertisement accelerated : Disabled
Advertisement logging:
Delay exceeded : Disabled (default)
Threshold crossing check : Maximum-delay
Router alert : Disabled (default)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
679
Configure Performance Measurement
Link Delay Measurement
On-Demand SR Policy
Router(config-sr-te)# on-demand color 20
Router(config-sr-te-color)# performance-measurement delay-measurement
Router(config-sr-te-color-delay-meas)# delay-profile name profile2
Router(config-sr-te-color-delay-meas)# commit
Running Configuration
Router# show run segment-routing traffic-eng on-demand color 20
segment-routing
traffic-eng
on-demand color 20
performance-measurement
delay-measurement
delay-profile name profile2
Liveness Profile
This example shows how to create a named SR performance measurement liveness profile.
Router(config)# performance-measurement liveness-profile sr-policy name profile3
Router(config-pm-ld-srpolicy)# probe
Router(config-pm-ld-srpolicy-probe)# burst-interval 60
Router(config-pm-ld-srpolicy-probe)# measurement-mode loopback
Router(config-pm-ld-srpolicy-probe)# tos dscp 10
Router(config-pm-ld-srpolicy-probe)# liveness-detection
Router(config-pm-ld-srpolicy-probe)# multiplier 5
Router(config-pm-ld-srpolicy-probe)# commit
Router(config-sr-te-policy)# performance-measurement
Router(config-sr-te-policy-perf-meas)# liveness-detection liveness-profile name profile3
Running Configuration
Router# show run segment-routing traffic-eng policy TRST2
segment-routing
traffic-eng
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
680
Configure Performance Measurement
Link Delay Measurement
policy TRST2
color 40 end-point ipv4 20.20.20.20
candidate-paths
preference 50
explicit segment-list LIST3
weight 2
!
explicit segment-list LIST4
weight 3
!
!
!
performance-measurement
liveness-detection
liveness-profile name profile3
!
Verification
Router# show performance-measurement profile named-profile delay
-----------
0/RSP0/CPU0
-----------
On-Demand SR Policy
For the same policy, you cannot enable delay-measurement (delay-profile) and liveness-detection
(liveness-profile) at the same time. For example, to disable delay measurement, use the no delay-measurement
command, and then enable the following command for enabling liveness detection.
Router(config-sr-te)# on-demand color 30
Router(config-sr-te-color)# performance-measurement
Router(config-sr-te-color-pm)# liveness-detection liveness-profile name profile1
Router(config-sr-te-color-delay-meas)# commit
Running Configuration
Router# show run segment-routing traffic-eng on-demand color 30
segment-routing
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
681
Configure Performance Measurement
Delay Normalization
traffic-eng
on-demand color 30
performance-measurement
liveness-detection
liveness-profile name profile1
!
Verification
Router# show performance-measurement profile named-profile liveness sr-policy name profile1
--------------------
0/RSP0/CPU0
--------------------
SR Policy Liveness Detection Profile Name: profile1
Profile configuration:
Measurement mode : Loopback
Protocol type : TWAMP-light
Type of service:
TWAMP-light DSCP : 10
Burst interval : 60 (effective: 60) mSec
Destination sweeping mode : Disabled
Liveness detection parameters:
Multiplier : 3
Logging state change : Disabled
Delay Normalization
Table 101: Feature History Table
SR-TE Delay Normalization for Release 7.3.1 This feature extends the current
OSPF Delay Normalization feature to
support OSPF.
Performance measurement (PM) measures various link characteristics like packet loss and delay. Such
characteristics can be used by IS-IS as a metric for Flexible Algorithm computation. Low latency routing
using dynamic delay measurement is one of the primary use cases for Flexible Algorithm technology.
Delay is measured in microseconds. If delay values are taken as measured and used as link metrics during the
IS-IS topology computation, some valid ECMP paths might be unused because of the negligible difference
in the link delay.
The Delay Normalization feature computes a normalized delay value and uses the normalized value instead.
This value is advertised and used as a metric during the Flexible Algorithm computation.
The normalization is performed when the delay is received from the delay measurement component. When
the next value is received, it is normalized and compared to the previous saved normalized value. If the values
are different, then the LSP generation is triggered.
The following formula is used to calculate the normalized value:
• Dm – measured Delay
• Int – configured normalized Interval
• Off – configured normalized Offset (must be less than the normalized interval Int)
• Dn – normalized Delay
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
682
Configure Performance Measurement
Delay Normalization
If the measured delay (Dm) is less than or equal to b, then the normalized delay (Dn) is equal to b. Otherwise,
Dn is b + Int.
Example
The following example shows a low-latency service. The intent is to avoid high-latency links (1-6, 5-2). Links
1-2 and 5-6 are both low-latency links. The measured latency is not equal, but the difference is insignificant.
We can normalize the measured latency before it is advertised and used by IS-IS. Consider a scenario with
the following:
• Interval = 10
• Offset = 3
• Dm = 31
a = 31 / 10 = 3 (3.1, rounded down to 3)
b = 3 * 10 + 3 = 33
In this case, Dm (31) is less than b (33); so Dn is b = 33
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
683
Configure Performance Measurement
Delay Normalization
Configuration
Delay normalization is disabled by default. To enable and configure delay normalization, use the delay
normalize interval interval [offset offset] command.
• interval – The value of the normalize interval in microseconds.
• offset – The value of the normalized offset in microseconds. This value must be smaller than the value
of normalized interval.
IS-IS Configuration
router isis 1
interface GigEth 0/0/0/0
delay normalize interval 10 offset 3
address-family ipv4 unicast
metric 77
OSPF Configuration
router ospf 1
area 0
interface GigabitEthernet0/0/0/0
delay normalize interval 10 offset 3
!
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
684
Configure Performance Measurement
Link Anomaly Detection with IGP Penalty
Link Anomaly Detection with IGP Release 7.4.1 This feature allows you to define
Penalty thresholds above the measured
delay that is considered
“anomalous” or unusual. When this
threshold is exceeded, an anomaly
(A) bit/flag is set along with link
delay attribute that is sent to clients.
Customers might experience performance degradation issues, such as increased latency or packet loss on a
link. Degraded links might be difficult to troubleshoot and can affect applications, especially in cases where
traffic is sent over multiple ECMP paths where one of those paths is degraded.
The Anomaly Detection feature allows you to define a delay anomaly threshold to identify unacceptable link
delays. Nodes monitor link performance using link delay monitoring probes. The measured value is compared
against the delay anomaly threshold values. When the upper bound threshold is exceeded, the link is declared
“abnormal”, and performance measurement sets an anomaly bit (A-bit). When IGP receives the A-bit, IGP
can automatically increase the IGP metric of the link by a user-defined amount to make this link undesirable
or unusable. When the link recovers (lower bound threshold), PM resets the A-bit.
For information on configuring IGP penality, see the following:
• IS-IS Penalty for Link Delay Anomaly
• OSPF Penalty for Link Delay Anomaly
Configuration Example
The following example shows how to configure the upper and lower anomoly thresholds. The range for
upper_bound and lower_bound is from 1 to 200,000 microseconds. The lower_bound value must be less than
the upper_bound value.
RP/0/0/CPU0:router(config)# performance-measurement delay-profile interfaces default
RP/0/0/CPU0:router(config-pm-dm-intf)# advertisement
RP/0/0/CPU0:router(config-pm-dm-intf-adv)# anomaly-check upper-bound 5000 lower-bound 1000
RP/0/0/CPU0:router(config-pm-dm-intf-adv)# commit
Running Configuration
performance-measurement
delay-profile interfaces default
advertisement
anomaly-check
upper-bound 5000 lower-bound 1000
!
!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
685
Configure Performance Measurement
Delay Measurement for IP Endpoint
!
!
end
IP Endpoint Delay Release This feature measures the end-to-end delay and monitors liveness
Measurement Monitoring 7.4.1 of a specified IP endpoint node, including VRF-aware (awareness
of multiple customers belonging to different VRFs).
Release
7.3.2 This feature is supported on IPv4, IPv6, and MPLS data planes.
Delay for an IP endpoint is the amount of time it takes for a data packet to travel from a source device to a
specific IP endpoint within a network.
To measure a delay for a packet, also called a probe, is sent from a source device to the target IP endpoint.
The time from when the packet leaves the source to when it arrives at the endpoint is measured and recorded
as the delay.
You can measure one-way delay, Two-way delay, and Roundtrip delay or delay in loop-back mode. For more
information on Delay measurement, see Link Delay Measurement and Measurement Modes.
• Model Driven Telemetry (MDT) and Event Driven Telemetry (EDT) are supported for the following
data:
• Delay metrics computed in the last probe computation-interval (event: probe-completed)
• Delay metrics computed in the last aggregation-interval; that is, end of the periodic
advertisement-interval (event: advertisement-interval expired)
• Delay metrics last notified (event: notification-triggered)
• Cisco-IOS-XR-perf-meas-oper:performance-measurement/nodes/node/endpoints/
endpoint-delay/endpoint-last-aggregations
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
686
Configure Performance Measurement
IP Endpoint Delay Measurement over MPLS Network Usecases
• Cisco-IOS-XR-perf-meas-oper:performance-measurement/nodes/node/endpoints/
endpoint-delay/endpoint-last-advertisements
Use-Case 1: Delay Measurement Probe Toward an IP Endpoint Reachable in the Global Routing Table
The following figure illustrates a delay measurement probe toward an IP endpoint reachable in the global
routing table. The network interconnecting the sender and the reflector provides plain IP connectivity.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
687
Configure Performance Measurement
IP Endpoint Delay Measurement over MPLS Network Usecases
Figure 53: Delay Measurement Probe Toward an IP Endpoint Reachable in the Global Routing Table
Configuration
RouterA(config)# performance-measurement
RouterA(config-perf-meas)# endpoint ipv4 10.1.1.5
RouterA(config-pm-ep)# source-address ipv4 10.1.1.1
RouterA(config-pm-ep)# delay-measurement
RouterA(config-pm-ep-dm)# exit
RouterA(config-pm-ep)# exit
RouterA(config-perf-meas)# delay-profile endpoint default
RouterA(config-pm-dm-ep)# probe
RouterA(config-pm-dm-ep-probe)# measurement-mode one-way
Running Configuration
performance-measurement
endpoint ipv4 10.1.1.5
source-address ipv4 10.1.1.1
delay-measurement
!
!
delay-profile endpoint default
probe
measurement-mode one-way
!
!
!
Verification
RouterA# show performance-measurement endpoint ipv4 10.1.1.5
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
688
Configure Performance Measurement
IP Endpoint Delay Measurement over MPLS Network Usecases
0/RSP0/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Segment-list : None
Delay Measurement session:
Session ID : 33554433
Last advertisement:
No advertisements have occured
Next advertisement:
Threshold check scheduled in 4 more probes (roughly every 120 seconds)
No probes completed
Current computation:
Started at: Jul 19 2021 16:28:06.723 (17.788 seconds ago)
Packets Sent: 6, received: 0
Measured delays (uSec): avg: 0, min: 0, max: 0, variance: 0
Next probe scheduled at: Jul 19 2021 16:28:36.718 (in 12.207 seconds)
Next burst packet will be sent in 0.207 seconds
Burst packet sent every 3.0 seconds
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
689
Configure Performance Measurement
IP Endpoint Delay Measurement over MPLS Network Usecases
Figure 54: Delay Measurement Probe Toward an IP Endpoint Reachable in a User-Specified VRF
Configuration
RouterA(config)# performance-measurement
RouterA(config-perf-meas)# endpoint ipv4 10.10.10.100 vrf green
RouterA(config-pm-ep)# source-address ipv4 10.1.1.1
RouterA(config-pm-ep)# delay-measurement
RouterA(config-pm-ep-dm)# exit
RouterA(config-pm-ep)# exit
RouterA(config-perf-meas)# delay-profile endpoint default
RouterA(config-pm-dm-ep)# probe
RouterA(config-pm-dm-ep-probe)# measurement-mode one-way
Running Configuration
performance-measurement
endpoint ipv4 10.10.10.100 vrf green
source-address ipv4 10.1.1.1
delay-measurement
!
!
delay-profile endpoint default
probe
measurement-mode one-way
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
690
Configure Performance Measurement
IP Endpoint Delay Measurement over MPLS Network Usecases
!
!
!
Verification
RouterA# show performance-measurement endpoint vrf green
----------------------------------------------------------------------------------------------------------------------------------------------------------------
0/RSP0/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Segment-list : None
Delay Measurement session:
Session ID : 33554434
Last advertisement:
No advertisements have occured
Next advertisement:
Advertisement not scheduled as the probe is not running
Current computation:
Not running: Unable to resolve (non-existing) vrf
Use Case 3: Delay Measurement Probe Toward an IP Endpoint Using Custom Labeled Paths
The following figure illustrates a delay measurement probe toward an IP endpoint learned by the IGP. The
network interconnecting the sender and reflector provides MPLS connectivity with Segment Routing.
The IP endpoint is advertised with multiple SR algorithms (Algo 0 and Flex Algo 128). The probe is configured
with two custom-labeled paths in order to monitor the LSP for each algorithm separately.
Figure 55: Delay Measurement Probe Toward an IP Endpoint Using Custom Labeled Paths
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
691
Configure Performance Measurement
IP Endpoint Delay Measurement over MPLS Network Usecases
Note The probe response messages are not shown in the above figure.
Configuration
RouterA(config)# segment-routing
RouterA(config-sr)# traffic-eng
RouterA(config-sr-te)# segment-list name SIDLIST1-Algo0
RouterA(config-sr-te-sl)# index 10 mpls label 16005
RouterA(config-sr-te-sl)# exit
RouterA(config)# performance-measurement
RouterA(config-perf-meas)# endpoint ipv4 10.1.1.5
RouterA(config-pm-ep)# source-address ipv4 10.1.1.1
RouterA(config-pm-ep)# segment-list name SIDLIST1-Algo0
RouterA(config-pm-ep-sl)# exit
RouterA(config-pm-ep)# segment-list name SIDLIST2-FlexAlgo128
RouterA(config-pm-ep-sl)# exit
RouterA(config-pm-ep)# delay-measurement
RouterA(config-pm-ep-dm)# exit
RouterA(config-pm-ep)# exit
RouterA(config-perf-meas)# delay-profile endpoint default
RouterA(config-pm-dm-ep)# probe
RouterA(config-pm-dm-ep-probe)# measurement-mode one-way
Running Configuration
segment-routing
traffic-eng
segment-list SIDLIST1-Algo0
index 10 mpls label 16005
!
segment-list SIDLIST2-FlexAlgo128
index 10 mpls label 16085
!
!
!
!
performance-measurement
endpoint ipv4 10.1.1.5
segment-list name SIDLIST1-Algo0
!
segment-list name SIDLIST2-FlexAlgo128
!
source-address ipv4 10.1.1.1
delay-measurement
!
!
delay-profile endpoint default
probe
measurement-mode one-way
!
!
!
Verification
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
692
Configure Performance Measurement
IP Endpoint Delay Measurement over MPLS Network Usecases
----------------------------------------------------------------------------------------------------------------------------------------------------------------
0/RSP0/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Segment-list : None
Delay Measurement session:
Session ID : 33554433
Last advertisement:
No advertisements have occured
Next advertisement:
Threshold check scheduled in 4 more probes (roughly every 120 seconds)
No probes completed
Current computation:
Started at: Jul 19 2021 16:31:53.827 (15.844 seconds ago)
Packets Sent: 6, received: 0
Measured delays (uSec): avg: 0, min: 0, max: 0, variance: 0
Next probe scheduled at: Jul 19 2021 16:32:22.957 (in 13.286 seconds)
Next burst packet will be sent in 1.286 seconds
Burst packet sent every 3.0 seconds
Segment-list : SIDLIST1-Algo0
Delay Measurement session:
Session ID : 33554435
Last advertisement:
No advertisements have occured
Next advertisement:
Threshold check scheduled in 4 more probes (roughly every 120 seconds)
No probes completed
Current computation:
Started at: Jul 19 2021 16:31:53.827 (15.844 seconds ago)
Packets Sent: 4, received: 0
Measured delays (uSec): avg: 0, min: 0, max: 0, variance: 0
Next probe scheduled at: Jul 19 2021 16:32:22.957 (in 13.286 seconds)
Next burst packet will be sent in 2.940 seconds
Burst packet sent every 3.0 seconds
Segment-list : SIDLIST2-FlexAlgo128
Delay Measurement session:
Session ID : 33554436
Last advertisement:
No advertisements have occured
Next advertisement:
Threshold check scheduled in 4 more probes (roughly every 120 seconds)
No probes completed
Current computation:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
693
Configure Performance Measurement
IP Endpoint Delay Measurement over MPLS Network Usecases
The following figure illustrates a liveness detection probe toward an IP endpoint learned by the IGP. The
network interconnecting the sender and reflector provides MPLS connectivity with Segment Routing.
The liveness detection multiplier is set to 5 to specify the number of consecutive missed probe packets before
the PM session is declared as down.
Figure 56: IP Endpoint Liveness Detection
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
694
Configure Performance Measurement
SR Policy End-to-End Delay Measurement
Configuration
RouterA(config)# performance-measurement
RouterA(config-perf-meas)# endpoint ipv4 10.1.1.5
RouterA(config-pm-ep)# source-address ipv4 10.1.1.1
RouterA(config-pm-ep)# liveness-detection
RouterA(config-pm-ep-ld)# exit
RouterA(config-pm-ep)# exit
RouterA(config-perf-meas)# liveness-profile endpoint default
RouterA(config-pm-ld-ep)# liveness-detection
RouterA(config-pm-ld-ep-ld)# multiplier 5
RouterA(config-pm-ld-ep-ld)# exit
RouterA(config-pm-ld-ep)# probe
RouterA(config-pm-ld-ep-probe)# measurement-mode loopback
Running Configuration
performance-measurement
endpoint ipv4 10.1.1.5
source-address ipv4 10.1.1.1
liveness-detection
!
!
liveness-profile endpoint default
liveness-detection
multiplier 5
!
probe
measurement-mode loopback
!
!
!
end
Verification
RouterA# show performance-measurement endpoint ipv4 10.1.1.5
--------------------------------------------------------------------------------
0/RSP0/CPU0
--------------------------------------------------------------------------------
Segment-list : None
Session State: Down
Missed count: 0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
695
Configure Performance Measurement
SR Policy End-to-End Delay Measurement
delay values before activating the candidate-path or the segment lists of the SR policy in forwarding table, or
to deactivate the active candidate-path or the segment lists of the SR policy in forwarding table.
Note The end-to-end delay value of an SR policy will be different than the path computation result (for example,
the sum of TE link delay metrics) due to several factors, such as queuing delay within the routers.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
696
Configure Performance Measurement
SR Policy End-to-End Delay Measurement
• periodic-advertisement threshold: Checks the minimum-delay metric change for threshold crossing
for periodic advertisement. The default value is 10 percent and the range is from 0 to 100 percent.
• periodic-advertisement minimum-change: The default value is 500 microseconds (usec) and the range
is from 0 to 100000 microseconds.
• accelerated advertisement: Accelerated advertisement is disabled by default.
• accelerated-advertisement threshold: Checks the minimum-delay metric change for threshold crossing
for accelerated advertisement. The default value is 20 percent and the range is from 0 to 100 percent.
• accelerated-advertisement minimum: The default value is 500 microseconds and the range is from 1
to 100000 microseconds.
Router(config-pm-dm-srpolicy-adv)# accelerated
Router(config-pm-dm-srpolicy-adv-acc)# minimum-change 1000
Router(config-pm-dm-srpolicy-adv-acc)# threshold 10
Router(config-pm-dm-srpolicy-adv-acc)# exit
Note The same UDP destination port is used for delay measurement for links and SR Policy.
This example shows how to configure the UDP destination port for delay.
Router(config)# performance-measurement
Router(config-perf-meas)# protocol twamp-light
Router(config-pm-protocol)# measurement delay unauthenticated
Router(config-pm-proto-mode)# querier-dst-port 12000
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
697
Configure Performance Measurement
SR Policy End-to-End Delay Measurement
Note The destination IPv4 address must be 127/8 range (loopback), otherwise it will
be rejected.
• One PM session is always created for the actual endpoint address of the SR Policy.
• You can specify the number of IP addresses to sweep. The range is from 0 (default, no sweeping) to 128.
• Platforms may have a limitation for large label stack size to not check IP address for hashing.
Verification
Router# show performance-measurement sr-policy
Mon Jan 20 18:48:41.002 PST
-------------------------------------------------------------------------------
0/0/CPU0
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
0/0/CPU0
-------------------------------------------------------------------------------
SR Policy name: srte_c_10_ep_192.168.0.4
Color : 10
Endpoint : 192.168.0.4
Number of candidate-paths : 1
Candidate-Path:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
698
Configure Performance Measurement
SR Policy End-to-End Delay Measurement
Instance : 2
Preference : 100
Protocol-origin : Configured
Discriminator : 100
Source address : 192.168.0.2
Reverse path label : Not configured
Number of segment-lists : 1
Last advertisement:
No advertisements have occured
Next advertisement:
Check scheduled at the end of the current probe (roughly every 30 seconds)
Aggregated delays (uSec): avg: 45218, min: 26512, max: 82600, variance: 18706
Rolling average (uSec): 45218
Last probe:
Packets Sent: 9, received: 9
Measured delays (uSec): avg: 45218, min: 26512, max: 82600, variance: 18706
Current Probe:
Started at Jan 20 2020 18:44:19.170 (3.453 seconds ago)
Packets Sent: 3, received: 3 Measured delays (uSec): avg: 26588, min: 26558,
max: 26630, variance: 30
Next probe scheduled at Jan 20 2020 18:44:34.166 (in 11.543 seconds)
Next burst packet will be sent in 1.543 seconds
Burst packet sent every 5.0 seconds
Liveness Detection: Disabled
Segment-List : R4
16004
Number of atomic paths : 3
Last advertisement:
No advertisements have occured
Next advertisement:
Aggregated delays (uSec): avg: 45218, min: 26512, max: 82600, variance: 18706
Rolling average (uSec): 45218
Last probe:
Packets Sent: 9, received: 9
Measured delays (uSec): avg: 45218, min: 26512, max: 82600, variance: 18706
Current probe:
Packets Sent: 3, received: 3
Measured delays (uSec): avg: 26588, min: 26558, max: 26630, variance: 30
Liveness Detection: Disabled
Atomic path:
Hops : 127.0.0.0
Session ID : 33554434
Last advertisement:
No advertisements have occured
Next advertisement:
Aggregated delays (uSec): avg: 45407, min: 26629, max: 82600, variance: 18778
Rolling average (uSec): 45407
Last Probe:
Packets Sent: 3, received: 3
Measured delays (uSec): avg: 45407, min: 26629, max: 82600, variance: 18778
Current Probe:
Packets Sent: 1, received: 1
Measured delays (uSec): avg: 26630, min: 26630, max: 26630, variance: 0
Probe samples:
Packet Rx Timestamp Measured Delay (nsec)
Jan 20 2020 18:44:19.198 26630730
Liveness Detection: Disabled
Atomic path:
Hops : 127.0.0.1
Session ID : 33554435
Last advertisement:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
699
Configure Performance Measurement
SR Policy End-to-End Delay Measurement
Atomic path:
Hops : 192.168.0.4
Session ID : 33554433
Last advertisement:
No advertisements have occured
Next advertisement:
Aggregated delays (uSec): avg: 45119, min: 26512, max: 81956, variance: 18607
Rolling average (uSec): 45119
Last Probe:
Packets Sent: 3, received: 3
Measured delays (uSec): avg: 45119, min: 26512, max: 81956, variance: 18607
Current Probe:
Packets Sent: 1, received: 1
Measured delays (uSec): avg: 26558, min: 26558, max: 26558, variance: 0
Probe samples:
Packet Rx Timestamp Measured Delay (nsec)
Jan 20 2020 18:44:19.198 26558375
Liveness Detection: Disabled
-------------------------------------------------------------------------------
0/0/CPU0
-------------------------------------------------------------------------------
Candidate-Path:
Preference : 100
Protocol-origin : Configured
Discriminator : 100
Delay-Measurement history (uSec):
Probe Start Timestamp Pkt(TX/RX) Average Min Max
Jan 20 2020 18:46:34.174 9/9 26880 26684 27070
Jan 20 2020 18:46:19.174 9/9 26899 26822 27004
Jan 20 2020 18:46:04.173 9/9 26813 26571 27164
Jan 20 2020 18:45:49.172 9/9 26985 26713 27293
Jan 20 2020 18:45:34.172 9/9 26744 26557 27005
Jan 20 2020 18:45:19.171 9/9 26740 26435 27093
Jan 20 2020 18:45:04.171 9/9 27115 26938 27591
Jan 20 2020 18:44:49.171 9/9 26878 26539 27143
Jan 20 2020 18:44:34.171 9/9 26824 26562 27265
Jan 20 2020 18:44:19.170 9/9 26944 26558 27422
Jan 20 2020 18:44:06.543 9/9 45218 26512 82600
Segment-List : R4
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
700
Configure Performance Measurement
SR Policy End-to-End Delay Measurement
16004
Delay-Measurement history (uSec):
Probe Start Timestamp Pkt(TX/RX) Average Min Max
Jan 20 2020 18:46:34.174 9/9 26880 26684 27070
Jan 20 2020 18:46:19.174 9/9 26899 26822 27004
Jan 20 2020 18:46:04.173 9/9 26813 26571 27164
Jan 20 2020 18:45:49.172 9/9 26985 26713 27293
Jan 20 2020 18:45:34.172 9/9 26744 26557 27005
Jan 20 2020 18:45:19.171 9/9 26740 26435 27093
Jan 20 2020 18:45:04.171 9/9 27115 26938 27591
Jan 20 2020 18:44:49.171 9/9 26878 26539 27143
Jan 20 2020 18:44:34.171 9/9 26824 26562 27265
Jan 20 2020 18:44:19.170 9/9 26944 26558 27422
Jan 20 2020 18:44:06.543 9/9 45218 26512 82600
Atomic path:
Hops : 127.0.0.0
Delay-Measurement history (uSec):
Probe Start Timestamp Pkt(TX/RX) Average Min Max
Jan 20 2020 18:46:34.174 3/3 26927 26747 27070
Jan 20 2020 18:46:19.174 3/3 26982 26970 27004
Jan 20 2020 18:46:04.173 3/3 26895 26647 27164
Jan 20 2020 18:45:49.172 3/3 27054 26764 27293
Jan 20 2020 18:45:34.172 3/3 26801 26694 27005
Jan 20 2020 18:45:19.171 3/3 26807 26524 27093
Jan 20 2020 18:45:04.171 3/3 27226 26938 27591
Jan 20 2020 18:44:49.171 3/3 26976 26644 27143
Jan 20 2020 18:44:34.171 3/3 26880 26679 27265
Jan 20 2020 18:44:19.170 3/3 26994 26630 27422
Jan 20 2020 18:44:06.543 3/3 45407 26629 82600
Atomic path:
Hops : 127.0.0.1
Delay-Measurement history (uSec):
Probe Start Timestamp Pkt(TX/RX) Average Min Max
Jan 20 2020 18:46:34.174 3/3 26865 26705 26988
Jan 20 2020 18:46:19.174 3/3 26846 26822 26881
Jan 20 2020 18:46:04.173 3/3 26787 26581 26939
Jan 20 2020 18:45:49.172 3/3 26954 26728 27180
Jan 20 2020 18:45:34.172 3/3 26724 26577 26957
Jan 20 2020 18:45:19.171 3/3 26705 26452 27032
Jan 20 2020 18:45:04.171 3/3 27043 26972 27124
Jan 20 2020 18:44:49.171 3/3 26848 26550 27062
Jan 20 2020 18:44:34.171 3/3 26800 26562 27204
Jan 20 2020 18:44:19.170 3/3 26927 26576 27327
Jan 20 2020 18:44:06.543 3/3 45128 26521 81961
Atomic path:
Hops : 192.168.0.4
Delay-Measurement history (uSec):
Probe Start Timestamp Pkt(TX/RX) Average Min Max
Jan 20 2020 18:46:34.174 3/3 26848 26684 26967
Jan 20 2020 18:46:19.174 3/3 26871 26833 26913
Jan 20 2020 18:46:04.173 3/3 26759 26571 26876
Jan 20 2020 18:45:49.172 3/3 26947 26713 27163
Jan 20 2020 18:45:34.172 3/3 26708 26557 26939
Jan 20 2020 18:45:19.171 3/3 26708 26435 27075
Jan 20 2020 18:45:04.171 3/3 27078 27016 27138
Jan 20 2020 18:44:49.171 3/3 26812 26539 27043
Jan 20 2020 18:44:34.171 3/3 26793 26582 27181
Jan 20 2020 18:44:19.170 3/3 26911 26558 27308
Jan 20 2020 18:44:06.543 3/3 45119 26512 81956
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
701
Configure Performance Measurement
SR Policy End-to-End Delay Measurement
-------------------------------------------------------------------------------
0/0/CPU0
-------------------------------------------------------------------------------
SR Policy name: srte_c_10_ep_192.168.0.4
Candidate-Path:
Instance : 2
Preference : 100
Protocol-origin : Configured
Discriminator : 100
Packets:
Total sent : 141
Total received : 141
Errors:
Total sent errors : 0
Total received errors : 0
Probes:
Total started : 16
Total completed : 15
Total incomplete : 0
Total advertisements : 2
Segment-List : R4
16004
Packets:
Total sent : 141
Total received : 141
Errors:
Total sent errors : 0
Total received errors : 0
Probes:
Total started : 16
Total completed : 15
Total incomplete : 0
Total advertisements : 2
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
702
Configure Performance Measurement
Path Tracing in SRv6 Network
Path Tracing Midpoint Release 7.8.1 Path Tracing (PT) provides a log or record of the packet path
Node as a sequence of interface IDs along with its time stamp. In
Path Tracing, a node can behave as a source, midpoint, or sink
node.
The Path Tracing Midpoint feature is implemented in this
release which measures the hop-by-hop delay, traces the path
in the network and collects egress interface load information
and interface Id, and stores them in the Midpoint Compressed
Data (MCD) section of Hop-by-Hop Path Tracing (HbH-PT)
header.
This feature provides visibility to the Path Tracing Midpoint
node that handles IPv6 transit in Path Tracing and full
characterization of the packet delivery path. It provides real
time information and the current status of the network.
This feature introduces the following command:
• performance-measurement interface
Operators do not know the actual path that the packets take within their network. This makes operations, such
as troubleshooting routing problems, or verifying Equal-Cost Multipath (ECMP), a complex problem. Also,
operators want to characterize the network in terms of delay and load on a per-hop basis.
Knowledge of the Path Tracing Midpoint helps the operators to troubleshoot the routing problems faster.
This feature allows the operators to:
• Detect the actual path the packet takes between any two nodes in network (A and Z).
• Measure the end-to-end delay from A to Z.
• Measure the per-hop delay at each node on the path from A to Z.
• Detects the load on each router that forwards the packet from A to Z
Path Tracing (PT) provides a log or record of the packet path as a sequence of interface IDs along with its
time-stamp. In addition, it provides a record of end-to-end delay, per-hop delay, and load on each egress
interface along the packet delivery path.
In Path Tracing, a node can behave as a source, midpoint, or a sink node.
The source node generates and injects probe packets toward a destination node to trace the time-stamp and
interface ID along the path of the probe packet. The Interface ID value of 0 means that Path Tracing (PT) is
disabled on the interface.
Path Tracing (PT) Midpoint: It is a transit node that performs IPv6 routing. In addition, it records the PT
information (MCD) in the HbH-PT.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
703
Configure Performance Measurement
Limitations and Guidelines
Note There is no support for Path Tracing Midpoint on transit nodes that perform SRH operations or SRv6 endpoint
operations.
• Midpoint Compressed Data (MCD): The PT Midpoint along the packet delivery path from the Source
to Sink node, stores its PT information into the HbH-PT header. This PT information is called Midpoint
Compressed Data (MCD).
• Hop-by-Hop Path Tracing (HbH-PT): In IPv6 The HbH PT Options header is used to carry optional
information that is examined and processed by every node along a packet's delivery path. It contains a
stack of MCDs.
• PT-Aware Midpoint: A midpoint node that performs plain IPv6 routing or SR Endpoint processing and
in addition stores the Path Tracing information in HbH-PT.
• PT-Unaware Midpoint: A midpoint node that performs plain IPv6 routing or SR Endpoint processing
and is not capable of performing Path Tracing.
• PT-Legacy Midpoint: A midpoint node that performs plain IPv6 routing or SR Endpoint processing and
is not capable of recording Path Tracing information in the HBH-PT. However, it is capable of exporting
Path Tracing information directly to the collector, using the node telemetry system.
• PT Source: A Source node is the one that starts a PT session and generates PT probes.
• PT Sink: A node that receives the PT probes sent from the Source node containing the information
recorded by every PT Midpoint along the path and forwards them to the collector after recording its Path
Tracing information.
• RC: Regional collector that receives PT probes, parses, and stores them in Timeseries DB
The destination or sink node that receives the PT probes generated by the PT source node, stores PT related
info into PT-TLV and forwards them to a Regional Collector (RC). This Regional Collector (RC) parses and
stores them in the TimeSeries Database. It uses the information in the Hop-by-Hop Path Tracing (HbH-PT)
to construct the packet delivery path and the timestamps at each node.
Note These configurations must be done on the Source, Midpoint and Sink routers as shown in the following
configuration examples.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
704
Configure Performance Measurement
Configure Midpoint, Sink, and Source Nodes
Router(config)# performance-measurement
Router(config-pm)# interface FourHundredGigE0/0/0/1
Router(config-pm-interf)# path-tracing
Router(config-pm-interf-interf-id)# interface-id 200
Router(config-pm-interf-time)# exit
Running Configuration
• Running configuration example of Midpoint node:
Configure the Interface ID under Path-tracing for the Midpoint node and for it to participate in the MCD
updates inside the probe packets:
performance-measurement
interface FourHundredGigE0/0/0/1
path-tracing
interface-id 200
exit
!
!
!
!
Verification
It is good to check the target interface configuration and performance-measurement configuration for that
interface.
Verify using the show commands listed below to check if the PT configuration is applied to the interface
properly.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
705
Configure Performance Measurement
Configure Midpoint, Sink, and Source Nodes
Path-Tracing:
Interface ID : 64
Load IN : 0
Load OUT : 0
Load Interval : 60
Last FIB Update:
Updated at: Mar 04 2022 13:34:43.112 (0.392 seconds ago)
Update reason: Path tracing config
Update status: Done
This is an example of Show CLI without InterfaceID, which means PT is disabled on the target interface. So,
you can configure timestamp template:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
706
Configure Performance Measurement
Configure Midpoint, Sink, and Source Nodes
Path-Tracing:
Interface ID : 0
Timestamp Template : 3
Load IN : 0
Load OUT : 0
Load Interval : 60
Last FIB Update:
Updated at: Mar 04 2022 13:49:37.492 (176.418 seconds ago)
Update reason: Path tracing config
Update status: Done
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
707
Configure Performance Measurement
Two-Way Active Measurement Protocol Light Source Address Filtering
Two-Way Active Measurement Release 7.11.1 You can now restrict unauthorized
Protocol Light Source Address users from sending packets to the
Filtering network and prevent compromising
the network security and reliability.
For a destination UDP port, you can
configure the list of IP addresses
that can send Two-Way Active
Measurement Protocol
(TWAMP)-light packets to
responder or querier nodes.
In earlier releases, the responder or
querier node accepted
TWAMP-light packets from all IP
addresses.
The feature introduces these
changes:
CLI:
• The querier and responder
keywords are introduced in the
performance-measurement
protocol twamp-light
measurement delay
command.
Earlier, the responder node scanned all IP addresses of a querier on the destination UDP port. In other words,
the responder node accepted packets from any IP address. See Measurement Modes for more information
about querier and responder nodes.
Note The responder is also called the reflector, and the querier is also called the sender.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
708
Configure Performance Measurement
Usage Guidelines and Limitations
With this configuration, you can specify the source IP addresses on both the responder and querier nodes.
The responder or querier nodes accept packets only from the IP addresses configured in the TWAMP-light
protocol, and reject the packets from an IP address that isn’t included in the configured list.
All the configured addresses are available for use on all interfaces in the Local Packet Transport Services
(LPTS). The configured address filter applies to both default and nondefault VRFs. The TWAMP delay
measurement sessions use the configured addresses.
Note The PM UDP port accepts all incoming IPv4 or IPv6 packets when there are no IPv4 or IPv6 prefix entries
configured.
Running Configuration
performance-measurement
protocol twamp-light
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
709
Configure Performance Measurement
Configure IP address on querier and responder nodes
measurement delay
responder
allow-querier
address ipv4 10.10.10.1
!
!
!
!
!
End
Verification
The following example shows output from the IP address of a querier, which is configured on a responder
node for delay measurement.
Router#show performance-measurement allowed-querier summary
Wed Oct 11 10:41:43.268 UTC
----------------------------------------------------------------------------------------------------------------------------------------------------------------
0/RP0/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Allowed-querier IPv4 prefix : 1
10.10.10.1/32
Allowed-querier IPv6 prefix : 0
Running Configuration
performance-measurement
protocol twamp-light
measurement delay
querier
allow-responder
address ipv4 10.10.10.1
!
!
!
!
!
End
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
710
Configure Performance Measurement
Configure IP address on querier and responder nodes
Verification
The following example shows output from the IP address of a responder, which is configured on a querier
node for delay measurement.
Router#show performance-measurement allowed-responder summary
Wed Mar 29 19:38:06.381 UTC
----------------------------------------------------------------------------------------------------------------------------------------------------------------
0/RP1/CPU0
----------------------------------------------------------------------------------------------------------------------------------------------------------------
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
711
Configure Performance Measurement
Configure IP address on querier and responder nodes
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
712
CHAPTER 16
Configure Topology-Independent Loop-Free
Alternate (TI-LFA)
Topology-Independent Loop-Free Alternate (TI-LFA) uses segment routing to provide link, node, and Shared
Risk Link Groups (SRLG) protection in topologies where other fast reroute techniques cannot provide
protection.
• Classic Loop-Free Alternate (LFA) is topology dependent, and therefore cannot protect all destinations
in all networks. A limitation of LFA is that, even if one or more LFAs exist, the optimal LFA may not
always be provided.
• Remote LFA (RLFA) extends the coverage to 90-95% of the destinations, but it also does not always
provide the most desired repair path. RLFA also adds more operational complexity by requiring a targeted
LDP session to the RLFAs to protect LDP traffic.
TI-LFA provides a solution to these limitations while maintaining the simplicity of the IPFRR solution.
The goal of TI-LFA is to reduce the packet loss that results while routers converge after a topology change
due to a link or node failure. Rapid failure repair (< 50 msec) is achieved through the use of pre-calculated
backup paths that are loop-free and safe to use until the distributed network convergence process is completed.
The optimal repair path is the path that the traffic will eventually follow after the IGP has converged. This is
called the post-convergence path. This path is preferred for the following reasons:
• Optimal for capacity planning — During the capacity-planning phase of the network, the capacity of a
link is provisioned while taking into consideration that such link with be used when other links fail.
• Simple to operate — There is no need to perform a case-by-case adjustments to select the best LFA
among multiple candidate LFAs.
• Fewer traffic transitions — Since the repair path is equal to the post-convergence path, the traffic switches
paths only once.
The following topology illustrates the optimal and automatic selection of the TI-LFA repair path.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
713
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
714
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Usage guidelines and limitations for TI-LFA
When you enable link protection, you can also enable node protection, SRLG protection, or both, and specify
a tiebreaker priority in case there are multiple LFAs.
The following example illustrates the link, node, and SRLG protection types. In this topology, Node2 applies
different protection models to protect traffic to Node7.
Figure 58: TI-LFA Protection Types
Limitations
1
TI-LFA Functionality IS-IS OSPFv2
Protected Traffic Types
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
715
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Usage guidelines and limitations for TI-LFA
1
TI-LFA Functionality IS-IS OSPFv2
Protection for SR labeled traffic Supported Supported
Protection of IPv4 unlabeled traffic Supported Supported
(IS-ISv4)
Protection of IPv6 unlabeled traffic Supported N/A
(IS-ISv6)
Protection Types
Link Protection Supported Supported
Node Protection Supported Supported
Local SRLG Protection Supported Supported
Weighted Remote SRLG Protection Supported Supported
Interface Types
Ethernet Interfaces Supported Supported
TI-LFA with L3VPN Supported Supported
Additional Functionality
Maximum number of labels that can be pushed on the backup path 10 10
(including the label of the protected prefix)
BFD-triggered Supported Supported
BFDv6-triggered Supported N/A
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
716
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Configuring TI-LFA for IS-IS
SUMMARY STEPS
1. configure
2. router isis instance-id
3. interface type interface-path-id
4. address-family ipv4 [unicast]
5. fast-reroute per-prefix
6. fast-reroute per-prefix ti-lfa
7. fast-reroute per-prefix tiebreaker {node-protecting | srlg-disjoint} index priority
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 router isis instance-id Enables IS-IS routing for the specified routing instance,
and places the router in router configuration mode.
Example:
Note
RP/0/RSP0/CPU0:router(config)# router isis 1 You can change the level of routing to be performed by a
particular routing instance by using the is-type router
configuration command.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
717
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Configuring TI-LFA for OSPF
RP/0/RSP0/CPU0:router(config-isis)# interface
Bundle-Ether1
Step 4 address-family ipv4 [unicast] Specifies the IPv4 address family, and enters router address
family configuration mode.
Example:
RP/0/RSP0/CPU0:router(config-isis-if)#
address-family ipv4 unicast
RP/0/RSP0/CPU0:router(config-isis-if-af)#
fast-reroute per-prefix
Step 6 fast-reroute per-prefix ti-lfa Enables per-prefix TI-LFA fast reroute link protection.
Example:
RP/0/RSP0/CPU0:router(config-isis-if-af)#
fast-reroute per-prefix ti-lfa
Step 7 fast-reroute per-prefix tiebreaker {node-protecting | Enables TI-LFA node or SRLG protection and specifies the
srlg-disjoint} index priority tiebreaker priority. Valid priority values are from 1 to 255.
The lower the priority value, the higher the priority of the
Example:
rule. Link protection always has a lower priority than node
or SRLG protection.
RP/0/RSP0/CPU0:router(config-isis-if-af)#
fast-reroute per-prefix tie-breaker srlg-disjoint Note
index 100 The same attribute cannot be configured more than once
on an interface.
Note
For IS-IS, TI-LFA node protection and SRLG protection
can be configured on the interface or the instance.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
718
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Configuring TI-LFA for OSPF
Note TI-LFA can be configured on the instance, area, or interface. When configured on the instance or area, all
interfaces in the instance or area inherit the configuration.
SUMMARY STEPS
1. configure
2. router ospf process-name
3. area area-id
4. interface type interface-path-id
5. fast-reroute per-prefix
6. fast-reroute per-prefix ti-lfa
7. fast-reroute per-prefix tiebreaker {node-protecting | srlg-disjoint} index priority
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Step 2 router ospf process-name Enables OSPF routing for the specified routing process,
and places the router in router configuration mode.
Example:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
719
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
TI-LFA Node and SRLG Protection: Examples
RP/0/RSP0/CPU0:router(config-ospf)# area 1
RP/0/RSP0/CPU0:router(config-ospf-ar)# interface
Bundle-Ether1
RP/0/RSP0/CPU0:router(config-ospf-ar-if)#
fast-reroute per-prefix
Step 6 fast-reroute per-prefix ti-lfa Enables per-prefix TI-LFA fast reroute link protection.
Example:
RP/0/RSP0/CPU0:router(config-ospf-ar-if)#
fast-reroute per-prefix ti-lfa
Step 7 fast-reroute per-prefix tiebreaker {node-protecting | Enables TI-LFA node or SRLG protection and specifies the
srlg-disjoint} index priority tiebreaker priority. Valid priority values are from 1 to 255.
The higher the priority value, the higher the priority of the
Example:
rule. Link protection always has a lower priority than node
or SRLG protection.
RP/0/RSP0/CPU0:router(config-ospf-ar-if)#
fast-reroute per-prefix tie-breaker srlg-disjoint Note
index 100 The same attribute cannot be configured more than once
on an interface.
router ospf 1
area 1
interface GigabitEthernet0/0/2/1
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
720
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Configuring Global Weighted SRLG Protection
Both link-protecting and node-protecting TI-LFA backup paths will be computed. If the priority associated
with the node-protecting tiebreaker is higher than any other tiebreakers, then node-protecting post-convergence
backup paths will be selected, if it is available.
router ospf 1
area 1
interface GigabitEthernet0/0/2/1
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
fast-reroute per-prefix tiebreaker srlg-disjoint index 100
Both link-protecting and SRLG-protecting TI-LFA backup paths will be computed. If the priority associated
with the SRLG-protecting tiebreaker is higher than any other tiebreakers, then SRLG-protecting
post-convergence backup paths will be selected, if it is available.
router ospf 1
area 1
interface GigabitEthernet0/0/2/1
fast-reroute per-prefix
fast-reroute per-prefix ti-lfa
fast-reroute per-prefix tiebreaker node-protecting index 200
fast-reroute per-prefix tiebreaker srlg-disjoint index 100
Link-protecting, node-protecting, and SRLG-protecting TI-LFA backup paths will be computed. If the priority
associated with the node-protecting tiebreaker is highest from all tiebreakers, then node-protecting
post-convergence backup paths will be selected, if it is available. If the node-protecting backup path is not
available, SRLG-protecting post-convergence backup path will be used, if it is available.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
721
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Configuring Global Weighted SRLG Protection
This example shows how to configure the local SRLG with global weighted SRLG protection feature.
RP/0/RP0/CPU0:router(config)# srlg
RP/0/RP0/CPU0:router(config-srlg)# interface TenGigE0/0/0/0
RP/0/RP0/CPU0:router(config-srlg-if)# name group1
RP/0/RP0/CPU0:router(config-srlg-if)# exit
RP/0/RP0/CPU0:router(config-srlg)# interface TenGigE0/0/0/1
RP/0/RP0/CPU0:router(config-srlg-if)# name group1
RP/0/RP0/CPU0:router(config-srlg)# exit
RP/0/RP0/CPU0:router(config-srlg)# name group1 value 100
RP/0/RP0/CPU0:router(config-srlg)# exit
RP/0/RP0/CPU0:router(config)# router isis 1
RP/0/RP0/CPU0:router(config-isis)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-isis-af)# fast-reroute per-prefix srlg-protection weighted-global
RP/0/RP0/CPU0:router(config-isis-af)# fast-reroute per-prefix tiebreaker srlg-disjoint index
1
RP/0/RP0/CPU0:router(config-isis-af)# exit
RP/0/RP0/CPU0:router(config-isis)# interface TenGigE0/0/0/0
RP/0/RP0/CPU0:router(config-isis-if)# point-to-point
RP/0/RP0/CPU0:router(config-isis-if)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-isis-if-af)# fast-reroute per-prefix
RP/0/RP0/CPU0:router(config-isis-if-af)# fast-reroute per-prefix ti-lfa
RP/0/RP0/CPU0:router(config-isis-if-af)# exit
RP/0/RP0/CPU0:router(config-isis-if)# exit
RP/0/RP0/CPU0:router(config-isis)# srlg
RP/0/RP0/CPU0:router(config-isis-srlg)# name group1
RP/0/RP0/CPU0:router(config-isis-srlg-name)# admin-weight 5000
This example shows how to configure the global weighted SRLG protection feature with remote SRLG
flooding. The configuration includes local and remote router configuration. On the local router, the global
weighted SRLG protection is enabled by using the fast-reroute per-prefix srlg-protection weighted-global
command. In the remote router configuration, you can control the SRLG value flooding by using the advertise
application lfa link-attributes srlg command. You should also globally configure SRLG on the remote
router.
The local router configuration for global weighted SRLG protection with remote SRLG flooding is as follows:
RP/0/RP0/CPU0:router(config)# router isis 1
RP/0/RP0/CPU0:router(config-isis)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-isis-af)# fast-reroute per-prefix srlg-protection weighted-global
RP/0/RP0/CPU0:router(config-isis-af)# fast-reroute per-prefix tiebreaker srlg-disjoint index
1
RP/0/RP0/CPU0:router(config-isis-af)# exit
RP/0/RP0/CPU0:router(config-isis)# interface TenGigE0/0/0/0
RP/0/RP0/CPU0:router(config-isis-if)# point-to-point
RP/0/RP0/CPU0:router(config-isis-if)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-isis-if-af)# fast-reroute per-prefix
RP/0/RP0/CPU0:router(config-isis-if-af)# fast-reroute per-prefix ti-lfa
RP/0/RP0/CPU0:router(config-isis-if-af)# exit
RP/0/RP0/CPU0:router(config-isis-if)# exit
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
722
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Configuring Global Weighted SRLG Protection
RP/0/RP0/CPU0:router(config-isis)# srlg
RP/0/RP0/CPU0:router(config-isis-srlg)# name group1
RP/0/RP0/CPU0:router(config-isis-srlg-name)# admin-weight 5000
The remote router configuration for global weighted SRLG protection with remote SRLG flooding is as
follows:
RP/0/RP0/CPU0:router(config)# srlg
RP/0/RP0/CPU0:router(config-srlg)# interface TenGigE0/0/0/0
RP/0/RP0/CPU0:router(config-srlg-if)# name group1
RP/0/RP0/CPU0:router(config-srlg-if)# exit
RP/0/RP0/CPU0:router(config-srlg)# interface TenGigE0/0/0/1
RP/0/RP0/CPU0:router(config-srlg-if)# name group1
RP/0/RP0/CPU0:router(config-srlg-if)# exit
RP/0/RP0/CPU0:router(config-srlg)# name group1 value 100
RP/0/RP0/CPU0:router(config-srlg)# exit
RP/0/RP0/CPU0:router(config)# router isis 1
RP/0/RP0/CPU0:router(config-isis)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-isis-af)# advertise application lfa link-attributes srlg
This example shows configuring the global weighted SRLG protection feature with static provisioning of
SRLG values for remote links. You should perform these configurations on the local router.
RP/0/RP0/CPU0:router(config)# srlg
RP/0/RP0/CPU0:router(config-srlg)# interface TenGigE0/0/0/0
RP/0/RP0/CPU0:router(config-srlg-if)# name group1
RP/0/RP0/CPU0:router(config-srlg-if)# exit
RP/0/RP0/CPU0:router(config-srlg)# interface TenGigE0/0/0/1
RP/0/RP0/CPU0:router(config-srlg-if)# name group1
RP/0/RP0/CPU0:router(config-srlg-if)# exit
RP/0/RP0/CPU0:router(config-srlg)# name group1 value 100
RP/0/RP0/CPU0:router(config-srlg)# exit
RP/0/RP0/CPU0:router(config)# router isis 1
RP/0/RP0/CPU0:router(config-isis)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-isis-af)# fast-reroute per-prefix srlg-protection weighted-global
RP/0/RP0/CPU0:router(config-isis-af)# fast-reroute per-prefix tiebreaker srlg-disjoint index
1
RP/0/RP0/CPU0:router(config-isis-af)# exit
RP/0/RP0/CPU0:router(config-isis)# interface TenGigE0/0/0/0
RP/0/RP0/CPU0:router(config-isis-if)# point-to-point
RP/0/RP0/CPU0:router(config-isis-if)# address-family ipv4 unicast
RP/0/RP0/CPU0:router(config-isis-if-af)# fast-reroute per-prefix
RP/0/RP0/CPU0:router(config-isis-if-af)# fast-reroute per-prefix ti-lfa
RP/0/RP0/CPU0:router(config-isis-if-af)# exit
RP/0/RP0/CPU0:router(config-isis-if)# exit
RP/0/RP0/CPU0:router(config-isis)# srlg
RP/0/RP0/CPU0:router(config-isis-srlg)# name group1
RP/0/RP0/CPU0:router(config-isis-srlg-name)# admin-weight 5000
RP/0/RP0/CPU0:router(config-isis-srlg-name)# static ipv4 address 10.0.4.1 next-hop ipv4
address 10.0.4.2
RP/0/RP0/CPU0:router(config-isis-srlg-name)# static ipv4 address 10.0.4.2 next-hop ipv4
address 10.0.4.1
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
723
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
SR-MPLS over GRE as TI-LFA Backup Path
SR-MPLS over GRE as Release This feature allows the router (as ABR) to program a Generic Routing
TI-LFA Backup Path 7.3.1 Encapsulation (GRE) tunnel as an outgoing interface for TI-LFA
backup paths computed by the IGP in a Segment Routing network.
Two links between ABR 2 and ABR 3 are required, one in each IS-IS level. These links provide protection
in each direction and ensure that there is always an alternate path inside the IGP domain.
Note Alternatively, a single link with two logical sub-interfaces could be used between the ABRs.
TI-LFA performs the backup path calculation inside the domain (process, level, or area) of the failed link.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
724
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
SR-MPLS over GRE as TI-LFA Backup Path
For example, if the link between nodes 2 and 5 failed, the link between ABR 2 and 3 would create a TI-LFA
path in L1 IS-IS level. If the link between nodes 1 and 2 failed, the link between ABR 2 and 3 would create
a TI-LFA path in L2 IS-IS level.
However, if the interconnecting link between ABRs are in the same Shared Risk Link Groups (SRLG) as
other links inside the domain (for example, the link between Nodes 2 and 3 are in the same SRLG as link
between Nodes 2 and 5), TI-LFA with local SRLG protection would not find an alternate path.
In cases where it is not feasible to provide interconnecting links between ABRs (for example, the ABR nodes
might be in different locations with no connectivity options), TI-LFA will not be able to compute backup
paths for all of the prefixes.
To address these issues, you can create a GRE tunnel in each domain, between the ABRs, which can be used
as TI-LFA backup paths.
Now, if a link failure occurs in either IS-IS level (for example, between nodes 1 and 2 or between nodes 2
and 5), the path is protected by the GRE tunnel.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
725
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Limitations
Traffic flowing in the opposite direction, from node 5 to node 1, is simply routed over nodes 6-3-4 to node
1.
Limitations
The following behaviors and limitations apply to the router when a GRE tunnel is programmed as backup
interface for TI-LFA:
• The MPLS label of a protected prefix must be the same in the primary and backup paths (SWAP scenario)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
726
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Example: SR-MPLS over GRE as TI-LFA Backup Path
• Single-segment TI-LFA is supported. In this scenario, the router pushes one extra label when programming
the backup path. The total label stack is 2, including the primary label and backup label.
• Double-segment (or more) TI-LFA is not supported. In this scenario, the router pushes two or more extra
labels when programming the backup path.
• GRE tunnel as a primary or backup path for an SR policy with TI-LFA protection is not supported.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
727
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Example: SR-MPLS over GRE as TI-LFA Backup Path
Area 100
Area 100
Configuration on Node 5
segment-routing mpls
!
set-attributes
address-family ipv4
sr-label-preferred
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
728
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Example: SR-MPLS over GRE as TI-LFA Backup Path
!
connected-prefix-sid-map
address-family ipv4
5.5.5.5/32 index 5 range 1
!
interface TenGigabitEthernet0/0/26
description ***Connected to ABR 2
ip address 10.2.5.5 255.255.255.0
ip ospf network point-to-point
cdp enable
!
interface TenGigabitEthernet0/0/27
description ***Connected to Node 6
ip address 10.5.6.5 255.255.255.0
ip ospf network point-to-point
cdp enable
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
729
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Example: SR-MPLS over GRE as TI-LFA Backup Path
GRE RED is configured in Area 100 using Loopback55 (on ABR2) and Loopback 66 (on ABR3). These
loopbacks are advertised in Area 0:
Figure 60: GRE RED
Configuration on ABR 2
interface Loopback0
ipv4 address 2.2.2.2 255.255.255.255
!
interface Loopback50
description Lo for GRE BLU
ipv4 address 50.0.0.50 255.255.255.0
!
interface Loopback55
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
730
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Example: SR-MPLS over GRE as TI-LFA Backup Path
Note In the above configuration, GRE tunnel-ip5060 belongs to area 0, but its source and destination addresses are
advertised in area 100. This ensures disjointness between the GRE tunnel and the links in area 0 that it protects.
The same applies to GRE tunnel-ip5566 which belongs to area 100 and its source and destination addresses
are advertised in area 0.
A high cost is applied to the GRE tunnel interfaces so that they are used only as a backup path.
Configuration on ABR 3
interface Loopback0
ipv4 address 3.3.3.3 255.255.255.255
!
interface Loopback60
description Lo for GRE BLU
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
731
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Example: SR-MPLS over GRE as TI-LFA Backup Path
Note In the above configuration, GRE tunnel-ip5060 belongs to area 0, but its source and destination addresses are
advertised in area 100. This ensures disjointness between the GRE tunnel and the links in area 0 that it protects.
The same applies to GRE tunnel-ip5566 which belongs to area 100 and its source and destination addresses
are advertised in area 0.
A high cost is applied to the GRE tunnel interfaces so that they are used only as a backup path.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
732
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Example: SR-MPLS over GRE as TI-LFA Backup Path
With GRE tunnel as TI-LFA backup, traffic flowing from Node 5 to Node 1 will be encapsulated at ABR2
and routing over the GRE tunnel.
With a link failure between Node 5 and ABR 2, traffic flowing from Node 5 to Node 1 is simply routed through
Nodes 6-3-4 to Node 1.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
733
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Unlabeled IPv6 Traffic Protection
With GRE tunnel as TI-LFA backup, traffic flowing from Node 1 to Node 5 will be encapsulated at ABR2
and routing over the GRE tunnel.
IPv6 Unlabeled Traffic protection Release 7.3.1 TI-LFA provides protection for
with TI-LFA SR-labeled traffic (IPv4 and IPv6
prefixes associated with a prefix
SID) and for other unlabeled IPv4
prefixes.
This feature introduces support for
protecting unlabeled IPv6 prefixes.
This feature introduces support for protecting unlabeled IPv6 prefixes. IS-IS can calculate and install TI-LFA
backup paths for unlabeled IPv6 prefixes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
734
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Unlabeled IPv6 Traffic Protection
By default, all IPv6 prefixes without a prefix SID are eligible to have a dynamic local label assigned to them.
This behavior provides the greatest degree of protection, but in some deployments, it may consume too many
MPLS labels. This feature provides the ability to disable local label allocation or to restrict local label allocation
to a subset of prefixes based on a prefix list or route policy.
Use the following commands in IS-IS IPv6 address family configuration mode to specify the local label
allocation behavior:
• segment-routing mpls unlabeled protection disable—Disable local label allocation.
• segment-routing mpls unlabeled protection prefix-list sample_prefix_list—Restricts local label
allocation to the prefixes based on a prefix list.
• segment-routing mpls unlabeled protection route-policy sample_rpl—Restricts local label allocation
to the prefixes based a route policy.
Configuration
The following example shows how to disable local label allocation:
Router(config)# router isis 1
Router(config-isis)# address-family ipv6 unicast
Router(config-isis-af)# segment-routing mpls unlabeled protection disable
Router(config-isis-af)#
The following example shows how to enable local label allocation for prefixes in a prefix list:
Router(config)# ipv6 prefix-list sample_prefix_list
Router(config-ipv6-pfx)# 10 permit 333::333:0:0/96 ge 112
Router(config-ipv6-pfx)# 20 permit 666::666:0:0/96 ge 112
Router(config-ipv6-pfx)# exit
Router(config)#
The following example shows how to enable local label allocation for prefixes in a route policy:
Router(config)# prefix-set sample_prefix_set
Router(config-pfx)# 333::333:1:0/112
Router(config-pfx)# end-set
Router(config)# route-policy sample_rpl
Router(config-rpl)# if destination in sample_prefix_set then
Router(config-rpl-if)# pass
Router(config-rpl-if)# else drop endif
Router(config-rpl)# end-policy
Router(config)#
Verification
In the following show command output, 24103 is the local label used to program the prefix with a TI-LFA
backup.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
735
Configure Topology-Independent Loop-Free Alternate (TI-LFA)
Unlabeled IPv6 Traffic Protection
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
736
CHAPTER 17
Configure Segment Routing Microloop Avoidance
The Segment Routing Microloop Avoidance feature enables link-state routing protocols, such as IS-IS, to
prevent or avoid microloops during network convergence after a topology change.
• About Segment Routing Microloop Avoidance, on page 737
• Usage Guidelines and Limitations, on page 740
• Configure Segment Routing Microloop Avoidance for IS-IS, on page 740
• Configure Segment Routing Microloop Avoidance for OSPF, on page 746
Microloops are caused by the non-simultaneous convergence of different nodes in the network. If a node
converges and sends traffic to a neighbor node that has not converged yet, traffic may be looped between
these two nodes, resulting in packet loss, jitter, and out-of-order packets.
Segment Routing can be used to resolve the microloop problem. A router with the Segment Routing Microloop
Avoidance feature detects if microloops are possible for a destination on the post-convergence path following
a topology change associated with a remote link event.
If a node determines that a microloop could occur on the new topology, the IGP computes a microloop-avoidant
path by updating the forwarding table and temporarily (based on a RIB update delay timer) installing the
SID-list imposition entries associated with the microloop-avoidant path for the destination. Traffic is steered
to that destination loop-free.
After the RIB update delay timer expires, IGP updates the forwarding table and removes the microloop-avoidant
SID list. Traffic now natively follows the post-convergence path.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
737
Configure Segment Routing Microloop Avoidance
About Segment Routing Microloop Avoidance
SR microloop avoidance is a local behavior and therefore not all nodes need to implement it to get the benefits.
In the topology below, microloops can occur after the failure of the link between Node6 and Node7, or if
Node6 costs out.
At steady state, Node1 sends traffic to node 6 (16006) via Node7. Node 7 is configured with TI-LFA to protect
traffic to Node6.
TI-LFA on Node7 pre-computes a backup path for traffic to Node6 (prefix SID 16006) that will be activated
if the link between Node7 and Node6 goes down. In this network, the backup path would steer traffic toward
Node5 (prefix SID 16005) and then via link between Node5 and Node6 (adj-SID 24056). All nodes are notified
of the topology change due to the link failure.
However, if nodes along the path do not converge at the same time, microloops can be introduced. For example,
if Node2 converged before Node3, Node3 would send traffic back to Node2 as the shortest IGP path to Node6.
The traffic between Node2 and Node3 creates a microloop.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
738
Configure Segment Routing Microloop Avoidance
About Segment Routing Microloop Avoidance
With microloop avoidance configured on Node1, a post-convergence path is computed and possible microloops
on the post-convergence path for any destination are detected.
If microloops are possible on the post-convergence path to Node6, a microloop-avoidant path is constructed
to steer the traffic to Node6 loop-free over the microloop-avoidant path {16005, 24056, 16006}.
Node1 updates the forwarding table and installs the SID-list imposition entries for those destinations with
possible microloops, such as Node6. All nodes converge and update their forwarding tables, using SID lists
where needed.
After the RIB update delay timer expires, the microloop-avoidant path is replaced with regular forwarding
paths; traffic now natively follows the post-convergence path.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
739
Configure Segment Routing Microloop Avoidance
Usage Guidelines and Limitations
Procedure
RP/0/RSP0/CPU0:router# configure
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
740
Configure Segment Routing Microloop Avoidance
Configure Segment Routing Microloop Avoidance for IS-IS
Step 3 address-family ipv4 [ unicast ] Specifies the IPv4 address family and enters router address
family configuration mode.
Example:
RP/0/RSP0/CPU0:router(config-isis)# address-family
ipv4 unicast
RP/0/RSP0/CPU0:router(config-isis-af)# microloop
avoidance segment-routing
Step 5 microloop avoidance rib-update-delay delay-time Specifies the amount of time the node uses the microloop
avoidance policy before updating its forwarding table. The
Example:
delay-time is in milliseconds. The range is from 1-60000.
The default value is 5000.
RP/0/RSP0/CPU0:router(config-isis-af)# microloop
avoidance rib-update-delay 3000
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
741
Configure Segment Routing Microloop Avoidance
Microloop Avoidance for IS-IS with Per-Prefix Filtering
Microloop Avoidance Release Currently, when SR Microloop Avoidance for IS-IS is enabled, it
for IS-IS with 7.11.1 applies to all prefixes.
Per-Prefix Filtering
This feature allows you to selectively allow or deny specific IPv4 or
IPv6 prefixes or routes that may cause microloops, which allows for
efficient use of hardware resources and ensures overall network
stability.
This feature introduces these changes:
CLI:
• The microloop avoidance segment-routing command is
modified with the new route-policy name option for IS-IS.
Per-prefix filtering is an enhancement to the existing IOS XR IS-IS SR microloop avoidance feature. Per-prefix
filtering allows network administrators to specify a subset of IP prefixes (v4 and v6) to which micro loop
avoidance mechanisms can be applied.
Note Per-prefix filtering is available only for SR microloop avoidance and is not supported for local microloop
avoidance.
When SR microloop avoidance is enabled, it applies to all prefixes. However, it might be important to preserve
hardware resources for certain prefixes. In such a cases, it is beneficial to use SR microloop avoidance per-prefix
filtering to allow only those prefixes without such limitations to be subjected to SR microloop avoidance.
Per-prefix filtering provides a level of granularity that allows you to apply microloop avoidance only for the
prefixes that require it, and to avoid consumption of resources that might otherwise be exhausted.
SR Microloop avoidance per-prefix filtering is configured under the IPv4 or IPv6 address family (AF). It will
only be used for filtering in that specific AF. Filtering is applied to prefixes from all algorithms (Algo 0,
Flexible Algorithms 128 to 255).
• For SR MLPS – If a prefix has multiple Flexible Algorithm paths and the filtering configuration permits
SR microloop avoidance for that prefix, then SR microloop avoidance is allowed for "all" Flexible
Algorithm paths associated with that prefix. On the other hand, if a prefix has multiple Flexible Algorithm
paths and the filtering configuration prohibits SR microloop avoidance for that prefix, then microloop
avoidance is disabled for all Flexible Algorithm paths associated with that prefix.
• For SRv6 – Regardless of the association of the prefix to the algorithm, filtering is applied solely on a
per-prefix basis.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
742
Configure Segment Routing Microloop Avoidance
Microloop Avoidance for IS-IS with Per-Prefix Filtering
SR microloop avoidance per-prefix filtering uses route policies to identify the prefixes subjected to microloop
avoidance. When SR microloop avoidance per-prefix filtering is enabled, the prefixes are verified against the
route policy as follows:
• If the route policy permits the prefixes (pass), SR microloop avoidance computes the explicit path for
the prefixes.
• If the route policy prevents the prefixes from being considered for SR microloop avoidance (drop), it is
treated as if there is no explicit path defined for that prefix. The network will rely on the standard routing
mechanisms to determine the path for those prefixes after convergence.
Example: Configuration
1. Identify the prefixes to be filtered by defining a prefix set or applying a tags to prefixes.
• Prefix Set
prefix-set pset-sample-ipv4
2.3.3.3/32,
2.4.4.4/32
2.5.5.5/32
end-set
prefix-set pset-sample-ipv6
2001:0:0:1::/64,
2001:0:0:2::/64,
2001:0:0:2::/64,
2001:0:0:2::/64
end-set
• Tag
router isis 1
interface Loopback1
address-family ipv4 unicast
tag 7
prefix-sid index 7
2. Create a route policy for the destinations (prefix set) or tagged prefixes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
743
Configure Segment Routing Microloop Avoidance
Microloop Avoidance for IS-IS with Per-Prefix Filtering
• Destination
route-policy BAR
if destination in pset-sample-ipv4 then
pass
else
drop
endif
end-policy
route-policy BAR2
if destination in (2.3.3.3/32, 2.4.4.4/32) then
pass
else
drop
endif
end-policy
route-policy BAR3
if destination in pset-sample-ipv6 then
drop
else
pass
endif
end-policy
• Tag
route-policy FOO
if tag eq 7 then
drop
endif
pass
end-policy
route-policy FOO2
if tag eq 7 then
pass
else
drop
endif
end-policy
3. Use the microloop avoidance segment-routing route-policy name command to attach the route policy
to the SR Microloop Avoidance configuration.
router isis 1
address-family ipv4 unicast
microloop avoidance segment-routing route-policy FOO2
!
!
address-family ipv6 unicast
microloop avoidance segment-routing route-policy BAR3
Verify
Use the show isis command to verify that SR microloop avoidance is enabled under the AF and the route
policy is applied for per-prefix filtering.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
744
Configure Segment Routing Microloop Avoidance
Microloop Avoidance for IS-IS with Per-Prefix Filtering
IS-IS Router: 1
System Id: 0000.0000.0001
IS Levels: level-2-only
Manual area address(es):
49.0001
Routing for area address(es):
49.0001
Multi-Instance Id: 0
Job Id: 1013
PID: 61171
Respawn count: 1
Started: Thu Feb 23 02:57:58 2023
LSP MTU: 1400
LSP Full: level-1: No, level-2: No
Non-stop forwarding: Cisco Proprietary NSF Restart enabled
Most recent startup mode: Cold Restart
TE connection status: Up
XTC connection status: Up
Overload Bit: not configured
Maximum Metric: not configured
Topologies supported by IS-IS:
IPv4 Unicast
Rib connected
Level-2
Metric style (generate/accept): Wide/Wide
Metric: 10
Microloop avoidance: Enabled
Configuration: Type: Segment Routing, RIB update delay: 60000 msec, Policy: FOO2
No protocols redistributed
Distance: 115
Advertise Passive Interface Prefixes Only: No
IPv6 Unicast
Rib connected
Level-2
Metric: 10
Microloop avoidance: Enabled
Configuration: Type: Segment Routing, RIB update delay: 5000 msec, Policy: BAR3
No protocols redistributed
Distance: 115
Advertise Passive Interface Prefixes Only: No
SR-MPLS:
SRLB allocated: 15000 - 15999
SRGB allocated: 16000 - 23999
SRv6:
Configured locators:
USID_ALG0 (Active)
USID_ALG128 (Active)
Interfaces supported by IS-IS 1:
Loopback0 is running actively (active in configuration)
GigabitEthernet0/2/0/0 is running actively (active in configuration)
GigabitEthernet0/2/0/3 is running actively (active in configuration)
GigabitEthernet0/2/0/4 is running actively (active in configuration)
GigabitEthernet0/2/0/6 is running actively (active in configuration)
GigabitEthernet0/2/0/7 is running actively (active in configuration)
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
745
Configure Segment Routing Microloop Avoidance
Configure Segment Routing Microloop Avoidance for OSPF
This task describes how to enable Segment Routing Microloop Avoidance and set the Routing Information
Base (RIB) update delay value for OSPF.
Procedure
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
746
Configure Segment Routing Microloop Avoidance
Configure Segment Routing Microloop Avoidance for OSPF
RP/0/RSP0/CPU0:router# configure
Step 2 router ospf process-name Enables OSPF routing for the specified routing process,
and places the router in router configuration mode.
Example:
RP/0/RSP0/CPU0:router(config-ospf)# microloop
avoidance segment-routing
Step 4 microloop avoidance rib-update-delay delay-time Specifies the amount of time the node uses the microloop
avoidance path before updating its forwarding table. The
Example:
delay-time is in milliseconds. The range is from 1-60000.
The default value is 5000.
RP/0/RSP0/CPU0:router(config-ospf)# microloop
avoidance rib-update-delay 3000
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
747
Configure Segment Routing Microloop Avoidance
Configure Segment Routing Microloop Avoidance for OSPF
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
748
CHAPTER 18
Configure Segment Routing Mapping Server
The mapping server is a key component of the interworking between LDP and segment routing. It enables
SR-capable nodes to interwork with LDP nodes. The mapping server advertises Prefix-to-SID mappings in
IGP on behalf of other non-SR-capable nodes.
• Segment Routing Mapping Server, on page 749
• Segment Routing and LDP Interoperability, on page 751
• Configuring Mapping Server, on page 754
• Enable Mapping Advertisement, on page 756
• Enable Mapping Client, on page 758
The mapping server automatically manages the insertions and deletions of mapping entries to always yield
an active mapping policy that contains non-overlapping consistent SID-mapping entries.
• Locally configured mapping entries must not overlap each other.
• The mapping server takes the locally configured mapping policy, as well as remotely learned mapping
entries from a particular IGP instance, as input, and selects a single mapping entry among overlapping
mapping entries according to the preference rules for that IGP instance. The result is an active mapping
policy that consists of non-overlapping consistent mapping entries.
• At steady state, all routers, at least in the same area or level, must have identical active mapping policies.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
749
Configure Segment Routing Mapping Server
Usage Guidelines and Restrictions
• The position of the mapping server in the network is not important. However, since the mapping
advertisements are distributed in IGP using the regular IGP advertisement mechanism, the mapping
server needs an IGP adjacency to the network.
• The role of the mapping server is crucial. For redundancy purposes, you should configure multiple
mapping servers in the networks.
• The mapping server functionality supports the advertisement of SID-mapping entries between IS-IS
levels (for example, from L1 to L2-only and from L2 to L1). A mapping server is not required for each
IS-IS area.
For example, mapping entries learned from IS-IS Type Level-1 (intra-area) routers can be used to calculate
prefix-SIDs for prefixes learned or advertised by IS-IS Type Level-2-only (backbone) routers.
Use the domain-wide option to advertise the prefix-SID mappings between Level 1 and Level 2 IS-IS
routers.
• The mapping server functionality does not support a scenario where SID-mapping entries learned through
one IS-IS instance are used by another IS-IS instance to determine the prefix-SID of a prefix. For example,
mapping entries learnt from remote routers by 'router isis 1' cannot be used to calculate prefix-SIDs for
prefixes learnt, advertised, or downloaded to FIB by 'router isis 2'. A mapping server is required for each
IS-IS instance.
• Segment Routing Mapping Server does not support Virtual Routing and Forwarding (VRF) currently.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
750
Configure Segment Routing Mapping Server
Segment Routing and LDP Interoperability
A service flow must be established from PE1 to PE3 over a continuous MPLS tunnel. This requires SR and
LDP to interoperate.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
751
Configure Segment Routing Mapping Server
Example: Segment Routing LDP Interoperability
The end-to-end MPLS LSP is established from an LDP LSP from PE7 to P4 and the related node segment
from P4 to PE1.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
752
Configure Segment Routing Mapping Server
Example: Segment Routing LDP Interoperability
Suppose that the operator configures P2 as a Segment Routing Mapping Server (SRMS) and advertises the
mappings (1.1.1.7, 16007 for PE7). Because PE7 is non-SR capable, the operator configures that mapping
policy at the SRMS; the SRMS advertises the mapping on behalf of the non-SR capable nodes. Multiple
SRMS servers can be provisioned in a network for redundancy. The mapping server advertisements are only
understood by the SR-capable nodes. The SR-capable routers install the related node segments in the MPLS
data plane in exactly the same manner as if node segments were advertised by the nodes themselves.
The traffic flow in the SR to LDP direction involves the following:
1. PE1 learns a service route with service label 50010 and BGP nhop PE7.
2. PE1 has an SR label binding (16007) learned from the SRMS (P2) for PE7.
3. PE1 installs the node segment 16007 following the IGP shortest-path with nhop P3.
4. P3 swaps 16007 for 16007 and forwards to P4.
5. The nhop for P4 for the IGP route PE7 is non-SR capable, since P5 does not advertise the SR capability.
However, P4 has an LDP label binding from that nhop for the same FEC (for example, LDP label 24009).
P4 would then swap 16007 for 24009 and forward to P5. We refer to this process as label merging.
6. P5 swaps this label with the LDP label received from P6 (for example, LDP label 24006) and forwards
to P6.
7. P6 pops the LDP label and forwards to PE7.
8. PE7 receives the packet and processes the service label.
The end-to-end MPLS LSP is established from an SR node segment from PE1 to P4 and an LDP LSP from
P4 to PE7.
Observe that the capabilities provided by the SRMS are only required in the SR-to-LDP direction.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
753
Configure Segment Routing Mapping Server
Configuring Mapping Server
SUMMARY STEPS
1. configure
2. segment-routing
3. mapping-server
4. prefix-sid-map
5. address-family ipv4 |ipv6
6. ip-address/prefix-length first-SID-value range range
7. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
RP/0/RSP0/CPU0:router(config)# segment-routing
RP/0/RSP0/CPU0:router(config-sr)# mapping-server
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
754
Configure Segment Routing Mapping Server
Configuring Mapping Server
RP/0/RSP0/CPU0:router(config-sr-ms-map)#
address-family ipv4
RP/0/RSP0/CPU0:router(config-sr-ms-map)#
address-family ipv6
Step 6 ip-address/prefix-length first-SID-value range range Adds SID-mapping entries in the active local mapping
policy. In the configured example:
Example:
• Prefix 10.1.1.1/32 is assigned prefix-SID 10, prefix
RP/0/RSP0/CPU0:router(config-sr-ms-map-af)# 10.1.1.2/32 is assigned prefix-SID 11,…, prefix
10.1.1.1/32 10 range 200 10.1.1.199/32 is assigned prefix-SID 200
RP/0/RSP0/CPU0:router(config-sr-ms-map-af)#
20.1.0.0/16 400 range 300 • Prefix 20.1.0.0/16 is assigned prefix-SID 400, prefix
20.2.0.0/16 is assigned prefix-SID 401,…, and so on.
Step 7 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
755
Configure Segment Routing Mapping Server
Enable Mapping Advertisement
SID Index: 10
Range: 200
Last Prefix: 10.1.1.200/32
Last SID Index: 209
Flags:
What to do next
Enable the advertisement of the local SID-mapping policy in the IGP.
DETAILED STEPS
Procedure
Step 2 address-family { ipv4 | ipv6 } [ unicast ] Specifies the IPv4 or IPv6 address family, and enters router
address family configuration mode.
Example:
The following is an example for ipv4 address family:
RP/0/RSP0/CPU0:router(config-isis)# address-family
ipv4 unicast
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
756
Configure Segment Routing Mapping Server
Configure Mapping Advertisement for OSPF
RP/0/RSP0/CPU0:router(config-isis-af)#
segment-routing prefix-sid-map advertise-local
domain-wide
Step 4 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
<...removed...>
SID Binding: 10.1.1.1/32 F:0 M:0 S:0 D:0 A:0 Weight:0 Range:200
SID: Start:10, Algorithm:0, R:0 N:0 P:0 E:0 V:0 L:0
SID Binding: 20.1.1.0/24 F:0 M:0 S:0 D:0 A:0 Weight:0 Range:300
SID: Start:400, Algorithm:0, R:0 N:0 P:0 E:0 V:0 L:0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
757
Configure Segment Routing Mapping Server
Enable Mapping Client
DETAILED STEPS
Procedure
Step 2 segment-routing prefix-sid-map advertise-local Configures OSPF to advertise locally configured prefix-SID
mappings.
Example:
RP/0/RSP0/CPU0:router(config-ospf)# segment-routing
prefix-sid-map advertise-local
Step 3 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
<...removed...>
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
758
Configure Segment Routing Mapping Server
Enable Mapping Client
You can disable the mapping client functionality by using the segment-routing prefix-sid-map receive
disable command.
You can re-enable the mapping client functionality by using the segment-routing prefix-sid-map receive
command.
The following example shows how to enable the mapping client for IS-IS:
The following example shows how to enable the mapping client for OSPF:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
759
Configure Segment Routing Mapping Server
Enable Mapping Client
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
760
CHAPTER 19
Using Segment Routing Traffic Matrix
This module provides information about the Segment Routing Traffic Matrix (SR-TM) and the Traffic Collector
process, and describes how to configure the TM border and the Traffic Collector and to display traffic
information.
• Segment Routing Traffic Matrix, on page 761
• Traffic Collector Process, on page 761
• Configuring Traffic Collector, on page 762
• Displaying Traffic Information, on page 764
Pcounters
A Pcounter is a packet and byte pair of counters. There is one Pcounter per tunnel. There are two Pcounters
per prefix-SID:
• Base Pcounter – any packet that is switched on the prefix-SID forwarding information base (FIB) entry
• TM Pcounter – any packet from an external interface and switched on the prefix-SID FIB entry
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
761
Using Segment Routing Traffic Matrix
Configuring Traffic Collector
The Traffic Collector periodically collects the Base Pcounters and TM Pcounters of all prefix-SIDs, and the
Pcounters of all tunnel interfaces.
For each Pcounter, the Traffic Collector calculates the number of packets and bytes that have been forwarded
during the last interval. The Traffic Collector keeps a history of the per-interval statistics for each of the
Pcounters. Each entry in the history contains:
• The start and end time of the interval
• The number of packets forwarded during the interval
• The number of bytes forwarded during the interval
SUMMARY STEPS
1. configure
2. traffic-collector
3. statistics collection-interval value
4. statistics history-size value
5. statistics history-timeout value
6. interface type l3-interface-address
7. Use the commit or end command.
DETAILED STEPS
Procedure
RP/0/RSP0/CPU0:router# configure
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
762
Using Segment Routing Traffic Matrix
Configuring Traffic Collector
RP/0/RP0/CPU0:router(config)# traffic-collector
Step 3 statistics collection-interval value (Optional) Sets the frequency that the traffic collector
collects and posts data, in minutes. Valid values are 1, 2,
Example:
3, 4, 5, 6, 10, 12,15, 20, 30, and 60. The default interval is
1.
RP/0/RP0/CPU0:router(config-tc)# statistics
collection-interval 5
Step 4 statistics history-size value (Optional) Specifies the number of entries kept in the history
database. Valid values are from 1 to 10. The default is 5.
Example:
Note
RP/0/RP0/CPU0:router(config-tc)# statistics The number of entries affects how the average packet and
history-size 10 average byte rates are calculated. The rates are calculated
over the range of the histories and are not averages based
in real time.
Step 5 statistics history-timeout value (Optional) When a prefix SID or a tunnel-te interface is
deleted, the history-timeout sets the length of time, in hours,
Example:
that the prefix SID and tunnel statistics are retained in the
history before they are removed. The minimum is one hour;
RP/0/RP0/CPU0:router(config-tc)# statistics
history-timeout 24
the maximum is 720 hours. The default is 48.
Note
Enter 0 to disable the history timeout. (No history is
retained.)
Step 6 interface type l3-interface-address Identifies interfaces that handle external traffic. Only L3
interfaces are supported for external traffic.
Example:
Step 7 Use the commit or end command. commit —Saves the configuration changes and remains
within the configuration session.
end —Prompts user to take one of these actions:
• Yes — Saves configuration changes and exits the
configuration session.
• No —Exits the configuration session without
committing the configuration changes.
• Cancel —Remains in the configuration session,
without committing the configuration changes.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
763
Using Segment Routing Traffic Matrix
Displaying Traffic Information
Note For detailed information about the command syntax for the following show commands, see the Segment
Routing Command Reference Guide.
History of counters:
23:01 - 23:02: Packets 9379529, Bytes: 9248215594
23:00 - 23:01: Packets 9687124, Bytes: 9551504264
22:59 - 23:00: Packets 9539200, Bytes: 9405651200
22:58 - 22:59: Packets 9845278, Bytes: 9707444108
22:57 - 22:58: Packets 9033554, Bytes: 8907084244
TM Counters:
Average over the last 5 collection intervals:
Packet rate: 9528754 pps, Byte rate: 9357236821 Bps
History of counters:
23:01 - 23:02: Packets 9400815, Bytes: 9231600330
23:00 - 23:01: Packets 9699455, Bytes: 9524864810
22:59 - 23:00: Packets 9579889, Bytes: 9407450998
22:58 - 22:59: Packets 9911734, Bytes: 9733322788
22:57 - 22:58: Packets 9051879, Bytes: 8888945178
This output shows the average Pcounter (packets, bytes), the Pcounter history, and the collection interval
of the Base and TM for the specified prefix-SID.
• Display the counter history database for a policy:
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
764
Using Segment Routing Traffic Matrix
Displaying Traffic Information
History of counters:
23:14 – 23:15: Packets 9870522 , Bytes: 9771816780
23:13 – 23:14: Packets 9553048 , Bytes: 9457517520
23:12 – 23:13: Packets 9647265 , Bytes: 9550792350
23:11 – 23:12: Packets 9756654 , Bytes: 9659087460
23:10 – 23:11: Packets 9694434 , Bytes: 9548235180
This output shows the average Pcounter (packets, bytes), the Pcounter history, and the collection interval
for the policy.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
765
Using Segment Routing Traffic Matrix
Displaying Traffic Information
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
766
CHAPTER 20
Using Segment Routing OAM
Segment Routing Operations, Administration, and Maintenance (OAM) helps service providers to monitor
label-switched paths (LSPs) and quickly isolate forwarding problems to assist with fault detection and
troubleshooting in the network. The Segment Routing OAM feature provides support for BGP prefix SIDs,
IGP prefix and Flexible Algorithm SIDs, and Nil-FEC (forwarding equivalence classes) LSP Ping and
Traceroute functionality.
• MPLS Ping and Traceroute for BGP and IGP Prefix-SID, on page 767
• Examples: MPLS Ping, Traceroute, and Tree Trace for Prefix-SID, on page 768
• MPLS LSP Ping and Traceroute Nil FEC Target, on page 770
• Examples: LSP Ping and Traceroute for Nil_FEC Target , on page 770
• Segment Routing Ping and Traceroute, on page 772
• Segment Routing Ping and Traceroute for Flexible Algorithm, on page 780
• Segment Routing Policy Nil-FEC Ping and Traceroute, on page 781
• Segment Routing over IPv6 OAM, on page 783
• Segment Routing Data Plane Monitoring , on page 784
The MPLS LSP Ping feature is used to check the connectivity between ingress Label Switch Routers (LSRs)
and egress LSRs along an LSP. MPLS LSP ping uses MPLS echo request and reply messages, similar to
Internet Control Message Protocol (ICMP) echo request and reply messages, to validate an LSP. The destination
IP address of the MPLS echo request packet is different from the address used to select the label stack. The
destination IP address is defined as a 127.x.y.z/8 address and it prevents the IP packet from being IP switched
to its destination, if the LSP is broken.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
767
Using Segment Routing OAM
Examples: MPLS Ping, Traceroute, and Tree Trace for Prefix-SID
The MPLS LSP Traceroute feature is used to isolate the failure point of an LSP. It is used for hop-by-hop
fault localization and path tracing. The MPLS LSP Traceroute feature relies on the expiration of the Time to
Live (TTL) value of the packet that carries the echo request. When the MPLS echo request message hits a
transit node, it checks the TTL value and if it is expired, the packet is passed to the control plane, else the
message is forwarded. If the echo message is passed to the control plane, a reply message is generated based
on the contents of the request message.
The MPLS LSP Tree Trace (traceroute multipath) operation is also supported for BGP and IGP Prefix SID.
MPLS LSP Tree Trace provides the means to discover all possible equal-cost multipath (ECMP) routing paths
of an LSP to reach a destination Prefix SID. It uses multipath data encoded in echo request packets to query
for the load-balancing information that may allow the originator to exercise each ECMP. When the packet
TTL expires at the responding node, the node returns the list of downstream paths, as well as the multipath
information that can lead the operator to exercise each path in the MPLS echo reply. This operation is performed
repeatedly for each hop of each path with increasing TTL values until all ECMP are discovered and validated.
MPLS echo request packets carry Target FEC Stack sub-TLVs. The Target FEC sub-TLVs are used by the
responder for FEC validation. The BGP and IGP IPv4 prefix sub-TLV has been added to the Target FEC
Stack sub-TLV. The IGP IPv4 prefix sub-TLV contains the prefix SID, the prefix length, and the protocol
(IS-IS or OSPF). The BGP IPv4 prefix sub-TLV contains the prefix SID and the prefix length.
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/2/3 ms
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
768
Using Segment Routing OAM
Examples: MPLS Ping, Traceroute, and Tree Trace for Prefix-SID
LL!
Path 0 found,
output interface TenGigE0/0/0/0 nexthop 12.12.12.2 source 12.12.12.1 destination 127.0.0.0
L!
Path 1 found,
output interface TenGigE0/0/0/0 nexthop 12.12.12.2 source 12.12.12.1 destination 127.0.0.2
LL!
Path 2 found,
output interface TenGigE0/0/0/1 nexthop 15.15.15.5 source 15.15.15.1 destination 127.0.0.1
L!
Path 3 found,
output interface TenGigE0/0/0/1 nexthop 15.15.15.5 source 15.15.15.1 destination 127.0.0.0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
769
Using Segment Routing OAM
MPLS LSP Ping and Traceroute Nil FEC Target
In the case of segment routing, each segment nodal label and adjacency label along the routing path is put
into the label stack of an echo request message from the initiator Label Switch Router (LSR); MPLS data
plane forwards this packet to the label stack target, and the label stack target sends the echo message back.
The following table shows the syntax for the ping and traceroute commands.
Command Syntax
ping mpls nil-fec labels {label[,label]} [output {interface tx-interface} [nexthop nexthop-ip-addr]]
traceroute mpls nil-fec labels {label[,label]} [output {interface tx-interface} [nexthop nexthop-ip-addr]]
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
770
Using Segment Routing OAM
Examples: LSP Ping and Traceroute for Nil_FEC Target
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
771
Using Segment Routing OAM
Segment Routing Ping and Traceroute
SR OAM for SR Policy Release This feature extends SR OAM ping and traceroute function for an SR
(Policy Name / Binding 7.3.1 policy (or binding SID)-LSP end-point combination.
SID / Custom label
This addresses the limitations of the Nil-FEC LSP Ping and Traceroute
stack)
function which cannot perform a ping operation to a segment list that
is not associated with an installed SR policy. Also, it cannot validate
egress device-specific SR policies.
Note Segment routing ping can only be used when the originating device is running segment routing.
You can initiate the segment routing ping operation only when Segment Routing control plane is available at
the originator, even if it is not preferred. This allows you to validate the SR path before directing traffic over
the path. Segment Routing ping can use either generic FEC type or SR control-plane FEC type (SR-OSPF,
SR-ISIS). In mixed networks, where some devices are running MPLS control plane (for example, LDP) or
do not understand SR FEC, generic FEC type allows the device to successfully process and respond to the
echo request. By default, generic FEC type is used in the target FEC stack of segment routing ping echo
request. Generic FEC is not coupled to a particular control plane; it allows path verification when the advertising
protocol is unknown or might change during the path of the echo request. If you need to specify the target
FEC, you can select the FEC type as OSPF, IS-IS, or BGP. This ensures that only devices that are running
segment routing control plane, and can therefore understand the segment routing IGP FEC, respond to the
echo request.
Configuration Examples
These examples show how to use segment routing ping to test the connectivity of a segment routing control
plane. In the first example, FEC type is not specified. You can also specify the FEC type as shown in the other
examples.
RP/0/RSP0/CPU0:router# ping sr-mpls 10.1.1.2/32
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
772
Using Segment Routing OAM
Segment Routing Ping
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/5 ms
RP/0/RSP0/CPU0:router# ping sr-mpls 10.1.1.2/32 fec-type generic
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
!!!!!
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
773
Using Segment Routing OAM
Segment Routing Traceroute
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
774
Using Segment Routing OAM
Segment Routing Traceroute
The existence of load balancing at routers in an MPLS network provides alternate paths for carrying MPLS
traffic to a target router. The multipath segment routing traceroute feature provides a means to discover all
possible paths of an LSP between the ingress and egress routers.
Configuration Examples
These examples show how to use segment routing traceroute to trace the LSP for a specified IPv4 prefix SID
address. In the first example, FEC type is not specified. You can also specify the FEC type as shown in the
other examples.
RP/0/RSP0/CPU0:router# traceroute sr-mpls 10.1.1.2/32
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
775
Using Segment Routing OAM
Segment Routing Traceroute
This example shows how to use multipath traceroute to discover all the possible paths for a IPv4 prefix SID.
RP/0/RSP0/CPU0:router# traceroute sr-mpls multipath 10.1.1.2/32
!
Path 0 found,
output interface GigabitEthernet0/0/0/2 nexthop 10.13.13.2
source 10.13.13.1 destination 127.0.0.0
!
Path 1 found,
output interface Bundle-Ether1 nexthop 10.12.12.2
source 10.12.12.1 destination 127.0.0.0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
776
Using Segment Routing OAM
Segment Routing Treetrace Enhancements
The SR-OAM Treetrace (multipath traceroute) operation provides enhanced traceroute functionality to validate
ECMP paths between two endpoints.
The Segment Routing Treetrace enhancements augment the Treetrace operation to support SR policies, Flex
Algo labels, or a custom list of labels.
• Use the traceroute sr-mpls multipath policy EXEC command to specify the target SR policy.
• Use the traceroute sr-mpls multipath labels EXEC command to specify the target custom list of labels:
• The custom list can have 1 to 12 prefix-SID labels.
• A label can be Algo 0 or Flex Algo prefix-SID label.
• Use the traceroute sr-mpls multipath nil-fec EXEC command to specify the target custom list of labels
and outgoing information or the target SR policy, to be verified using Nil FEC.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
777
Using Segment Routing OAM
Segment Routing Treetrace Enhancements
L!
Path 0 found,
output interface GigabitEthernet0/0/0/0 nexthop 10.10.10.2
source 10.10.10.1 destination 127.0.0.0
L!
Path 1 found,
output interface GigabitEthernet0/0/0/1 nexthop 11.11.11.2
source 11.11.11.1 destination 127.0.0.0
L!
Path 0 found,
output interface GigabitEthernet0/0/0/0 nexthop 10.10.10.2
source 10.10.10.1 destination 127.0.0.0
L!
Path 1 found,
output interface GigabitEthernet0/0/0/1 nexthop 11.11.11.2
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
778
Using Segment Routing OAM
Segment Routing Treetrace Enhancements
Example 3: Treetrace Operation for a Custom List of Labels with SR Label FEC
Router# traceroute sr-mpls multipath labels 16128 lsp-end-point 10.1.1.5
Starting LSP Path Discovery for SR Label FEC with lsp end point 10.1.1.5, SID Label(s)
[16128]
LL!
Path 0 found,
output interface GigabitEthernet0/0/0/0 nexthop 10.10.10.2
source 10.10.10.1 destination 127.0.0.0
LL!
Path 1 found,
output interface GigabitEthernet0/0/0/1 nexthop 11.11.11.2
source 11.11.11.1 destination 127.0.0.0
Example 4: Treetrace Operation for a Custom List of Labels with Nil FEC
Router# traceroute sr-mpls multipath labels 16004,16005 output interface GigabitEthernet
0/0/0/2 nexthop 12.12.12.3
Starting LSP Path Discovery for Nil FEC with labels [16004,16005]
LL!
Path 0 found,
output interface GigabitEthernet0/0/0/2 nexthop 12.12.12.3
source 12.12.12.1 destination 127.0.0.2
!
Path 1 found,
output interface GigabitEthernet0/0/0/2 nexthop 12.12.12.3
source 12.12.12.1 destination 127.0.0.0
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
779
Using Segment Routing OAM
Segment Routing Ping and Traceroute for Flexible Algorithm
Sending 5, 100-byte MPLS Echos with SR Label FEC with lsp end point 10.1.1.5, SID Label(s)
[16131],
timeout is 2 seconds, send interval is 0 msec:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/6 ms
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
780
Using Segment Routing OAM
Segment Routing Traceroute for Flexible Algorithm
Tracing MPLS Label Switched Path to SR Label FEC with lsp end point 10.1.1.5, SID Label(s)
[16130], timeout is 2 seconds
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
781
Using Segment Routing OAM
Segment Routing Policy Nil-FEC Ping and Traceroute
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
782
Using Segment Routing OAM
Segment Routing over IPv6 OAM
The following example shows using traceroute in an SRv6 network without an SRH.
RP/0/RSP1/CPU0:Router# traceroute ipv6 2001::44:44:44:44 srv6
Wed Jan 16 14:35:27.511 UTC
Type escape sequence to abort.
Tracing the route to 2001::44:44:44:44
1 2001::2:2:2:2 3 msec 2 msec 2 msec
2 2001::44:44:44:44 3 msec 3 msec 3 msec
The following example shows using ping for a specified IP address in the VRF.
RP/0/RP0/CPU0:Router# ping 10.15.15.1 vrf red
Mon Sep 17 20:07:10.085 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.15.15.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
The following example shows using traceroute for a specified IP address in the VRF.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
783
Using Segment Routing OAM
Segment Routing Data Plane Monitoring
The following example shows using traceroute for CE1 (4.4.4.5) to CE2 (5.5.5.5) in the VRF:
RP/0/RP0/CPU0:Router# traceroute 5.5.5.5 vrf a
Wed Jan 16 15:08:46.264 UTC
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
784
Using Segment Routing OAM
Segment Routing Data Plane Monitoring
• Static adjacency
• Dynamic adjacency
• Shared adjacency
• Prefix Validation—Prefix validation identifies any forwarding inconsistency of any IGP Prefix SID
reachable from the device. The validation is done for all upstream and downstream neighbor combinations
of each prefix SID, and identifies inconsistencies in the downstream neighbor. The prefix validation
phase simulates customer traffic path by validating both ingress and egress forwarding chain at the DPM
processing node.
Since prefix validation is localized to a device running DPM as well as its immediate neighbors, it does
not suffer from scale limitations of end-to-end monitoring.
Prefix validation builds on top of adjacency validation by using special MPLS echo requests that travel
to the upstream node, return to the DPM-processing node, and time-to-live (TTL) expire at the immediate
downstream node, thus exercising entire forwarding path towards the downstream.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
785
Using Segment Routing OAM
Segment Routing Data Plane Monitoring
DPM also maintains a list of all local adjacencies. DPM maintains a database that contains local links, their
respective local and remote adjacency labels and IP addresses, and error stats.
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
786
Using Segment Routing OAM
Configure SR DPM
Node 2 is a DPM-capable device. DPM is enabled in proactive mode to perform forwarding consistency tests
for all prefix-SIDs in the network. For each destination prefix, the router identifies the directly connected
upstream and downstream neighbors used to reach a given destination.
Using node 9 as the prefix under test (prefix-SID = 16009), node 1 is designated as the upstream node and
node 3 as the downstream nodes with 2 ECMPs.
1. Node 2 generates test traffic (MPLS OAM ping with source_ip of node 2) to test its forwarding for every
upstream/downstream combination. In this case, two combinations exist:
• Prefix-SID node 9 - test iteration A path = Node 2 to Node 1 to Node 2 to Node 3 (via top ECMP)
• Prefix-SID node 9 - test iteration B path = Node 2 to Node 1 to Node 2 to Node 3 (via bottom ECMP)
2. Node 2 adds a label stack in order to enforce the desired path for the test traffic. For example, two labels
are added to the packet for test iterations A and B:
• The top label is equal to the adjacency-SID on node 1 for the interface facing node 2 (adjacency SID
= 24012). The bottom label is the prefix-SID under test (16009). The test traffic is sent on the interface
facing node 1.
• The top label (after being POPed at node 1) causes the test traffic to come back to node 2. This
returning traffic is completely hardware-switched based on the forwarding entry for the prefix-SID
under test (16009). Note that the labeled test traffic has a time-to-live (TTL) of 2 and it will never
be forwarded beyond the downstream router(s).
• When test traffic reaches node 3, a TTL expired response is sent back to node 2. If the response
packet arrives over the expected interface (top ECMP link) then the forwarding verification on node
2 for the first iteration towards node 9 is considered to be a success.
• The difference between the test traffic for test iteration A and B in this example is the destination_ip
of the MPLS OAM ping. Node 2 calculates them in this order to exercise a given ECMP path (if
present). Thus, test traffic for iteration A is hashed onto the top ECMP and test traffic for iteration
B is hashed onto the bottom ECMP link.
3. The DPM tests are then repeated for the remaining prefix-SIDs in the network
Configure SR DPM
To configure SR-DPM, complete the following configurations:
• Enable SR DPM
• Configure SR DPM interval timer
• Configure SR DPM rate limit
Enable SR DPM
Use the mpls oam dpm command to enable SR DPM and enter MPLS OAM DPM command mode.
Router(config)# mpls oam dpm
Router(config-oam-dpm)#
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
787
Using Segment Routing OAM
Configure SR DPM
Note If the specified rate limit is more than the rate limit for overall MPLS OAM requests, DPM generates an error
message.
Router(config-oam-dpm)# pps 45
Router(config-oam-dpm#
Verification
Router# show mpls oam dpm summary
Displays the overall status of SR-DPM from the last run.
Router# show mpls oam dpm adjacency summary
Displays the result of DPM adjacency SID verification for all local interfaces from the
last run.
Router# show mpls oam dpm adjacency interface
Displays the result of DPM adjacency SID verification for all adjacencies for the specified
local interface.
Router# show mpls oam dpm counters
Outputs various counters for DPM from last run as well as since the start of DPM process.
Router# show mpls oam dpm prefix summary
Displays the result of DPM prefix SID verification for all reachable IGP prefix SIDs from
the last run.
Router# show mpls oam dpm prefix prefix
Displays the result of DPM prefix SID verification for the specified prefix including all
upstream and downstream combinations.
Router# show mpls oam dpm trace
Returns logged traces for DPM.
In addition, the existing show mpls oam command is extended to specify DPM counters.
Router# show mpls oam counters packet dpm
Segment Routing Configuration Guide for Cisco ASR 9000 Series Routers, IOS XR Release 7.11.x
788