Skip to content

Segment Routing

Segment routing (segment-routing) steers traffic along a path encoded as a list of segments. SR-MPLS settings (segment-routing > mpls) cover the segment routing global block (SRGB), the SRGB cleanup and retry timers, shutdown and the connected prefix SID map that assigns an index or absolute label to local prefixes per address family. SRv6 settings (segment-routing > srv6) cover the encapsulation source address and the locators with their prefixes. SR-TE settings (segment-routing > traffic-engineering) cover the MPLS encapsulation source address, liveness detection, the PCC source address and PCE addresses, the affinity map, TE interfaces with metric and affinity colors, explicit segment lists, SRv6 locators, on-demand colors (ODN) and SR-TE policies. On-demand colors and policies support shutdown, lockdown, liveness detection and candidate paths, each with explicit segment lists, dynamic path computation (locally or through PCEP) and constraints (segments, disjointness association group, affinity).

Diagram
NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo
device_groupsListdevice_groupsNo
globalClassglobalNo
templatesListtemplatesNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
routingClassroutingNo

NameTypeConstraintMandatoryDefault Value
segment_routingClasssegment_routingNo

segment_routing (nxos.devices.configuration.routing)

Section titled “segment_routing (nxos.devices.configuration.routing)”
NameTypeConstraintMandatoryDefault Value
mplsClassmplsNo
srv6Classsrv6No
traffic_engineeringClasstraffic_engineeringNo

mpls (nxos.devices.configuration.routing.segment_routing)

Section titled “mpls (nxos.devices.configuration.routing.segment_routing)”
NameTypeConstraintMandatoryDefault Value
shutdownBooleantrue, falseNo
global_block_minIntegermin: 16000, max: 471804No
global_block_maxIntegermin: 16000, max: 471804No
timers_srgb_cleanupIntegermin: 1, max: 65535No
timers_srgb_retryIntegermin: 1, max: 65535No
connected_prefix_sid_map_address_familiesListconnected_prefix_sid_map_address_familiesNo

srv6 (nxos.devices.configuration.routing.segment_routing)

Section titled “srv6 (nxos.devices.configuration.routing.segment_routing)”
NameTypeConstraintMandatoryDefault Value
encapsulation_source_addressIPNo
locatorsListlocatorsNo

traffic_engineering (nxos.devices.configuration.routing.segment_routing)

Section titled “traffic_engineering (nxos.devices.configuration.routing.segment_routing)”
NameTypeConstraintMandatoryDefault Value
encapsulation_mpls_source_ipv4IPNo
liveness_detection_intervalIntegermin: 50, max: 30000No
liveness_detection_multiplierIntegermin: 1, max: 10No
liveness_detection_mpls_bfdBooleantrue, falseNo
liveness_detection_mpls_oamBooleantrue, falseNo
pcc_source_address_ipv4IPNo
pcc_pce_addressesListpcc_pce_addressesNo
affinity_map_colorsListaffinity_map_colorsNo
segment_routing_srv6_locatorsListStringNo
interfacesListinterfacesNo
segment_listsListsegment_listsNo
on_demand_colorsListon_demand_colorsNo
policiesListpoliciesNo

connected_prefix_sid_map_address_families (nxos.devices.configuration.routing.segment_routing.mpls)

Section titled “connected_prefix_sid_map_address_families (nxos.devices.configuration.routing.segment_routing.mpls)”
NameTypeConstraintMandatoryDefault Value
address_familyChoiceipv4, ipv6Yes
prefixesListprefixesNo

locators (nxos.devices.configuration.routing.segment_routing.srv6)

Section titled “locators (nxos.devices.configuration.routing.segment_routing.srv6)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
prefixIPNo

pcc_pce_addresses (nxos.devices.configuration.routing.segment_routing.traffic_engineering)

Section titled “pcc_pce_addresses (nxos.devices.configuration.routing.segment_routing.traffic_engineering)”
NameTypeConstraintMandatoryDefault Value
ipv4IPYes
precedenceIntegermin: 0, max: 255No

affinity_map_colors (nxos.devices.configuration.routing.segment_routing.traffic_engineering)

Section titled “affinity_map_colors (nxos.devices.configuration.routing.segment_routing.traffic_engineering)”
NameTypeConstraintMandatoryDefault Value
colorStringYes
bit_positionIntegermin: 0, max: 31No

interfaces (nxos.devices.configuration.routing.segment_routing.traffic_engineering)

Section titled “interfaces (nxos.devices.configuration.routing.segment_routing.traffic_engineering)”
NameTypeConstraintMandatoryDefault Value
interface_typeChoiceethernet, loopback, mgmt, port-channel, vlan, vniYes
interface_idAnyString or Integer[min: 0]Yes
metricIntegermin: 0, max: 4294967295No
affinity_colorsListStringNo

segment_lists (nxos.devices.configuration.routing.segment_routing.traffic_engineering)

Section titled “segment_lists (nxos.devices.configuration.routing.segment_routing.traffic_engineering)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
indexesListindexesNo

on_demand_colors (nxos.devices.configuration.routing.segment_routing.traffic_engineering)

Section titled “on_demand_colors (nxos.devices.configuration.routing.segment_routing.traffic_engineering)”
NameTypeConstraintMandatoryDefault Value
colorIntegermin: 0, max: 4294967295Yes
shutdownBooleantrue, falseNo
lockdownBooleantrue, falseNo
liveness_detectionClassliveness_detectionNo
candidate_paths_preferencesListcandidate_paths_preferencesNo

