How do you tell a network exactly which path a packet should take, rather than just its final destination? This is the core problem of traffic engineering, and older methods were like giving a taxi a final address but letting it make every turn decision itself. Segment Routing (SR) solves this by packing the entire route, or a set of instructions, directly into the packet header, like handing the taxi a turn-by-turn map from the start, which matters for the 350-501 exam because it is the modern way Service Providers control traffic flow with incredible precision and simplicity.
Jump to a section
A simple way to picture Segment Routing Fundamentals
A standard postal package has a label with a destination address, but no instructions for how it gets there. The postal sorting offices decide the route, inspecting the label at each stop. This is like traditional routing, where every router makes its own decision about the next hop.
Segment routing changes this. Imagine instead, the sender writes a complete itinerary on the package: 'Go to City A, then use Express Lane to City B, then go to City C.' The package is a 'segment list'. Each instruction is a 'segment'. The sorting office at City A reads only the top instruction, executes it (forward via the express lane), and then 'pops' the top instruction off, revealing the next one. The package carries its own path. This is the core of segment routing.
The advantage is significant. The intermediate offices no longer need to consult complex lookup tables. They just execute the top instruction. This is faster and simpler, just like segment routing reduces state in the network by encoding the path in the packet header. The sender, or 'head-end' router, calculates the best path and encodes it. The package, or data packet, follows a precise, pre-determined route without needing each intermediate router to make an independent decision about the final destination.
Segment Routing (SR) is a method of forwarding packets that gives the source router (the one where the packet enters the network) the power to dictate the exact path the packet takes through the network. To understand it, you first need to know a little about how normal IP routing works. In traditional IP routing, each router along the path looks at the packet's destination IP address, checks its own routing table (a big map), and independently decides the next router to send the packet to. This is like a relay race where each runner decides the next hand-off point based on their own map. It works, but it is hard to force a packet to take a specific route unless you manipulate the network in complex ways.
Segment Routing changes this by encoding a list of instructions into the packet header. These instructions are called 'segments'. A segment can represent a specific router (a 'node segment'), a specific link between two routers (an 'adjacency segment'), or a service like a firewall. The list of instructions is called a 'segment list' or a 'label stack' because it is similar to the stack of labels used in MPLS (Multi-Protocol Label Switching), an older technology that Segment Routing builds upon.
Here is how it works step-by-step at a high level:
The source router (called the 'head-end' router) determines the path it wants the packet to travel. It might choose a path that avoids a congested link, ensures low latency, or follows a specific chain of services.
The head-end router then creates a segment list. For example, if the packet needs to go to Router A, then use the specific link from Router A to Router B (the 'adjacency segment'), and finally arrive at destination Router C, the segment list might be: [Node segment for A, Adjacency segment for A-to-B, Node segment for C].
The head-end router pushes this list onto the packet header. The topmost instruction is always the one that must be executed next. The packet is then sent to the first hop.
Each router along the path looks only at the top instruction. If it is a node segment for that router, the router does nothing to the segment list and forwards the packet towards the destination of that segment (usually the router's own loopback interface). If it is an adjacency segment, the router forwards the packet out of the specific link associated with that segment and then 'pops' (removes) that top instruction from the stack, revealing the next instruction for the downstream router.
This process repeats until the packet reaches its destination, at which point the segment list is empty.
The beauty of Segment Routing lies in its simplicity. Traditional networks require complex protocols like RSVP-TE (Resource Reservation Protocol - Traffic Engineering) to set up a path, which requires each router along the path to maintain state information for every path through it. Segment Routing is 'source-routed', meaning only the head-end router knows about the full path. The middle routers just execute the top instruction. This dramatically reduces the amount of state information that must be maintained in the core of the network, making it more scalable and simpler to operate.
Segment Routing integrates natively with the IGP (Interior Gateway Protocol), such as OSPF (Open Shortest Path First) or IS-IS (Intermediate System to Intermediate System). These are the protocols routers use to share routing information with each other within a single network domain. The IGP automatically distributes the segment identifiers (SIDs) for each router and each link. This means that once you enable Segment Routing on your routers, the IGP tells every other router the SID for that router (its Node-SID) and the SIDs for its directly connected links (Adjacency-SIDs). No additional protocol is needed to distribute labels, which was a major complexity in the earlier MPLS era. This automatic distribution of SIDs via the IGP is known as 'IGP-Prefix' and 'IGP-Adjacency' segments. The exam will test your understanding of how the IGP, primarily IS-IS and OSPF, is extended to carry this information.
IGP Convergence and SID Assignment
First, every router in the network runs an IGP like OSPF or IS-IS. This protocol discovers the network topology. When Segment Routing is enabled, the IGP is extended to assign a unique numeric identifier (a SID) to each router's loopback address (a Node-SID) and to each link (an Adjacency-SID). This information is flooded to all routers. This step is crucial because it builds the global database of SIDs that the head-end router will later use to create segment lists.
Path Calculation by the Head-End Router
When a packet arrives at the ingress (head-end) router, that router must decide the path. It uses the SID database (like a big map of shortcut numbers) and a policy (a set of rules) to decide the best route. For instance, the policy might say 'use the path with the lowest latency'. The head-end router calculates a segment list: a sequence of SIDs that will force the packet along that exact path. This step is where traffic engineering decisions are implemented.
Encapsulation and PUSH Operation
The head-end router takes the calculated segment list and 'pushes' it onto the packet. This means it adds an additional header to the packet containing the list of SIDs. The top SID in the stack is the immediate instruction for the next router. For a packet that needs to go directly over a specific link, the top SID would be the Adjacency-SID for that link. This encapsulation is what makes the packet 'segment-routed'.
Forwarding with CONTINUE and POP Operations
The packet travels to the next router. That router inspects the top SID. If the top SID is a Node-SID that points to this router itself (i.e., the packet has reached the target of that segment), the router 'pops' (removes) that SID from the top of the stack, revealing the next SID. It then forwards the packet based on the new top SID. If the top SID is an Adjacency-SID for a link connected to this router, the router forwards the packet out of that specific link and then pops the SID. This hop-by-hop 'pop and forward' continues until the stack is empty.
Delivery and End of Path
When the last SID is popped, the packet is left with its original IP header. The final router in the path (the egress router) receives this packet and performs a standard IP lookup on the destination address within its original IP header. It then forwards the packet out of the correct interface towards the final destination, completing the segment-routed journey. This step shows how the special segment header is removed, and the packet completes its path using standard IP routing.
An IT professional working for a large Internet Service Provider (ISP) uses Segment Routing to solve a very common problem: traffic congestion on an expensive inter-city link. Imagine the ISP's network connects London, Manchester, and Edinburgh. The shortest path from London to Edinburgh goes through Manchester. During peak hours, the London-to-Manchester link is heavily loaded, causing delays.
With traditional routing, the ISP has limited options. They could change the link cost in the IGP, which would re-route all traffic, potentially causing worse problems elsewhere. Or they could configure complex MPLS Traffic Engineering (TE) tunnels, which require a heavy protocol called RSVP-TE to create and maintain paths on every router. This is tedious and error-prone.
With Segment Routing, the engineer can solve this elegantly. They would:
Identify the path: The engineer decides they want traffic from London to Edinburgh to go via an alternative, underutilised path, perhaps London -> Manchester -> (some other intermediate router) -> Edinburgh, or directly London -> Edinburgh if a direct link exists. For this example, let's assume a direct London-to-Edinburgh link is available but not preferred by the IGP because its metric (cost) is set higher.
Create a 'SR Policy': On the head-end router in London, the engineer configures a Segment Routing Policy. This policy defines a segment list. For the alternative path, the engineer would use an adjacency segment for the direct London-to-Edinburgh link. The segment list would be: [Adjacency-SID for London->Edinburgh link]. This forces the packet directly onto that link, bypassing Manchester.
Apply the policy to traffic: The engineer then matches specific traffic flows to this SR Policy. For example, they might decide that all traffic to a specific video streaming server in Edinburgh should use this direct path. This is done using a colour or a steering mechanism.
Monitor and refine: The engineer uses network monitoring tools to observe the effect. They can adjust policies in real time without touching the many intermediate routers. They might also create multiple SR Policies for different classes of service.
Beyond congestion management, the IT professional uses Segment Routing for: - 'Fast Reroute' (FRR): using a technique called 'Topology Independent Loop-Free Alternate' (TI-LFA). When a link fails, Segment Routing can pre-calculate a backup path that is encoded in the packet header itself. The router detecting the failure instantly sends the packet along this backup path, resulting in sub-50ms recovery. This is critical for services like VoIP or video conferencing. - 'Service Chaining': ordering traffic to go through a series of security boxes (a firewall, an intrusion prevention system, a load balancer) in a specific sequence. Each service is assigned its own segment. The head-end router includes all these service SIDs in the segment list, ensuring the traffic follows the exact desired service chain.
The 350-501 exam tests your understanding of Segment Routing architecture, not just how to configure it on a specific vendor's equipment. Expect both conceptual and technical questions. Here is what you need to focus on:
The Segment Types: You will be asked to differentiate between Node-SID, Adjacency-SID, and Prefix-SID. Remember a Node-SID uniquely identifies a router and is globally significant (every router in the domain knows where it points). An Adjacency-SID identifies a specific link between two routers and is locally significant (only meaningful to the router that originated it). A Prefix-SID identifies any prefix (a network address) and is globally significant. Be prepared for a question that presents a scenario and asks which SID is most appropriate.
SID Operations: The exam tests your understanding of how the segment list is manipulated. The key operations are 'PUSH' (adding a new SID to the top of the stack), 'SWAP' (replacing the top SID with a different one, used in MPLS networks), and 'CONTINUE' or 'NEXT' (which involves popping the top SID and forwarding based on the next). A common trap is to assume all routers do 'POP'. Remember that only the router that is the destination of a Node-SID will pop it.
IGP Integration: This is a major topic. Know that OSPF and IS-IS are extended to carry Segment Routing information. OSPF uses 'Opaque LSAs' to carry sub-TLVs for SID assignment. IS-IS uses new TLVs (Type-Length-Values) in its link-state packets (LSPs). The exam might test which TLV is used for what. Do not try to memorise every TLV number, but understand the principle of how the IGP distributes the mapping between a prefix (like a router's loopback IP) and its SID.
SR-MPLS vs SRv6: The exam covers both. SR-MPLS uses the existing MPLS label format (32-bit labels) as SIDs. SRv6 uses IPv6 addresses as SIDs. You must understand the fundamental difference: one uses labels, the other uses IPv6 addresses. A typical question might be: 'An engineer is deploying a new network and has only IPv4 support in the core. Which segment routing technology is viable?' The correct answer is SR-MPLS because SRv6 requires an IPv6 core.
Comparison to LDP and RSVP-TE: The exam loves to ask why you would choose Segment Routing over traditional MPLS. The short answer is: fewer protocols (no LDP, no RSVP-TE), better scalability (less state in the core), and better integration with traffic engineering and fast reroute.
Traps to avoid: - 'Does Segment Routing require MPLS?' Trick question! SR-MPLS does, but SRv6 does not. The answer is 'It depends'. The examiner will ask for the specific technology, so read the question carefully. - 'The Adjacency-SID is globally unique.' False. It is locally significant to the router that advertises it. - 'The IGP protocol itself is replaced by Segment Routing.' False. Segment Routing is an addition to the IGP, not a replacement. The IGP still runs and provides the basic network topology information.
Segment Routing is a source-routed forwarding method where the entire path is encoded in the packet header as a list of segment identifiers (SIDs).
The three main SID types are Node-SID (identifies a router), Adjacency-SID (identifies a specific link), and Prefix-SID (identifies a network prefix).
Segment Routing integrates with IGPs like OSPF and IS-IS, which auto-distribute SIDs, eliminating the need for a separate label distribution protocol like LDP.
In Segment Routing, only the head-end router has full state; transit routers process only the top SID in the stack, improving scalability.
SR-MPLS uses 32-bit MPLS labels as SIDs, while SRv6 uses 128-bit IPv6 addresses as SIDs, requiring an IPv6 core.
Segment Routing enables advanced features like TI-LFA (fast reroute with sub-50ms convergence) and efficient traffic engineering without complex protocols like RSVP-TE.
These come up on the exam all the time. Here's how to tell them apart.
Node-SID
Identifies a specific router (node) in the network.
Globally significant: the same SID points to the same router across the whole domain.
Typically assigned to the router's loopback interface.
Adjacency-SID
Identifies a specific link between two routers.
Locally significant: only meaningful to the router that owns the link.
Represents a direct connection that is a single IP hop.
SR-MPLS
Uses 32-bit MPLS labels as SIDs.
Requires an MPLS-enabled core network.
More mature and widely deployed in existing service provider networks.
SRv6
Uses 128-bit IPv6 addresses as SIDs.
Requires an IPv6-enabled core network.
Newer technology with tighter integration with IPv6 and network programming.
Segment Routing
Uses source routing; only the head-end router maintains path state.
No separate signalling protocol required; SIDs are distributed via the IGP.
Simpler to operate and scale, especially in large networks.
Traditional MPLS with RSVP-TE
Every router along the path maintains state for each TE tunnel (RSVP-TE).
Requires a separate protocol (RSVP) to signal and maintain tunnel state.
More complex to configure and troubleshoot, with scaling limitations.
Mistake
Segment Routing is a completely new networking protocol that replaces all existing routing protocols like OSPF and BGP.
Correct
Segment Routing is a forwarding paradigm that extends existing IGPs (like OSPF and IS-IS) to distribute SIDs. It is not a replacement for these protocols; it uses them for its control plane.
Beginners hear 'new technology' and assume it replaces everything. In reality, SR is designed to integrate with and simplify existing protocols, not throw them away.
Mistake
Every router in a segment routing network must maintain a list of every possible path through the network.
Correct
Only the head-end router (the ingress router) maintains the segment list for a given flow. Transit routers only look at the top segment and forward based on it, keeping no state about the overall path.
This is a fundamental misunderstanding of source routing. People assume that if the packet has a list of instructions, every router must know the full list. The beauty of the stack is that you only need to process the top instruction.
Mistake
A Node-SID and a Prefix-SID are the exact same thing.
Correct
They are similar but not identical. A Node-SID is a specific type of Prefix-SID that identifies the router's own loopback IP address. A Prefix-SID can identify any IP prefix in the network, not just a router's loopback.
The terms are used somewhat interchangeably in casual conversation, leading beginners to assume they are synonyms. The exam differentiates them, so it is important to know the nuance.
Mistake
Segment Routing only works with MPLS labels and cannot be used in a pure IPv6 network.
Correct
Segment Routing works in two flavours: SR-MPLS (using MPLS labels) and SRv6 (using IPv6 addresses as SIDs). SRv6 is explicitly designed for IPv6 networks.
Many introductory resources focus on SR-MPLS because it is more mature and widely deployed. Beginners may not realise that SRv6 exists and is a major part of the 350-501 exam objectives.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
A Node-SID identifies a specific router and is globally unique across the network. An Adjacency-SID identifies a specific link between two routers and is only locally significant to the router that owns the link.
No, Segment Routing does not replace BGP. It is a forwarding mechanism that works alongside BGP. BGP still handles routing between different network domains (e.g., between an ISP and its customer), while SR handles the path a packet takes within a single domain.
A segment list is like a set of turn-by-turn directions for a packet. It is a stack of instructions (SIDs) placed in the packet header that tells each router along the path exactly what to do, without needing the router to look up the ultimate destination.
A network engineer would choose SRv6 if their network core is already IPv6, as SRv6 uses native IPv6 addresses as SIDs, eliminating the need to run a separate MPLS label protocol. It also offers better integration with newer network services and simplifies the data plane.
TI-LFA stands for Topology Independent Loop-Free Alternate. It is a fast reroute mechanism in Segment Routing that pre-computes a backup path for a failed link. When a failure occurs, the router that detects the failure instantly forwards the packet along this backup path, providing sub-50ms recovery.
In OSPF, SIDs are carried in Opaque Link State Advertisements (LSAs) using sub-TLVs. In IS-IS, SIDs are carried in new TLVs within the router's Link State Packets (LSPs). Both protocols flood this information so every router knows the SID for every other router and link.
You've finished Segment Routing Fundamentals. Continue through the 350-501 study guide to build a complete picture of the exam.
Done with this chapter?