Segment routing is a method of forwarding packets on the network that are based on the source routing paradigm. The source
selects a path and encodes it in the packet header as an ordered list of segments. Segments are an identifier for any type
of instruction. For example, topology segments identify the next hop toward a destination. The segment ID (SID) consisting
of an unsigned 32-bit integer identifies each segment.
With segment routing for traffic engineering (SR-TE), the network no longer must maintain a per-application and per-flow state.
Instead, it simply obeys the forwarding instructions that are provided in the packet.
Segments
Interior gateway protocol (IGP) distributes two types of segments: prefix segments and adjacency segments. Each router (node)
and each link (adjacency) has an associated segment identifier (SID).
-
A prefix SID is associated with an IP prefix. The prefix SID is manually configured from the segment routing global block
(SRGB) range of labels, and is distributed by IS-IS or OSPF. The prefix segment steers the traffic along the shortest path
to its destination. A node SID is a special type of prefix SID that identifies a specific node. It is configured under the
loopback interface with the loopback address of the node as the prefix.
A prefix segment is a global segment, so a prefix SID is globally unique within the segment routing domain.
-
An adjacency segment is identified by a label that is called an adjacency SID, which represents a specific adjacency, such
as egress interface, to a neighboring router. The adjacency SID is distributed by IS-IS or OSPF. The adjacency segment steers
the traffic to a specific adjacency.
An adjacency segment is a local segment, so the adjacency SID is locally unique relative to a specific router.
The following diagram shows a basic network with the Node SID and the Adjacency SID for each of the devices and connections
between the devices noted.
![](/c/dam/en/us/td/i/400001-500000/460001-470000/461001-462000/461026.jpg)
Segment Routing Policies
An SR policy path is expressed as a list of segments that specifies the path (SID list). By combining prefix (node) and adjacency
segment IDs in an ordered list, any path within a network can be constructed. At each hop, the top segment is used to identify
the next hop. Segments are stacked in order at the top of the packet header. When the top segment contains the identity of
another node, the receiving node uses equal cost multipaths (ECMP) to move the packet to the next hop. When the identity is
that of the receiving node, the node pops the top segment and performs the task that is required by the next segment.
There are two types of SR policies: dynamic and explicit.
Dynamic SR PolicyA dynamic path is based on an optimization objective and a set of constraints. The headend computes a solution, resulting
in a SID list or a set of SID lists. When the topology changes, a new path is computed. If the headend does not have enough
information about the topology, the headend might delegate the computation to a path computation engine (PCE). If a path isn't
found, then the policy becomes operationally down (operation status down) and packets will not be routed based on the policy.
Explicit SR PolicyWhen you configure an explicit policy, you specify an explicit path which consists of a list of prefix or adjacency SIDs,
each representing a node or link along on the path. Each segment is an end-to-end path from the source to the destination,
and instructs the routers in the network to follow the specified path instead of the shortest path calculated by the IGP.
If a packet is steered into an SR policy, the SID list is pushed on the packet by the headend. The rest of the network executes
the instructions embedded in the SID list.
![](https://www.cisco.com/content/dam/en/us/td/i/templates/note.gif)
Note
|
For PCC-initiated policies, if the explicit path is configured in the form of IP addresses, the policy goes operational status
down if one of the hops goes down. If it is configured as a list of labels, then the policy goes operational status down only
if it is the first hop that goes down. The remaining hops are not resolved by the PCC and so it will not take the policy operational
status down if they fail.
|
Segment Routing over MPLS (SR-MPLS)
Segment Routing can be applied on an MPLS data plane. In an SR-MPLS enabled network, an MPLS label represents an instruction.
The source nodes programs the path to a destination in the packet header as a stack of labels. For more information, see IETF RFC 8660 Segment Routing with the MPLS Data Plane.
Segment Routing over IPv6 (SRv6)
Segment Routing over IPv6 (SRv6) extends Segment Routing support with an IPv6 data plane. SRv6 introduces the Network Programming
framework that enables a network operator or an application to specify a packet processing program by encoding a sequence
of instructions in the IPv6 packet header. Each instruction is implemented on one or several nodes in the network and identified
by an SRv6 Segment Identifier (SID) in the packet. For more information, see IETF RFC 8986 SRv6 Network Programming.
In SRv6, an IPv6 address represents an instruction. SRv6 uses a new type of IPv6 Routing Extension Header, called the Segment
Routing Header (SRH), in order to encode an ordered list of instructions. The active segment is indicated by the destination
address of the packet, and the next segment is indicated by a pointer in the SRH.
For more information, see https://www.segment-routing.net/.
SRv6 Limitations
-
Cisco IOS XR 7.3.2 only supports SRv6 visualization with IS-IS IGP.
-
Traffic collection on SRv6 policies is not currently supported.
-
OSPFv3 IGP (PCE-initiated) SRv6 policies are not supported.
-
SRv6 is not supported on Bandwidth Optimization, Bandwidth on Demand, or Local Congestion Mitigation feature packs.
-
IPv4 and IPv6 topologies must be congruent. Different link metrics for IPv4 and IPv6 are not supported.
-
Visualization of PCC-initiated dynamic path SRv6 policies only. PCE-initiated and explicit path are not supported.
Segment Routing for Traffic Engineering
SR-TE takes place through a policy between a source and destination pair. SR-TE uses the concept of source routing, where
the source calculates the path and encodes it in the packet header as a segment.
SR-TE utilizes network bandwidth more effectively than traditional MPLS-TE networks by using ECMP at every segment level.
It uses a single intelligent source and relieves remaining routers from the task of calculating the required path through
the network.
Disjointness
Crosswork can use a disjoint policy to compute two unique paths that steer traffic from the same source and destination avoiding
common specified resources (links or nodes). This results in no single point of failure in steering traffic through the network.
The following disjoint path computations are supported:
-
Link – Specifies that links are not shared on the computed paths.
-
Node – Specifies that nodes are not shared on the computed paths.
-
SRLG – Specifies that links with the same Share Risk Link Group (SRLG) value are not shared on the computed paths.
-
SRLG-node – Specifies that SRLG and nodes are not shared on the computed paths.
![](https://www.cisco.com/content/dam/en/us/td/i/templates/note.gif)
Note
|
|
Tree-SID Policies
Tree Segment Identifier (Tree-SID) is modern controller driven multicast technology based on Segment Routing. It is a tree-building
solution that uses a Segment Routing Path Computation Element (SR-PCE) using path computation element protocol (PCEP) to calculate
point-to-multipoint (P2MP) trees using SR policies. Tree-SID uses a single MPLS label to build a multicast replication tree
in an SR network. The advantage of having a controller is that any sort of constraints can be applied to calculate the tree.
See View a Point-to-Multipoint Tree on the Topology Map
Flexible Algorithms
Flexible Algorithm allows operators to customize and compute the IGP shortest path according to their own needs and constraints
(specific metrics and link properties). Many possible constraints can be used to compute a path over a network. For example,
Flexible Algorithm can confine the path to a particular plane for networks with multiple logical planes. Since the meaning
of the algorithm is not defined by any standard, but is defined by the user, it is called a Flexible Algorithm.
See Visualize Flexible Algorithm