Segment Routing v6 Policy Commands
This chapter describes each segment routing command.
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
Defaults
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 5.1.
Examples
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#admin-state down
 
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 5.1.
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)
 
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#no candidate-path 1
 
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 X:X::X:X 
no color <1-4294967295> end-point X:X::X:X
Parameters
<1-4294967295>
Color value
X:X::X:X
IPv6 address type
Defaults
By default, no segment routing policy key is configured.
Command Mode
Segment routing policy mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#color 1 end-point 2001::2
(config-sr-pol)
 
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#no color 1 end-point 2001::2
 
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
Defaults
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 5.1.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#segment-list s1
(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 s1
 
index segment-type-2
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-2 X:X::X:X
no index <1-65535> segment-type-2
Parameters
<1-65535>
Index number.
X:X::X:X	
IPv6 address.
Default
By default, no segment is configured.
Command Mode
Segment list mode
Applicability
This command was introduced in OcNOS version 5.1.
Examples
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#segment-list sid_list2
(config-sr-sl)#index 1 segment-type-2 cafe:1:2:a11:1001::
 
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#segment-list sid_list2
(config-sr-sl)#no index 1 segment-type-2
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 5.1.
Example 
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#policy SR_POLICY_1
(config-sr-pol)#
 
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#no policy SR_POLICY_1
 
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
Defaults
By default, preference value is 100 for a candidate path.
Command Mode
Candidate path mode
Applicability
This command was introduced in OcNOS version 5.1.
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)#
 
#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)#no preference 200
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 5.1.
Examples
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#segment-list sid_list1
(config-sr-sl)#
 
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#no segment-list sid_list1
(config-sr-sl)#
 
 
show segment-routing policy
Use this command to display segment routing v6 policy information (display basic/detailed information for all SR policies).
Command Syntax
show segment-routing policy (detail|)
Parameters
None
Defaults
detail 
Display details of segment routing policies
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
PE2# show segment-routing policy detail
Policy-Name: p1    Color 1      End-point cafe:1:2::11     Tunnel-ID: 1
  Admin-Status: UP    Oper-Status: UP for 00:03:39
  State Transition Count: 3
  CP ID: 2, Active
    Preference: 200    Path Type: Explicit    CP Origin: Local
    CP state: Valid
    Segment List:
    Total no. of segments: 1
     Segment0[LABEL]: Label :cafe:1:2:a11:1001::
    Out-if: ce62         Out-label-stack: cafe:1:2:a11:1001::
    Attributes:
      Configured:
        Explicit segment-list Name: l1
 
  CP ID: 1
    Preference: 100    Path Type: Explicit    CP Origin: Local
    CP state: Valid
    Segment List:
    Total no. of segments: 1
     Segment0[LABEL]: Label :cafe:1:2:a11:1001::
    Out-if: ce62         Out-label-stack: cafe:1:2:a11:1001::
    Attributes:
      Configured:
        Explicit segment-list Name: l
 
 
 
 
 
PE2# sho segment-routing policy
Policy-Name                                                  Color       End-point        State       Forwarding-Info
p1                                                           1           cafe:1:2::11     UP          cafe:1:2:a11:1001::/ce62
 
 
show running-config segment-routing
Use this command to show any segment routing related running configuration.
Command Syntax
show running-config segment-routing
Parameters
None
Command Mode
Privileged Exec mode
Applicability
This command was introduced before OcNOS version 5.1.
Example
#show running-config segment-routing
!
segment-routing
 srv6
  locators
   locator VPC12
    prefix 2981:40:a1::/48
   exit-locator
   !
  exit-locators
 !
 exit-srv6
 !
 traffic-engineering
  segment-list l1
   index 1 segment-type-2 2981:40:a2:0:1001::
   index 2 segment-type-2 2981:40:a2:0:3001::
  exit-sr-sl
  !
  policy p1
   color 1 end-point 2001::2
   candidate-path 1
    explicit segment-list l1
   exit-pol-cp
   !
  exit-sr-pol
  !
  policy p2
   color 2 end-point 2001::2
   candidate-path 2
    explicit segment-list l1
   exit-pol-cp
   !
  exit-sr-pol
  !
 exit-te
!
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 5.1.
Example
#configure terminal
(config)#segment-routing
(config-sr)#traffic-engineering
(config-sr-te)#
 
#configure terminal
(config)#segment-routing
(config-sr)#no traffic-engineering