policies (nxos.devices.configuration.routing.segment_routing.traffic_engineering)

Section titled “policies (nxos.devices.configuration.routing.segment_routing.traffic_engineering)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
colorIntegermin: 0, max: 4294967295No
endpointIPNo
shutdownBooleantrue, falseNo
lockdownBooleantrue, falseNo
liveness_detectionClassliveness_detectionNo
candidate_paths_preferencesListcandidate_paths_preferencesNo

prefixes (nxos.devices.configuration.routing.segment_routing.mpls.connected_prefix_sid_map_address_families)

Section titled “prefixes (nxos.devices.configuration.routing.segment_routing.mpls.connected_prefix_sid_map_address_families)”
NameTypeConstraintMandatoryDefault Value
prefixIPYes
indexIntegermin: 0, max: 471804No
absoluteIntegermin: 16000, max: 471804No

indexes (nxos.devices.configuration.routing.segment_routing.traffic_engineering.segment_lists)

Section titled “indexes (nxos.devices.configuration.routing.segment_routing.traffic_engineering.segment_lists)”
NameTypeConstraintMandatoryDefault Value
indexIntegermin: 1, max: 65535Yes
mpls_labelIntegermin: 16, max: 471804No
segment_routing_srv6IPNo
policy_endpointBooleantrue, falseNo

liveness_detection (nxos.devices.configuration.routing.segment_routing.traffic_engineering.on_demand_colors)

Section titled “liveness_detection (nxos.devices.configuration.routing.segment_routing.traffic_engineering.on_demand_colors)”
NameTypeConstraintMandatoryDefault Value
shutdownBooleantrue, falseNo
index_limitIntegermin: 0, max: 65535No
mpls_bfdBooleantrue, falseNo
mpls_oamBooleantrue, falseNo

candidate_paths_preferences (nxos.devices.configuration.routing.segment_routing.traffic_engineering.on_demand_colors)

Section titled “candidate_paths_preferences (nxos.devices.configuration.routing.segment_routing.traffic_engineering.on_demand_colors)”
NameTypeConstraintMandatoryDefault Value
preferenceIntegermin: 0, max: 4294967295Yes
shutdownBooleantrue, falseNo
explicit_segment_listsListStringNo
dynamicBooleantrue, falseNo
dynamic_pcepBooleantrue, falseNo
dynamic_metric_typeChoiceigpNo
constraints_segments_dataplane_mplsBooleantrue, falseNo
constraints_segments_protectedBooleantrue, falseNo
constraints_segments_unprotectedBooleantrue, falseNo
constraints_association_group_disjoint_typeChoicelink, nodeNo
constraints_association_group_disjoint_idIntegermin: 0, max: 4294967295No
constraints_affinity_include_all_colorsListStringNo
constraints_affinity_include_any_colorsListStringNo
constraints_affinity_exclude_any_colorsListStringNo

Example 1: SR-MPLS with an SRGB and connected prefix SIDs

nxos:
devices:
- name: PE1
configuration:
feature_set:
mpls: true
feature:
mpls_segment_routing: true
routing:
segment_routing:
mpls:
global_block_min: 17000
global_block_max: 25999
timers_srgb_cleanup: 90
timers_srgb_retry: 120
connected_prefix_sid_map_address_families:
- address_family: ipv4
prefixes:
- prefix: 10.0.0.1/32
index: 1
- prefix: 10.0.0.101/32
absolute: 17101

Example 2: SR-TE with PCC, affinities, an on-demand color and an explicit policy

nxos:
devices:
- name: PE1
configuration:
feature_set:
mpls: true
feature:
mpls_segment_routing: true
mpls_segment_routing_traffic_engineering: true
routing:
segment_routing:
mpls:
global_block_min: 16000
global_block_max: 23999
traffic_engineering:
encapsulation_mpls_source_ipv4: 10.0.0.1
pcc_source_address_ipv4: 10.0.0.1
pcc_pce_addresses:
- ipv4: 10.0.0.100
precedence: 10
affinity_map_colors:
- color: RED
bit_position: 1
interfaces:
- interface_type: ethernet
interface_id: 1/1
metric: 10
affinity_colors:
- RED
segment_lists:
- name: TO-PE2
indexes:
- index: 10
mpls_label: 16002
- index: 20
policy_endpoint: true
on_demand_colors:
- color: 100
candidate_paths_preferences:
- preference: 100
dynamic: true
dynamic_pcep: true
dynamic_metric_type: igp
constraints_segments_dataplane_mpls: true
constraints_segments_protected: true
constraints_affinity_include_all_colors:
- RED
policies:
- name: PE1-TO-PE2
color: 200
endpoint: 10.0.0.2
liveness_detection:
index_limit: 10
candidate_paths_preferences:
- preference: 100
explicit_segment_lists:
- TO-PE2
- preference: 50
dynamic: true
constraints_association_group_disjoint_type: link
constraints_association_group_disjoint_id: 2

Example 3: SRv6 locator and encapsulation source address

nxos:
devices:
- name: PE2
configuration:
feature:
srv6: true
routing:
segment_routing:
srv6:
encapsulation_source_address: 2001:db8::2
locators:
- name: LOC1
prefix: 2001:db8:0:2::/64