OcNOS-SP : Segment Routing Guide : Segment Routing Command Reference : Segment Routing v6 Commands
Segment Routing v6 Commands
This chapter describes each segment routing command.
srv6
locators
Use this command to enter in to locators mode.
Use this no command to remove the locators configuration.
Command Syntax
locators
no locators
Parameters
None
Default
NA
Command Mode
SRv6 mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
(config-sr)#srv6
(config-srv6)#locators
(config-srv6-loc)#
 
(config-sr)#srv6
(config-srv6)#no locators
 
 
 
 
 
 
locator WORD
Use this command to configure locator name.
Use the no form of the command to remove the locator name.
Command Syntax
locators WORD
no locators WORD
Parameters
WORD
Locator name
Default
NA
Command Mode
Locators mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
(config-sr)#srv6
(config-srv6)#locators
(config-srv6-loc)#locator LOC_PE1
(config-srv6-loc-conf)#
 
(config-sr)#srv6
(config-srv6)#locators
(config-srv6-loc)#no locator LOC_PE1
 
 
prefix X:X::X:X/X
Use this command to configure locator prefix.
Use the no form of the command to unconfigure locator prefix
Command Syntax
prefix X:X::X:X/X
no prefix
Parameters
X:X::X:X/X
Locator prefix (i.e IPv6 address)
Default
NA
Command Mode
Locator configure mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
(config)#segment-routing
(config-sr)#srv6
(config-srv6)#locators
(config-srv6-loc)#locator LOC_PE1
(config-srv6-loc-conf)#prefix 2981:40:a1::/64
(config-srv6-loc-conf)#
 
(config)#segment-routing
(config-sr)#srv6
(config-srv6)#locators
(config-srv6-loc)#locator LOC_PE1
(config-srv6-loc-conf)#no prefix
segment-routing srv6 (IPv4)
Use this command to enter into segment routing SRv6 mode
Use the no form of this to remove segment routing SRv6.
Command Syntax
segment-routing srv6
Parameters
None
Command Mode
IPv4 address family for VRF mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
(config)#router bgp 100
(config-router)#address-family ipv4 vrf vrf1
(config-router-af)#segment-routing srv6
(config-router-vrfv4-srv6)#
 
(config)#
(config)#router bgp 100
(config-router)#address-family ipv4 vrf vrf1
(config-router-af)#no segment-routing srv6
 
 
segment-routing srv6 (ISIS)
Use this command to enter segment routing SRv6 mode.
Use the no form of this command to unconfigure segment routing SRv6.
Command Syntax
segment-routing srv6
no segment-routing srv6
Parameters
None
Default
NA
Command Mode
Address Family IPv6 mode under router ISIS mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
(config)#router isis 1
(config-router)#address-family ipv6
(config-router-af)#segment-routing srv6
(config-router-af-srv6)#
 
(config)#router isis 1
(config-router)#address-family ipv6
(config-router-af)#no segment-routing srv6
segment-routing srv6 (OSPFv3)
Use this command to enter into segment routing SRv6 mode
Use the no form this to command to disable SRv6 for OSPFv3
Command Syntax
segment-routing srv6
no segment-routing srv6
Parameters
NA
Default
NA
Command Mode
Router IPv6 OSPF mode
Applicability
This command was introduced in OcNOS version 5.1
Example
R1#configure t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router ipv6 ospf 1
R1(config-router)#segment-routing srv6
R1(config-router-srv6)# exit-srv6
 
R1(config)#router ipv6 ospf 1
R1(config-router)#no segment-routing srv6
R1(config-router-srv6)# exit-srv6
 
segment-routing srv6 (VPNv4)
Use this command to enter into segment routing SRv6 mode
Command Syntax
segment-routing srv6
Parameters
None
Command Mode
VPNv4 address family mode
Applicability
This command was introduced before OcNOS version 5.1.
Example
(config)#router bgp 100
(config-router)#address-family vpnv4 unicast
(config-router-af)#segment-routing srv6
(config-router-vpnv4-srv6)#
 
(config)#router bgp 100
(config-router)#address-family vpnv4 unicast
(config-router-af)#no segment-routing srv6
srv6
Use this command to enter in to SRv6 mode.
Use this no command to remove the SRv6 configuration.
Command Syntax
srv6
no srv6
Parameters
None
Default
NA
Command Mode
segment-routing mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
(config)#segment-routing
(config-sr)#srv6
(config-srv6)#
 
(config)#segment-routing
(config-sr)#no srv6
 
 
 
