SRv6 Basics: Locator and End SIDs¶
Krzysztof Szarkowicz - 06/29/2022
SRv6 (Segment Routing version 6) is a version of segment routing based on IPv6 tunneling mechanism, rather than on MPLS (MultiProtocol Label Switching) underlay. Therefore, with SRv6 underlying transport routers must be capable of forwarding IPv6 (Internet Protocol version 6) packets, and do not require MPLS support.
In the first series of SRv6 articles, I will present very basic SRv6 functionality. Which is the concept of SRv6 locator and SRv6 SID (Segment Identifier). To discuss this simple topic, a very basic topology will be used, as outlined in Figure 1.

Introduction¶
In this topology, all IP addresses in the transport infrastructure (loopbacks, links of PE and P routers) are IPv6 addresses from the IPv6 subnets listed in Figure 1. There are no IPv4 addresses at all, since SRv6 relies completely on IPv6. Obviously, SRv6 can be deployed in dual-stack (IPv4 + IPv6) transport infrastructure, but it unnecessarily complicates the design and is absolutely not required. The only 'IPv4 like' number used in the design is a router ID associated with each router in the transport infrastructure. Given the fact, that this ID is 32-bit, it looks like an IPv4 address (although, it isn't).
SRv6 Locator¶
Apart from configuring a standard IPv6 network, what is needed to enable SRv6?
The most important and most basic piece of SRv6 configuration is the allocation of SRv6 locators to each router in the transport infrastructure.
But wait a minute, what is an SRv6 locator, actually?
An SRv6 locator is an IPv6 subnet. Apart from allocating for each router some host IPv6 prefix for loopback (/128), you need to allocate as well some IPv6 subnet to each router (for example /64).
And, what is it for, this locator?
In a very basic sense, SRv6 locator is the base for SRv6 SID. An SRv6 SID is 128-bit long number (thus, the same size as an IPv6 address) constructed from the SRv6 locator (most significanct bits in the SRv6 SID), and other values, defining the actual function of the locator. From this definition, it can be easily derived, that there could be multiple SRv6 SIDs associated with a single router -- each SRv6 SID based on the same IPv6 prefix defined as the SRv6 locator.
In this topology, we are allocating the locators using bad:feed:0:
Configuration 1: SRv6 Locator on PE11
SRV6-LOC-1 is just a locally significant name. In addition to configuring the locator, you need to enable SRv6 extension in the IGP (Interior Gateway Protocol) - IS-IS (Intermediate System to Intermediate System) in this particular case - and specify, which locator should be used in IGP advertisements. Note that it is possible to use multiple locators per node; we will discuss scenarios, where multiple locators might be used, in some follow up SRv6 articles. The name of the SRv6 locator is not exchanged via the IGP extensions, just the SRv6 locator value.
Configuration 2: SRv6 IS-IS extensions on PE11
Now, after defining the SRv6 locator, and enabling IS-IS SRv6 extensions, you can verify the status.
CLI-Output 1: IS-IS Status
First success! SRv6 is enabled and local locator is shown! Note: we will discuss different algorithms in some follow-up SRv6 blog.
You can as well check the IS-IS database, and verify the SRv6 locator advertisements.
CLI-Output 2: SRv6 Locator advertisement
As you can see, each node advertises the IPv6 subnet used for SRv6 locator as legacy IPv6 prefix (IS-IS TLV - Type-Length-Value - 236: IPv6 IP Reachability), as well as SRv6 locator (IS-IS TLV 27: SRv6 Locator). There is some other information (like flags) visible -- this will be discussed in some follow-up articles.
CLI-Output 3: Packet dump with SRv6 Locator information
If you check the routing tables for SRv6 locators, you can observe they are present in both inet6.0 (installed based on IS-IS TLV 236: IPv6 IP Reachability) and in inet6.3 (installed based on IS-IS TLV 27: SRv6 Locator) RIBs (Routing Information Base). Having them in inet6.0 allows routing (i.e. IPv6 packet with the destination matching SRv6 locator prefix can be routed). Having them in inet6.3 allows for BGP (Border Gateway Protocol) protocol next-hop resolution for BGP services (like for example L3VPN) carried across SRv6 underlay. This will be discussed in the next blog in more detail.
CLI-Output 4: Packet dump with SRv6 Locator information
SRv6 SID¶
OK. We successfully configured SRv6 locators on the routers, and verified that these locators are distributed across entire network. Now, if you try to verify the forwarding:
CLI-Output 5: Forwarding towards SRv6 locator
You can observe that forwarding towards IPv6 loopback is OK, but forwarding towards SRv6 locator fails with failure code "Destination Host Unreachable" provided by the destination node itself (beef::212:12 is the link address on PE12 for the P2-PE12 link). In essence, the packet reached the destination node, but the destination node has no idea what it is supposed to do with it.
Well, this is, actually, expected. The piece that is missing is SRv6 SID. As mentioned earlier, SID defines some functions. Meaning: what is supposed to happen with the packet that uses the SID as IPv6 destination address, when the packet arrives at the endpoint advertising the SRv6 locator. An exemplary structure of the SRv6 SID is outlined in Figure 2.

In essence, the 128-bit long SRv6 SID can be divided into two main parts: SRv6 locator and FUNC:ARG (Function:Argument).
SRv6 standard doesn't specify any fixed boundaries between these parts. The boundaries can be limited by the particular SRv6 implementation (Junos doesn't have such limitation) or can be freely chosen by the operator to align to particular design requirements.
Boundaries mentioned in the figure are just examples used in this blog:
- SRv6 Locator block: bad:feed:0::/48
- SRv6 Locator: bad:feed:0:
:/64
There is large number of functions (called as well end-point behaviors) defined in the SRv6 standard (RFC 8986). The most basic function is the 'Endpoint' behavior (End SID in short), which instructs the router to locally 'consume' the packet. Thus, to successfully perform previous ping tests, we need to define End SID for each node.
Configuration 3: SRv6 End SID on PE11
End SID is a host (/128) IPv6 address from within the SRv6 locator subnet allocated to the router. In this particular case I used SID with 'all zeros' in the FUNC:ARG portion of the SRv6 SID. The defined SRv6 End SID appears similar to the SRv6 locator, which is probably easier from an operational perspective. Saying that, any value in the FUNC:ARG portion could be used. Now, if you perform some checks:
CLI-Output 6: IS-IS SRv6 End SID states
These SRv6 End SIDs are flooded via SRv6 IS-IS extensions, and allow the router to accept and process the packets with IPv6 address equal to locally defined End SID. Please note, there are no changes in the routing tables. The routing still uses SRv6 locators. It is just endpoint behavior (meaning, what happens, when the packet eventually arrives at the end node), which is now defined. And now, ping works!
CLI-Output 7: Forwarding towards SRv6 locator
Conclusion¶
In the next article, we will discuss how the L3 services (global IPv4/IPv6, L3VPN with IPv4/IP6) can be implemented with SRv6 underlay.
Useful links¶
- RFC 8986: Segment Routing over IPv6 (SRv6) Network Programming
- SRv6 in Junos: https://www.juniper.net/documentation/us/en/software/junos/is-is/topics/topic-map/infocus-isis-srv6-network-programming.html
- TechPost 1: SRv6 Basics Locator and End-SIDs - https://juniper.github.io/techposts/srv6-basics-locator-and-end-sids/article
- TechPost 2: L3VPN on SRv6 - https://juniper.github.io/techposts/l3vpn-over-srv6/article
- TechPost 3: SRv6 Summarisation - https://juniper.github.io/techposts/srv6-summarization/article
- TechPost 4: SRv6 SID Encoding and Transposition - https://juniper.github.io/techposts/srv6-sid-encoding-and-transposition/article
Glossary¶
- BGP: Border Gateway Protocol
- CE: Customer Edge
- ID: Identifier
- IGP: Interior Gateway Protocol
- IS-IS: Intermediate System to Intermediate System
- P: Provider
- PE: Provider Edge
- IP: Internet Protocol
- IPv4: Internet Protocol version 4
- IPv6: Internet Protocol version 6
- L3VPN: Layer 3 Virtual Private Network
- MPLS: MultiProtocol Label Switching
- RIB: Routing Information Base
- SID: Segment Identifier
- SRv6: Segment Routing version 6
- TLV: Type-Length-Value
Acknowledgements¶
Thanks to Anton Elita for thorough review, and Abhishek Murali for preparing JCL and vLabs topologies.