Segment Routing over IPv6 Overview
Segment Routing (SR) can be applied on both MPLS and IPv6 data planes. This feature extends Segment Routing support with IPv6 data plane. In an SR-MPLS enabled network, an MPLS label is used as the Segment Identifier (SID) and the source router chooses a path to the destination and encodes the path in the packet header as a stack of labels. However, in a Segment Routing over IPv6 (SRv6) network, an IPv6 address serves as the SID. The source router encodes the path to destination as an ordered list of segments (list of IPv6 addresses) in the IPv6 packet. To encode an ordered list of IPv6 addresses in an IPv6 packet, a new routing header which is an extension header is used. This new header for SRv6 is called Segment Routing Header (SRH). In an SRv6 enabled network, the active segment is indicated by the destination address of the packet, and the next segment is indicated by a pointer in the SRH.
The following list explains the fields in SRH:
-
Next header—Identifies the type of header immediately following the SRH.
-
Hdr Ext Len (header extension length)—The length of the SRH in 8-octet units, not including the first 8 octets.
-
Segments left—Specifies the number of route segments remaining. That means, the number of explicitly listed intermediate nodes still to be visited before reaching the final destination.
-
Last Entry—Contains the index (zero based) of the last element of the segment list.
-
Flags— Contains 8 bits of flags.
-
Tag—Tag a packet as part of a class or group of packets like packets sharing the same set of properties.
-
Segment list—128-bit IPv6 addresses representing the nth segment in the segment list. The segment list encoding starts from the last segment of the SR policy (path). That means the first element of the segment list (Segment list [0]) contains the last segment of the SR policy, the second element contains the penultimate segment of the SR policy and so on.
Each node along the SRv6 packet path has a different functionality:
-
Source node—A node that can generate an IPv6 packet with an SRH (an SRv6 packet), or an ingress node that can impose an SRH on an IPv6 packet.
-
Transit node—A node along the path of the SRv6 packet (IPv6 packet and SRH). The transit node does not inspect the SRH. The destination address of the IPv6 packet does not correspond to the transit node.
-
End point node—A node in the SRv6 domain where the SRv6 segment is terminated. The destination address of the IPv6 packet with an SRH corresponds to the end point node. The segment endpoint node executes the function bound to the SID
Next Header |
Hdr Ext Len |
Routing Type |
Segments Left |
Last Entry |
Flags |
Tag |
|
Segment List[0] (128-bit IPv6 address) |
|||
. . . |
|||
Segment List[n] (128-bit IPv6 address) |
|||
Optional Type Length Value objects (variable) |
In SRv6, a SID represents a 128-bit value, consisting of the following three parts:
-
Locator: This is the first part of the SID with most significant bits and represents an address of a specific SRv6 node.
-
Function: This is the portion of the SID that is local to the owner node and designates a specific SRv6 function (network instruction) that is executed locally on a particular node, specified by the locator bits.
-
Args: This field is optional and represents optional arguments to the function.
The locator part can be further divided into two parts:
-
SID Block: This field is the SRv6 network designator and is a fixed or known address space for an SRv6 domain. This is the most significant bit (MSB) portion of a locator subnet.
-
Node Id: This field is the node designator in an SRv6 network and is the least significant bit (LSB) portion of a locator subnet.
Configuring SRv6
To enable SRv6 globally, you should first configure a locator with its prefix. The IS-IS protocol announces the locator prefix in IPv6 network and SRv6 applications (like ISIS, BGP) use it to allocate SIDs.
The following usage guidelines and restrictions apply while configuring SRv6.
-
All routers in the SRv6 domain should have the same SID block (network designator) in their locator.
-
The locator length should be 64-bits long.
-
The SID block portion (MSBs) cannot exceed 40 bits. If this value is less than 40 bits, user should use a pattern of zeros as a filler.
-
The Node Id portion (LSBs) cannot exceed 24 bits.
-
-
You can configure up to 8 locators to support SRv6 Flexible Algorithm. All locators prefix must share the same SID block (first 40-bits).
This example shows how to globally enable SRv6 and configure locator.
Router(config)# segment-routing srv6
Router(config-srv6)# locators
Router(config-srv6-locators)# locator myLoc1
Router(config-srv6-locator)# prefix 2001:db8:0:a2::/64
This example shows how to configure encapsulation parameters when configuring SRv6. These optional parameters include:
-
Source Address of outer encapsulating IPv6 header: The default source address for encapsulation is one of the loopback addresses.
-
The hop limit of outer-encapsulating IPv6 header. The range is from 1 to 254 for NCS 5500 and from 1 to 255 for NCS 5700; the default value for hop-limit is 254.
Router(config)# segment-routing srv6
Router(config-srv6)# encapsulation source-address 1::1
Router(config-srv6)# hop-limit 60
This example shows how to enable the logging of locator status.
Router(config)# segment-routing srv6
Router(config-srv6)# logging locator status
Verifying SRv6 Manager
This example shows how to verify the overall SRv6 state from SRv6 Manager point of view. The output displays parameters in use, summary information, and platform specific capabilities.
Router# show segment-routing srv6 manager
Parameters:
Parameters:
SRv6 Enabled: Yes
SRv6 Operational Mode:
Base:
SID Base Block: 2001:db8::/40
Encapsulation:
Source Address:
Configured: 1::1
Default: 5::5
Hop-Limit: Default
Traffic-class: Default
Summary:
Number of Locators: 1 (1 operational)
Number of SIDs: 4 (0 stale)
Max SIDs: 64000
OOR:
Thresholds: Green 3200, Warning 1920
Status: Resource Available
History: (0 cleared, 0 warnings, 0 full)
Block 2001:db8:0:a2::/64:
Number of SIDs free: 65470
Max SIDs: 65470
Thresholds: Green 3274, Warning 1965
Status: Resource Available
History: (0 cleared, 0 warnings, 0 full)
Platform Capabilities:
SRv6: Yes
TILFA: Yes
Microloop-Avoidance: Yes
Endpoint behaviors:
End (PSP)
End.X (PSP)
End.DX6
End.DX4
End.DT6
End.DT4
End.DX2
End.OP
uN (PSP/USD)
uA (PSP/USD)
uDT6
uDT4
uDX2
uB6 (Insert.Red)
Headend behaviors:
T
H.Insert.Red
H.Encaps.Red
Security rules:
SEC-1
SEC-2
SEC-3
Counters:
CNT-1
CNT-3
Signaled parameters:
Max-SL : 3
Max-End-Pop-SRH : 3
Max-H-Insert : 3 sids
Max-H-Encap : 3 sids
Max-End-D : 4
Configurable parameters (under srv6):
Encapsulation:
Source Address: Yes
Hop-Limit : value=Yes, propagate=No
Traffic-class : value=Yes, propagate=Yes
Max SIDs: 64000
SID Holdtime: 3 mins
Verifying SRv6 Locator
This example shows how to verify the locator configuration and its operational status.
Router# show segment-routing srv6 locator myLoc1 detail
Name ID Prefix Status
-------------------- ------- ------------------------ -------
myLoc1* 5 2001:db8:0:a2::/64 Up
(*): is-default
Interface:
Name: srv6-myLoc1
IFH : 0x00000170
IPv6 address: 2001:db8:0:a2::/64
Chkpt Obj ID: 0x2fc8
Created: Apr 25 06:21:57.077 (00:03:37 ago)
Verifying SRv6 SIDs
This example shows how to verify the allocation of SRv6 local SIDs off locator(s).
Router# show segment-routing srv6 locator myLoc1 sid
SID Function Context Owner State RW
-------------------------- ----------- ------------------------------ ------------------ ----- --
2001:db8:0:a2:1:: End (PSP) 'default':1 sidmgr InUse Y
2001:db8:0:a2:40:: End.DT4 'VRF1' bgp-100 InUse Y
2001:db8:0:a2:41:: End.X (PSP) [Hu0/1/0/1, Link-Local] isis-srv6 InUse Y
The following example shows how to display detail information regarding an allocated SRv6 local SID.
Router# show segment-routing srv6 locator myLoc1 sid 2001:db8:0:a2:40:: detail
SID Function Context Owner State RW
-------------------------- ----------- ------------------------------ ------------------ ----- --
2001:db8:0:a2:40:: End.DT4 'VRF1' bgp-100 InUse Y
SID context: { table-id=0xe0000011 ('VRF1':IPv4/Unicast) }
Locator: myLoc1'
Allocation type: Dynamic
Created: Feb 1 14:04:02.901 (3d00h ago)
Similarly, you can display SID information across locators by using the show segment-routing sid command.
show Commands
You can use the following show commands to verify the SRv6 global and locator configuration:
Command |
Description |
---|---|
show segment-routing srv6 manager |
Displays the summary information from SRv6 manager, including platform capabilities. |
show segment-routing srv6 locator locator-name [detail] |
Displays the SRv6 locator information on the router. |
show segment-routing srv6 locator locator-name sid [[sid-ipv6-address [detail] |
Displays the information regarding SRv6 local SID(s) allocated from a given locator. |
show segment-routing srv6 sid [sid-ipv6-address | all | stale] [detail] |
Displays SID information across locators. By default, only “active” (i.e. non-stale) SIDs are displayed. |
show route ipv6 local-srv6 |
Displays all SRv6 local-SID prefixes in IPv6 RIB. |