srv6-locator
Use this command to configure SRv6 locator word.
Use the no form this to command to remove SRv6 locator word.
Command Syntax
srv6-locator WORD
Parameters
WORD
Name of the Locator List
Command Mode
Segment routing srv6 mode
Applicability
This command was introduced before OcNOS version 5.1.
Example
(config)#router bgp 100
(config-router)#address-family vpnv4 unicast
(config-router-af)#segment-routing srv6
(config-router-vpnv4-srv6)#srv6-locator LOC_PE1
(config-router-vpnv4-srv6)#
 
 
 
 
srv6-locator WORD
Use this command to configure SRv6 locator name.
Use the no form to unconfigure the SRv6 locator name.
Command Syntax
srv6-locator WORD
no srv6-locator WORD
Parameters
WORD
Locator name
Default
NA
Command Mode
Segment routing SRv6 mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
(config)#router isis 1
(config-router)#address-family ipv6
(config-router-af)#segment-routing srv6
(config-router-af-srv6)#srv6-locator LOC_PE1
 
(config)#router isis 1
(config-router)#address-family ipv6
(config-router-af)#segment-routing srv6
(config-router-af-srv6)#no srv6-locator LOC_PE1
srv6-locator WORD (OSPFv3)
Use this command to configure SRv6 locator word.
Use the no form this to command to remove SRv6 locator word.
Command Syntax
srv6-locator WORD
no srv6-locator WORD
Parameters
WORD
Name of the Locator List
Default
None
Command Mode
Segment routing SRv6 mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
R1(config)#router ipv6 ospf 1
R1(config-router)#segment-routing srv6
R1(config-router-srv6)#srv6-locator L1
R1(config-router-srv6)# exit-srv6
 
 
R1(config)#router ipv6 ospf 1
R1(config-router)#segment-routing srv6
R1(config-router-srv6)#no srv6-locator L1
R1(config-router-srv6)# exit-srv6
 
R1#show running-config segment-routing
!
segment-routing
srv6
locators
locator L1
prefix 2981:40:a1::/64
exit-locator
!
exit-locators
!
exit-srv6
!
!
R1#show running-config router ipv6 ospf
!
router ipv6 ospf 1
router-id 1.1.1.1
segment-routing srv6
srv6-locator L1
exit-srv6
!
!
R1#
 
R1#show segment-routing srv6 sid
SRv6 Segment ID table:
SID Operation Nexthop Originator
+----------------------+------------+------------------------+----------
2981:40:a1:0:801:: END[usd] :: nsm
2981:40:a1:0:1001:: END[usp] :: nsm
2981:40:a1:0:2001:: END[psp] :: nsm
2981:40:a1:0:2002:: END.X[psp] fe80::5054:ff:fe1f:b4e7 ospf
show ipv6 ospf database <LSA name>
Use this command to display segment routing v6 related LSA information.
Command Syntax
show ipv6 ospf database (opaque|locator|ext-router)
Parameters
opaque
 
locator
 
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
R1#show ipv6 ospf database opaque
 
OSPFv3 Router with ID (1.1.1.1) (Process 1)
 
Opaque-LSA (Area 0.0.0.0)
 
LS age: 752
LS Type: Opaque RI LSA
Link State ID: 0.0.0.3
Advertising Router: 1.1.1.1
LS Seq Number: 0x8000002D
Checksum: 0xF685
Length: 48
 
Router Capability TLV:
Flags:0 Reserve bits:0
 
Algorithm TLV :
Algorithm: 0
 
Maximum SID Depth :
SRH maximum segments left (41) : 4
SRH maximum end pop (42) : 4
SRH maximum H.encaps (44) : 4
SRH maximum decapsulation sids (45) : 4
 
 
LS age: 754
LS Type: Opaque RI LSA
Link State ID: 0.0.0.0
Advertising Router: 2.2.2.2
LS Seq Number: 0x8000070D
Checksum: 0x2272
Length: 48
 
Router Capability TLV:
Flags:0 Reserve bits:0
 
Algorithm TLV :
Algorithm: 0
 
Maximum SID Depth :
SRH maximum segments left (41) : 4
SRH maximum end pop (42) : 4
SRH maximum H.encaps (44) : 4
SRH maximum decapsulation sids (45) : 4
 
R1#show ipv6 ospf database locator
 
OSPFv3 Router with ID (1.1.1.1) (Process 1)
 
Locator-LSA (Area 0.0.0.0)
 
LS age: 765
LS Type: Locator LSA
Link State ID: 0.0.0.3
Advertising Router: 1.1.1.1
LS Seq Number: 0x8000002D
Checksum: 0xD97A
Length: 120
 
