Network Working Group F. Templin, Ed. Internet-Draft Boeing Phantom Works Intended status: Informational June 1, 2008 Expires: December 3, 2008 The Subnetwork Encapsulation and Adaptation Layer (SEAL) draft-templin-seal-16.txt Status of this Memo By submitting this Internet-Draft, each author represents that any applicable patent or other IPR claims of which he or she is aware have been or will be disclosed, and any of which he or she becomes aware will be disclosed, in accordance with Section 6 of BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet- Drafts. 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." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on December 3, 2008. Abstract Subnetworks are connected network regions bounded by border nodes that forward unicast and multicast packets over a virtual topology, often manifested by encapsulation and/or tunneling. This virtual topology may span multiple IP- and/or sub-IP layer forwarding hops, and can introduce failure modes due to packet duplication and/or links with diverse Maximum Transmission Units (MTUs). This document specifies a Subnetwork Encapsulation and Adaptation Layer (SEAL) that accommodates such virtual topologies over diverse underlying link technologies. Templin Expires December 3, 2008 [Page 1] Internet-Draft SEAL June 2008 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Terminology and Requirements . . . . . . . . . . . . . . . . . 4 3. Applicability Statement . . . . . . . . . . . . . . . . . . . 5 4. SEAL Protocol Specification - Tunnel Mode . . . . . . . . . . 6 4.1. Model of Operation . . . . . . . . . . . . . . . . . . . . 6 4.2. ITE Specification . . . . . . . . . . . . . . . . . . . . 7 4.2.1. Tunnel Interface MTU . . . . . . . . . . . . . . . . . 7 4.2.2. Accounting for Headers . . . . . . . . . . . . . . . . 9 4.2.3. Segmentation and Encapsulation . . . . . . . . . . . . 9 4.2.4. Sending Probes . . . . . . . . . . . . . . . . . . . . 12 4.2.5. Packet Identification . . . . . . . . . . . . . . . . 12 4.2.6. Sending SEAL Protocol Packets . . . . . . . . . . . . 13 4.2.7. Processing Raw ICMPv4 Messages . . . . . . . . . . . . 13 4.2.8. Processing SEAL-Encapsulated ICMPv4 Messages . . . . . 13 4.3. ETE Specification . . . . . . . . . . . . . . . . . . . . 14 4.3.1. Reassembly Buffer Requirements . . . . . . . . . . . . 14 4.3.2. IPv4-Layer Reassembly . . . . . . . . . . . . . . . . 14 4.3.3. Generating SEAL-Encapsulated ICMPv4 Fragmentation Needed Messages . . . . . . . . . . . . . . . . . . . 15 4.3.4. SEAL-Layer Reassembly . . . . . . . . . . . . . . . . 16 4.3.5. Decapsulation and Generating Other ICMPv4 Errors . . . 17 5. SEAL Protocol Specification - Transport Mode . . . . . . . . . 17 6. Link Requirements . . . . . . . . . . . . . . . . . . . . . . 18 7. End System Requirements . . . . . . . . . . . . . . . . . . . 18 8. Router Requirements . . . . . . . . . . . . . . . . . . . . . 18 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 10. Security Considerations . . . . . . . . . . . . . . . . . . . 18 11. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 19 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 19 12.1. Normative References . . . . . . . . . . . . . . . . . . . 19 12.2. Informative References . . . . . . . . . . . . . . . . . . 20 Appendix A. Historic Evolution of PMTUD (written 10/30/2002) . . 21 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 22 Intellectual Property and Copyright Statements . . . . . . . . . . 24 Templin Expires December 3, 2008 [Page 2] Internet-Draft SEAL June 2008 1. Introduction As Internet technology and communication has grown and matured, many techniques have developed that use virtual topologies (frequently tunnels of one form or another) over an actual IP network. Those virtual topologies have elements which appear as one hop in the virtual topology, but are actually multiple IP or sub-IP layer hops. These multiple hops often have quite diverse properties which are often not even visible to the end-points of the virtual hop. This introduces many failure modes that are not dealt with well in current approaches. The use of IP encapsulation has long been considered as an alternative for creating such virtual topologies. However, the insertion of an outer IP header reduces the effective path MTU as- seen by the IP layer. When IPv4 is used, this reduced MTU can be accommodated through the use of IPv4 fragmentation, but unmitigated in-the-network fragmentation has been shown to be harmful through operational experience and studies conducted over the course of many years [FRAG][FOLK][RFC4963]. Additionally, classical path MTU discovery [RFC1191] has known operational issues that are exacerbated by in-the-network tunnels [RFC2923][RFC4459]. For the purpose of this document, subnetworks are defined as virtual topologies that span connected network regions bounded by encapsulating border nodes. Examples include the global Internet interdomain routing core, Mobile Ad hoc Networks (MANETs) and enterprise networks. Subnetwork border nodes support the Internet protocols [RFC0791][RFC2460] and forward unicast and multicast IP packets over the virtual topology across multiple IP- and/or sub-IP layer forwarding hops which may introduce packet duplication and/or traverse links with diverse Maximum Transmission Units (MTUs). This document proposes a Subnetwork Encapsulation and Adaptation Layer (SEAL) for tunnel-mode operation of IP over subnetworks that connect the Ingress- and Egress Tunnel Endpoints (ITEs/ETEs) of border nodes. Operation in transport mode is also supported when subnetwork border node upper-layer protocols negotiate the use of SEAL during connection establishment. SEAL accommodates links with diverse MTUs and supports efficient duplicate packet detection by introducing a minimal mid-layer encapsulation. The SEAL encapsulation introduces an extended Identification field for packet identification and a mid-layer segmentation and reassembly capability that allows simplified cutting and pasting of packets without invoking in-the-network IPv4 fragmentation. The SEAL encapsulation layer and protocol is specified in the following sections. Templin Expires December 3, 2008 [Page 3] Internet-Draft SEAL June 2008 2. Terminology and Requirements The term "subnetwork" in this document refers to a virtual topology that is configured over a connected network region bounded by border nodes. The terms "inner", "mid-layer" and "outer" respectively refer to the innermost IP {layer, protocol, header, packet, etc.} before any encapsulation, the mid-layer IP {protocol, header, packet, etc.) after any mid-layer '*' encapsulation and the outermost IP {layer, protocol, header, packet etc.} after SEAL/*/IPv4 encapsulation. The notation IPvX/*/SEAL/*IPvY refers to an inner IPvX packet encapsulated in any mid-layer '*' encapsulations followed by the SEAL header followed by any outer '*' encapsulations followed by an outer IPvY header. The notation "IP" means either IP protocol version (IPv4 or IPv6). The following abbreviations correspond to terms used within this document and elsewhere in common Internetworking nomenclature: Subnetwork - a connected network region bounded by border nodes SEAL - Subnetwork Encapsulation and Adaptation Layer ITE - Ingress Tunnel Endpoint ETE - Egress Tunnel Endpoint MTU - Maximum Transmission Unit MHLEN - the length of any mid-layer '*' headers and trailers OHLEN - the length of the outer encapsulating SEAL/*/IPv4 headers S_MTU - the per-ETE SEAL Maximum Transmission Unit S_MRU- the per-ETE SEAL Maximum Reassembly Unit S_MSS - the SEAL Maximum Segment Size, derived from S_MTU PTB - an ICMPv6 "Packet Too Big" or an ICMPv4 "Fragmentation Templin Expires December 3, 2008 [Page 4] Internet-Draft SEAL June 2008 Needed" message DF - the IPv4 header "Don't Fragment" flag SEAL-ID - a 32-bit Identification value; randomly initialized and monotonically incremented for each SEAL protocol packet SEAL_PROTO - an IPv4 protocol number used for SEAL SEAL_PORT - a TCP/UDP service port number used for SEAL SEAL_OPTION - a TCP option number used for (transport-mode) SEAL The keywords MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, MAY, and OPTIONAL, when they appear in this document, are to be interpreted as described in [RFC2119]. 3. Applicability Statement SEAL was motivated by the specific use case of subnetwork abstraction for Mobile Ad-hoc Networks (MANETs), however the domain of applicability also extends to subnetwork abstractions of enterprise networks, the interdomain routing core, etc. The domain of application therefore also includes the map-and-encaps architecture proposals in the IRTF Routing Research Group (RRG) (see: http:// www3.tools.ietf.org/group/irtf/trac/wiki/RoutingResearchGroup). SEAL introduces a minimal new sublayer for IPvX in IPvY encapsulation (e.g., as IPv6/SEAL/IPv4), and appears as a subnetwork encapsulation as seen by the inner IP layer. SEAL can also be used as a sublayer for encapsulating inner IP packets within outer UDP/IPv4 header (e.g., as IP/SEAL/UDP/IPv4) such as for the Teredo domain of applicability [RFC4380]. When it appears immediately after the outer IPv4 header, the SEAL header is processed exactly as for IPv6 extension headers. SEAL can also be used in "transport-mode", e.g., when the inner layer includes upper layer protocol data rather than an encapsulated IP packet. For instance, TCP peers can negotiate the use of SEAL for the carriage of protocol data encapsulated as TCP/SEAL/IPv4. In this sense, the "subnetwork" becomes the entire end-to-end path between the TCP peers and may potentially span the entire Internet. The current document version is specific to the use of IPv4 as the Templin Expires December 3, 2008 [Page 5] Internet-Draft SEAL June 2008 outer encapsulation layer, however the same principles apply when IPv6 is used as the outer layer. 4. SEAL Protocol Specification - Tunnel Mode 4.1. Model of Operation SEAL supports the encapsulation of inner IP packets in mid-layer and outer encapsulating headers/trailers. For example, an inner IP packet would appear as IP/*/SEAL/*/IPv4 after mid-layer and outer encapsulations, where '*' denotes zero or more additional encapsulation sublayers. Ingres Tunnel Endpoints (ITEs) add mid- layer '*' and outer SEAL/*/IPv4 encapsulations to the inner packets they inject into a subnetwork, where the outermost IPv4 header contains the source and destination addresses of the subnetwork entry/exit points (i.e., the ITE/ETE), respectively. SEAL defines a new IP protocol type and a new encapsulation sublayer for both unicast and multicast. The ITE encapsulates an inner IP packet in mid-layer and outer encapsulations as shown in Figure 1: +-------------------------+ | | ~ Outer */IPv4 headers ~ | | I +-------------------------+ n | SEAL Header | n +-------------------------+ +-------------------------+ e ~ Any mid-layer * headers ~ ~ Any mid-layer * headers ~ r +-------------------------+ +-------------------------+ | | | | I --> ~ Inner IP ~ --> ~ Inner IP ~ P --> ~ Packet ~ --> ~ Packet ~ | | | | P +-------------------------+ +-------------------------+ a ~ Any mid-layer trailers ~ ~ Any mid-layer trailers ~ c +-------------------------+ +-------------------------+ k ~ Any outer trailers ~ e +-------------------------+ t (After mid-layer encaps.) (After SEAL/*/IPv4 encaps.) Figure 1: SEAL Encapsulation where the SEAL header is inserted as follows: o For simple IP/IPv4 encapsulations (e.g., [RFC2003][RFC2004][RFC4213]), the SEAL header is inserted between Templin Expires December 3, 2008 [Page 6] Internet-Draft SEAL June 2008 the inner IP and outer IPv4 headers as: IP/SEAL/IPv4. o For tunnel-mode IPsec encapsulations over IPv4, [RFC4301], the SEAL header is inserted between the {AH,ESP} header and outer IPv4 headers as: IP/*/{AH,ESP}/SEAL/IPv4. o For IP encapsulations over transports such as UDP, the SEAL header is inserted immediately after the outer transport layer header, e.g., as IP/*/SEAL/UDP/IPv4. SEAL-encapsulated packets include a 32-bit SEAL-ID formed from the concatenation of the 16-bit ID Extension field in the SEAL header as the most-significant bits, and with the 16-bit ID value in the outer IPv4 header as the least-significant bits. (For tunnels that traverse IPv4 Network Address Translators, the SEAL-ID is instead maintained only within the 16-bit ID Extension field in the SEAL header.) Routers within the subnetwork use the SEAL-ID for duplicate packet detection, and ITEs/ETEs use the SEAL-ID for SEAL segmentation and reassembly. SEAL enables a multi-level segmentation and reassembly capability. First, the ITE can use IPv4 fragmentation to fragment inner IPv4 packets with DF=0 before SEAL encapsulation to avoid lower-level segmentation and reassembly. Secondly, the SEAL layer itself provides a simple mid-layer cutting-and-pasting of mid-layer packets to avoid IPv4 fragmentation on the outer packet. Finally, ordinary IPv4 fragmentation is permitted on the outer packet after SEAL encapsulation and used to detect and dampen any in-the-network fragmentation as quickly as possible. The following sections specifiy the SEAL-related operations of the ITE and ETE, respectively: 4.2. ITE Specification 4.2.1. Tunnel Interface MTU The ITE configures a tunnel virtual interface over one or more underlying links that connect the border node to the subnetwork. The tunnel interface must present a fixed MTU to the inner IP layer (i.e., Layer 3) as the size for admission of inner IP packets into the tunnel. Since the tunnel interface may support a potentially large set of ETEs, however, care must be taken in setting a greatest- common-denominator MTU for all ETEs while still upholding end system expectations. Due to the ubiquitous deployment of standard Ethernet and similar networking gear, the nominal Internet cell size has become 1500 Templin Expires December 3, 2008 [Page 7] Internet-Draft SEAL June 2008 bytes; this is the de facto size that end systems have come to expect will either be delivered by the network without loss due to an MTU restriction on the path or a suitable PTB message returned. However, the network may not always deliver the necessary PTBs, leading to MTU-related black holes [RFC2923]. The ITE therefore requires a means for conveying 1500 byte (or smaller) packets to the ETE without loss due to MTU restrictions and without dependence on PTB messages from within the subnetwork. In common deployments, there may be many forwarding hops between the original source and the ITE. Within those hops, there may be additional encapsulations (IPSec, L2TP, etc.) such that a 1500 byte packet sent by the original source might grow to a larger size by the time it reaches the ITE for encapsulation as an inner IP packet. Similarly, additional encapsulations on the path from the ITE to the ETE could cause the encapsulated packet to become larger still and trigger in-the-network fragmentation. In order to preserve the end system expectations, the ITE therefore requires a means for conveying these larger packets to the ETE even though there may be links within the subnetwork that configure a smaller MTU. The ITE should therefore set a tunnel virtual interface MTU of 1500 bytes plus extra room to accommodate any additional encapsulations that may occur on the path from the original source (i.e., even if the underlying links do not support an MTU of this size). The ITE can set larger MTU values still (up to the maximum MTU size of the underlying links), but should select a value that is not so large as to cause excessive PTBs coming from within the tunnel interface (see: Sections 4.2.2 and 4.2.6). The ITE can also set smaller MTU values, however care must be taken not to set so small a value that original sources would experience an MTU underflow. In particular, IPv6 sources must see a minimum path MTU of 1280 bytes, and IPv4 sources should see a minimum path MTU of 576 bytes. The inner IP layer consults the tunnel interface MTU when admitting a packet into the interface. For inner IPv4 packets larger than the tunnel interface MTU and with the IPv4 Don't Fragment (DF) bit set to 0, the inner IP layer uses IPv4 fragmentation to break the packet into IPv4 fragments no larger than the tunnel interface MTU then admits each fragment into the tunnel as an independent packet. For all other inner packets (IPv4 or IPv6), the ITE admits the packet if it is no larger than the tunnel interface MTU; otherwise, it drops the packet and sends an PTB message with an MTU value of the tunnel interface MTU to the source. Templin Expires December 3, 2008 [Page 8] Internet-Draft SEAL June 2008 4.2.2. Accounting for Headers As for any upper-layer protocol, ITEs use the MTU of the underlying IPv4 interface, the length of any mid-layer '*' headers and trailers, and the length of the outer SEAL/*/IPv4 headers to determine the maximum-sized upper layer payload. For example, when the underlying IPv4 interface advertises an MTU of 1500 bytes and the ITE inserts a minimum-length (i.e., 20 byte) IPv4 header, the ITE sees an upper layer payload of 1480 bytes. When the ITE inserts IPv4 header options, the size is further reduced by as many as 40 additional bytes (the maximum length for IPv4 options) such that as few as 1440 bytes may be available for the upper layer payload. When the ITE inserts outer '*' encapsulations before the SEAL header and mid-layer '* encapsulations after the SEAL header, the available MTU for the upper layer payload is reduced further still. The ITE must additionally account for the length of the SEAL header itself as an extra encapsulation that further reduces the size available for the upper layer payload. The length of the SEAL header is not incorporated in the IPv4 header length, therefore the network does not observe the SEAL header as an IPv4 option. In this way, the SEAL header is inserted after the IPv4 options but before the upper layer payload in exactly the same manner as for IPv6 extension headers. 4.2.3. Segmentation and Encapsulation The ITE maintains a SEAL Maximum Transmission Unit (S_MTU) value for each ETE as soft state within the tunnel interface (e.g., in the IPv4 destination cache). The ITE initializes S_MTU to the MTU of the underlying IPv4 interface, and decreases or increases S_MTU based on any ICMPv4 Fragmentation Needed messages received (see: Section 4.2.6). The ITE additionally maintains a SEAL Maximum Reassembly Unit (S_MRU) value for each ETE. The ITE initializes S_MRU to a value no larger than 2KB (2048 bytes), and uses this value to determine when to set the "Dont Reassemble" bit (see below). The ITE performs segmentation and encapsulation on inner packets that have been admitted into the tunnel interface. For each inner packet, the ITE maintains the length of any mid-layer '*' encapsulation headers and trailers (e.g., for '*' = AH, ESP, NULL, etc.) in a per- packet variable 'MHLEN' and maintains the length of the outer SEAL/*/ IPv4 encapsulation headers in a per-packet variable 'OHLEN'. The ITE also sets a per-packet variable 'S_MSS" to (S_MTU-OHLEN). Next, for inner IPv4 packets with the DF bit set to 0, if the length of the inner packet plus MHLEN is larger than S_MRU the ITE uses IPv4 fragmentation to break the packet into IPv4 fragments no larger than S_MRU - MHLEN. For unfragmentable inner packets (e.g., IPv6 packets, Templin Expires December 3, 2008 [Page 9] Internet-Draft SEAL June 2008 IPv4 packets with DF=1, etc.), if the length of the inner packet plus MHLEN is larger than MAX(S_MSS, S_MRU) the ITE drops the packet and sends an ICMP PTB message with an MTU value of (MAX(S_MSS, S_MRU) - MHLEN) back to the original source. The ITE then encapsulates each inner packet/fragment in the MHLEN bytes of mid-layer '*' headers and trailers. For each such resulting mid-layer packet, if the packet is no larger than S_MRU but is larger than S_MSS, the ITE breaks it into N segments (N <= 16) that are no larger than S_MSS bytes each. Each segment except the final one MUST be of equal length, while the final segment MUST be no larger than the initial segment. The first byte of each segment MUST begin immediately after the final byte of the previous segment, i.e., the segments MUST NOT overlap. Note that this SEAL segmentation is used only for mid-layer packets that are no larger than S_MRU; packets that are larger than S_MRU (and also no larger than S_MSS) are instead encapsulated as a single segment. Note also that this SEAL segmentation ignores the fact that the mid-layer packet may be unfragmentable. This segmentation process is a mid-layer (not an IP layer) operation employed by the ITE to adapt the mid-layer packet to the subnetwork path characteristics, and the ETE will restore the packet to its original form during decapsulation. Therefore, the fact that the packet may have been segmented within the subnetwork is not observable after decapsulation. The ITE next encapsulates each segment in a SEAL header formatted 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ID Extension |P|R|D|M|Segment| Next Header | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 2: SEAL Header Format where the header fields are defined as follows: ID Extension (16) a 16-bit extension of the ID field in the outer IPv4 header; encodes the most-significant 16 bits of a 32 bit SEAL-ID value. P (1) the "Probe" bit. Set to 1 if the ITE wishes to receive an explicit acknowledgement from the ETE. Templin Expires December 3, 2008 [Page 10] Internet-Draft SEAL June 2008 R (1) the "Report Fragmentation" bit. Set to 1 if the ITE wishes to receive a report from the ETE if any IPv4 fragmentation occurs. D (1) the "Dont Reassemble" bit. Set to 1 if the reassembled SEAL protocol packet is to be discarded by the ETE if any IPv4 reassemly is required. M (1) the "More Segments" bit. Set to 1 if this SEAL protocol packet contains a non-final segment of a multi-segment mid-layer packet. Segment (4) a 4-bit Segment number. Encodes a segment number between 0 - 15. Next Header (8) an 8-bit field that encodes an IP protocol number the same as for the IPv4 protocol and IPv6 next header fields. For single-segment mid-layer packets, the ITE encapsulates the segment in a SEAL header with (M=0; Segment=0). For N-segment mid- layer packets (N <= 16), the ITE encapsulates each segment in a SEAL header with (M=1; Segment=0) for the first segment, (M=1; Segment=1) for the second segment, etc., with the final segment setting (M=0; Segment=N-1). For each encapsulated segment, the ITE sets D=0 in the SEAL header if the ETE is to accept the packet even if it arrives as multiple IPv4 fragments; for example, the ITE may set D=0 in the SEAL header of each segment for all mid-layer packets no larger than S_MRU. The ITE instead sets D=1 in the SEAL header if the ETE is to discard the packet if it arrives as multiple IPv4 fragments; in particular, the ITE should set D=1 in the SEAL header of each segment for all mid-layer packets larger than S_MRU. The ITE next sets the P and R bits in the SEAL header of each segment depending on whether the packet is to be used as an explicit/implicit probe as specified in Section 4.2.4, then writes the IP protocol number corresponding to the mid-layer packet in the SEAL 'Next Header' field. Next, the ITE encapsulates the segment in the requisite */IPv4 outer headers according to the specific encapsulation format (e.g., [RFC2003], [RFC4213], [RFC4380], etc.), except that it writes 'SEAL_PROTO' in the protocol field of the outer IPv4 header (when simple IPv4 encapsualtion is used) or writes 'SEAL_PORT' in the outer destination service port field (e.g., when UDP/IPv4 encapsulation is used). The ITE finally sets packet identification values as specified in Section 4.2.5 and sends the packets as specified in Section 4.2.6. Templin Expires December 3, 2008 [Page 11] Internet-Draft SEAL June 2008 4.2.4. Sending Probes When S_MSS is larger than 128, the ITE sends ordinary data packets as implicit probes to detect in-the-network IPv4 fragmentation and to determine new values for S_MTU. The ITE sets R=1 in the SEAL header and DF=0 in the outer IPv4 header of each segment of a SEAL-segmented packet to be used as an implicit probe, and will receive ICMPv4 Fragmentation Needed messages from the ETE if any IPv4 fragmentation occurs. When S_MSS is no larger than 128, the ITE instead sets R=0 in the SEAL header to avoid generating fragmentation reports for unavoidable in-the-network fragmentation. The ITE may additionally send explicit probes periodically to manage a window of SEAL-IDs of outstanding probes as a means to validate any ICMPv4 messages it receives. The ITE sets P=1 in the SEAL header of each segment of a SEAL-segmented packet to be used as an explicit probe, where the probe can be either an ordinary data packet or a NULL packet created by setting the 'Next Header' field in the SEAL header to a value of "No Next Header" (see: [RFC2460], Section 4.7. The ITE should periodically probe to detect increases in S_MTU. The ITE can 1) reset S_MTU to the MTU of the underlying IPv4 interface, and/or 2) send probes that are larger than the current S_MTU using either a NULL packet or an ordinary data packet that is padded at the end by setting the outer IPv4 length field to a larger value than the packet's true length. 4.2.5. Packet Identification For the purpose of packet identification, the ITE maintains a 32-bit SEAL-ID value as per-ETE soft state, e.g. in the IPv4 destination cache. The ITE randomly-initializes SEAL-ID when the soft state is created and monotonically increments it (modulo 2^32) for each successive SEAL protocol packet it sends to the ETE. For each packet, the ITE writes the least-significant 16 bits of the SEAL-ID value in the ID field in the outer IPv4 header, and writes the most- significant 16 bits in the ID Extension field in the SEAL header. For packets that may traverse IPv4 Network Address Translators (NATs), the ITE instead maintains SEAL-ID as a 16-bit value that it randomly-initializes when the soft state is created and monotonically increments (modulo 2^16) for each successive SEAL protocol packet. For each packet, the ITE writes SEAL-ID in the ID extension field of the SEAL header and writes a random 16-bit value in the ID field in the outer IPv4 header. This requires that both the ITE and ETE participate in this alternate scheme. Templin Expires December 3, 2008 [Page 12] Internet-Draft SEAL June 2008 4.2.6. Sending SEAL Protocol Packets Following SEAL segmentation and encapsulation, the ITE sets DF=0 in the outer IPv4 header of every outer packet it sends. For "expendable" packets (e.g., for NULL packets used as probes - see: Section 4.2.6), the ITE may optionally set DF=1. The ITE then sends each outer packet that encapsulates a segment of the same mid-layer packet into the tunnel in canonical order, i.e., Segment 0 first, followed by Segment 1, etc. and finally Segment N-1. 4.2.7. Processing Raw ICMPv4 Messages The ITE may receive "raw" ICMPv4 error messages from routers within the subnetwork that comprise an outer IPv4 header followed by an ICMPv4 header followed by a portion of the SEAL packet that generated the error (also known as the "packet-in-error"). For such messages, the ITE can use the 32-bit SEAL ID encoded in the packet-in-error as a nonce to confirm that the ICMP message came from an on-path router within the subnetwork. The ITE MAY process raw ICMPv4 messages as soft errors indicating that the path to the ETE may be failing, but it discards any raw ICMPv4 Fragmentation Needed messages for which the IPv4 header of the packet-in-error has the DF=0. 4.2.8. Processing SEAL-Encapsulated ICMPv4 Messages In addition to any raw ICMPv4 messages, the ITE may receive SEAL- encapsulated ICMPv4 messages from subnetwork border nodes that comprise outer ICMPv4/*/SEAL/*/IPv4 headers followed by a portion of the SEAL-encapsulated packet-in-error. The ITE can use the 32-bit SEAL ID encoded in the packet-in-error as well as information in the outer IPv4 and SEAL headers as nonces to confirm that the ICMP message came from a legitimate ETE. The ITE then verifies that the SEAL-ID encoded in the packet-in-error is within the current window of transmitted SEAL-IDs for this ETE. If the SEAL-ID is outside of the window, the ITE discards the message; otherwise, it advances the window and processes the message. The ITE processes SEAL-encapsulated ICMPv4 messages other than ICMPv4 Fragmentation Needed exactly as specified in [RFC0792]. For all SEAL-encapsulated ICMPv4 Fragmentation Needed messages, if the MTU value is larger than S_MTU the ITE sets S_MTU to this new value. For SEAL-encapsulated packets-in-error that the first-fragment of an IPv4 fragmented packet, the ITE instead sets S_MTU to this new value if the value is no smaller than 576 and sets S_MTU to MAX(S_MTU/2, 128) if the value is smaller than 576. Note that in the above 576 is assumed as the nominal minimum MTU for Templin Expires December 3, 2008 [Page 13] Internet-Draft SEAL June 2008 common IPv4 links, and accounts for normal-case IPv4 first fragments. When an ETE reports an MTU smaller than 576, the ITE performs a "limited halving" of S_MTU that accounts for IPv4 links with unusually small MTUs or cases in which the ETE otherwise receives an undersized IPv4 first-fragment. This limited halving may require multiple iterations of sending probes and receiving ICMPv4 Fragmentation Needed messages, but will soon converge to a stable S_MTU value. After deterimining a new value for S_MTU, if the IPv4 header of the packet-in-error has M=1 and its SEAL header has D=1 the ITE MAY transcribe the message into an ICMP PTB message to send back to the original source. To do so, the ITE discards the SEAL/*/IPv4 headers plus any mid-layer '*' headers/trailers then encapsulates the remaining inner IP packet portion in a PTB message with the MTU field set to MAX((S_MSS, S_MRU) - MHLEN). Note that this may not be possible when the inner IP packet portion was encrypted (e.g. via IPsec/ESP) and is otherwise not entirely necessary, since the ITE will discard subsequent large packets and send back an ICMP PTB *before* encapsulating them and sending to the ETE. Transcribing ICMPv4 Fragmentation Needed messages into ICMP PTBs is therefore offered only as an optional optimization. 4.3. ETE Specification 4.3.1. Reassembly Buffer Requirements ETEs MUST be capable of using IPv4-layer reassembly to reassemble SEAL protocol outer IPv4 packets of at least 2KB plus the size of the maximum-length outer SEAL/*/IPv4 plus mid-layer '*' headers and trailers. For example, for simple IP/SEAL/IPv4 encapsulation, the ETE must be capable of reassembling an outer IPv4 packet of 2KB + 4 + 60 bytes The ETE MUST also be capable of using SEAL-layer reassembly to reassemble mid-layer packets of 2KB. 4.3.2. IPv4-Layer Reassembly The ETE performs IPv4 reassembly as-normal, and should maintain a conservative high- and low-water mark for the number of outstanding reassemblies pending for each ITE. When the size of the reassembly buffer exceeds this high-water mark, the ETE actively discards incomplete reassemblies (e.g., using an Active Queue Management (AQM) strategy) until the size falls below the low-water mark. The ETE should also use a reduced IPv4 maximum segment lifetime value (e.g., 15 seconds), i.e., the time after which it will discard an incomplete IPv4 reassembly for a SEAL protocol packet. Templin Expires December 3, 2008 [Page 14] Internet-Draft SEAL June 2008 After reassembly, the ETE either accepts or discards the reassembled packet based on the current status of the IPv4 reassembly cache (congested vs uncongested). The SEAL-ID included in the IPv4 first- fragment provides an additional level of reassembly assurance, since it can record a distinct arrival timestamp useful for associating the first-fragment with its corresponding non-initial fragments. The choice of accepting/discarding a reassembly may also depend on the strength of the upper-layer integrity check if known (e.g., IPSec/ESP provides a strong upper-layer integrity check) and/or the corruption tolerance of the data (e.g., multicast streaming audio/video may be more corruption-tolerant than file transfer, etc.). In the limiting case, the ETE may choose to discard all IPv4 reassemblies and process only the IPv4 first-fragment for SEAL-encapsulated error generation purposes (see the following sections). 4.3.3. Generating SEAL-Encapsulated ICMPv4 Fragmentation Needed Messages During IPv4-layer reassembly, the ETE determines whether the packet belongs to the SEAL protocol by checking for SEAL_PROTO in the outer IPv4 header (i.e., for simple IPv4 encapsulation) or for SEAL_PORT in the outer */IPv4 header (e.g., for '*'=UDP). When the ETE processes the IPv4 first-fragment (i.e, one with DF=1 and Offset =0 in the IPv4 header) of a SEAL protocol IPv4 packet with (R=1; Segment=0) in the SEAL header, it sends a SEAL-encapsulated ICMPv4 Fragmentation Needed message back to the ITE with the MTU value set to the length of the IPv4 first-fragment. When the ETE processes a SEAL protocol IPv4 packet with (P=1; Segment=0) for which no IPv4 reassembly was required, it sends a SEAL-encapsulated ICMPv4 Fragmentation Needed message back to the ITE with the MTU value set to the length of the whole IPv4 packet. Note that explicit probes with (P=1; Segment=0) are only acknowledged by the ETE if they arrive as an unfragmented IPv4 packet. The ITE should therefore set both R=1 and P=1 if it requires an acknowledgement whether or not any IPv4 fragmentation occurred. The ETE prepares the ICMPv4 Fragmentation Needed message by encapsulating as much of the first fragment (or the whole IPv4 packet) as possible in outer */SEAL/*/IPv4 headers without the length of the message exceeding 576 bytes as shown in Figure 3: Templin Expires December 3, 2008 [Page 15] Internet-Draft SEAL June 2008 +-------------------------+ - | | \ ~ Outer */SEAL/*/IPv4 hdrs~ | | | | +-------------------------+ | | ICMPv4 Header | | |(Dest Unreach; Frag Need)| | +-------------------------+ | | | > Up to 576 bytes ~ IP/*/SEAL/*/IPv4 ~ | ~ hdrs of IPv4 packet ~ | | | | +-------------------------+ | | | | ~ Data of IPv4 packet ~ | | | / +-------------------------+ - Figure 3: SEAL-encapsulated ICMPv4 Fragmentation Needed Message The ETE next sets D=0, P=0, R=0, M=0 and Segment=0 in the outer SEAL header, sets the SEAL-ID the same as for any SEAL packet, then sets the SEAL Next Header field and the fields of the outer */IPv4 headers the same as for ordinay SEAL encapsulation. The ETE then sets outer IPv4 destination address to the source address of the first-fragment and sets the outer IPv4 source address to the destination address of the first-fragment. If the destination address in the first-fragment was multicast, the ETE instead sets the outer IPv4 source address to an address assigned to the underlying IPv4 interface. The ETE finally sends the SEAL-encapsulated ICMPv4 message to the ITE the same as specified in Section 4.2.5, except that the ETE may send the messages subject to rate limiting since it is not entirely critical that all fragmentation be reported to the ITE. 4.3.4. SEAL-Layer Reassembly Following IPv4 reassembly of a SEAL protocol packet, the ETE adds the SEAL packet to a SEAL-Layer pending-reassembly queue (if necessary). If the packet arrived as multiple IPv4 fragments and with D=1 in the SEAL header, the ETE marks the packet and/or pending reassembly queue as "discard following reassembly". The ETE also marks the packet as "discard following reassembly" if the (Next Header, P, R, D) fields of the packet's SEAL header differ from their respective values in other SEAL segments already in the queue, i.e., the (Next Header, P, R, D)-tuple serves as a reassembly nonce. The ETE performs SEAL-layer reassembly for multi-segment mid-layer packets through simple in-order concatenation of the encapsulated Templin Expires December 3, 2008 [Page 16] Internet-Draft SEAL June 2008 segments from N consecutive SEAL protocol packets from the same mid- layer packet. SEAL-layer reassembly requires the ETE to maintain a cache of recently received SEAL packet segments for a hold time that would allow for reasonable inter-segment delays. The ETE uses a SEAL maximum segment lifetime of 15 seconds for this purpose, i.e., the time after which it will discard an incomplete reassembly. However, the ETE should also actively discard any pending reassemblies that clearly have no opportunity for completion, e.g., when a considerable number of new SEAL packets have been received before a packet that completes a pending reassembly has arrived. The ETE reassembles the mid-layer packet segments in SEAL protocol packets that contain Segment numbers 0 through N-1, with M=1/0 in non-final/final segments, respectively, and with consecutive SEAL-ID values. That is, for an N-segment mid-layer packet, reassembly entails the concatenation of the SEAL-encapsulated segments with (Segment 0, SEAL-ID i), followed by (Segment 1, SEAL-ID ((i + 1) mod 2^32)), etc. up to (Segment N-1, SEAL-ID ((i + N-1) mod 2^32)). (For tunnels that may traverse IPv4 NATs, the ETE instead uses only a 16- bit SEAL-ID value, and uses mod 2^16 arithmetic to associate the segments of the same packet.) 4.3.5. Decapsulation and Generating Other ICMPv4 Errors Following SEAL-layer reassembly, if the packet had the value "No Next Header" in the SEAL header's Next Header field, or if the packet was marked "discard following reassembly" and IPv4 fragmentat was experienced, the ETE silently discards the reassembled mid-layer packet. Otherwise, the ETE decapsulates the inner packet and processes it as normal. If the ETE determines that the decapsulated inner packet cannot be processed further, it drops the packet and prepares an appropriate SEAL-encapsulated ICMPv4 error message and sends it back to the ITE exactly as for ICMPv4 Fragmentation Needed messages (See: Section 4.3.3). 5. SEAL Protocol Specification - Transport Mode Section 4 specifies the operation of SEAL in "tunnel mode", i.e., when there is both an inner and outer IP layer and with a SEAL encapsulation layer between. However, the SEAL protocol can also be used in a "transport mode" of operation in which the inner layer corresponds to an upper layer protocol (e.g., UDP, TCP, etc.) instead of an additional IP layer. For example, two TCP endpoints connected to the same subnetwork region can negotiate the use of transport-mode SEAL for a connection by inserting a 'SEAL_OPTION' TCP option during the connection Templin Expires December 3, 2008 [Page 17] Internet-Draft SEAL June 2008 establishment phase. If both TCPs agree on the use of SEAL, their protocol messages will be carriaged as TCP/SEAL/IPv4 and the connection will be serviced by the SEAL protocol using TCP (nstead of an encapsulating tunnel endpoint) as the upper layer protocol. The SEAL protocol for transport mode otherwise observes the same specifications as for Section 4. 6. Link Requirements Subnetwork designers are strongly encouraged to follow the recommendations in [RFC3819] when configuring link MTUs, where all IPv4 links SHOULD configure a minimum MTU of 576 bytes. Links that cannot configure an MTU of at least 576 bytes (e.g., due to performance characteristics) SHOULD implement transparent link-layer segmentation and reassembly such that an MTU of at least 576 can still be presented to the IP layer. 7. End System Requirements SEAL provides robust mechanisms for returning PTB messages to the original source, however end systems that send unfragmentable IP packets larger than 1500 bytes are strongly encouraged to use Packetization Layer Path MTU Discovery per [RFC4821]. 8. Router Requirements IPv4 routers within the subnetwork are strongly encouraged to implement IPv4 fragmentation such that the first fragment is the largest and approximately the size of the underlying link MTU. 9. IANA Considerations SEAL_PROTO, SEAL_PORT and SEAL_OPTION are taken from their respective range of experimental values documented in [RFC3692][RFC4727]. These values are for experimentation purposes only, and not to be used for any kind of deployments (i.e., they are not to be shipped in any products). This document therefore has no actions for IANA. 10. Security Considerations Unlike IPv4 fragmentation, overlapping fragment attacks are not possible due to the requirement that SEAL segments be non- overlapping. Templin Expires December 3, 2008 [Page 18] Internet-Draft SEAL June 2008 An amplification/reflection attack is possible when an attacker sends IPv4 first-fragments with spoofed source addresses to an ETE, resulting in a stream of ICMPv4 Fragmentation Needed messages returned to a victim ITE. The encapsulated segment of the spoofed IPv4 first-fragment provides mitigation for the ITE to detect and discard spurious ICMPv4 Fragmentation Needed messages. The SEAL header is sent in-the-clear (outside of any IPsec/ESP encapsulations) the same as for the IPv4 header. As for IPv6 extension headers, the SEAL header is protected only by L2 integrity checks and is not covered under any L3 integrity checks. 11. Acknowledgments Path MTU determination through the report of fragmentation experienced by the final destination was first proposed by Charles Lynn of BBN on the TCP-IP mailing list in May 1987. An historical analysis of the evolution of path MTU discovery appears in http://www.tools.ietf.org/html/draft-templin-v6v4-ndisc-01 and is reproduced in Appendix A of this document. The following individuals are acknowledged for helpful comments and suggestions: Jari Arkko, Fred Baker, Teco Boot, Iljitsch van Beijnum, Brian Carpenter, Steve Casner, Ian Chakeres, Remi Denis-Courmont, Aurnaud Ebalard, Gorry Fairhurst, Joel Halpern, John Heffner, Bob Hinden, Christian Huitema, Joe Macker, Matt Mathis, Dan Romascanu, Dave Thaler, Joe Touch, Magnus Westerlund, Robin Whittle, James Woodyatt and members of the Boeing PhantomWorks DC&NT group. 12. References 12.1. Normative References [RFC0791] Postel, J., "Internet Protocol", STD 5, RFC 791, September 1981. [RFC0792] Postel, J., "Internet Control Message Protocol", STD 5, RFC 792, September 1981. [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998. Templin Expires December 3, 2008 [Page 19] Internet-Draft SEAL June 2008 12.2. Informative References [FOLK] C, C., D, D., and k. k, "Beyond Folklore: Observations on Fragmented Traffic", December 2002. [FRAG] Kent, C. and J. Mogul, "Fragmentation Considered Harmful", October 1987. [MTUDWG] "IETF MTU Discovery Working Group mailing list, gatekeeper.dec.com/pub/DEC/WRL/mogul/mtudwg-log, November 1989 - February 1995.". [RFC1063] Mogul, J., Kent, C., Partridge, C., and K. McCloghrie, "IP MTU discovery options", RFC 1063, July 1988. [RFC1191] Mogul, J. and S. Deering, "Path MTU discovery", RFC 1191, November 1990. [RFC1981] McCann, J., Deering, S., and J. Mogul, "Path MTU Discovery for IP version 6", RFC 1981, August 1996. [RFC2003] Perkins, C., "IP Encapsulation within IP", RFC 2003, October 1996. [RFC2004] Perkins, C., "Minimal Encapsulation within IP", RFC 2004, October 1996. [RFC2923] Lahey, K., "TCP Problems with Path MTU Discovery", RFC 2923, September 2000. [RFC3692] Narten, T., "Assigning Experimental and Testing Numbers Considered Useful", BCP 82, RFC 3692, January 2004. [RFC3819] Karn, P., Bormann, C., Fairhurst, G., Grossman, D., Ludwig, R., Mahdavi, J., Montenegro, G., Touch, J., and L. Wood, "Advice for Internet Subnetwork Designers", BCP 89, RFC 3819, July 2004. [RFC4213] Nordmark, E. and R. Gilligan, "Basic Transition Mechanisms for IPv6 Hosts and Routers", RFC 4213, October 2005. [RFC4301] Kent, S. and K. Seo, "Security Architecture for the Internet Protocol", RFC 4301, December 2005. [RFC4380] Huitema, C., "Teredo: Tunneling IPv6 over UDP through Network Address Translations (NATs)", RFC 4380, February 2006. Templin Expires December 3, 2008 [Page 20] Internet-Draft SEAL June 2008 [RFC4459] Savola, P., "MTU and Fragmentation Issues with In-the- Network Tunneling", RFC 4459, April 2006. [RFC4727] Fenner, B., "Experimental Values In IPv4, IPv6, ICMPv4, ICMPv6, UDP, and TCP Headers", RFC 4727, November 2006. [RFC4821] Mathis, M. and J. Heffner, "Packetization Layer Path MTU Discovery", RFC 4821, March 2007. [RFC4963] Heffner, J., Mathis, M., and B. Chandler, "IPv4 Reassembly Errors at High Data Rates", RFC 4963, July 2007. [TCP-IP] "TCP-IP mailing list archives, http://www-mice.cs.ucl.ac.uk/multimedia/mist/tcpip, May 1987 - May 1990.". Appendix A. Historic Evolution of PMTUD (written 10/30/2002) The topic of Path MTU discovery (PMTUD) saw a flurry of discussion and numerous proposals in the late 1980's through early 1990. The initial problem was posed by Art Berggreen on May 22, 1987 in a message to the TCP-IP discussion group [TCP-IP]. The discussion that followed provided significant reference material for [FRAG]. An IETF Path MTU Discovery Working Group [MTUDWG] was formed in late 1989 with charter to produce an RFC. Several variations on a very few basic proposals were entertained, including: 1. Routers record the PMTUD estimate in ICMP-like path probe messages (proposed in [FRAG] and later [RFC1063]) 2. The destination reports any fragmentation that occurs for packets received with the "RF" (Report Fragmentation) bit set (Steve Deering's 1989 adaptation of Charles Lynn's Nov. 1987 proposal) 3. A hybrid combination of 1) and Charles Lynn's Nov. 1987 proposal (straw RFC draft by McCloughrie, Fox and Mogul on Jan 12, 1990) 4. Combination of the Lynn proposal with TCP (Fred Bohle, Jan 30, 1990) 5. Fragmentation avoidance by setting "IP_DF" flag on all packets and retransmitting if ICMPv4 "fragmentation needed" messages occur (Geof Cooper's 1987 proposal; later adapted into [RFC1191] by Mogul and Deering). Option 1) seemed attractive to the group at the time, since it was believed that routers would migrate more quickly than hosts. Option Templin Expires December 3, 2008 [Page 21] Internet-Draft SEAL June 2008 2) was a strong contender, but repeated attempts to secure an "RF" bit in the IPv4 header from the IESG failed and the proponents became discouraged. 3) was abandoned because it was perceived as too complicated, and 4) never received any apparent serious consideration. Proposal 5) was a late entry into the discussion from Steve Deering on Feb. 24th, 1990. The discussion group soon thereafter seemingly lost track of all other proposals and adopted 5), which eventually evolved into [RFC1191] and later [RFC1981]. In retrospect, the "RF" bit postulated in 2) is not needed if a "contract" is first established between the peers, as in proposal 4) and a message to the MTUDWG mailing list from jrd@PTT.LCS.MIT.EDU on Feb 19. 1990. These proposals saw little discussion or rebuttal, and were dismissed based on the following the assertions: o routers upgrade their software faster than hosts o PCs could not reassemble fragmented packets o Proteon and Wellfleet routers did not reproduce the "RF" bit properly in fragmented packets o Ethernet-FDDI bridges would need to perform fragmentation (i.e., "translucent" not "transparent" bridging) o the 16-bit IP_ID field could wrap around and disrupt reassembly at high packet arrival rates The first four assertions, although perhaps valid at the time, have been overcome by historical events leaving only the final to consider. But, [FOLK] has shown that IP_ID wraparound simply does not occur within several orders of magnitude the reassembly timeout window on high-bandwidth networks. (Authors 2/11/08 note: this final point was based on a loose interpretation of [FOLK], and is more accurately addressed in [RFC4963].) Templin Expires December 3, 2008 [Page 22] Internet-Draft SEAL June 2008 Author's Address Fred L. Templin (editor) Boeing Phantom Works P.O. Box 3707 Seattle, WA 98124 USA Email: fltemplin@acm.org Templin Expires December 3, 2008 [Page 23] Internet-Draft SEAL June 2008 Full Copyright Statement Copyright (C) The IETF Trust (2008). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Property The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Templin Expires December 3, 2008 [Page 24]