Enabling Segment Routing Flexible Algorithm. Cisco Network Convergence System 5500 Series
Tangazo
Tangazo
C H A P T E R
11
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 323
•
Building Blocks of Segment Routing Flexible Algorithm, on page 323
•
Configuring Flexible Algorithm, on page 328
•
Example: Configuring IS-IS Flexible Algorithm, on page 335
•
Example: Configuring OSPF Flexible Algorithm, on page 335
•
Example: Traffic Steering to Flexible Algorithm Paths, on page 336
Prerequisites for Flexible Algorithm
Segment routing must be enabled on the router before the Flexible Algorithm functionality is activated.
Building Blocks of Segment Routing Flexible Algorithm
This section describes the building blocks that are required to support the SR Flexible Algorithm functionality in IS-IS and OSPF.
Flexible Algorithm Definition
Many possible constraints may be used to compute a path over a network. Some networks are deployed with multiple planes. A simple form of constraint may be to use a particular plane. A more sophisticated form of constraint can include some extended metric, like delay, as described in [RFC7810]. Even more advanced case could be to restrict the path and avoid links with certain affinities. Combinations of these are also possible.
To provide a maximum flexibility, the mapping between the algorithm value and its meaning can be defined
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
323
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.
Flexible Algorithm Membership
An algorithm defines how the best path is computed by IGP. Routers advertise the support for the algorithm as a node capability. Prefix-SIDs are also advertised with an algorithm value and are tightly coupled with the algorithm itself.
An algorithm is a one octet value. Values from 128 to 255 are reserved for user defined values and are used for Flexible Algorithm representation.
Flexible Algorithm Definition Advertisement
To guarantee the loop free forwarding for paths computed for a particular Flexible Algorithm, all routers in the network must share the same definition of the Flexible Algorithm. This is achieved by dedicated router(s) advertising the definition of each Flexible Algorithm. Such advertisement is associated with the priority to make sure that all routers will agree on a single and consistent definition for each Flexible Algorithm.
Definition of Flexible Algorithm includes:
• Metric type
• Affinity constraints
• Exclude SRLG constraint
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.
Flexible Algorithm Link Attribute Advertisement
Various link attributes may be used during the Flexible Algorithm path calculation. For example, include or exclude rules based on link affinities can be part of the Flexible Algorithm definition, as defined in IETF draft draft-ietf-lsr-flex-algo .
Link attribute advertisements used during Flexible Algorithm calculation must use the Application-Specific
Link Attribute (ASLA) advertisements, as defined in RFC8919 (IS-IS) and RFC8920 (OSPF). In the case of
IS-IS, if the L-Flag is set in the ASLA advertisement, then legacy advertisements (IS-IS Extended Reachability
TLV) are used instead.
The mandatory use of ASLA advertisements applies to the following link attributes:
• Minimum Unidirectional Link Delay
• TE Default Metric
• Administrative Group
• Extended Administrative Group
324
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Prefix-SID Advertisement
• Shared Risk Link Group
Flexible Algorithm Prefix-SID Advertisement
To be able to forward traffic on a Flexible Algorithm specific path, all routers participating in the Flexible
Algorithm will install a MPLS labeled path for the Flexible Algorithm specific SID that is advertised for the prefix. Only prefixes for which the Flexible Algorithm specific Prefix-SID is advertised is subject to Flexible
Algorithm specific forwarding.
Calculation of Flexible Algorithm Path
Table 45: Feature History Table
Feature Name
OSPF: Microloop Avoidance for
Flexible Algorithm
Release Information
Release 7.3.2
OSPF: TI-LFA for Flexible
Algorithm
Release 7.3.1
Feature Description
This feature extends the current
OSPF Flexible Algorithm functionality to support Microloop
Avoidance.
This feature extends the current
OSPF Flexible Algorithm functionality to support TI-LFA.
Table 46: Feature History Table
Feature Name
OSPF: Microloop Avoidance for
Flexible Algorithm
Release Information
Release 7.4.1
Feature Description
This feature extends the current
OSPF Flexible Algorithm functionality to support Microloop
Avoidance.
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.
When computing the shortest path tree for particular Flexible Algorithm:
• All nodes that don't advertise support for Flexible Algorithm are pruned from the topology.
• If the Flexible Algorithm definition includes affinities that are excluded, then all links for which any of such affinities are advertised will be pruned from the topology.
• If the Flexible Algorithm definition includes an "exclude SRLG" rule, then all links that are part of such
SRLG are 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
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
325
Enabling Segment Routing Flexible Algorithm
Installation of Forwarding Entries for Flexible Algorithm Paths
Algorithm. These paths use Prefix-SIDs advertised specifically for such Flexible Algorithm in order to enforce a backup or microloop avoidance path.
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.
Configuring Microloop Avoidance for Flexible Algorithm
By default, Microloop Avoidance per Flexible Algorithm instance follows Microloop Avoidance configuration for algo-0. For information about configuring Microloop Avoidance, see
Configure Segment Routing Microloop
You can disable Microloop Avoidance for Flexible Algorithm using the following commands:
router isis instance flex-algo algo microloop avoidance disable
router ospf process flex-algo algo microloop avoidance disable
Configuring LFA / TI-LFA for Flexible Algorithm
By default, LFA/TI-LFA per Flexible Algorithm instance follows LFA/TI-LFA configuration for algo-0. For information about configuring TI-LFA, see
Configure Topology-Independent Loop-Free Alternate (TI-LFA), on page 421 .
You can disable TI-LFA for Flexible Algorithm using the following commands:
router isis instance flex-algo algo fast-reroute disable
router ospf process flex-algo algo fast-reroute disable
Installation of Forwarding Entries for Flexible Algorithm Paths
Flexible Algorithm path to any prefix must be installed in the forwarding using the Prefix-SID that was advertised for such Flexible Algorithm. If the Prefix-SID for Flexible Algorithm is not known, such Flexible
Algorithm path is not installed in forwarding for such prefix..
Only MPLS to MPLS entries are installed for a Flexible Algorithm path. No IP to IP or IP to MPLS entries are installed. These follow the native IPG paths computed based on the default algorithm and regular IGP metrics.
Flexible Algorithm Prefix-SID Redistribution
Previously, 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.
326
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Prefix Metric
Flexible Algorithm Prefix Metric
Table 47: Feature History Table
Feature Name
Prefix Metric support for OSPF
Flexible Algorithm
Release Information
Release 7.5.1
Feature Description
This feature extends the current
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.
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/ .
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
327
Enabling Segment Routing Flexible Algorithm
Configuring Flexible Algorithm
Configuring Flexible Algorithm
Table 48: Feature History Table
Feature Name
TE Metric Support for IS-IS Flex
Algo
Release Information
Release 7.4.1
Feature Description
Flexible Algorithm allows for user-defined algorithms where the
IGP computes paths based on a user-defined combination of metric type (path optimization objective) and constraint.
This feature add 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 ISIS and OSPF configuration sub-mode is used to configure Flexible Algorithm:
router isis instance flex-algo algo
router ospf process flex-algo algo algo —value from 128 to 255
Configuring Flexible Algorithm Definitions
The following commands are used to configure Flexible Algorithm definition under the flex-algo sub-mode:
•
router isis instance flex-algo algo metric-type { delay | te }
router ospf process flex-algo algo metric-type { delay | te-metric }
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 330
for TE metric behaviors.
•
router isis instance flex-algo algo affinity { include-any | include-all | exclude-any } name1, name2, …
router ospf process flex-algo algo affinity { include-any | include-all | exclude-any } name1, name2, …
328
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
Enabling Segment Routing Flexible Algorithm
Configuring Flexible Algorithm name —name of the affinity map
•
router isis instance flex-algo algo priority priority value
router ospf process flex-algo algo priority priority value priority value —priority used during the Flexible Algorithm definition election.
The following command is used to to include the Flexible Algorithm prefix metric in the advertised Flexible
Algorithm definition in IS-IS and OSPF :
router isis instance flex-algo algo prefix-metric
router ospf process flex-algo algo prefix-metric
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.
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
• name —name of the affinity-map.
• bit number —bit position in the Extended Admin Group bitmask.
The following command is used to associate the affinity with an interface:
router isis instance interface type interface-path-id affinity flex-algo name 1, name 2, …
router ospf process area area interface type interface-path-id affinity flex-algo name 1, name 2, … name —name of the affinity-map
Configuring Prefix-SID Advertisement
The following command is used to advertise prefix-SID for default and strict-SPF algorithm:
router isis instance interface type interface-path-id address-family { ipv4 | ipv6 } [ unicast ] prefix-sid [ strict-spf | algorithm algorithm-number ] [ index | absolute ] sid value
router ospf process area area interface Loopback interface-instance prefix-sid [ strict-spf
| algorithm algorithm-number ] [ index | absolute ] sid value
• algorithm-number —Flexible Algorithm number
• sid value —SID value
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
329
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Link Attribute Advertisement Behavior
Flexible Algorithm Link Attribute Advertisement Behavior
Table 49: Feature History Table
Feature Name
Advertisement of Link Attributes for IS-IS Flexible Algorithm
Release Information
Release 7.4.1
Feature Description
Link attribute advertisements used during Flexible Algorithm path calculation must use the
Application-Specific Link Attribute
(ASLA) advertisements, as defined in IETF draft draft-ietf-lsr-flex-algo .
This feature introduces support for
ASLA advertisements during IS-IS
Flexible Algorithm path calculation.
The following tables explain the behaviors for advertising (transmitting) and processing (receiving) Flexible
Algorithm link attributes.
Table 50: OSPF
Link Attribute
Link Delay Metric
Link TE Metric
Transmit Receive
IOS XR OSPF Flex Algo implementation advertises the link delay metric value using the OSPF
ASLA sub-TLV with the F-bit set.
IOS XR OSPF only uses the link delay metric advertised in the
ASLA sub-TLV for Flex Algo.
ASLA sub-TLV is supported with non-zero-length or with zero-length
Application Identifier Bit Masks.
IOS XR OSPF Flex Algo implementation advertises the link
TE metric value using the OSPF
ASLA sub-TLV with the F-bit set.
The link TE metric values advertised are configured under
SR-TE.
IOS XR OSPF only uses the TE metric advertised in the ASLA sub-TLV for Flex Algo.
ASLA sub-TLV is supported with non-zero-length or with zero-length
Application Identifier Bit Masks.
330
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
Enabling Segment Routing Flexible Algorithm
Flexible Algorithm Link Attribute Advertisement Behavior
Link Attribute
Link Admin Group/Extended
Admin Group
Transmit Receive
IOS XR OSPF Flex Algo implementation advertises the link admin group value using both link admin group (AG) and link extended admin group (EAG) encoding using the OSPF ASLA sub-TLV with the F-bit set.
IOS XR OSPF only uses the
AG/EAG (either one or both) advertised in the ASLA sub-TLV for Flex Algo.
ASLA sub-TLV is supported with non-zero-length or with zero-length
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.
Table 51: IS-IS
Link Attribute
Link Delay
Metric
Transmit Receive
IOS XR IS-IS Flex Algo implementation advertises the link delay metric value using both the IS-IS
Extended Reachability TLV and the
IS-IS ASLA.
By default, IOS XR IS-IS Flex Algo implementation prefers the link delay metric value received in the IS-IS ASLA. Otherwise, it will use link delay metric value received in the IS-IS
Extended Reachability TLV.
ASLA sub-TLV is supported with non-zero-length or with zero-length Application Identifier Bit
Masks.
If the incoming ASLA includes the L-Flag, implementation derives the link delay metric value from the IS-IS Extended Reachability TLV.
You can configure the IOS XR IS-IS Flex Algo implementation to strictly use the link delay metric value received in the IS-IS ASLA. See
Strict IS-IS ASLA Link Attribute, on page 332
.
Link TE Metric IOS XR IS-IS Flex Algo implementation advertises the link TE metric value using the IS-IS ASLA.
IOS XR IS-IS Flex Algo implementation processes the link TE metric value received in the IS-IS
ASLA.
The link TE metric values advertised can be configured directly under the IGP and are therefore FA-specific.
Otherwise, they will be derived from the link TE metric values configured under SR-TE.
ASLA sub-TLV is supported with non-zero-length or with zero-length Application Identifier Bit
Masks.
If incoming ASLA includes the L-Flag, implementation derives the link TE metric value from the IS-IS Extended Reachability TLV.
See
Algorithm-Specific TE Metric, on page
.
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
331
Enabling Segment Routing Flexible Algorithm
Configuring Strict IS-IS ASLA Link Attribute
Link Attribute Transmit Receive
Link Admin
Group/Extended
Admin Group
IOS XR IS-IS Flex Algo implementation advertises the affinity value as both the link admin group (AG)
TLV and the link extended admin group
(EAG) TLV using the IS-IS ASLA when its value falls within the first 32 bits. Otherwise, the affinity value is advertised only as link EAG TLV using the IS-IS ASLA.
The admin group values advertised are configured directly under the IGP and are therefore FA-specific.
IOS XR IS-IS Flex Algo implementation processes the affinity value received as either the link admin group TLV or link extended admin group TLV in the IS-IS ASLA.
ASLA sub-TLV is supported with non-zero-length or with zero-length Application Identifier Bit
Masks.
If incoming ASLA includes the L-Flag, implementation derives the affinity value from the
IS-IS Extended Reachability TLV.
Link SRLG IOS XR IS-IS LFA implementation advertises the link SRLG value in the
IS-IS ASLA.
IOS XR IS-IS LFA implementation processes the link SRLG value received in the IS-IS ASLA.
If incoming ASLA includes the L-Flag, implementation derives the link SRLG value from the IS-IS Extended Reachability TLV.
Configuring Strict IS-IS ASLA Link Attribute
Use the following command to configure the IOS XR IS-IS Flex Algo implementation to strictly use the link delay metric value received in the IS-IS ASLA:
router isis instance-id receive application flex-algo delay app-only
Configuring Flexible Algorithm-Specific TE Metric
Use the following command to configure the Flexible Algorithm-specific TE metric value under IS-IS, where metric_value is from 1 to 16777214:
router isis instance interface type interface-path-id address-family { ipv4 | ipv6 } [ unicast ]
te-metric flex-algo metric_value [ level { 1 | 2 }]
The following example shows how to configure the Flexible Algorithm-specific TE metric value to 50:
Router(config)# router isis 1
Router(config-isis)# interface HundredGigE 0/0/0/2
Router(config-isis-if)# address-family ipv4 unicast
Router(config-isis-if-af)# te-metric flex-algo 50
332
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
Enabling Segment Routing Flexible Algorithm
Configuring Flexible Algorithm with Exclude SRLG Constraint
Configuring Flexible Algorithm with Exclude SRLG Constraint
Table 52: Feature History Table
Feature Name
IS-IS Flexible Algorithm:
Exclude-SRLG Constraint
Release Information
Release 7.5.1
Feature Description
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. 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 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.
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
333
Enabling Segment Routing Flexible Algorithm
Configuring Flexible Algorithm with Exclude SRLG Constraint
Note See
section in the Configure SR-TE Policies chapter for information about configuring
SR policies with Flex-Algo constraints.
Figure 21: Flex Algo with Exclude SRLG Constraint
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.
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
RP/0/RP0/CPU0:router(config-srlg)# interface HunGigE0/0/1/0
RP/0/RP0/CPU0:router(config-srlg-if)# name groupY
RP/0/RP0/CPU0:router(config-srlg-if)# exit
RP/0/RP0/CPU0:router(config-srlg)# interface TenGigE0/0/1/1
RP/0/RP0/CPU0:router(config-srlg-if)# name groupY
RP/0/RP0/CPU0:router(config-srlg-if)# exit
RP/0/RP0/CPU0:router(config-srlg)# name groupX value 100
334
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
Enabling Segment Routing Flexible Algorithm
Example: Configuring IS-IS Flexible Algorithm
RP/0/RP0/CPU0:router(config-srlg)# name groupY value 200
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 flex-algo link-attributes srlg
RP/0/RP0/CPU0:router(config-isis-af)# exit
RP/0/RP0/CPU0:router(config-isis)# flex-algo 128
RP/0/RP0/CPU0:router(config-isis-flex-algo)# advertise-definition
RP/0/RP0/CPU0:router(config-isis-flex-algo)# srlg exclude-any groupX
RP/0/RP0/CPU0:router(config-isis-flex-algo)# exit
RP/0/RP0/CPU0:router(config-isis)# flex-algo 129
RP/0/RP0/CPU0:router(config-isis-flex-algo)# advertise-definition
RP/0/RP0/CPU0:router(config-isis-flex-algo)# srlg exclude-any groupY
RP/0/RP0/CPU0:router(config-isis-flex-algo)# exit
RP/0/RP0/CPU0:router(config-isis)#
Example: Configuring IS-IS Flexible Algorithm
router isis 1 affinity-map red bit-position 65 affinity-map blue bit-position 8 affinity-map green bit-position 201 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
!
Example: Configuring OSPF Flexible Algorithm
router ospf 1 flex-algo 130 priority 200 affinity exclude-any
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
335
Enabling Segment Routing Flexible Algorithm
Example: Traffic Steering to Flexible Algorithm Paths red blue
!
metric-type delay
!
flex-algo 140 affinity include-all
!
green
!
affinity include-any red
!
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
Example: Traffic Steering to Flexible Algorithm Paths
BGP Routes on PE – Color Based Steering
SR-TE On Demand Next-Hop (ODN) feature can be used to steer the BGP traffic towards the Flexible
Algorithm paths.
The following example configuration shows how to setup BGP steering local policy, assuming two router:
R1 (2.2.2.2) and R2 (4.4.4.4), in the topology.
Configuration on router R1: vrf Test address-family ipv4 unicast import route-target
!
1:150 export route-policy SET_COLOR_RED_HI_BW export route-target
1:150
!
!
!
interface Loopback0
336
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
Enabling Segment Routing Flexible Algorithm
BGP Routes on PE – Color Based Steering ipv4 address 2.2.2.2 255.255.255.255
!
interface Loopback150 vrf Test ipv4 address 2.2.2.222 255.255.255.255
!
interface TenGigE0/1/0/3/0 description exr1 to cxr1 ipv4 address 10.0.20.2 255.255.255.0
!
extcommunity-set opaque color129-red-igp
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
!
!
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
337
Enabling Segment Routing Flexible Algorithm
BGP Routes on PE – Color Based Steering
!
!
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 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
!
Configuration on router R2: vrf Test address-family ipv4 unicast import route-target
1:150
!
export route-policy SET_COLOR_RED_HI_BW export route-target
1:150
!
!
!
interface TenGigE0/1/0/1 description cxr1 to exr1 ipv4 address 10.0.20.1 255.255.255.0
!
extcommunity-set opaque color129-red-igp
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.0004.00
log adjacency changes affinity-map RED bit-position 28 affinity-map BLUE bit-position 29
338
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
Enabling Segment Routing Flexible Algorithm
BGP Routes on PE – Color Based Steering affinity-map GREEN bit-position 30 flex-algo 128 priority 228
!
flex-algo 129 priority 229
!
flex-algo 130 priority 230
!
address-family ipv4 unicast 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 1.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 Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
339
BGP Routes on PE – Color Based Steering
!
!
!
!
segment-routing
!
end
Enabling Segment Routing Flexible Algorithm
340
Segment Routing Configuration Guide for Cisco NCS 5500 Series Routers, IOS XR Release 7.6.x
Pakua
Tangazo