The EVPN, VPN-IPv4, VPN-IPv6, IPv4 and IPv6 routes for the SRv6-enabled services are advertised along with the SRv6 Service TLV. The TLV format is described in draft-ietf-bess-srv6-services and shown in Figure 1.
The SRv6 Service TLV encoded in the BGP Prefix-SID attribute can have two different types:
Type 5 is used for Layer 3 service SIDs or the SIDs signaled for VPRN services with VPN-IP or EVPN-IFL routes. Layer 3 service SIDs are also supported for the base router along with IPv4/6 routes.
Type 6 is used for Layer 2 service SIDs or the SIDs signaled for Epipe or VPLS services. Type 6 is supported along with AD per-EVI and per-ES routes for Epipes.
The SRv6 Service TLV may contain an unordered list of sub-TLVs, but currently the SRv6 Service TLV is advertised with only one sub-TLV – the SRv6 SID Info sub-TLV (type 1). This sub-TLV encodes the following information:
SID value — the entire 128-bit SID allocated to the service. This includes the locator configured for the service and the allocated FUNCTION (which can be dynamically allocated or statically configured on the service). The ARGUMENT is always 0.
SID Flags — all zero.
Endpoint behavior — encodes the behavior as in RFC 8986, in decimal values. The following are relevant for SR OS:
18 – End.dt6
19 – End.dt4
20 – End.dt46
21 – End.dx2
24 – End.dt2m (only for AD per-ES routes)
One SID Structure Sub-Sub-TLV (Service Data Sub-Sub-TLV type 1).
The SID Structure Sub-Sub-TLV is always included in routes with label fields and always uses the following values when advertised:
Locator Block Length — encodes the length of the block configured in the locator for the service
Locator Node Length — the length of the node configured in the locator for the service
Function Length — configurable in the range 20..96
Argument Length — 0
Transposition Length (TL) — 20 for EVPN and VPN-IP routes. For IP routes in the base router, the Transposition Length is always 0.
Transposition Offset (TO) — for EVPN and VPN-IP routes:
If Function Length equals to 20, the Transposition Offset (TO) value equals the prefix length configured in the locator
If Function Length is greater than 20, the TO value equals ((prefix length configured in the locator) + (FunctLength -20))
For IP routes in the base router, the TO value is always 0.