Table of Contents
Introduction
In What is SRv6? A Simple Explanation and Why It Matters, we provide a basic introduction to SRv6.
The next three articles will focus on how does SRv6 work, and the key topics of each article are shown below:
- How Does SRv6 Work ? (Ⅰ) SRH Explained
- How Does SRv6 Work ? (Ⅱ) SRv6 Protocol Extensions
- How Does SRv6 Work ? (Ⅲ) SRv6 SRv6 Operating Modes
In this section, we explain the Segment Routing Header (SRH).
How SRv6 Makes the Network Programmable
The core idea of SRv6 (RFC 8402, RFC 8986, RFC 8754) is to make the network behave like a programmable system. Traditional Segment Routing (SR) forwards packets by stitching together path segments, whereas SRv6 does not rely on hop-by-hop route lookups. Instead, the entire path is determined at the source node and encoded directly into the packet.
Leveraging the vast IPv6 address space, SRv6 effectively “programs” the forwarding path into the packet itself. Much like a computer executing a program, network services in SRv6 are represented as a sequence of forwarding instructions. These instructions travel with the packet across the network and are executed by each node along the path, enabling precise control over both the forwarding path and the processing behavior.
What is Segment Routing Header ?
The Segment Routing Header (SRH) is the data plane carrier of SRv6, and all capabilities of SRv6 are realized through the SRH.
The SRH is fundamentally a combination of path information and behavioral instructions. Its key functions include:
- Path Definition: The Segment List specifies an ordered sequence of segments, representing the nodes or service functions that the packet must traverse
- Forwarding Control: The Segments Left (SL) field indicates the number of remaining segments to be processed
- Behavior Programming: Each segment is represented by a 128-bit SID (Segment Identifier), which not only identifies a node but also encodes specific forwarding or service behaviors
During packet forwarding, network devices use the Segments Left and Segment List fields in the SRH to dynamically update the IPv6 Destination Address (DA), guiding the packet hop-by-hop along the predefined path.
Therefore, the SRH serves not only as a routing map that defines the forwarding path, but also as an instruction set that drives network behavior. This enables SRv6 to support flexible traffic engineering and service orchestration without requiring complex per-flow state in the network.

SRH Processing Procedure
In an SRv6 packet, the IPv6 Destination Address (DA) represents the currently active SID. The SRH carries an ordered Segment List, and as the packet traverses each SRv6 node, the SL field is decremented by one, while the IPv6 DA is updated to the next SID in the list.
At the source node, the Segment List and the initial destination SID are encapsulated into the SRH, and the SL field is initialized to indicate the active segment position. As the packet progresses through the network, each SRv6 node processes the packet according to the SRH, which may include updating the IPv6 DA, performing encapsulation/decapsulation, or forwarding.
If a node does not support SRv6, it forwards the packet based on standard IPv6 forwarding behavior, without processing the SRH—similar to a transit station that simply forwards a package without interpreting its routing instructions. Eventually, when the packet reaches the final endpoint, decapsulation is performed, completing end-to-end service delivery.
To illustrate, consider sending a package from Shanghai to New York via intermediate hubs such as Hong Kong and Memphis. At the origin, the entire route—Shanghai (PVG) → Hong Kong (HKIA) → Memphis (MEM) → New York—is pre-determined. Each transit hub simply forwards the package according to this predefined path, without recalculating routes. SRv6 forwarding follows a similar principle.
Formally, the relationship between the Segment List and the IPv6 DA is as follows:
When SL = n, the IPv6 DA is set to SID[n]; upon reaching the next node, SL is decremented
When SL = n − 1, the IPv6 DA is updated to SID[n−1]
…
This process continues iteratively until SL = 0, indicating that the final segment is being processed.

SRv6 Node Behaviors
As described earlier, the SRH (Segment Routing Header) not only defines the forwarding path of a packet (Segment List), but also implicitly encodes function information within each SID, driving network nodes to perform specific forwarding or service actions.
As packets traverse the path defined by the SRH, different nodes perform varying levels of processing based on their roles. From the perspective of node roles, nodes in an SRv6 network can be categorized into the following three types:
- SRv6 Source Node: Responsible for generating SRv6 packets, encapsulating the SRH, and inserting the complete Segment List into the packet to define the end-to-end path and sequence of behaviors.
- Transit Node: Forwards packets solely based on IPv6 destination address lookup, without parsing or processing the SRH.
- SRv6 Segment Endpoint Node: When the IPv6 destination address matches a local SID or interface address, the node processes the SRH and executes the specific behavior defined by the corresponding SID.

