Segment Routing Overview
SR is a source-routing architecture, with the implementation based on the original RFC 7855 Source Packet Routing in Networking
(SPRING) problem statement and requirements proposal. Many additional IETF and RFC documents were later introduced to cover
various features of SR. One notable feature of SR is its ability to use centralized optimization through an optional network controller.
SR implements the source routing paradigm, where ingress nodes steer packets through the network using a list of instructions,
called segments. A segment can have a local or global meaning inside an SR domain. All devices in an SR domain are capable of
interpreting and executing the segment-associated instructions. Although segments may have a broader meaning, you can look at a
global, prefix segments as instructions to reach a specific end node N in your network, using the shortest IGP path.
In the IPv4 implementation of SR, segments are encoded as MPLS labels. A label stack corresponds to a segment list in SR
terminology.
The following two figures show the data plane of the SR in action. First, the node PE2 advertises its own prefix segment identifier
(SID) 16012 through the IGP (OSPF or IS-IS), to the rest of the SR capable routers in the core. This prefix advertisement allows other
SR routers in the SR domain to add label 16012 into the forwarding structures for that destination.
When a packet comes in at PE1, it is imposed with the label 16012. That same label is then used throughout the domain on every
router. Since SRv4 uses the same legacy MPLS data plane, the label swap operation still happens. However, the label is just swapped
for the same value at P1 and P2. P4 pops the transport label and the packet arrives at PE2, where it is forwarded to the IP domain
again.
In this setup, a key feature that distinguishes SR from traditional MPLS is the core's ability to utilize Equal Cost Multipathing (ECMP).
For example, in the previous figure, if the IGP cost of the path PE1-P1-P2-P4-PE2 is equal to that of PE1-P3-P2-P4-PE2, both paths will
be used for label-switching packets. Using both paths not only increases available bandwidth, but also optimizes core usage in a
more cost-effective way.
In the IPv6 Segment Routing implementation called SRv6, segments are encoded inside the packet extension headers without
changing the standard IPv6 packet structure. MPLS is not needed for SRv6 deployments and since no labels are imposed, and the IP
packet structure is standardized, there are no compatibility issues when deploying SRv6 on top of existing IPv6 networks.
In Cisco IOS XR routers, SR uses the existing MPLS data plane for IPv4 deployments. This means you can enable SR capabilities on
existing routers through a straightforward software upgrade, followed by specific SR configuration. Migration from legacy MPLS to
SR is a common practice since LDP and SR can interoperate and coexist on the same devices within the network. This compatibility
allows for the migration to be done gradually in steps, with minimal risk of network interruptions during the migration process.
SR Benefits
SR is a network technology that is developed to address the limitations of existing IP and MPLS networks, and find the ideal balance
between distributed operation and centralized control. The centralized control of SR and optimization of SR traffic engineering (SR-
TE) is done with the help of a dedicated controller software. You can implement the controller function as a feature of Cisco IOS XR
Software. You can also implement the controller as a standalone product that supports the required Path Computation Element
Protocol (PCEP) and BGP Link State (BGP-LS) protocols, such as Cisco Crosswork Network Controller (CNC) software.
The main benefits of deploying SR are as follows:
Simplified Architecture: Eliminates LDP and RSVP (IPv4 SR) and MPLS data plane (SRv6).
Efficient Traffic Engineering: SR-TE enables intuitive, policy-based routing.
SDN-Ready: Foundation for Application Engineered Routing (AER), allowing applications to influence network behavior.
Minimal Configuration: Requires only source router setup for traffic engineering.
Optimized Load Balancing: Supports ECMP, unlike RSVP-TE.
Fast Reroute (FRR): TI-LFA provides sub-50-ms failure protection.
Seamless Deployment: Works with existing MPLS networks without major changes.
The main benefits of deploying SR are among others, the following:
Reduced complexity:
o IPv4 SR: Removes the need for LDP and RSVP protocols
o IPv6 SR: Additionally, removes the need for the MPLS data plane
o SR-TE: More intuitive intent-based traffic engineering using policies and colors
Ready for Software-Defined Networking (SDN): SR was built for SDN and is the foundation for Application Engineered
Routing (AER). SR prepares networks for business models, where applications can direct network behavior.
Minimal configuration: Segment routing for TE requires minimal configuration on the source router.
Load balancing: Unlike in Resource Reservation Protocol-Traffic Engineering (RSVP-TE), load balancing for SR can utilize
ECMPs.
Supports Fast Reroute (FRR): Topology Independent Loop-Free Alternate (TI-LFA) FRR feature can provide sub-50-ms
protection of path and node failures.
Plug-and-Play deployment: Segment routing tunnels are interoperable with existing MPLS control and data planes and can
be implemented in an existing deployment.
SR-TE is simple, scalable, and easy to automate. It uses policies to apply labels on the ingress packets according to the routing
requirements. SR-TE policies are uniquely identifiable through a combination of headend, color, and endpoint parameters. Unlike
traditional methods, the state of the SR-TE path is not kept in the network core; only the originating router, which encodes the
packets, is aware of the policy. If your network is set up with one, a controller can also be aware. A notable difference between
RSVP-TE and SR-TE, is that in SR-TE, there are no tunnel interfaces.
SR Architecture
SR architecture contains the following components:
Data plane: existing MPLS data plane based on segment information that is exchanged by IS-IS or OSPF
Control plane:
1. OSPF or IS-IS in the core
2. MP-BGP for services (for example, L2/L3 VPNs) and SR multidomain scenarios
3. PCEP and BGP-LS between the controller and the network
Controller: for example, a Cisco IOS XR-based router or Cisco CNC Linux server-based software
1. Application awareness and resource control
2. SR-TE path calculation, initiation, and optimization
3. Can be stateless or stateful. Stateless PCE maintains only the topology database, acquired by IGP or BGP-LS, while
stateful PCE also maintains the SR-TE Label Switched Path (LSP) state using the path database. With stateful PCE,
the routers in the network can initiate an LSP and delegate the control to the controller or the controller can
initiate the LSPs on the routers by itself.
In segment routing, segments can be global or local, and an SID identifies them. Global segment identifiers are selected from a label
range that is known as the segment routing global block (SRGB). SRGB is a reserved range of labels from 16000 to 23999 on every SR
capable Cisco device regardless of whether SR is configured or not. SRBG makes the migration to SR easy, because the SR labels are
not in use by other MPLS applications when you enable SR on a router.
SIDs are simple extensions for letting IGP protocols install segments in the MPLS data plane. The IGP automatically builds and
maintains the segment information required to create MPLS labels, since SR has no use for LDP.
The two basic segment types distributed by IS-IS and OSPF are:
Prefix segments (Prefix SIDs):
o Represent the shortest path to the IGP prefix and are ECMP aware
o Typically, one Prefix SID per router, but can be more in specific scenarios
o Globally unique in a domain and configured as a fixed index value by the administrator
o Advertised as an index value. Directly maps to a label from the SRGB block
Adjacency segments (Adjacency SIDs):
o Represent an adjacency between two nodes in the IGP
o Every router link is assigned at least one Adjacency SID
o Locally unique and dynamically assigned by the router for each link from the MPLS label space
o Advertised as the actual label value
Prefix SIDs use domain-wide unique indexes and the SRGB to generate labels. Each prefix SID index corresponds to a specific label
within the SRGB. For example, If an IGP advertises a prefix SID index of 65 for a node, it translates to the label 16065 in the (default)
SRGB on the routers. With a consistent SRGB range across all routers, only one Prefix SID-based label with the value 16065 will exist
in the entire SR domain. On the other hand, Adjacency SIDs use the advertised segment information directly as labels, for example,
9101, 9105, and so on. Multiple Adjacency SIDs with the same label value can coexist within the network as they are locally
significant on each device.
SR Traffic Engineering
Apart from the IGP advertised SIDs, SR features other types of SIDs when deploying complex multidomain SR networks that can also
use SR-TE. A very important component in a multidomain SR implementation is the SR controller, commonly referred to as the SR-
PCE:
Role of the controller: A controller collects all SID data from single-domain or multidomain networks to ensure correct
setup and management of SR-TE. Consistent MPLS labels for destination nodes across routers enhance network visibility
and simplify both troubleshooting and SR-TE policy creation. Path computation and deployment, as well as existing path
optimization based on the changing network conditions are also important roles of an SR-PCE.
Additional segment types:
o BGP Prefix SID: Used for SR multi-domain applications. BGP has been extended to support segment routing via the
BGP Labeled Unicast (BGP-LU) address family.
o BGP Peering SID: Used in SR Egress Peer Engineering (EPE) scenarios.
o Binding Segment ID (BSID): The BSID is a local, dynamically allocated label that identifies an SR-TE policy. It is
useful in scenarios where the label stack for an SR-TE policy exceeds platform capabilities, allowing for seamless
policy stitching or nesting within other SR-TE policies.
A typical SR-PCE controller contains two databases that are used in the SR-TE operation:
TE database: This database stores information about the network topology and available resources (for exampl., links,
nodes, and their attributes). The network topology information is typically derived directly from the IGP database (OSPF or
IS-IS) or indirectly via BGP Link State (BGP-LS) protocol.
LSP database: A database that is populated using the PCEP protocol messages. In scenarios where BGP SIDs are required,
BGP-LU is used for signaling between the controller and the network. LSP database stores information about the active LSPs
in the network such as:
o A list of paths that are computed and deployed by the SR-PCE, as well as paths deployed directly by the devices
o Associated bandwidth reservations and usage
o Current state of LSPs
SR also supports classical MPLS services, the Layer 2 and Layer 3 VPNs among others, where the PE devices exchange VPNv4 or
VPNv6 routes using MP-BGP sessions, much like in the legacy MPLS application.
Answer
The correct answer is As MPLS labels. This answer is correct because in IPv4 implementations of Segment Routing, segments are
encoded as MPLS labels.
The As IPv6 extension headers option is incorrect because IPv6 segment routing uses extension headers, not MPLS labels.
The As part of the BGP-LU address family option is incorrect because BGP-LU is related to carrying segment routing information, but
it is not the encoding mechanism for segments.
The As dynamically assigned IP addresses option is incorrect because segments are not encoded as IP addresses.