Locator-TLV (Length:96):
Route type:0 Algorithm:0
Flags:0 Metric:0
Prefix: 2981:40:a1::/64
 
SRv6 END Sub TLV (Length:20):
Flags:0 Reserved:0
END SID: 2981:40:a1:0:2001::
End-point behaviour: End with PSP (2)
 
SRv6 END Sub TLV (Length:20):
Flags:0 Reserved:0
END SID: 2981:40:a1:0:1001::
End-point behaviour: End with USP (3)
 
SRv6 END Sub TLV (Length:20):
Flags:0 Reserved:0
END SID: 2981:40:a1:0:801::
End-point behaviour: End with USD (28)
 
 
 
LS age: 767
LS Type: Locator LSA
Link State ID: 0.0.0.3
Advertising Router: 2.2.2.2
LS Seq Number: 0x8000070D
Checksum: 0x1697
Length: 120
 
Locator-TLV (Length:24):
Route type:0 Algorithm:0
Flags:0 Metric:0
Prefix: 2981:40:a2::/64
 
SRv6 END Sub TLV (Length:20):
Flags:0 Reserved:0
END SID: 2981:40:a2:0:2001::
End-point behaviour: End with PSP (2)
 
SRv6 END Sub TLV (Length:20):
Flags:0 Reserved:0
END SID: 2981:40:a2:0:1001::
End-point behaviour: End with USP (3)
 
SRv6 END Sub TLV (Length:20):
Flags:0 Reserved:0
END SID: 2981:40:a2:0:801::
End-point behaviour: End with USD (28)
 
R1#show ipv6 ospf database ext-router
 
OSPFv3 Router with ID (1.1.1.1) (Process 1)
 
Ext-Router-LSA (Area 0.0.0.0)
 
LS age: 774
LS Type: External-Router-LSA
Link State ID: 0.0.0.3
Advertising Router: 1.1.1.1
LS Seq Number: 0x8000002D
Checksum: 0x41A0
Length: 76
Flags: 0x00 (-|-|-|-|-)
Options: 0x000133 (AF|*|*|DC|R|-|-|E|V6)
 
Router-Link TLV (Length:48): a Transit Network
Metric: 1
Interface ID: 3
Neighbor Interface ID: 3
Neighbor Router ID: 2.2.2.2
 
SRv6 LAN End.X SID Sub-TLV (Length: 28):
Neighbor Router ID: 2.2.2.2
SRV6 P2P END.X SID: 2981:40:a1:0:2002::
Algo: 0 flags: 0
End-behaviour: End.X with PSP (6) weight: 0
 
LS age: 776
LS Type: External-Router-LSA
Link State ID: 0.0.0.3
Advertising Router: 2.2.2.2
LS Seq Number: 0x8000070D
Checksum: 0x1CE2
Length: 76
Flags: 0x00 (-|-|-|-|-)
Options: 0x000133 (AF|*|*|DC|R|-|-|E|V6)
 
Router-Link TLV (Length:16): a Transit Network
Metric: 1
Interface ID: 3
Neighbor Interface ID: 3
Neighbor Router ID: 2.2.2.2
 
SRv6 LAN End.X SID Sub-TLV (Length: 28):
Neighbor Router ID: 1.1.1.1
SRV6 P2P END.X SID: 2981:40:a2:0:201d::
Algo: 0 flags: 0
End-behaviour: End.X with PSP (6) weight: 0
 
show segment-routing srv6 locator
Use this command to display segment routing v6 locator information.
Command Syntax
show segment-routing srv6 locator WORD (detail|)
Parameters
detail
Locator name
WORD
Display locator detail information
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
show segment-routing srv6 locator LOC_PE1
Locator : LOC_PE1
Prefix : 9999:9:a3::/48
 
 
show segment-routing srv6 locator LOC_PE1 detail
Locator : LOC_PE1
Prefix : 9999:9:a3::/48
Uptime : 01d00h31m
show segment-routing srv6 manager
Use this command to display segment routing v6 Manager information.
Command Syntax
show segment-routing srv6 manager
Parameters
None
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
VPC3#sh segment-routing srv6 manager
Protocol state : Enabled
Locators:
PE1
Platform Capabilities:
End Function:
End (PSP)
End (USP)
End (USD)
End.X (PSP)
End.DT4
Ingress Functions:
H.Encaps
Ingress SR Policy:
H.Encaps
 
 
show segment-routing srv6 services
Use this command to display segment routing v6 service information.
Syntax
show segment-routing srv6 services
Parameters
None
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
PE1#sh segment-routing srv6 services
Codes: > - installed; T:Uses service-mapped tunnel
Service Flags vrf FEC SID Nexthop Tunnel ix
vpnv4 > vrf2 2.6.7.0/24 9999:9:a7:0:8001:: 9999:9:7:1:: None
vpnv4 > vrf2 2.7.11.0/24 9999:9:a7:0:8001:: 9999:9:7:1:: None
vpnv4 > vrf3 2.7.77.0/24 9999:9:a7:0:8002:: 9999:9:7:1:: None
 
