Segment Routing Policy Commands
This chapter describes the segment routing policy commands:
A.B.C.D (IP constraints)
Use this command to set IP constraints for a dynamic candidate path.
Use the no form of this command to remove an IP constraint from a dynamic candidate path.
Command Syntax
A.B.C.D (loose|strict|)
no A.B.C.D
Parameters
loose
Make this constraint loose
strict
Make this constraint strict
Default
By default, IP constraint is considered as loose.
Command Mode
Candidate path constraint mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#dynamic-path isis
(config-sr-pol-cp)#constraints
(config-sr-pol-cp-cons)#2.2.2.2
(config-sr-pol-cp-cons)#20.1.1.2 strict
(config-sr-pol-cp-cons)#
admin-state down
Use this command to bring down a segment routing policy administratively.
Use the no form of this command to bring up a segment routing policy administratively.
Command Syntax
admin-state down
no admin-state down
Parameters
None
Default
By default, admin-state is not configured and a segment routing policy admin-state is up.
Command Mode
Segment routing policy mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#admin-state down
(config-sr-pol)#
affinity
Use this command to set a set affinity constraints for a dynamic candidate path.
Use the no form of this command to remove affinity constraints from a dynamic candidate path.
Command Syntax
affinity (exclude-any|incude-all|include-any) ADMIN-GROUP-NAME
no affinity (exclude-any|incude-all|include-any) ADMIN-GROUP-NAME
Parameters
exclude-any
Exclude any attribute
include-all
Include all attribute
include-any
Include any attribute
ADMIN-GROUP-NAME
Administrative group name
Default
By default, no affinity constraint is configured.
Command Mode
Candidate path constraint mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#dynamic-path isis
(config-sr-pol-cp)#constraints
(config-sr-pol-cp-cons)#affinity include-any red
(config-sr-pol-cp-cons)#
binding-sid mpls label
Use this command to configure binding SID MPLS label value for a segment routing policy.
Use the no form of this command to remove a binding SID.
Command Syntax
binding-sid mpls label <16-15999>
no binding-sid mpls label
Parameters
<16-15999>
MPLS Label
Default
By default, binding SID is not configured.
Command Mode
RSVP trunk mode
Segment routing policy mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#binding-sid mpls label 15000
(config-sr-pol)#
#configure terminal
(config)#rsvp-trunk mytrunk ipv4
(config-trunk)#binding-sid mpls label 15000
candidate-path
Use this command to configure a candidate path for a segment routing policy.
Use the no form of this command to remove a candidate path from a segment routing policy.
Command Syntax
candidate-path <1-65535>
no candidate-path <1-65535>
Parameters
<1-65535>
Identifier for candidate path
Default
By default, no candidate path is configured.
Command Mode
Segment routing policy mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#
color end-point
Use this command to configure key parameters for segment routing policy.
Use the no form of this command to remove a segment routing policy key.
Command Syntax
color <1-4294967295> end-point A.B.C.D
no color <1-4294967295> end-point A.B.C.D
Parameters
<1-4294967295>
Color value
A.B.C.D
IPv4 address type
Default
By default, no segment routing policy key is configured.
Command Mode
Segment routing policy mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#color 1 end-point 3.3.3.3
(config-sr-pol)#
constraints
Use this command to set constraints for a dynamic candidate path.
Use the no form of this command to remove constraints from a dynamic candidate path.
Note: Constraints are not supported for explicit candidate path.
Command Syntax
constraints
no constraints
Parameters
NA
Default
By default, constraints is not configured.
Command Mode
Candidate path mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#dynamic-path isis
(config-sr-pol-cp)#constraints
(config-sr-pol-cp-cons)#
cspf-retry-interval
Use this command to set the retry interval for two successive ISIS/OSPF CSPF computation for a candidate path.
Use the no form of this command to remove the CSPF retry interval.
Command Syntax
cspf-retry-interval <1-600>
no cspf-retry-interval
Parameters
<1-600>
Time in seconds between successive retries
Default
By default, the retry interval is 10 seconds.
Command Mode
Segment routing policy mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#cspf-retry-interval 30
(config-sr-pol)#
cspf-retry-limit
Use this command to set the number of retries for ISIS/OSPF CSPF computation for a candidate path.
Use the no form of this command to set the CSPF retry limit to its default (100).
Note: CSPF computation engine will compute cspf for a requested path after each retry interval until this limit is reached.
Command Syntax
cspf-retry-limit <1-65535>
no cspf-retry-limit
Parameters
<1-65535>
Number of times CSPF should retry
Default
By default, the retry limit is 100.
Command Mode
Segment routing policy mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#cspf-retry-limit 30
(config-sr-pol)#
debug sr-policy
Use this command to enable debugging for segment routing policy.
Use the no form of this command to disable debugging for segment routing policy.
Command Syntax
debug sr-policy all
no debug sr-policy all
debug sr-policy policy
no debug sr-policy policy
debug sr-policy cp
no debug sr-policy cp
debug sr-policy pce
no debug sr-policy pce
Parameters
all
Enable all debugging
policy
Enable policy debugging
cp
Enable candidate-path debugging
pce
Enable PCE debugging
Default
N/A
Command Mode
Configure mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#debug sr-policy pce
dynamic-path
Use this command to set a candidate path as a dynamic path and request the computation engine to compute LSP.
Use the no form of this command to remove a dynamic path type and computation engine from a candidate path.
Note: Candidate path type or computation engine cannot be updated.
Command Syntax
dynamic-path (isis (WORD|) | ospf (<0-65535>|)| pcep)
no dynamic-path (isis (WORD|) | (ospf <0-65535>|)| pcep)
Parameters
isis
Request ISIS
WORD
ISIS instance name
ospf
Request OSPF
<0-65535>
OSPF process identifier
pcep
Request PCEP
Default
By default, path type is not set and no computation engine is attached.
Command Mode
Candidate path mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#dynamic-path isis
(config-sr-pol-cp)#exit-pol-cp
(config-sr-pol)#candidate-path 2
(config-sr-pol-cp)#dynamic-path ospf
(config-sr-pol-cp)#
exit-pol-cp
Use this command to leave candidate path mode.
Command Syntax
exit-pol-cp
Parameters
None
Default
NA
Command Mode
Candidate path mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#exit-pol-cp
(config-sr-pol)#
exit-sr-pol
Use this command to leave segment routing policy mode.
Command Syntax
exit-sr-pol
Parameters
NA
Default
NA
Command Mode
Segment routing policy mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#exit-pol-cp
(config-sr-pol)#exit-sr-pol
(config-sr-te)#
exit-sr-sl
Use this command to leave segment-list mode.
Command Syntax
exit-sr-sl
Parameters
None
Default
NA
Command Mode
Segment list mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#segment-list sid_list1
(config-sr-sl)#exit-sr-sl
(config-sr-te)#
exit-te
Use this command to leave traffic-engineering mode.
Command Syntax
exit-te
Parameters
None
Default
NA
Command Mode
Traffic engineering mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#exit-te
(config-sr)#
explicit segment-list
Use this command to configure a candidate path as an explicit path and attach a segment-list to it.
Use the no form of this command to remove explicit segment-list from a candidate path.
Note: Only one segment-list can be attached to a candidate path.
Command Syntax
explicit segment-list WORD
no explicit segment-list WORD
Parameters
WORD
Name of the SID list
Default
By default, path type is not set and no segment-list is attached.
Command Mode
Candidate path mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#segment-list l1
(config-sr-sl)#exit-sr-sl
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#explicit segment-list l1
(config-sr-pol-cp)#
explicit-null ipv4
Use this command to configure the explicit-null ipv4 label for a segment routing policy. This command adds the explicit null label at the bottom of the segment routing policy label stack.
Use the no form of this command to remove the explicit null label.
Command Syntax
explicit-null ipv4
no explicit-null ipv4
Parameters
None
Default
By default, the explicit null is disabled.
Command Mode
Segment routing policy mode.
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#explicit-null ipv4
(config-sr-pol)#
index segment-type-1
Use this command to configure a segment of explicit segment list.
Use the no form of this command to remove the corresponding segment list.
Command Syntax
index <1-65535> segment-type-1 <0-1048575>
no index <1-65535> segment-type-1
Parameters
<1-65535>
Index number
<0-1048575>
Label value
Default
By default, no segment is configured.
Command Mode
Segment list mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#segment-list sid_list1
(config-sr-sl)#index 1 segment-type-1 16002
(config-sr-sl)#index 2 segment-type-1 16003
(config-sr-sl)#
metric-type
Use this command to set a metric-type for optimization objective.
Use the no form of this command to remove a metric type from a dynamic candidate path.
Command Syntax
metric-type (igp|te)(bound <1-4294967295>|)
no metric-type (igp|te)
Parameters
igp
IGP metric
te
TE metric
bound
Maximum allowed metric for computed path
<1-4294967295>
Maximum allowed metric value
Default
By default, no metric and bound is configured.
Command Mode
Candidate path constraint mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#dynamic-path isis
(config-sr-pol-cp)#constraints
(config-sr-pol-cp-cons)#metric-type te
(config-sr-pol-cp-cons)#
ping mpls sr-policy
Use this command to check the connectivity between ingress and egress of LSP. This command uses MPLS echo request and reply messages, similar to Internet Control Message Protocol (ICMP) echo request and reply messages, to validate an LSP.
Segment routing ping is an extension of the MPLS LSP ping to perform connectivity verification on the segment routing control plane.
You can initiate the segment routing ping operation only when the segment routing control plane is available at the originator.
Command Syntax
ping mpls (protocol-origin (local | pcep) | ) sr-policy SR_POLICY_NAME (| candidate-path CANDIDATE_PATH_ID ({flags | source A.B.C.D | ttl <1-255> | timeout <1-500> | repeat <5-5000> | interval <2-20000> | force-explicit-null | detail}|)
Parameters
local
Locally originated candidate path
pce
PCE originated candidate path
SR_POLICY_NAME
Segment routing policy name
CANDIDATE_PATH_ID
Candidate path identifier
flags
Validate FEC stack
source
Source address
A.B.C.D
IPv4 address of the source
ttl
Trace packet Time-to-live
<1-255>
Trace packet TTL value
timeout
Time to wait before rejecting the probe as a failure
<1-500>
Timeout in seconds
repeat
Repeat sending of ping packets
<5-5000>
Number of pings to send
interval
Interval between ping packets
<2-20000>
Interval in milliseconds
force-explicit-null
Force Explicit Null label
detail
Print detailed output of the ping
Defaults
Default TTL is 255.
Default timeout is 60 seconds.
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#ping mpls protocol-origin pcep sr-policy SR_POLICY_1 candidate-path 1
policy
Use this command to configure a segment routing policy.
Use the no form of this command to remove a segment routing policy.
Command Syntax
policy WORD
no policy WORD
Parameters
WORD
Policy Name
Default
By default, no segment routing policy is configured.
Command Mode
Traffic engineering mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#
policy-fast-reroute-enable
Use this command to enable segment-routing policy fast-reroute for SR Policies.
Use the no form of this command to remove segment-routing policy fast-reroute for SR Policies.
Command Syntax
policy-fast-reroute-enable
no policy-fast-reroute-enable
Parameters
None
Default
By default, segment-routing policy fast-reroute is disabled.
Command Mode
Traffic engineering mode.
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy-fast-reroute-enable
(config-sr-te)#
preference
Use this command to set a preference value for a candidate path.
Use the no form of this command to remove a preference value from a candidate path.
Command Syntax
preference <1-65535>
no preference
Parameters
<1-65535>
Preference for candidate path
Default
By default, preference value is 100 for a candidate path.
Command Mode
Candidate path mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#candidate-path 1
(config-sr-pol-cp)#preference 200
(config-sr-pol-cp)#
segment-list
Use this command to configure an explicit segment list.
Use the no form of this command to remove a segment list.
Command Syntax
segment-list WORD
no segment-list WORD
Parameters
WORD
Name of the SID list
Default
By default, no segment-list is configured.
Command Mode
Traffic engineering mode.
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#segment-list sid_list1
(config-sr-sl)#
show segment-routing policy
Use this command to display segment routing policy information.
Command Syntax
Use this command to display basic/detailed information for all SR policies:
show segment-routing policy (detail|)
Use this command to check details of a particular policy or a particular candidate path:
show segment-routing policy WORD (candidate-path <0-4294967295> origin (local|pce)|)
Use this command to check if a policy has candidate-paths with the given origin:
show segment-routing policy candidate-path origin (local|pce)
Parameters
detail
Display details of segment routing policies
WORD
Segment routing policy name
<0-4294967295>
Candidate-path identifier
local
Locally originated candidate path
pce
PCE originated candidate path
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#show segment-routing policy detail
Policy-Name: p2 Color 1 End-point 3.3.3.3
Admin-Status: UP Oper-Status: UP for 00:08:59
State Transition Count: 1
CSPF Retry Limit: 10 CSPF Retry Interval: 10
Binding SID :
BSID: 24960
Alloc mode: Dynamic
Oper State: Pending
CP ID: 2, Active
Preference: 100 Path Type: Dynamic(isis) CP Origin: Local
Segment List:
Total no. of segments: 1
Segment0[LABEL]: Label :16033
Out-if: eth1 Out-label-stack: 16033
Attributes:
Configured:
Affinity:
Metric-type: TE
IP Constraints:
#show segment-routing policy p2
Policy-Name: p2 Color 1 End-point 3.3.3.3
Admin-Status: UP Oper-Status: UP for 00:09:06
State Transition Count: 1
CSPF Retry Limit: 10 CSPF Retry Interval: 10
Binding SID :
BSID: 24960
Alloc mode: Dynamic
Oper State: Pending
CP ID: 2, Active
Preference: 100 Path Type: Dynamic(isis) CP Origin: Local
Segment List:
Total no. of segments: 1
Segment0[LABEL]: Label :16033
Out-if: eth1 Out-label-stack: 16033
Attributes:
Configured:
Affinity:
Metric-type: TE
IP Constraints:
#show segment-routing policy candidate-path origin local
Policy-Name Color End-point State Forwarding-Info
p2 1 3.3.3.3 UP 16033/eth1
CP ID: 2, Active
Preference: 100 Path Type: Dynamic(isis) CP Origin: Local
CP state: Valid
Segment List:
Total no. of segments: 1
Segment0[LABEL]: Label :16033
Out-if: eth1 Out-label-stack: 16033
Attributes:
Configured:
Affinity:
Metric-type: TE
IP Constraints:
#show segment-routing policy
Policy-Name Color End-point State Forwarding-Info
p2 1 3.3.3.3 UP 16033/eth1
#
#show segment-routin policy p2 candidate-path 2 origin local
Policy-Name: p2 Color 1 End-point 3.3.3.3
Admin-Status: UP Oper-Status: UP
CP ID: 2, Active
Preference: 100 Path Type: Dynamic(isis) CP Origin: Local
CP state: Valid
Segment List:
Total no. of segments: 1
Segment0[LABEL]: Label :16033
Out-if: eth1 Out-label-stack: 16033
Attributes:
Configured:
Affinity:
Metric-type: TE
IP Constraints:
traffic-engineering
Use this command to configure segment routing traffic engineering configuration.
Use the no form of this command to remove traffic engineering configuration.
Command Syntax
traffic-engineering
no traffic-engineering
Parameters
None
Default
By default, traffic-engineering is not configured.
Command Mode
Segment-routing mode
Applicability
This command was introduced in OcNOS version 4.0.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#