Configuring SR-TE Manual Preference Selection
This section describes the configuration and execution commands introduced to support manual preference selection feature.
Guidelines and Limitations for SR-TE Manual Preference Selection
The following guidelines and limitations apply to the SR-TE manual preference selection feature:
-
Beginning with Cisco NX-OS Release 10.2(2)F, the SR-TE manual preference selection feature allows you to lockdown, shutdown, or perform both on an SRTE policy or an on-demand color template; shutdown preference(s) of an SR-TE policy or an on-demand color template. Furthermore, this feature also allows you to force a specific preference to be active for the SR-TE policy and force path re-optimization for all or a specific SR-TE policy.
This feature is supported on Cisco Nexus 9300-EX, 9300-FX, 9300-FX2, 9300-GX, and N9K-C9332D-GX2B platform switches.
About SR-TE Manual Preference – Lockdown and Shutdown
Beginning with Cisco NX-OS Release 10.2(2)F, you can perform the following actions as appropriate:
-
Lockdown an SRTE policy – You can enable lockdown under on-demand color templates or explicit policies. Lockdown disables auto re-optimization of path preferences for a policy. In case a new higher preferred path comes up for a policy which is locked down, then it does not automatically switch to use the new path and continues to use the current active path option until it is valid.
Note
If an explicit policy configuration exists for the same color as the on-demand template, then the policy configuration takes precedence over the template configuration for the lockdown.
Example
Consider a scenario where there are multiple preferences on a policy. Assume that the higher preference path goes down due to some fault in the network. The fault could be an impending failure of a node in the higher preference path. When investigating and rectifying the fault, the operations team may need to reload or disable the problematic node and prevent any disruptions while this occurs. Then, locking down the lower preference path and preventing switching back to the higher preference path is a good option to use.
-
Shutdown an SRTE policy – You can enable shutdown under on-demand color templates or explicit policies. The policy state changes to admin down, and a policy down notification is sent to all the clients interested in the policy. Disabling shutdown under on-demand color configuration changes the policy state to up or down based on the path validity of the policy.
Note
If an explicit policy configuration exists for the same color as the on-demand template, then the policy configuration takes precedence over the template configuration for the shutdown.
-
Shutdown preference[s] of an SRTE policy – You can shut down a path preference under an on-demand color template configuration or under a path preference of explicit policy configuration. This disables that path preference and stops it from entering any future path re-optimization until the preference is unshut. The path preference is shown as admin down or up in the output of
show srte policy
based on whether it is shut or unshut in the configuration.
Configuring SR-TE Manual Preference – Lockdown/Shutdown
You can configure lockdown, shutdown, or both on an SR-TE policy or an on-demand color template. You can also shutdown a preference under an SR-TE policy or an on-demand color template.
Before you begin
You must ensure that the mpls segment routing feature is enabled.
Procedure
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
configure terminal |
Enters global configuration mode. |
||
Step 2 |
segment-routing |
Enters the segment-routing mode. |
||
Step 3 |
traffic-engineering |
Enters the traffic engineering mode. |
||
Step 4 |
on-demand colorcolor_num or policy name |
Enters the on-demand mode to configure the color or configures the SR-TE policy respectively. |
||
Step 5 |
(optional) [no] lockdown |
Enables lockdown under the on-demand color template or explicit policy configuration.
|
||
Step 6 |
(optional) [no] shutdown |
Shuts down any policy created from the on-demand color template or the configured SR-TE policy, as appropriate.
|
||
Step 7 |
candidate-paths |
Specifies the candidate paths of the policy. |
||
Step 8 |
preference preference_number |
Specifies the preference of the candidate path. |
||
Step 9 |
(optional) [no] shutdown |
Shuts down a path preference under an SR-TE policy configuration or an on-demand color template configuration. |
Force a Specific Path Preference for an SRTE Policy
To force a specific preference to be the active path option for an SRTE policy, use the segment-routing traffic-engineering switch name <policy_name> pref <preference_number>
execution command. This command uses the preference until it is valid.
A sample output is as follows:
NX2# show srte policy Green_White
Policy: 8.8.8.0|801
Name: Green_White
Source: 2.2.2.0
End-point: 8.8.8.0
State: UP
Color: 801
Authorized: Y
Binding-sid Label: 22
Policy-Id: 3
Path type = MPLS Active path option
Path-option Preference:180 ECMP path count: 1
1. PCE Weighted: No
Delegated PCE: 11.11.11.11
Index: 1 Label: 16005
Index: 2 Label: 16008
NX2# segment-routing traffic-engineering switch name Green_White preference 170
NX2(cfg-pref)# show srte policy Green_white detail
Policy: 8.8.8.0|801
Name: Green_White
…..
Path type = MPLS Path options count: 4
Path-option Preference:180 ECMP path count: 1 Admin: UP Forced: No
1. PCE Weighted: No
Delegated PCE: 11.11.11.11
Index: 1 Label: 16005
Index: 2 Label: 16008
Path-option Preference:170 ECMP path count: 1 Admin: UP Forced: Yes Active path option
1. Explicit Weighted: No
Name: Yellow
Index: 1 Label: 16006
Index: 2 Label: 16008
To undo this manually selected preference, you can perform any one of the following options:
-
Use the
segment-routing traffic-engineering reoptimize name <policy_name>
command. For more information, see the Force path re-optimization for an SRTE Policy or All SRTE Policies section. -
Switch to another preference
-
Shut this policy
-
Shut the selected preference
Force path re-optimization for an SRTE Policy or All SRTE Policies
When there are multiple preferences for an SRTE policy, you can re-optimize a policy, that is, pick the best preferred available path.
To force path re-optimization for a specific SRTE policy, use the segment-routing traffic-engineering reoptimize name <policy_name>
command. The <policy_name>
can be the name or alias name of the policy. This command undoes the preference switch command explained in the previous
section and overrides lockdown if configured.
A sample output is as follows:
NX2# show srte policy Green_White
Policy: 8.8.8.0|801
Name: Green_White
Source: 2.2.2.0
End-point: 8.8.8.0
State: UP
Color: 801
Authorized: Y
Binding-sid Label: 22
Policy-Id: 3
Path type = MPLS Active path option
Path-option Preference:170 ECMP path count: 1
1. Explicit Weighted: Yes Weight: 1
Name: Yellow
Index: 1 Label: 16006
Index: 2 Label: 16008
NX2# segment-routing traffic-engineering reoptimize name Green_White
NX2# show srte policy Green_White
Policy: 8.8.8.0|801
Name: Green_White
Source: 2.2.2.0
End-point: 8.8.8.0
State: UP
Color: 801
Authorized: Y
Binding-sid Label: 22
Policy-Id: 3
Path type = MPLS Active path option
Path-option Preference:180 ECMP path count: 1
1. PCE Weighted: No
Delegated PCE: 11.11.11.11
Index: 1 Label: 16005
Index: 2 Label: 16008
To force path re-optimization for all SRTE policies, use the segment-routing traffic-engineering reoptimize all
command to force path re-optimization for all SRTE policies present on the system. This command undoes the preference switch
command explained in the previous point and overrides lockdown if configured.