show segment-routing srv6 sid
Use this command to display segment routing v6 SID information.
Command Syntax
show segment-routing srv6 sid (id WORD|)
Parameters
WORD
Display SRv6 SID detail information (Segment ID string)
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
PE1#show segment-routing srv6 sid
SRv6 Segment ID table:
SID Operation Nexthop Originator
+----------------------+---------+------------------------+----------
2981:40:a1:0:801:: END[usd] :: nsm
2981:40:a1:0:1001:: END[usp] :: nsm
2981:40:a1:0:2001:: END[psp] :: nsm
2981:40:a1:0:6001:: END.X fe80::5054:ff:fe9c:bbad isis
2981:40:a1:0:8001:: END.DT4 vrf vrf2 bgp:100
2981:40:a1:0:8002:: END.DT4 vrf vrf3 bgp:100
 
PE1#show segment-routing srv6 sid id 2981:40:a1:0:6001::
SRv6 Segment ID table:
SID Operation Nexthop Originator
+----------------------+---------+------------------------+----------
2981:40:a1:0:6001:: END.X fe80::5054:ff:fe9c:bbad isis
show segment-routing srv6 transports
Use this command to display all SRv6 transport and their mapping to services using detail command.
Command Syntax
show segment-routing srv6 transports (X:X::X:X/M|detail|)
Parameters
detail
Display detail information's of SRv6 transports like services attached to them.
X:X::X:X/M
FEC IPv6
Command Mode
Privileged Exec mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
PE-135#show segment-routing srv6 transports 2001:12::2/128
Codes: > - installed P6, * - selected P6, p - stale P6,
U - unknown P6
 
Code FEC SRv6-Policy-Name color Pri Out-SID Out-Intf Nexthop
> 2001:12::2 p4 4 Y 2001::2 eth1 fe80::5054:ff:fe9c:bbad
 
> 2001:12::2 p1 1 Y 2001::2 eth1 fe80::5054:ff:fe9c:bbad
 
PE-135#show segment-routing srv6 transports
Codes: > - installed P6, * - selected P6, p - stale P6,
U - unknown P6
 
Code FEC SRv6-Policy-Name color Pri Out-SID Out-Intf Nexthop
> 2001:12::2 p4 4 Y 2001::2 eth1 fe80::5054:ff:fe9c:bbad
 
> 2001:12::2 p1 1 Y 2001::2 eth1 fe80::5054:ff:fe9c:bbad
 
PE-135#show segment-routing srv6 transports detail
Codes: > - installed P6, * - selected P6, p - stale P6,
U - unknown P6
 
Code FEC SRv6-Policy-Name color Pri Out-SID Out-Intf Nexthop
> 2001:12::2 p4 4 Y 2001::2 eth1 fe80::5054:ff:fe9c:bbad
Service info
VRF-ID :3 Prefix 90.1.1.0 NH :2001:12::2 Tnl_policy : p2 color:4
 
> 2001:12::2 p1 1 Y 2001::2 eth1 fe80::5054:ff:fe9c:bbad
Service info
VRF-ID :2 Prefix 80.1.1.0 NH :2001:12::2 Tnl_policy : p1 color:1
 
 
 
 
 
sid-alloc per-vrf
Use this command to configure the SID allocation per VRF.
Use the no form of the command to remove the SID allocation per VRF.
Command Syntax
sid-alloc per-vrf
Parameters
None
Command Mode
Segment routing SRv6 mode
Applicability
This command was introduced in OcNOS version 5.1.
Example
(config)#router bgp 100
(config-router)#address-family ipv4 vrf vrf1
(config-router-af)#segment-routing srv6
(config-router-vrfv4-srv6)#
(config-router-vrfv4-srv6)#sid-alloc per-vrf
(config-router-vrfv4-srv6)#
 
(config)#router bgp 100
(config-router)#address-family ipv4 vrf vrf1
(config-router-af)#segment-routing srv6
(config-router-vrfv4-srv6)#
(config-router-vrfv4-srv6)#no sid-alloc per-vrf