Network Working Group B. Decraene Internet-Draft Orange Intended status: Standards Track January 24, 2020 Expires: July 27, 2020 SRv6 Network Programming extension: the Variable Length SID flavor draft-decraene-spring-srv6-vlsid-01 Abstract This document proposes an extension to Segment Routing IPv6 (SRv6) Network Programming to allow for SRv6 Segment Identifier (SID) of variable length. The use of smaller SRv6 SID reduces the size the SRv6 Header (SRH). This reduces the overhead for both the traffic volume and the network processor. This document is aligned with the SR architecture and does not change the SRH. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on July 27, 2020. Copyright Notice Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of Decraene Expires July 27, 2020 [Page 1] Internet-Draft SRv6 Variable Length SID January 2020 the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 2. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. SRv6 Variable Length SID . . . . . . . . . . . . . . . . . . 4 3.1. VLSID encoding in the SRH . . . . . . . . . . . . . . . . 5 3.2. SRv6 VLSID behavior . . . . . . . . . . . . . . . . . . . 6 4. Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5. Illustrations . . . . . . . . . . . . . . . . . . . . . . . . 8 5.1. Local VLSIDs . . . . . . . . . . . . . . . . . . . . . . 8 5.2. Global VLSIDs . . . . . . . . . . . . . . . . . . . . . . 9 6. Signaling VLSID . . . . . . . . . . . . . . . . . . . . . . . 9 6.1. Signaling VLSID size in IS-IS . . . . . . . . . . . . . . 10 7. Combining VLSIDs on an SR Endpoint . . . . . . . . . . . . . 10 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11 9. Security Considerations . . . . . . . . . . . . . . . . . . . 11 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 11 11. Changes / Author Notes . . . . . . . . . . . . . . . . . . . 12 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 12 12.1. Normative References . . . . . . . . . . . . . . . . . . 12 12.2. Informative References . . . . . . . . . . . . . . . . . 13 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 13 1. Introduction The Segment Routing (SR) architecture is defined RFC 8402 [RFC8402]. IPv6 Segment Routing Header (SRH) is defined [I-D.ietf-6man-segment-routing-header]. SRv6 Network Programming is defined [I-D.ietf-spring-srv6-network-programming]. The reader is expected to be familiar with the three above documents which define Segment Routing over the IPv6 data-plane (SRv6). SRv6 is flexible and powerful, but in some (uses) cases the size of the SID may be seen as too large. This document proposes an extension of SRv6 Network Programming to allow for SID of variable length. This allows for the use of smaller SID if needed for a specific deployment. This document is aligned and does not change the SR architecture nor the SRH. Decraene Expires July 27, 2020 [Page 2] Internet-Draft SRv6 Variable Length SID January 2020 1.1. Requirements Language The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 RFC 2119 [RFC2119] RFC 8174 [RFC8174] when, and only when, they appear in all capitals, as shown here. 2. Overview In a nutshell, SRv6 Variable Length SID (SRv6 VLSID) proposes to: o define one SRv6 SID block dedicated to SRv6 VLSID and called SRv6 VLSID block; o define the VLSID as the SRv6 SID minus the VLSID block: SRv6 SID:= SRv6 VLSID block + SRv6 VLSID; o encode in the Segment List of the SRH only the list of VLSIDs. In other words, SRv6 VLSID proposes to compress the SIDs in the SRH by not encoding the common SRv6 SID prefix (SRv6 VLSID block) in the SRH Segment List. The SRv6 VLSID block is only encoded once, in the IPv6 destination address. In a way, this is similar to SR-MPLS RFC 8660 [RFC8660]: o For SR-MPLS: SR-MPLS Label:= SRGB + Index o For SRv6 VLSID: SRv6 SID := SRv6 VLSID block + SRv6 VLSID One difference compared to SR-MPLS is that lowest bits of the SRv6 VLSID block are defined to be zero. This allows for an easier operation in the data plane as the addition of the VLSID may be replaced by a copy of the VLSID byte(s). Another difference is that the motivation to offset to a zero base index/VLSID is different. The format of the SRH is unchanged. The length of the VLSID is variable but its size does not need to be encoded in the SRH header. Indeed the VLSID size only needs to be known by the SR Segment Endpoint Node processing it. As per section 4.3 of [I-D.ietf-6man-segment-routing-header], the SR node identifies its local SID by performing a longest-prefix-match lookup on the packets IPv6 destination address. This identifies the SID and its properties, in particular the size of the VLSID. Decraene Expires July 27, 2020 [Page 3] Internet-Draft SRv6 Variable Length SID January 2020 3. SRv6 Variable Length SID As per section 3.1 of [I-D.ietf-spring-srv6-network-programming], an SRv6 SID can be represented as 'B:N:FUNCT'. Where 'B' is the SRv6 SID block, N is the identifier of the parent node N, FUNCT is the function of the SID of size 128-S. An SRv6 VLSID deployment choose one size 'L' of VLSID and an associated SRv6 VLSID block. 0 (bits) 128 SRv6 SID: +--------------------------------------------------------------+ | B: SRv6 SID block | N: Node | FUNCT: Function | +--------------------------------------------------------------+ SRv6 VLSID SID: +--------------------------------------------------------------+ | SRv6 VLSID block (aka Common Prefix) | VLSID | +--------------------------------------------------------------+ Figure 1: SRv6 SID:= SRv6 VLSID block + SRv6 VLSID An SRv6 VLSID deployment can use multiple SRv6 VLSID blocks. Each block may have its own VLSID size. If SRv6 VLSIDs are to identify global segments, the VLSID would typically include both the Node part 'N' of the locator and the local function 'FUNCT' locally instantiated on the node N. Hence the format of the VLSID would be "N:FUNCT". If SRv6 VLSIDs are to only identify local segments, the VLSID could be chosen to only include the local function 'FUNCT' locally instantiated on the node N. Hence the format of the VLSID would be "FUNCT". This may be interesting for a deployment using both 128-bits SRv6 SIDs and very short SRv6 VLSIDs. Such SRv6 VLSIDs could be used when a strictly routed path is needed and encoded as a list of adjacency SIDs. Given that the number of local adjacency SIDs is independent of the size of the SR domain, and typically below 255, one could use 8-bits VLSID which would allow encoding 16 VLSIDs within a single 128-bits SRv6 SID hence provides a very effective SRH compression. Note: in the initial version of this document, the length of the VLSID is assumed to be a multiple of 8-bits, up to 128 bits included, in order to provide octet alignement in the SRH Segment List. In a future version of this document, the granularity may changed (e.g. 1 Decraene Expires July 27, 2020 [Page 4] Internet-Draft SRv6 Variable Length SID January 2020 bit, 4 bits, 16 bits, or an integer fraction of a 128-bits SRv6 SID) depending on hardware capabilities and flexibility requirements. Also, implementations profiles could be defined in order for an implementation to support only one type/subset of granularity. 3.1. VLSID encoding in the SRH As per section 2 of [I-D.ietf-6man-segment-routing-header], the Segment Routing Header (SRH) is defined as follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Last Entry | Flags | Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[0] (128 bits IPv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | | ... | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | | Segment List[n] (128 bits IPv6 address) | | | | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // // Optional Type Length Value objects (variable) // // // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 2: SRH with 128-bits SRv6 SID When VLSID are used, there are encoded in the Segment List of the Segment Routing Header (SRH). VLSID are encoded back to back using their native size. There is no padding between SIDs. There is no alignement of the SID except that each SID begins and ends on an octet boundary. In a SRH, all VLSID MUST have the same size 'L'. Decraene Expires July 27, 2020 [Page 5] Internet-Draft SRv6 Variable Length SID January 2020 The Segment List MUST be encoded as a multiple of 128-bits. If the size of the VLSID multiplied by the number of segments in the SRH Segment List is not a multiple of 128 bits, then padding bits MUST be added up to the next multiple of 128 bits. Those padding bits MUST be set to 0 when sent and ignored on receipt. The fields 'Segments Left' and 'Last Entry" keep their meaning but refers to VLSID of size L. The following diagramm illustrates an example with VLSID of sixteen bits: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Last Entry | Flags | Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Segment List[0] (L bits VLSID)| Segment List[1] (L bits VLSID)| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ..... ..... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Segment List[n] (L bits VLSID)| Padding bits | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // // // Optional Type Length Value objects (variable) // // // +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 3: SRH with SRv6 VLSID with 16-bits VLSID 3.2. SRv6 VLSID behavior The VLSID behavior is a flavour of the endpoint behavior. The behavior takes as an argument the size L of the VLSID. This size L is a property of the VLSID and is given by the lookup on the IPv6 destination address which identifies the SRv6 SID and its properties. As part of the properties, the SR endpoint learn that the SID is a VLSID of size L. When N receives a packet whose IPv6 DA is S and S is a local VLSID of size L, the line S16 form the End processing which was, as per section 4.1 of [I-D.ietf-spring-srv6-network-programming]: S08. max_LE = (Hdr Ext Len / 2) - 1 Decraene Expires July 27, 2020 [Page 6] Internet-Draft SRv6 Variable Length SID January 2020 [...] S14. Update IPv6 DA with Segment List[Segments Left] are replaced by the following: S08. max_LE = (Hdr Ext Len * 64 / VLSID) - 1 [...] S14. Copy Segment List[Segments Left] from the SRH to the L lowest order bits of the destination address of the IPv6 header. Note: S14. Taking into consideration that the Segment List is a list of VLSIDs of size L bits 4. Benefits SRv6 Variable Length SID is believed to have the following benefits: o Aligned with SRv6: SR architecture, SRv6 Network Programming. o Reduced SID hence reduced header length. o Flexible SID length, to accommodate for various deployment models, network sizes, SRv6 usages. * A typical VLSID length could be 32 bits. Compared to SR-MPLS (which has a 20 bits SID) it is larger and more scalable. Compared to SRv6 (which has a 128 bits SID) it's four times more compact. * Other SID length are possible: 16 bits would be 8 times more compact than SRv6 SID and 2 times more compact the SR-MPLS shim header and large enough for most deployments; 8 bits would be 16 (respectively 4) more compact than SRv6 SID (respectively SR-MPLS shim header) and could fit some specific deployments (e.g. local adjacency SID only). o Unchanged SRv6 header (SRH). o No requirement for additional IPv6 addressing space: a /64 per router is more than enough. A /96 per router is the typical requirement. Decraene Expires July 27, 2020 [Page 7] Internet-Draft SRv6 Variable Length SID January 2020 5. Illustrations This section illustrates the usage of SRv6 VLSIDs through two examples. 5.1. Local VLSIDs In this example VLSIDs are used only for local SIDs, such as adjacency SIDS. VLSIDs are used in complement with 128-bits SRv6 SIDs. The SR domain has the following caracteristics: o 10 000 SR endpoints nodes; o network diameter is 30; o SRv6 SIDs: * each SRv6 node is allocated a /64 to allocate its 128-bits SID from; * SRv6 block: 2001:DB8::/48 (i.e., 65535 /64, allowing for growth or multiple SR routing algorithms); * node N is allocated 2001:DB8:0:N/64; o SRv6 VLSIDs * local VLSIDs are chosen to be 8-bits in size. They are used for adjacency SIDs hence allow for 255 Adjacency SIDs per node; * SRv6 VLSID block is allocated 2001:DB8:0:FFFF::/120; Some metrics of this SR domain: o An SR policy encoding a strictly routed path using only adjacency SIDs would need 30 8-bits VLSIDs resulting in a total of 32 octets in the SRH. In contrast the use of 128-bits SRv6 SIDs would require 480 octets and the use of 20-bits SR-MPLS SID would require 120 octets; o The IGP advertises 10 000 SRv6 locators to be installed in the IPv6 FIB of all IGP nodes (as per regular SRv6 and SR-MPLS); Decraene Expires July 27, 2020 [Page 8] Internet-Draft SRv6 Variable Length SID January 2020 o The IPv6 address space is one /64 per SR node for a total of one /48 for the whole SR domain. 5.2. Global VLSIDs In this example VLSIDs are used for global SIDs and are used alone without 128-bits SRv6 SIDs. The SR domain has the following caracteristics: o 1 000 SR endpoints nodes; o network diameter is 10; o VLSID are chosen to be 32-bits long; o each SRv6 node is allocated a /108 to allocate its VLSID from. This allows for 4 096 (2^^12) locators 1 million (2^^20) local functions on each SR node; o the SR domain and the SRv6 VLSID block is allocated: 2001:DB8::/96; o node N is allocated 2001:DB8:0:0:0:0:N/108; Some metrics of this SR domain: o An SR policy encoding a strictly routed path using only Adjacency SIDs would need 10 32-bits VLSIDs resulting in a total of 40 octets in the SRH. In contrast the use of 128-bits SRv6 SIDs would require 160 octets; o An SR policy using strictly routed path using 4 (node) SIDs would need 4 32-bits VLSIDs resulting in a total of 16 octets in the SRH. In contrast the use of 128-bits SRv6 SIDs would require 64 octets and the use of 20-bits SR-MPLS SID would require 16 octets; o The IGP advertises 1 000 SRv6 locators to be installed in the IPv6 FIB of all IGP nodes (as per regular SRv6 and SR-MPLS); o The IPv6 address space is one /108 per SR node for a total of one /96 for the whole SR domain. 6. Signaling VLSID Control plane extensions are required to signal the size of the VLSID. This will be defined in a later version of this document. Decraene Expires July 27, 2020 [Page 9] Internet-Draft SRv6 Variable Length SID January 2020 Note for IGP the size of the VLSID could be advertised along the SID, or the Locator, or as a property of the SR node. 6.1. Signaling VLSID size in IS-IS SRv6 SIDs are advertised in IS-IS as per [I-D.ietf-lsr-isis-srv6-extensions]. This document defines an new sub-TLV called VLSID Size' that MAY be advertised in the locator entries of the SRv6 Locator TLV. The format is the following: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | Flags | VLSID Size | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 4: IS-IS VLSID Size sub-TLV Type: TBD1. Length: 2. Flags: 1 octet. No flags are currently defined. VLSID Size: Size of the VLSID in bits. This applies for all SIDs of this locator. The SRv6 VLSID block is not advertised but can be computed. The SRv6 VLSID block is the 'VLSID Size' first bits of the Locator. It's size is 128 - 'VLSID Size'. Note: alternatively the VLSID Size could be advertised as a Sub-Sub- TLV of SRv6 End SID or SRv6 End.X SID or SRv6 LAN End.X SID TLVs. The encoding choice is postponed to a future version of this document. 7. Combining VLSIDs on an SR Endpoint One SR Endpoint node may need more functions (SIDs) than allowed by the size the FUNC field in the VLSID. This may especially be the case when at the same time: o the VLSID is choosen to be small in order to optimize for the size of the SRH header. Indeed, for topological/routing instructions, Decraene Expires July 27, 2020 [Page 10] Internet-Draft SRv6 Variable Length SID January 2020 the number of SIDs may be high in some use cases, up to the network diameter. o one VLSID (e.g. the last one) is a service instruction and the number of service SID may be high, requiring a SID longer than a VLSID. When an SR Endpoint node needs more functions (SIDs) than allowed by the size the FUNC field in the VLSID, it MAY combine two (resp. N) VLSIDs of size L to effectively benefit from a SID of size 2*L (resp. N*L). This is a local choice of this SR Endpoint using two (resp. N) VLSIDs instead of one. Nothing specific is required in the SRH which only contains those 2 (resp. N) SIDs. When two VLSIDs are combined, the first VLSID may be seen as having the role of a "Context SID" identifying a context specific SID space/ table, while the second SID is looked up in this context specific table. This is similar to the Context-Specific Label space defined in the section 3 of RFC 5331 [RFC5331]. 8. IANA Considerations TBD. 9. Security Considerations This document does not change the security considerations of SRv6. Please refers to RFC 8402 [RFC8402], [I-D.ietf-6man-segment-routing-header] and [I-D.ietf-spring-srv6-network-programming] for existing security consideration. 10. Acknowledgements This document has been inspired by the work of the SPRING WG and in particular the work done in [I-D.filsfils-spring-net-pgm-extension-srv6-usid] and [I-D.li-spring-compressed-srv6-np]. The author would like to acknowledge the authors of these two documents. The author would like to thank Joel Halpern for his review and comments. Decraene Expires July 27, 2020 [Page 11] Internet-Draft SRv6 Variable Length SID January 2020 11. Changes / Author Notes [RFC Editor: Please remove this section before publication] 00: Initial version. 01: Removal of the VLSID Size TLV; addition of the IS-IS extension; addition of the SR header length check in the pseudo code. 12. References 12.1. Normative References [I-D.ietf-6man-segment-routing-header] Filsfils, C., Dukes, D., Previdi, S., Leddy, J., Matsushima, S., and D. Voyer, "IPv6 Segment Routing Header (SRH)", draft-ietf-6man-segment-routing-header-26 (work in progress), October 2019. [I-D.ietf-lsr-isis-srv6-extensions] Psenak, P., Filsfils, C., Bashandy, A., Decraene, B., and Z. Hu, "IS-IS Extension to Support Segment Routing over IPv6 Dataplane", draft-ietf-lsr-isis-srv6-extensions-03 (work in progress), October 2019. [I-D.ietf-spring-srv6-network-programming] Filsfils, C., Camarillo, P., Leddy, J., Voyer, D., Matsushima, S., and Z. Li, "SRv6 Network Programming", draft-ietf-spring-srv6-network-programming-08 (work in progress), January 2020. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8402] Filsfils, C., Ed., Previdi, S., Ed., Ginsberg, L., Decraene, B., Litkowski, S., and R. Shakir, "Segment Routing Architecture", RFC 8402, DOI 10.17487/RFC8402, July 2018, . Decraene Expires July 27, 2020 [Page 12] Internet-Draft SRv6 Variable Length SID January 2020 12.2. Informative References [I-D.filsfils-spring-net-pgm-extension-srv6-usid] Filsfils, C., Camarillo, P., Cai, D., Jiang, Z., Voyer, D., Shawky, A., Leymann, N., Steinberg, D., Zandi, S., Dawra, G., Meilik, I., Uttaro, J., Jalil, L., So, N., Fiumano, M., and M. Khaddam, "Network Programming extension: SRv6 uSID instruction", draft-filsfils-spring- net-pgm-extension-srv6-usid-02 (work in progress), August 2019. [I-D.li-spring-compressed-srv6-np] Li, Z., Li, C., Peng, S., Wang, Z., and B. Liu, "Compressed SRv6 Network Programming", draft-li-spring- compressed-srv6-np-00 (work in progress), July 2019. [RFC5331] Aggarwal, R., Rekhter, Y., and E. Rosen, "MPLS Upstream Label Assignment and Context-Specific Label Space", RFC 5331, DOI 10.17487/RFC5331, August 2008, . [RFC8660] Bashandy, A., Ed., Filsfils, C., Ed., Previdi, S., Decraene, B., Litkowski, S., and R. Shakir, "Segment Routing with the MPLS Data Plane", RFC 8660, DOI 10.17487/RFC8660, December 2019, . Author's Address Bruno Decraene Orange Email: bruno.decraene@orange.com Decraene Expires July 27, 2020 [Page 13]