SRv6 Source Node Behaviors
The SRv6 source node is the starting point of the SRv6 forwarding process. It is responsible for selecting an appropriate SRv6 TE Policy based on packet characteristics (such as destination address, service type, and policy matching), and encapsulating the original packet with a Segment Routing Header (SRH) according to the Segment List defined in the selected policy.
Depending on service requirements and network deployment scenarios, the source node supports multiple SRH insertion modes (e.g., Inline and Encapsulation). These modes differ in packet structure, compatibility, and application scenarios:
- Inline Mode: Inserts the SRH directly into the original IPv6 packet
- Encapsulation Mode: Adds a new outer IPv6 header and encapsulates the original packet along with the SRH
- Encapsulation.Red Mode: An optimized version of Encapsulation, which reduces SRH overhead under certain conditions, improving forwarding efficiency in high-performance scenarios
SRv6 Endpoint Node Behaviors
Each SID consists of three components: Locator, Function, and Arguments:
- Locator: Identifies the network node to which the packet is routed
- Function: Defines the forwarding or processing behavior to be executed at the node
- Arguments: Optional field that provides additional parameters for the Function during execution
When a packet arrives at an endpoint node, the node determines the required action based on the function associated with the SID. According to different processing logics, SRv6 functions can be classified into the following three categories:
Basic Forwarding Behaviors
| SID Type | Function | Typical Use Case |
| End | Processes the current SID, advances the Segment List, and performs IPv6 routing table lookup for forwarding | Regular transit node in SRv6 TE Policy |
| End.X | Processes the current SID, advances the Segment List, and forwards packets directly to a predefined outgoing interface without routing lookup | Explicit path control in SRv6 Traffic Engineering |
| End.T | Processes the current SID, advances the Segment List, and performs lookup in a specified VRF or routing table | Multi-VRF network environments |
Decapsulation and Forwarding Behaviors
| SID Type | Function | Typical Use Case |
| End.DT4 | Decapsulates the SRv6 packet (removes outer IPv6 header and SRH), then performs IPv4 routing table lookup (typically within a VRF) | L3VPN services over SRv6 |
| End.DT6 | Decapsulates the SRv6 packet, then performs IPv6 routing table lookup (typically within a VRF) | L3VPN services over SRv6 |
| End.DX4 / End.DX6 | Decapsulates the SRv6 packet, then forwards the inner IPv4/IPv6 packet to a predefined next hop or outgoing interface (no routing lookup) | PE–CE direct connectivity |
| End.DT2U | Decapsulates the SRv6 packet, then performs Layer 2 lookup based on destination MAC address (unicast forwarding) | EVPN unicast traffic forwarding |
| End.DT2M | Decapsulates the SRv6 packet, then forwards traffic using Layer 2 multicast/BUM mechanisms | EVPN BUM traffic forwarding |
| End.DX2 | Decapsulates the SRv6 packet, then forwards the Layer 2 frame directly to a predefined outgoing interface (no MAC lookup) | EVPN VPWS services |
| End.AD | Decapsulates the SRv6 packet, then forwards based on MAC address and EVI context | EVPN VPWS/VPLS, typically with BUM traffic isolation |
Programmable SRv6 Behaviors
| SID Type | Function | Typical Use Case |
| End.B6 | Inserts a new SRH into the existing SRv6 packet (i.e., augments the Segment List) and forwards the packet according to the updated SRH | Service chaining, traffic redirection |
| End.B6.Encaps | Encapsulates the packet with a new outer IPv6 header and SRH, forming a new SRv6 packet | Service chaining, traffic redirection |
| End.AS | Replicates the packet and forwards a copy to a specified SID while continuing normal forwarding of the original packet | Traffic mirroring, telemetry, in-band monitoring |
The Next Article Will Explain SRv6 Protocol Extensions
The next chapter will introduce the second part: how does SRv6 work, covering its extension methods and operational mechanisms in SRv6 scenarios along two dimensions: IGP and BGP. It will also explain how they interact with the SRv6 data plane to enable the creation of Segment Lists and the execution of forwarding behaviors.
Need assistance or more info ?
Fill out the form, and we’ll reach out to you today !
Contact US !
- To request a proposal, send an E-Mail to bd@cloudswit.ch
- To receive timely and relevant information from Asterfusion, sign up at AsterNOS Community Portal
- To submit a case, visit Support Portal
- To find user manuals for a specific command or scenario, access AsterNOS Documentation
- To find a product or product family, visit Asterfusion-cloudswit.ch