A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Segment Routing and Source Routing

Graduate Depth 100 in the knowledge graph ☐ I know this ☆ Set as goal
614prerequisites beneath it
See this on the map →
BGP: Border Gateway ProtocolRouting Algorithms and Protocols+2 more→
routing segment-routing source-routing traffic-engineering

Core Idea

Segment Routing (SR) simplifies traffic engineering by encoding the path as a list of segment identifiers (SIDs) in packet headers. Rather than relying on per-flow state in routers, SR pushes routing decisions to the ingress node. Segment routing can run over MPLS (SR-MPLS) or IPv6 (SRv6), with segment identifiers mapping to prefixes, adjacencies, or functions.

How It's Best Learned

Deploy segment routing on open-source implementations (FRRouting) or network simulators. Configure SIDs for prefixes and adjacencies. Test traffic engineering policies using segment lists. Compare convergence time and state management vs. MPLS-TE.

Common Misconceptions

Segment routing does not replace OSPF/BGP; it augments them with a label distribution mechanism. SIDs are not addresses; they are indices into forwarding tables. Segment routing requires all routers to understand SID semantics for correct forwarding.

Explainer

Traditional IP routing works hop-by-hop: each router independently examines the destination address and consults its own routing table to decide where to forward the packet. From your study of routing algorithms and BGP, you know this model works well for basic reachability — packets find a path to their destination. But it gives the network operator very little control over *which* path traffic takes. If you want to steer certain flows through a specific sequence of routers (for traffic engineering, policy compliance, or avoiding congested links), hop-by-hop routing alone cannot do it. Segment Routing (SR) solves this by letting the source node encode the entire forwarding path directly into the packet header.

The core abstraction is the segment, identified by a Segment Identifier (SID). A segment represents an instruction — "forward to node X," "use the link between A and B," or "apply function F." There are two main types: prefix SIDs identify a destination node (like a global address), while adjacency SIDs identify a specific link between two neighboring routers. The source constructs an ordered list of SIDs — called a segment list — and pushes it onto the packet. Each router along the path reads the active SID, performs the corresponding action, pops that SID from the list, and forwards the packet onward. The result is source-routed traffic engineering without any per-flow state stored in intermediate routers.

This statelessness is Segment Routing's most important advantage over older traffic engineering approaches like RSVP-TE in MPLS networks. With RSVP-TE, every router along a traffic-engineered path must maintain signaling state for every tunnel — a significant operational burden that scales poorly. Segment Routing eliminates this entirely: intermediate routers just need to know how to process SIDs, which are distributed through extensions to protocols you already know (IS-IS or OSPF for interior routing, BGP for inter-domain). The intelligence lives at the network edge, where a controller or ingress router computes paths and encodes them as segment lists.

Segment Routing runs in two flavors: SR-MPLS uses MPLS label stacks to carry SIDs (each SID is simply an MPLS label), making it deployable on existing MPLS infrastructure with software upgrades. SRv6 encodes SIDs as IPv6 addresses in a Segment Routing Header extension, leveraging IPv6's native extensibility and enabling richer programmability — a SID can encode not just a destination but a network function to apply. Both approaches achieve the same goal of source-directed forwarding, but SRv6 trades some header overhead for greater flexibility and a unified IPv6 data plane.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Conditional Statements → Defining and Calling Functions → Functions: Decomposing Problems → Function Parameters and Argument Passing → Return Values → Variable Scope → Introduction to Classes → Objects and Instances → Methods and Attributes → Algorithm Design Basics → Tree Structure and Node Properties → Binary Trees → Tree Traversals → Depth-First Search (DFS) → Depth-First Search: Implementation and Applications → Topological Sort → Dynamic Programming → Longest Common Subsequence (LCS) Problem → Edit Distance: Levenshtein Distance and DP → 0/1 Knapsack Problem: Bounded Capacity DP → Greedy Algorithms → Activity Selection Problem Using Greedy Algorithms → Dijkstra's Algorithm → Floyd-Warshall Algorithm for All-Pairs Shortest Paths → Bellman-Ford Algorithm → Bellman-Ford Algorithm and Distance-Vector Routing → Distance-Vector Routing Protocols → BGP: Border Gateway Protocol → Segment Routing and Source Routing

Longest path: 101 steps · 614 total prerequisite topics

Prerequisites (4)

Leads To (0)

No topics depend on this one yet.