01-01 Segment Routing
01-01 Segment Routing
01-01 Segment Routing
1 Segment Routing
Definition
Segment Routing (SR) is a protocol designed to forward data packets on a network based on
source routes.
Segment Routing divides a network path into several segments and assigns a segment ID
(SID) to each segment and forwarding node. The segments and nodes are sequentially
arranged into a segment list to form a forwarding path.
Segment Routing is divided into two types based on the forwarding plane. Segment Routing
MPLS (SR MPLS for short) is based on the MPLS forwarding plane, whereas Segment
Routing IPv6 (SRv6 for short) is based on the IPv6 forwarding plane.
This document focuses on Segment Routing MPLS (hereinafter referred to as Segment
Routing).
SID: unique identifier of a segment. A SID is mapped to an MPLS label on the forwarding
plane.
Segment Routing global block (SRGB): a set of local labels reserved for Segment Routing.
Node Manually Identifies a specific node. Node segments are special prefix
segment configured segments. When an IP address is configured as a prefix for a
loopback interface of a node, the prefix SID is the node SID.
In plain terms, a prefix segment indicates a destination address, and an adjacency segment
indicates a link for outgoing data packets. The prefix and adjacency segments are similar to
the destination IP address and outbound interface in conventional IP forwarding, respectively.
In an IGP area, an NE propagates its node SID and adjacency SID through extended IGP
messages, so that any NE in the area can obtain information about the other NEs.
Combining prefix (node) and adjacency SIDs in sequence can construct any network path.
Every hop on a path identifies a next hop, which is based on the segment information on the
top of the label stack. The segment information is stacked in sequence at the top of the data
header. If the top SID identifies another node, the receive end forwards the received data
packet to that node through equal-cost multi-path routing (ECMP). If the top SID identifies
the local node, the receive end removes the top SID and proceeds with the following
procedure.
Prefix, adjacency, and node segments can be used independently or in combinations. They are
mainly used in the following three modes:
1. Prefix segment-based mode: An IGP uses the shortest path first (SPF) algorithm to
compute the shortest path. This mode is also called Segment Routing-Best Effort (SR-BE).
As shown in Figure 1-3, node Z is connected to the destination network with a prefix SID of
68. After an IGP propagates the prefix SID, each node in the IGP area learns the prefix SID of
the network from node Z and then runs SPF to compute the shortest path to the network.
3. Mode in which adjacency and node segments are combined: As shown in Figure 1-5,
adjacency and node segments are combined, and the adjacency segment allows a path to
forcibly include a specified adjacency. Nodes can run SPF to compute the shortest path based
on node segments or establish multiple paths to load-balance traffic. The paths computed in
this mode are not strictly fixed. Therefore, they are also called loose explicit paths. This mode
is mainly used for SR-TE.
each NE computes an outgoing label value by summing up the start value in the next-hop
SRGB range and the prefix SID.
3. Path computation: Based on IGP-collected topology information, the NEs use the same
SPF algorithm to compute a label forwarding path and then generate a forwarding entry.
Similar to traffic forwarding over MPLS LDP LSPs, traffic forwarding over SR LSPs
also involves push, swap, and pop operations on label stacks and supports penultimate
hop popping (PHP), MPLS QoS, and other features.
5. Tunnel creation: An SR-TE tunnel is automatically created between PEs based on tunnel
attributes and LSP information.
An SR-TE tunnel generated by a controller has the following advantages:
l The controller supports bandwidth computation and resource reservation, and can
therefore compute a globally optimal path.
l The controller can cooperate with network applications. Upon receipt of an application-
generated requirement, the controller can quickly respond to the requirement and
compute a network forwarding path that meets the requirement, helping achieve a
service-driven network.
l The controller does not require a lot of manual tunnel configurations, making this
method more suitable for large-scale networks.
If TI-LFA is used and the link between B and E is faulty, B directly uses TI-LFA FRR backup
entries to add new path information (node SID of C and adjacency SID for C-to-D) to the data
packets to ensure that the packets can be forwarded along the backup path.
TI-LFA establishes a backup path over an explicit path without topology constraints,
theoretically achieving 100% FRR protection.
Path adjustment and control The ingress performs re- Configurations need to be
computation to complete delivered node by node for
path adjustment and control. path adjustment and control.
Routes and services that can recurse to SR tunnels include static routes, BGP public network
routes, and L3VPN, VPLS, VPWS, and EVPN services.
References
For details about Segment Routing and how to configure Segment Routing, see New IP
Technologies.