Segment Routing
What Is Segment Routing?
Segment routing (SR) protocol is designed based on source routing
principles to forward data packets over a network.
Segment routing divides each network path into several segments and
assigns segment IDs (SIDs) to these segments and network nodes.
SIDs are arranged in an order (in a segment list) to form a forwarding
path.
Background
The network architecture evolves from "network adapting to services"
to "service-driven network".
Network adapting to services: The network structure and
configurations keep being passively adjusted. The network cannot
catch up with rapid service growths, and network deployment
becomes more complex and more difficult to maintain.
Service-driven network: As shown in the following figure,
applications pose requirements, and explicit paths are computed
based on the service requirements. The network is dynamically
adjusted in real time, meeting changing service requirements quickly.
EMS/NMS
Low
latency A
Controller
P
I
Low-latency path High-bandwidth path
Low-packet-loss-rate
path
Principles
Related Concepts
SR domain: is a set of SR nodes.
Segment ID (SID): is used to uniquely identify a segment. On the
forwarding plane, an SID is mapped to an MPLS label.
Segment routing global block (SRGB): is a set of local labels reserved
for segment routing.
Segment Categories
Type Generation Method Function
Prefix Manually configured. Identifies the prefix of a destination
segment address on a network.
Is advertised by an IGP, is globally visible,
and takes effect globally.
A node segment is a special prefix
segment and used to identify a specific node.
Adjacency Dynamically Identifies an adjacency on a network.
segment allocated using a Is advertised by an IGP, is globally visible,
protocol or manually and takes effect locally.
configured.
Prefix segment + Node segment Adjacency segment
101 102 103
1001 1002
16001 1003
[Link]/24
Segment Combination-Based Forwarding Paths
Prefix segment based: The IGP uses the SPF algorithm to
1 calculate the shortest path. Therefore, it is also called SR-best
effort (SR-BE).
As shown in the following figure, node Z connects to a
destination network, and the network prefix SID is 68. After IGP
flooding, all devices in an entire IGP area learn the prefix SID
from node Z, and then run the SPF algorithm to compute the
shortest paths to the network.
68 68 68
Pkt Pkt Pkt
68 B D F
cost:1 cost:1
Pkt
cost:1 cost:1 Pkt
Z
A Primary path
cost:8 cost:8 cost:8 Prefix
Backup path SID=68
cost:2 cost:2
cost:2 cost:2
C E G
Adjacency segment based: A strict explicit path (strict explicit)
2 is specified on the ingress. This mode allows for centralized
path adjustment and traffic optimization, which performs
better in implementing Software-Defined Networking (SDN).
Adjacency segment is primarily used for SR-TE.
204
405 405
102
507 507
204
709 709
405
Pkt Pkt
507
B D F
709 204
Pkt 102
A Z
Pkt
405
709
C E 507 G
507 709
709 Pkt
Pkt
Adjacency segment+node segment based: The explicit path
3 and the shortest path are used together, which is called loose
explicit path (loose explicit). This mode is primarily used for
SR-TE.
101
405 405
100 100
101
Pkt Pkt
405 Node
100
B D F
SID=101
Pkt
A Z
Adjacency
Pkt
SID=405
LoopBack
x.x.x.x
Node SID=100
C E G
100 100
Pkt Pkt
SR-BE Implementation
SR-BE-based forwarding paths are LSPs that do not have tunnel
interfaces. They are called SR LSPs. The creation and data forwarding
of SR LSPs are similar to those of LDP LSPs.
Key Steps to Establish an SR LSP
1. Manual configuration: The Prefix SID and SRGB are configured
on an NE, and IGP packets carrying these parameters are sent to
flood them to devices.
2. Label allocation: Each NE parses the IGP packets, computes a
label value based on its own SRGB using the following formula:
Label value = Local SRGB start value + Prefix SID
It also computes an outgoing label value based on the SRGB
advertised by a next-hop node using the following formula:
Outgoing label value = Next-hop SRGB start value + Prefix SID
3. Path calculation: Each NE runs an IGP to collect topology
information and uses the same SPF algorithm to compute a labeled
forwarding path and generate forwarding entries.
SRGB: SRGB: SRGB: SRGB:
16000-65535 16000-65535 16000-65535 16000-65535
A B C D LoopBack
x.x.x.x
Prefix ID=100
Push Swap Swap Pop
16100 16100 16100
Pkt Pkt Pkt Pkt Pkt
SR LSP data forwarding is the same as data forwarding on MPLS LDP
LSPs. The process involves label operations, such as push, swap, and
pop. Penultimate Hop Popping (PHP) and MPLS QoS features are also
supported.
SR-TE Implementation
SR-TE is a new tunneling technique that uses SR as a control protocol.
A tunnel established using SR-TE technology is called an SR-TE tunnel.
SR-TE tunnels support the same attributes of MPLS TE tunnel
attributes. SR-TE tunnels can be monitored using BFD.
3
Controller
Tunnel
2
102 4 4
204
P1
405 204 P3
506
405
5 1 IGP
PE1 PE2
P2 P4
SR-TE tunnels are automatically established by a controller or manually
established. The process of automatically creating an SR-TE tunnel is as
follows:
1 Manual configuration: IGP SR is configured on a forwarder to
generate link topology and label information.
2 Topology and label information report: BGP-LS reports it to the
controller.
3 Link generation: PCEP calculates label switch paths (LSPs).
4 Tunnel attribute delivery: Tunnel attribute configurations and LSP
information are delivered by NETCONF and PCEP, respectively, to a
forwarder PE.
5 Tunnel creation: The PE uses tunnel attributes and LSP information to
automatically create an SR-TE tunnel.
Advantages
Simplify MPLS Control Plane
Segment routing does not require LDP or RSVP-TE signaling protocol. It
runs an IGP to distribute labels and compute paths. On the forwarding
plane, the existing MPLS forwarding structure remains. The following
table lists the differences between segment routing and MPLS.
Feature Segment Routing MPLS
Control IGP LDP/RSVP-TE/BGP/IGP
protocol
Label Each adjacency or node is The number of labels
assignment assigned a label. Label increases with the number of
information is irrelevant to the tunnels. A large number of
number of tunnels. A few resources are consumed.
resources are consumed.
Path The ingress re-computes a Configurations must be
adjustment path to adjust a tunnel. delivered to each node for
and control tunnel adjustment.
100% TI-LFA FRR Protection
Conventional Loop Free Alternate (LFA) and Remote LFA (RLFA)
require topology constraints and cannot provide 100% protection. In the
following example, RLFA is used to be compared with TI-LFA.
RLFA
If B-E link fails, node B sends data packets to node C. Since the cost
of C-D-link is 1000, node C considers that the best path to node F is
to pass through node B. Therefore, node C forwards data packets to
node B, resulting in a loop and a forwarding failure.
A B C
1 2
P node
Cost:10
Cost:10 3 Cost:1000
Q node
Cost:10
F E D
TI-LFA
If B-E link fails, node B starts the TI-LFA FRR backup entry and adds
new path information (node label of node C and adjacency label for C-
D link) to data packets to forward them along the backup path.
C Newly added
Packet to F C->D path information
F F
Pkt Pkt
A B C
1 2
P node
Cost:10
F
Cost:10 3 Cost:1000 Pkt
4
Cost:10
Q node
Pkt Pkt
F E D
The Topology Independent LFA (TI-LFA) technique establishes
backup paths over explicit paths, without topology constraints.
Note It implements 100% FRR protection in theory.
Better Smooth Evolution to SDN Network
Controller
Scheduling Extends existing protocols to
Optimization help networks in more smooth
Control evolution, but does not overturn
them.
Uses the source routing
technique. Controls and adjusts
SR service paths on the ingress,
and the network rapidly
Domain
responds to upper-layer
Control Control Control applications' requirements.
Forwarding Forwarding Forwarding Strike a balance between
centralized control and
distributed control to prevent
the controller from being a
service bottleneck.
Simplify TE, Improve Capacity Expansion Capability
Conventional MPLS TE is a connection-oriented technique. To maintain
connection status, nodes have to exchange and process a huge number
of refresh packets, posing heavy load on the control plane. Segment
routing merely operates labels on the ingress to flexibly control service
paths. Transit nodes do not have to maintain path information, and the
control plane is lightly loaded.
The comparison between the number of connection states maintained
by the two techniques is as follows:
MPLS TE: The number of maintained connection states is directly
proportional to the number of TE tunnels. For a full-mesh TE network,
the number of statuses = Number of nodes x (Number of nodes – 1) x 2,
that is, twice of the total number of tunnels
Segment routing: The ingress maintains the tunnel status. Number of
maintained connection states = Number of nodes + Number of
connections
Comparison of the number of states to be maintained
between SR and TE full-mesh
2500
2000
1500
1000
500
0
1 5 10 30 50
Segment Routing TE Full-mesh
Applications
Segment routing, which is to replace MPLS, has the similar usage
scenarios as MPLS. Various services, such as public network services,
EVPN, L2VPN, and L3VPN, transmitted over MPLS tunnels can be
smoothly switched to SR tunnels.
Home L3VPN/HVPN…
services Internet
VPLS/HVPLS/VLL/EVPN…
…
Public network services
IDC PE (BGP/static route) PE IDC
Segment routing
Enterprise Enterprise
Presented by Huawei Network Information
Department
Copyright © Huawei Technologies Co., Ltd. All rights reserved.