ArticleslgStudy

computer science

Segment routing

Segment routing is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Segment routing rather than just read about it. In short: Segment routing (SR) is a computer networking technology that enables packets to be forwarded through a network according to an ordered list of instructions, referred to as segments. It was developed within the SPRING an IPv6 working group of the Internet Engineering Task Force (IETF) as an extension of source routing concepts for IP and MPLS.

Segment routing — main illustration
Segment routing — illustration

Key takeaways

  • Segment routing belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Segment routing to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Segment routing from memory before moving on to harder problems.

Reference excerpt

Segment routing (SR) is a computer networking technology that enables packets to be forwarded through a network according to an ordered list of instructions, referred to as segments. It was developed within the SPRING an IPv6 working group of the Internet Engineering Task Force (IETF) as an extension of source routing concepts for IP and MPLS. In a segment routing domain, the ingress router inserts a list of segments into each packet. Each segment identifies a forwarding instruction or network function that is executed by subsequent routers. The forwarding path is therefore determined by the segment list carried by the packet rather than solely by hop-by-hop routing decisions.

History The concepts underlying Segment Routing originated from research into simplifying traffic engineering in IP and MPLS networks. Traditional MPLS Traffic Engineering relied on signaling protocols such as Resource Reservation Protocol-Traffic Engineering (RSVP-TE) to establish explicit forwarding paths, requiring routers to maintain per-tunnel state throughout the network. As service provider networks increased in size and complexity, alternative approaches that reduced signaling requirements and simplified network operation were investigated. In 2013, the IETF established the SPRING (Source Packet Routing in Networking) Working Group to develop a standardized architecture based on source routing principles for packet-switched networks. Early work focused on integrating Segment Routing with MPLS labels without requiring additional signaling protocols. This approach later became known as SR-MPLS. Subsequent work extended the architecture to IPv6 through the introduction of the Segment Routing Header (SRH), an IPv6 extension header carrying a list of Segment Identifiers (SIDs). This extension, commonly referred to as Segment Routing over IPv6 (SRv6), introduced the ability to represent forwarding behaviors and network functions using IPv6 addresses. The architecture was standardized through a series of IETF publications, including RFC 8402, which defines the Segment Routing architecture, RFC 8754, which specifies the Segment Routing Header for IPv6, and RFC 8986, which defines the SRv6 Network Programming protocol extensions for MPLS, OSPF, IS-IS, BGP, and related technologies, while further development continues within the IETF SPRING Working Group.

Overview Segment routing is designed to operate using the topology information distributed by existing link-state routing protocols, including OSPF and IS-IS. Segment Identifiers (SIDs) are advertised through protocol extensions, allowing routers within the routing domain to maintain a consistent view of available segments. Unlike traditional MPLS Traffic Engineering deployments based on signaling protocols such as RSVP-TE, Segment Routing relies on the information already exchanged by the routing protocol to construct forwarding paths. The segment list may be generated by the ingress router itself or computed by an external controller such as a Path Computation Element (PCE).

Segments A segment represents an instruction executed by a router when forwarding a packet. Different types of segments may identify:

A router within the routing domain (Node SID) A network prefix (Prefix SID) An outgoing interface or adjacency (Adjacency SID) A forwarding policy (Binding SID) A locally defined forwarding behavior A packet may contain one or more segments. Routers process the current segment before forwarding the packet toward the next destination. Processing continues until all segments have been consumed.

Segment Routing over MPLS Segment Routing can be deployed over a MPLS network, where it is commonly referred to as SR-MPLS. In SR-MPLS, Segment Identifiers are encoded as MPLS labels. The ingress router pushes a stack of labels onto the packet, and each router forwards the packet according to the label at the top of the stack before removing it. The remaining labels determine the subsequent forwarding path. SIDs are distributed through extensions to Interior Gateway Protocols (IGPs), including OSPF and IS-IS.

Segment Routing over IPv6 Segment Routing may also operate over IPv6 using SRv6 (Segment Routing over IPv6). In SRv6, segments are represented by IPv6 addresses contained within an IPv6 extension known as the Segment Routing Header (SRH), defined by the IETF. Each segment identifies either a forwarding destination or a specific forwarding behavior associated with an IPv6 address. As a packet traverses the network, routers process the Segment Routing Header sequentially until every segment has been executed.

Segment Routing Header The Segment Routing Header (SRH) is an IPv6 Routing Extension Header that contains the information required for Segment Routing. The header includes a list of IPv6 segments, the index of the currently active segment, and optional Type-Length-Value (TLV) objects. Routers update the active segment during forwarding until the packet reaches its final destination. The Segment Routing Header is defined in RFC 8754.

Segment Identifier distribution Segment Identifiers are typically distributed by link-state routing protocols through protocol extensions standardized by the IETF. In SR-MPLS deployments, SIDs are commonly allocated from the MPLS label space. In SRv6 deployments, they correspond to IPv6 addresses or prefixes allocated by the network operator. Depending on their function, Segment Identifiers may be globally significant throughout a routing domain or locally significant to an individual router.

Traffic Engineering Segment Routing may be used to implement traffic engineering policies by defining explicit forwarding paths through a network. Instead of relying exclusively on the shortest path calculated by the routing protocol, packets may be directed through selected nodes or links in order to satisfy operational objectives such as load balancing, latency constraints, or administrative routing policies. The segment list defining the forwarding path may be computed locally by the ingress router or by a centralized controller.

Fast reroute Segment Routing supports protection mechanisms intended to reduce traffic interruption following network failures. One such mechanism is Topology Independent Loop-Free Alternate (TI-LFA), which allows routers to redirect traffic onto a precomputed backup path immediately after detecting a link of node failure, without waiting for complete routing protocol convergence.

… excerpt ends here. Continue reading the full article.

Illustrations

Segment routing illustration

Worked examples

Example 1 — a first encounter with Segment routing

Start with the simplest possible case. Write down what Segment routing claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Segment routing before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Segment routing ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Segment routing

In research
Segment routing appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Segment routing in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Segment routing is common in secondary-school and first-year university syllabi. It links to neighbouring topics Routing algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Segment routing outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Segment routing” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Segment routing in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Segment routing means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Segment routing out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Segment routing in simple terms?

Segment routing (SR) is a computer networking technology that enables packets to be forwarded through a network according to an ordered list of instructions, referred to as segments. It was developed within the SPRING an IPv6 working group of the Internet Engineering Task Force (IETF) as an extensi…

Why does Segment routing matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Segment routing?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Segment routing.

Tags

  • Routing algorithms

Keep exploring