SHIM6 WG E. Nordmark Internet-Draft Sun Microsystems Expires: March 5, 2006 September 2005 Level 3 multihoming shim protocoldraft-ietf-shim6-proto-01.txtdraft-ietf-shim6-proto-02.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 March 5, 2006. Copyright Notice Copyright (C) The Internet Society (2005). Abstract The SHIM6 working group is exploring a layer 3 shim approach for providing locator agility below the transport protocols, so that multihoming can be provided for IPv6 with failover and load spreading properties, without assuming that a multihomed site will have a provider independent IPv6 address prefix which is announced in the global IPv6 routing table. The hosts in a site which has multiple provider allocated IPv6 address prefixes, will use the shim6 protocol specified in this document to setup state with peer hosts, so that the state can later be used to failover to a different locator pair, should the original one stop working. This document picks a particular approach to such a protocol and tries to flush out a bunch of details, with the hope that the WG can better understand the details in this proposal as well as discovering and understanding alternative designs that might be better. Thus this proposal is my no means cast in stone as the direction; quite to the contrary it is a depth first exploration of the design space. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1 Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Non-Goals . . . . . . . . . . . . . . . . . . . . . . . . 5 1.3 Locators as Upper-layer Identifiers . . . . . . . . . . . 5 1.4 IP Multicast . . . . . . . . . . . . . . . . . . . . . . . 6 1.5 Renumbering Implications . . . . . . . . . . . . . . . . . 6 1.6 Placement of the shim . . . . . . . . . . . . . . . . . . 7 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . 9 2.1 Definitions . . . . . . . . . . . . . . . . . . . . . . . 9 2.2 Notational Conventions . . . . . . . . . . . . . . . . . .1011 3. Assumptions . . . . . . . . . . . . . . . . . . . . . . . . 11 4. Protocol Overview . . . . . . . . . . . . . . . . . . . . .1112 4.1 Context Tags . . . . . . . . . . . . . . . . . . . . . . . 13 4.2 Securing shim6 . . . . . . . . . . . . . . . . . . . . . . 14 4.3 Overview of Shim Control Messages . . . . . . . . . . . . 14 4.4 Locator Validation . . . . . . . . . . . . . . . . . . . . 16 5. Message Formats . . . . . . . . . . . . . . . . . . . . . .1516 5.1 Common shim6 Message Format . . . . . . . . . . . . . . . 16 5.2 Payload Message Format . . . . . . . . . . . . . . . . . .15 5.217 5.3 Common Shim6 Control header . . . . . . . . . . . . . . .16 5.317 5.4 I1 Message Format . . . . . . . . . . . . . . . . . . . .17 5.419 5.5 R1 Message Format . . . . . . . . . . . . . . . . . . . .18 5.520 5.6 I2 Message Format . . . . . . . . . . . . . . . . . . . .19 5.621 5.7 R2 Message Format . . . . . . . . . . . . . . . . . . . .21 5.722 5.8 No Context Error Message Format . . . . . . . . . . . . .22 5.823 5.9 Update Request Message Format . . . . . . . . . . . . . .23 5.924 5.10 Update Acknowledgement Message Format . . . . . . . . .. 24 5.1025 5.11 Reachability Probe Message Format . . . . . . . . . . .24 5.1126 5.12 Reachability Reply Message Format . . . . . . . . . . .25 5.1227 5.13 Keepalive Message Format . . . . . . . . . . . . . . . .26 5.13 Context Locator Pair Explore28 5.14 SHIM6 Probe Message Format . . . . . .27 5.14. . . . . . . . . 29 5.15 Option Formats . . . . . . . . . . . . . . . . . . . . .28 5.14.129 5.15.1 Validator Option Format . . . . . . . . . . . . . .29 5.14.230 5.15.2 Locator List Option Format . . . . . . . . . . . . .30 5.14.331 5.15.3 Locator Preferences Option Format . . . . . . . . .31 5.14.432 5.15.4 CGA Parameter Data Structure Option Format . . . . .32 5.14.533 5.15.5 CGA Signature Option Format . . . . . . . . . . . .33 5.14.634 5.15.6 ULID Pair Option Format . . . . . . . . . . . . . .33 5.14.734 5.15.7 Packet In Error Option Format . . . . . . . . . . .34 5.14.8 Explorer Results35 5.15.8 SHIM6 Event Option Format . . . . . . . . . . .34. . 35 6. Conceptual Model of a Host . . . . . . . . . . . . . . . . . 35 6.1 Conceptual Data Structures . . . . . . . . . . . . . . . . 36 7. Establishing Host Pair Contexts . . . . . . . . . . . . . . 36 7.1 Normal context establishment . . . . . . . . . . . . . . .3736 7.2 Concurrent context establishment . . . . . . . . . . . . . 37 7.3 Context recovery . . . . . . . . . . . . . . . . . . . . . 38 7.4 Context confusion . . . . . . . . . . . . . . . . . . . . 39 7.5 Sending I1 messages . . . . . . . . . . . . . . . . . . . 40 7.6 Receiving I1 messages . . . . . . . . . . . . . . . . . . 40 7.7 Receiving R1 messages . . . . . . . . . . . . . . . . . . 41 7.8 Retransmitting I2 messages . . . . . . . . . . . . . . . . 41 7.9 Receiving I2 messages . . . . . . . . . . . . . . . . . . 41 7.10 Receiving R2 messages . . . . . . . . . . . . . . . . . 42 8. No Such Content Errors . . . . . . . . . . . . . . . . . . . 42 9. Handling ICMP Error Messages . . . . . . . . . . . . . . . . 42 10. Teardown of the Host Pair Context . . . . . . . . . . . . . 43 11. Updating the Locator Pairs . . . . . . . . . . . . . . . . .4344 12. Various Probe Mechanisms . . . . . . . . . . . . . . . . . .4344 13. Rehoming to a Different Locator Pair . . . . . . . . . . . .4344 14.Payload Packets before a Switch . . . . . . . . .Sending ULP Payloads . . . . .43 15. Payload Packets after a Switch. . . . . . . . . . . . . . . 4416. Open Issues . . . .14.1 Sending ULP Payload after a Switch . . . . . . . . . . . 45 15. Receiving Packets . . . . . . . . .45 17. Design Alternatives. . . . . . . . . . . . 45 16. Initial Contact . . . . . . . .46 17.1 State Cleanup. . . . . . . . . . . . . . 46 17. Open Issues . . . . . . .46 17.2 Detecting Context Loss. . . . . . . . . . . . . . . . . 46 18. Implications Elsewhere . . . . . . . . . . . . . . . . . . . 47 19. Security Considerations . . . . . . . . . . . . . . . . . . 48 20. IANA Considerations . . . . . . . . . . . . . . . . . . . .4849 21.Change LogPossible Protocol Extensions . . . . . . . . . . . . . . . . 49 22. Change Log . . . . . . . . .49 22. Acknowledgements. . . . . . . . . . . . . . . . 50 23. Acknowledgements . . . . . .49 23. References. . . . . . . . . . . . . . . . 50 A. Design Alternatives . . . . . . . . .49 23.1 Normative References. . . . . . . . . . . 51 A.1 Context granularity . . . . . . .49 23.2 Informative References. . . . . . . . . . . . 51 A.2 Demultiplexing of data packets in shim6 communications . . 51 A.2.1 Flow-label . . .50 Author's Address. . . . . . . . . . . . . . . . . . . 52 A.2.2 Extension Header . . .51 Intellectual Property and Copyright Statements. . . . . . .52 1. Introduction The SHIM6 working group, and the. . . . . . . . . 54 A.3 Context Loss Detection . . . . . . . . . . . . . . . . . . 54 A.4 Securing locator sets . . . . . . . . . . . . . . . . . . 57 A.5 Host-pair context establishment exchange . . . . . . . . . 59 A.6 Updating locator sets . . . . . . . . . . . . . . . . . . 60 A.7 State Cleanup . . . . . . . . . . . . . . . . . . . . . . 61 24. References . . . . . . . . . . . . . . . . . . . . . . . . . 61 24.1 Normative References . . . . . . . . . . . . . . . . . . 61 24.2 Informative References . . . . . . . . . . . . . . . . . 62 Author's Address . . . . . . . . . . . . . . . . . . . . . . 63 Intellectual Property and Copyright Statements . . . . . . . 64 1. Introduction The SHIM6 working group, and the MULTI6 WG that preceded it, is exploring a layer 3 shim approach for providing locator agility below the transport protocols, so that multihoming can be provided for IPv6 with failover and load spreading properties[13],[14], without assuming that a multihomed site will have a provider independent IPv6 address which is announced in the global IPv6 routing table. The hosts in a site which has multiple provider allocated IPv6 address prefixes, will use the shim6 protocol specified in this document to setup state with peer hosts, so that the state can later be used to failover to a different locator pair, should the original one stop working. This document takes the outlines contained in[21][22] and[20][21] and expands to an actual proposed protocol. We assume that redirection attacks are prevented using the mechanism specified in HBA[5].[6]. The WG mailing list is discussing the scheme used for reachability detection[6].[7]. The schemes that are being discussed are Context Unreachability Detection (CUD) or Force Bidirectional communication Detection (FBD). This document doesn't discuss the tradeoffs between the two, but it does suggest a set of keepalive and probe messages that are sufficient to handle both. Once the WG has decided which approach to take, we can remove the unneeded messages. There is a related but slightly separate issue of how the hosts can find which of the locator pairs is working after a failure. This is discussed in[7]. We don't yet know how these details will be done, but this draft specifies a separate "Explore" message as a placeholder for such a protocol mechanism. 1.1 Goals The goals[8]. NOTE that the direction taken in the latest version of [8] is to use FBD and some new SHIM6 message types. Some of that work has been reflected in this document, but there are other edits that remain. 1.1 Goals The goals for this approach is to: o Preserve established communications through failures, for example, TCP connections and application communications using UDP. o Have no impact on upper layer protocols in general and on transport protocols in particular. o Address the security threats in[16][17] through a separate document[5],[6], and techniques described in this document. o No extra roundtrip for setup; deferred setup. o Take advantage of multiple locators/addresses for load spreading so that different sets of communication to a host (e.g., different connections) might use different locators of the host. 1.2 Non-Goals The assumption is that the problem we are trying to solve is site multihoming, with the ability to have the set of site locator prefixes change over time due to site renumbering. Further, we assume that such changes to the set of locator prefixes can be relatively slow and managed; slow enough to allow updates to the DNS to propagate. But it is not a goal to try to make communication survive a renumbering event (which causes all the locators of a host to change to a new set of locators). This proposal does not attempt to solve, perhaps related, problems such as host multihoming or host mobility. This proposal also does not try to provide an IP identifier. Even though such a concept would be useful to ULPs and applications, especially if the management burden for such a name space was zero and there was an efficient yet secure mechanism to map from identifiers to locators, such a name space isn't necessary (and furthermore doesn't seem to help) to solve the multihoming problem. 1.3 Locators as Upper-layer Identifiers Central to this approach is to not introduce a new identifier name space but instead use one of the locators as the upper-layer ID, while allowing the locators used in the address fields to change over time in response to failures of using the original locator. This implies that the ULID selection is performed as today's default address selection as specified in[11].[12]. Underneath, and transparently, the multihoming shim selects working locator pairs with the initial locator pair being the ULID pair. When communication fails the shim can test and select alternate locators. A subsequent section discusses the issues when the selected ULID is not initially working hence there is a need to switch locators up front. Using one of the locators as the ULID has certain benefits for applications which have long-lived session state, or performs callbacks or referrals, because both the FQDN and the 128-bit ULID work as handles for the applications. However, using a single 128- bit ULID doesn't provide seamless communication when that locator is unreachable. See[17][18] for further discussion of the application implications. There has been some discussion of using non-routable locators, such as unique-local addresses[15],[16], as ULIDs in a multihoming solution. While this document doesn't specify all aspects of this, it is believed that the approach can be extended to handle such a case. For example, the protocol already needs to handle ULIDs that are not initially reachable. Thus the same mechanism can handle ULIDs that are permanently unreachable from outside their site. The issue becomes how to make the protocol perform well when the ULID is not reachable, for instance, avoiding any timeout and retries in this case. In addition one would need to understand how the ULAs would be entered in the DNS to avoid a performance impact on existing, non- shim6 aware, IPv6 hosts potentially trying to communicate to the (unreachable) ULA. 1.4 IP Multicast IP Multicast requires that the IP source address field contain a topologically correct locator for interface that is used to send the packet, since IP multicast routing uses both the source address and the destination group to determine where to forward the packet. (This isn't much different than the situation with widely implemented ingress filtering[9][10] for unicast.) While in theory it would be possible to apply the shim re-mapping of the IP address fields between ULIDs and locators, the fact that all the multicast receivers would need to know the mapping to perform, makes such an approach difficult in practice. Thus it makes sense to have multicast ULPs operate directly on locators and not use the shim. This is quite a natural fit for protocols which use RTP[12],[13], since RTP already has an explicit identifier in the form of the SSRC field in the RTP headers. Thus the actual IP address fields are not important to the application. 1.5 Renumbering Implications As stated above, this approach does not try to make communication survive renumbering. However, the fact that a ULID might be used with a different locator over time open up the possibility that communication between two ULIDs might continue to work after one or both of those ULIDs are no longer reachable as locators, for example due to a renumbering event. This opens up the possibility that the ULID (or at least the prefix on which it is based) is reassigned to another site while it is still being used (with another locator) for existing communication. Worst case we could end up with two separate hosts using the same ULID while both of them are communicating with the same host. This potential source for confusion can be avoided if we require that any communication using a ULID must be terminated when the ULID becomes invalid (due to the underlying prefix becoming invalid). However, this might be an overkill. Even when an IPv6 prefix is retired and reassigned to some other site, there is still a very small probability that another host in that site picks the same 128 bit address (whether using DHCPv6, stateless address autoconfiguration, or picking a random interface ID[10]).[11]). Should the identical address be used by another host, then there still wouldn't be a problem until that host attempts to communicate with the same host with which the initial user of the IPv6 address was communicating. 1.6 Placement of the shim ----------------------- | Transport Protocols | ----------------------- ------ ------- -------------- ------------- IP endpoint | AH | | ESP | | Frag/reass | | Dest opts | sub-layer ------ ------- -------------- ------------- --------------------- | shim6 shim layer | --------------------- ------ IP routing | IP | sub-layer ------ Figure 1: Protocol stack The proposal uses an multihoming shim layer within the IP layer, i.e., below the ULPs, as shown in Figure 1, in order to provide ULP independence. The multihoming shim layer behaves as if it is associated with an extension header, which would beordered immediatelyplaced after anyhop-by-hop optionsrouting-related headers in thepacket.packet (such as any hop-by-hop options, or routing header). However, when the locator pair is the ULID pair there is no data that needs to be carried in an extension header, thus none is needed in that case. Layering AH and ESP above the multihoming shim means that IPsec can be made to be unaware of locator changes the same way that transport protocols can be unaware. Thus the IPsec security associations remain stable even though the locators are changing. The MOBIKE WG is looking at ways to have IPsec security associations survive even though the IP addresses changes, which is a different approach. Layering the fragmentation header above the multihoming shim makes reassembly robust in the case that there is broken multi-path routing which results in using different paths, hence potentially different source locators, for different fragments. Thus, effectively the multihoming shim layer is placed between the IP endpoint sublayer, which handles fragmentation, reassembly, and IPsec, and the IP routing sublayer, whichon a hostselects whichdefault routernext hop and interface to useetc.for sending out packets. Applications and upper layer protocols use ULIDs which the shim6 layer will map to/from different locators. The shim6 layer maintains state, called host-pair context, per ULID pairs (that is, applies to all ULP connections between the ULID pair) in order to perform this mapping. The mapping is performed consistently at the sender and the receiver, thus from the perspective of the upper layer protocols, packets appear to be sent using ULIDs from end to end, even though the packets travel through the network containing locators in the IP address fields, and even though those locators might be changed by the transmitting shim6 layer. The context state in this approach is maintained per remote ULID i.e. approximately per peer host, and not at any finer granularity. In particular, it is independent of the ULPs and any ULP connections. However, the forking capability enables shim-aware ULPs to use more than one locator pair at a time for an single ULID pair. ---------------------------- ---------------------------- | Sender A | | Receiver B | | | | | | ULP | | ULP | | | src ULID(A)=L1(A) | | ^ | | | dst ULID(B)=L1(B) | | | src ULID(A)=L1(A) | | v | | | dst ULID(B)=L1(B) | | multihoming shim | | multihoming shim | | | src L2(A) | | ^ | | | dst L3(B) | | | src L2(A) | | v | | | dst L3(B) | | IP | | IP | ---------------------------- ---------------------------- | ^ ------- cloud with some routers ------- Figure 2: Mapping with changed locators The result of this consistent mapping is that there is no impact on the ULPs. In particular, there is no impact on pseudo-header checksums and connection identification. Conceptually one could view this approach as if both ULIDs and locators are being present in every packet, but with a header compression mechanism applied that removes the need for the ULIDs once the state has been established. In order for the receiver to recreate a packet with the correct ULIDs there might be a need to include some "compression tag" in the data packets. This would serve to indicate the correct context to use for decompression when the locator pair in the packet is insufficient to uniquely identify the context. 2. Terminology This document uses the terms MUST, SHOULD, RECOMMENDED, MAY, SHOULD NOT and MUST NOT defined in RFC 2119 [1]. The terms defined in RFC 2460 [2] are also used. 2.1 Definitions This document introduces the following terms (taken from[21]):[22]): upper layer protocol (ULP) A protocol layer immediately above IP. Examples are transport protocols such as TCP and UDP, control protocols such as ICMP, routing protocols such as OSPF, and internet or lower-layer protocols being "tunneled" over (i.e., encapsulated in) IP such as IPX, AppleTalk, or IP itself. interface A node's attachment to a link. address An IP layer name that contains both topological significance and acts as a unique identifier for an interface. 128 bits. This document only uses the "address" term in the case where it isn't specific whether it is a locator oraan identifier. locator An IP layer topological name for an interface or a set of interfaces. 128 bits. The locators are carried in the IP address fields as the packets traverse the network. identifier An IP layer name for an IP layer endpoint (stack name in[23]).[24]). The transport endpoint name is a function of the transport protocol and would typically include the IP identifier plus a port number. NOTE: This proposal does not specify any new form of IP layer identifier, but still separates the identifying and locating properties of the IP addresses. upper-layer identifier (ULID) An IPlocatoraddress which has been selected for communication with a peer to be used by the upper layer protocol. 128 bits. This is used for pseudo-header checksum computation and connection identification in the ULP. Different sets of communication to a host (e.g., different connections) might use different ULIDs in order to enable load spreading. Since the ULID is just one of the IP locators/ addresses of the node, there is no need for a separate name space and allocation mechanisms. address field The source and destination address fields in the IPv6 header. As IPv6 is currently specified this fields carry "addresses". If identifiers and locators are separated these fields will contain locators for packets on the wire. FQDN Fully Qualified Domain Name Host-pair context The state that the multihoming shimmaintains for a particular peer.maintains. The context is for a ULID pair,asand is identified by a context tag for eachdirection.direction of the communication. Context tag Each end of the context allocates a context tag for the context. This is used to uniquely associate both received control packets and payload packets with the shim6 Payload extension header as belonging to the context. Current locator pair Each end of the context has a current locator pair which is used to send packets to be peer. The two ends might use different current locator pairs though. Default context At the sending end, the shim uses the ULID pair (passed down from the ULP) to find the context for that pair. Thus, normally, a host can have at most one context for a ULID pair. We call this the "default context". Context forking A mechanism which allows ULPs that are aware of multiple locators to use separate contexts for the same ULID pair, in order to be able use different locator pairs for different communication to the same ULID. Context forking causes more than just the default context to be created for a ULID pair. 2.2 Notational Conventions A, B, and C are hosts. X is a potentially malicious host. FQDN(A) is the domain name for A. Ls(A) is the locator set for A, which consists of the locators L1(A), L2(A), ... Ln(A). ULID(A) is an upper-layer ID for A. In this proposal, ULID(A) is always one member of A's locator set. This document also makes use of internal conceptual variables to describe protocol behavior and external variables that an implementation must allow system administrators to change. The specific variable names, how their values change, and how their settings influence protocol behavior are provided to demonstrate protocol behavior. An implementation is not required to have them in the exact form described here, so long as its external behavior is consistent with that described in this document. See Section 6 for a description of the conceptual data structures. 3. Assumptions The general approach of a level3 shim as well as this specific proposal makes the following assumptions: o When there is ingress filtering in the ISPs, that the use of all <source, destination> locator pairs will cause the packets to exit using different ISPs so that all exit ISPs can be tried. Since there might be only one destination locator, when the peer supports shim6 but is not multihomed, this implies that the selection of the exit ISP should be related to the source address in the packets. o Even without ingress filtering, there is the assumption that if the host tries all <source, destination> locator pairs, that it has done a good enough job of trying to find a working path to the peer. Since we want the protocol to provide benefits even if the peer has a single locator, this seems to imply that the choice of source locator needs to somehow affect the exit path from the site. 4. Protocol Overview The shim6 protocol operates in several phases over time. The following sequence illustrates the concepts: o An application on host A decides to contact B using some upper- layer protocol. This results in the ULP on A sending packets to B. We call this the initial contact. Assuming the IP addresses selected by Default Address Selection[11][12] work, then there is no action by the shim at this point in time. Any shim context establishment can be deferred until later. o Some heuristic on A or B (or both) determine that it might make sense to make this communication robust against locator failures. For instance, this heuristic might be that more than 50 packets have been sent or received. This makes the shim initiate the 4-way context establishment exchange. As a result of this exchange, both A and B will know a list of locators for each other. If the context establishment exchange fails, the initiator will then know that the other end does not support shim6, and will revert to standard unicast behavior for the session. o Communication continues without any change for the ULP packets. In addition, there might be some messages exchanged between the shim sub-layers for (un)reachability detection. o At some point in time something fails. Depending on the approach to reachability detection, there might be some advise from the ULP, or the shim (un)reachability detection might discover that there is a problem. At this point in time one or both ends of the communication need to probe and explore the different alternate locator pairs until a working pair is found, and rehome to using that pair. o Once a working alternative locator pair has been found, the shim will rewrite the packets on transmit, and tag the packets with shim6 Payload message as an extension header, which contains the receiver's context tag. The receiver will use the <Source Locator, Destination Locator, Context Tag> to find the context state which will indicate which addresses to place in the IPv6 header before passing the packet up to the ULP. The result is that from the perspective of the ULP the packet passes unmodified end-to-end, even though the IP routing infrastructure sends the packet to a different locator. o The shim (un)reachability detection will monitor the new locator pair as it monitored the original locator pair, so that subsequent failures can be detected. o In addition to failures detected based on end-to-end observations, one endpoint might be know for certain that one or more of its locators is not working. For instance, the network interface might have failed or gone down (at layer 2), or an IPv6 address might have become invalid. In such cases the host can signal its peer that this address is no longer recommended to try. Thus this triggers something similar to a failure handling in that a new, working locator pair must be found. The Working Group has discussed whether or not hosts can express other forms of locator preferences. If this is the case, a change in the preferences can be signaled to the peer, which might make the peer choose to try a different locator pair. Thus, this can also be treated similarly to a failure. o When the shim thinks that the context state is no longer used, it can garbage collect the state; there is no coordination necessary with the peer host before the state is removed. There is an error message defined to be able to signal when there is no context state, which can be used to detect and recover from both premature garbage collection, as well as complete state loss (crash and reboot) of a peer. The ULP packets in shim6 are carried completely unmodified as long as the ULID pair is used as the locator pair. After a switch to a different locator pair the packets are "tagged" with a shim6 extension header, so that the receiver can always determine the context to which they belong. This is accomplished by including an 8-octet "shim payload" extension header before the (extension) headers that are processed by the IP endpoint sublayer and ULPs. 4.1 Context Tags A context between two hosts is actually a context between two ULIDs. The context is identified by a pair of context tags. Each end gets to allocate a context tag, and once the context is established, the shim6 control messages contain the context tag that the receiver of the message allocated. Thus at a minimum the combination of <peer ULID, local ULID, localcontext> tagcontext tag> MUST uniquely identify one context. In addition, the non-shim6 messages, which we call payload packets, will not contain the ULIDs after a failure. This introduces the requirement that the <peer locator, local locator, local context tag> MUST uniquely identify the context. Since the peer's set of locators might be dynamic the simplest form of unique allocation of the local context tag is to pick a number that is unique on the host. Hosts which serve multiple ULIDs using disjoint sets of locators can maintain the context tag allocation per such disjoint set. The mechanism for detecting a loss of context state at the peer that is currently proposed in this document assumes that the receiver can tell the packets that need locator rewriting, even after it has lost all state (e.g., due to a crash followed by a reboot). This is achieved because after a rehoming event the packets that need receive-side rewriting, carry the Payload Message extension header. Even though we do not overload the flow label field to carry the context tag, any protocol (such as RSVP or NSIS) which signals information about flows from the host stack to devices in the path, need to be made aware of the locator agility introduced by a layer 3 shim, so that the signaling can be performed for the locator pairs that are currently being used. TBD: add forking - multiple contexts between ULID pairs, default context,etcetc. Need to explain that context forking assumes an API from the ULP. TBD: add that shim can be disabled for some ULP traffic if we define an API for this purpose. 4.2 Securing shim6 The mechanisms are secured using a combination of techniques: o The HBA technique[5][6] for validating the locators to prevent an attacker from redirecting the packet stream to somewhere else. o Requiring a Reachability Probe+Reply before a new locator is used as the destination, in order to prevent 3rd party flooding attacks. o The first message does not create any state on the responder. Essentially a 3-way exchange is required before the responder creates any state. This means that a state-based DoS attack (trying to use up all of memory on the responder) at least provides an IPv6 address that the attacker was using. o The context establishment messages use nonces to prevent replay attacks. 4.3 Overview of Shim Control Messages The shim context establishment is accomplished using four messages; I1, R1, I2, R2. Normally they are sent in that order from initiator and responder, respectively. Should both ends attempt to set up context state at the same time (for the same ULID pair), then their I1 messages might cross in flight, and result in an immediate R2 message. [The names of these messages are borrowed from HIP[22].][23].] There is a No Context error message defined, when a control or payload packet arrives and there is no matching context state at the receiver. When such a message is received, it will result in the destruction of the shim context and a re-establishment. The peers' lists of locators are normally exchanged as part of the context establishment exchange. But the set of locators might be dynamic. For this reason there is a Locator List Update message and acknowledgement. Even though the list of locators is fixed, a host might determine that some preferences might have changed. For instance, it might determine that there is a locally visible failure that implies that some locator(s) are no longer usable. Currently this mechanism has a separate message pair (Rehome Request and acknowledgement), but perhaps this can be encoded using the Locator List Update message pair with a preference option and no change to the list of locators. At least two approaches (CUD and FBD) have been discussed for the shim (un)reachability detection[6].[7]. This document attempt to define messages for both cases; once the WG has picked an approach we can delete any unneeded messages. The CUD approach uses a probe message and acknowledgement, which can be suppressed e.g. using positive advise from the ULP. This message pair also seems needed to verify that the host is indeed present at a new locator before the data stream is redirected to that locator, in order to prevent 3rd party DoS attacks. The FBD approach uses a keepalive message, which is sent when a host has received packets from the peer, but the ULP has not given the host an opportunity to send any payload packet to the peer. The above probe and keepalive messages assume we have an established host-pair context. However, communication might fail during the initial context (that is, when the application or transport protocol is trying to setup some communication). If we want the shim to be able to optimize discovering a working locator pair in that case, we need a mechanism to test the reachability of locators independent of some context. We define a locator pair test message and acknowledgement for this purpose, even though it isn't yet clear whether we need such a thing. Finally, when the context is established and there is a failure there needs to be a way to probe and explore the set of locator pairs to efficiently find a working pair. We define an explore message as a place holder for some mechanism in this space[7]. 5. Message Formats The shim6 messages are all carried using[8]. 4.4 Locator Validation Before anew IP protocol number TBD [to be assigned by IANA]. The shim6 messages havehost can use acommon header, defined below, with some fixed fields, followed by type specific fields. 5.1 Payload Message Format The payload message is used to carry ULP packets where the receiver must replacelocator (different than thecontent ofULID) as the sourceand or destination fields in the IPv6 header before passing the packet to the ULP. Thus this extension header is included when the locators pairlocator, it must know thatis used is notthesamepeer will accept packets with that source locator as being part of this context. The peer might wish to do some verification of theULID pair. Since the shim is placed between the IP endpoint sub-layer and the IP routing sub-layer in thelocator before accepting it as a source address. This document does not require any such verification. But if it is done by a host,the shim header willin all cases such verification need to beplacedfinished beforeany endpoint extension headers (fragmentation headers, destination options header, AH, ESP), but after any routing related headers (hop- by-hop extensions header, routing header,the host acknowledges the new locator, by sending an Update Acknowledgement message, R2 an message. Before adestinations options header which precedeshost can use arouting header). When tunneling is used, whether IP-in-IP tunneling orlocator (different than thespecial formULID) as the destination locator it must perform the full verification oftunneling that Mobile IPv6 uses (with Home Address Options and Routing header type 2), there is a choice whethertheshim applies insidelocator. This includes both verifying it using HBA/CGA, and verifying that thetunnel or outsideULID is indeed reachable at thetunnel, which effectslocator. The latter in order to prevent 3rd party flooding attacks. 5. Message Formats The shim6 messages are all carried using a new IP protocol number TBD [to be assigned by IANA]. The shim6 messages have a common header, defined below, with some fixed fields, followed by type specific fields. The shim6 messages are structured as an IPv6 extension header since thelocation ofPayload Message is used to carry the ULP packets after a locator switch. The shim6header. 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 | 0 |1| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Receiver Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: The payload which follows this header. Hdr Ext Len: 0 (sincecontrol messages use the same extension headeris 8 octets). Reserved: Reserved for future use. Zero on transmit. MUSTformats so that a single "protocol number" needs to beignored on receipt. Receiver Context Tag: 32-bit unsigned integer. Allocated by the receiverallowed through firewalls in order foruseshim6 toidentify the context (together withfunction across thesource and destination locators). 5.2firewall. 5.1 CommonShim6 Control headershim6 Message Format Thecommon partfirst 17 bits of the shim6 headerhas a next header and header extension length field which is consistent with the other IPv6 extension headers, even if the next header valueisalways "NO NEXT HEADER"common for thecontrol messages; onlyPayload Message and thepayloadcontrol messagesuse the Next Header field. The shim6 headers must be a multiple of 8 octets, hence the minimum size is 8 octets. The common message header isand looks as follows: 0 12 3 0 1 2 3 4 5 6 7 8 90 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 67 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len|0| Type |Type specific|0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | Type specific format | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|P| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header:8-bit selector. Normally set to NO_NXT_HDR (59). Indicates the next header value for the shim6The payloadmessages.which follows this header. Hdr Ext Len: 8-bit unsigned integer. Length of the shim6 header in 8-octet units, not including the first 8 octets.Type: 7-bit unsigned integer. Identifies the actual message from the table below. 0:P: A single bit(set to zero) which allows shim6 and HIPtohave a common header format yet telling shim6 and HIPdistinguish Payload messagesapart. Checksum: 16-bit unsigned integer.from control messages. 5.2 Payload Message Format Thechecksumpayload message is used to carry ULP packets where the16-bit one's complement ofreceiver must replace theone's complement sumcontent of theentire shim6 header message starting withsource and or destination fields in theshim6 nextIPv6 headerfield, and ending as indicated bybefore passing theHdr Ext Len.packet to the ULP. Thus this extension header is included whentherethe locators pair that isa payload followingused is not theshim6 header,same as thepayloadULID pair. Since the shim isNOT includedplaced between the IP endpoint sub-layer and the IP routing sub-layer in theshim6 checksum. +------------+-----------------------------------------------------+ | Type Value | Message | +------------+-----------------------------------------------------+ | 1 | I1 (first establishment message fromhost, theinitiator) | | 2 | R1 (first establishment message fromshim header will be placed before any endpoint extension headers (fragmentation headers, destination options header, AH, ESP), but after any routing related headers (hop- by-hop extensions header, routing header, a destinations options header which precedes a routing header). When tunneling is used, whether IP-in-IP tunneling or theresponder) | | 3 | I2 (2nd establishment message fromspecial form of tunneling that Mobile IPv6 uses (with Home Address Options and Routing header type 2), there is a choice whether theinitiator) | | 4 | R2 (2nd establishment message fromshim applies inside theresponder) | | 5 | No Context Error | | 6 | Update Request | | 7 | Update Acknowledgement | | 8 | Reachability Probe | | 9 | Reachability Reply | | 10 | Keepalive | | 11 | Context Locator Pair Explore | +------------+-----------------------------------------------------+ Table 1 5.3 I1 Message Format The I1 message istunnel or outside thefirst message intunnel, which effects thecontext establishment exchange.location of the shim6 header. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |59 | Hdr Ext Len |0| Type = 1 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ChecksumNext Header |Reserved20 |1| Reserved | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |InitiatorReceiver Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Initiator Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Fields: Next Header:NO_NXT_HDR (59). Type: 1 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field.The payload which follows this header. Hdr Ext Len: 0 (since the header is 8 octets). P: Set to one. A single bit to distinguish this from the shim6 control messages. Reserved: Reserved for future use. Zero on transmit. MUST be ignored on receipt.InitiatorReceiver Context Tag: 32-bitfield. The Context Tag the initiator has allocated for the context. Initiator Nonce: 32-bitunsigned integer.A random number pickedAllocated by theinitiator whichreceiver for use to identify theresponder will return incontext (together with theR1 message.source and destination locators). 5.3 Common Shim6 Control header Thefollowing options are allowed incommon part of themessage: ULID pair: TBD Do we need to carryheader has a next header and header extension length field which is consistent with theULIDs, or assume they areother IPv6 extension headers, even if thesame asnext header value is always "NO NEXT HEADER" for theaddress fields incontrol messages; only theIPv6 header? Depends on how we handle failures during initial contact. 5.4 R1 Message Format The R1 message is the second message inpayload messages use thecontext establishment exchange.Next Header field. Theresponder sends this in response to an I1 message, without creating any state specific toshim6 headers must be a multiple of 8 octets, hence theinitiator.minimum size is 8 octets. The common message header is 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |59Next Header | Hdr Ext Len |0| Type= 2 | Reserved1 |0||Type specific|0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum |Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Initiator Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Responder Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |+ Options +| Type specific format | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: 8-bit selector. Normally set to NO_NXT_HDR (59).Type: 2 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. ReservedIndicates the next header value forfuture use. Zero on transmit. MUST be ignored on receipt. Initiator Nonce: 32-bit unsigned integer. Copied fromtheI1 message. Responder Nonce: 32-bitshim6 payload messages. Hdr Ext Len: 8-bit unsigned integer.A number picked by the responder which the initiator will return inLength of theI2 message. The following options are allowedshim6 header in 8-octet units, not including themessage: Responder Validator: Variable length option. Typically a hash generated by the responder, which the responder uses together with the Responder Nonce valuefirst 8 octets. P: Set toverify that an I2 message is indeed sent in responsezero. A single bit toa R1 message, and thatdistinguish this from theparameters inshim6 payload messages. Type: 7-bit unsigned integer. Identifies theI2actual messageare the same as those infrom theI1 message. 5.5 I2 Message Formattable below. 0: A single bit (set to zero) which allows shim6 and HIP to have a common header format yet telling shim6 and HIP messages apart. Checksum: 16-bit unsigned integer. The checksum is the 16-bit one's complement of the one's complement sum of the entire shim6 header message starting with the shim6 next header field, and ending as indicated by the Hdr Ext Len. Thus when there is a payload following the shim6 header, the payload is NOT included in the shim6 checksum. +------------+-----------------------------------------------------+ | Type Value | Message | +------------+-----------------------------------------------------+ | 1 | I1 (first establishment message from the initiator) | | 2 | R1 (first establishment message from the responder) | | 3 | I2 (2nd establishment message from the initiator) | | 4 | R2 (2nd establishment message from the responder) | | 5 | No Context Error | | 6 | Update Request | | 7 | Update Acknowledgement | | 8 | Reachability Probe | | 9 | Reachability Reply | | 10 | Keepalive | | 11 | SHIM6 Probe Message | +------------+-----------------------------------------------------+ Table 1 5.4 I1 Message Format The I1 message is thethirdfirst message in the context establishment exchange.The initiator sends this in response to a R1 message, after checking the Initiator Nonce, etc.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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type =31 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Initiator Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Initiator Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Responder Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ || + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type:31 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Initiator Context Tag: 32-bit field. The Context Tag the initiator has allocated for the context. Initiator Nonce: 32-bit unsigned integer. A random number picked by the initiator which the responder will return in theR2 message. Responder Nonce: 32-bit unsigned integer. Copied from theR1 message. The following options are allowed in the message:Responder Validator: Variable length option. Just a copy of the Validator option in the R1 message.ULID pair: TBD Do we need to carry the ULIDs, or assume they are the same as the address fields in the IPv6 header?Locator list: Optionally sent when the initiator immediately wants to tell the responder its list of locators. When it is sent, the necessary HBA/CGA information for validating the locator list MUSTDepends on how we handle failures during initial contact. We also need it to beincluded. Locator Preferences: Optionally sent when the locators don't all have equal preference. CGA Parameter Data Structure: Included when the locator list is included so the receiver can verifyable to reestablish thelocator list. CGA Signature: Includedhost-pair context after a failure when one end has lost thesome of the locators in the list use CGA (and not HBA) for validation. 5.6 R2context state. 5.5 R1 Message Format TheR2R1 message is thefourthsecond message in the context establishment exchange. The responder sends this in response to anI2 message. The R2 message is also used when both hosts sendI1messages at the same time andmessage, without creating any state specific to theI1 messages cross in flight.initiator. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type =42 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Responder Context TagInitiator Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |InitiatorResponder Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type:42 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt.Responder Context Tag: 32-bit field. The Context Tag the responder has allocated for the context.Initiator Nonce: 32-bit unsigned integer. Copied from the I1 message. Responder Nonce: 32-bit unsigned integer. A number picked by the responder which the initiator will return in the I2 message. The following options are allowed in the message:Locator List: Optionally sent whenResponder Validator: Variable length option. Typically a hash generated by the responder, which the responderimmediately wants to telluses together with theinitiator its list of locators. When itResponder Nonce value to verify that an I2 message issent, the necessary HBA/CGA information for validating the locator list MUST also be included. Locator Preferences: Optionallyindeed sentwhenin response to a R1 message, and that thelocators don't all have equal preference. CGA Parameter Data Structure: Included whenparameters in thelocator list is included and the PDS was not included in the context establishment messages, so the receiver can verify the locator list. CGA Signature: Included when the some ofI2 message are thelocatorssame as those in thelist use CGA (and not HBA) for validation. 5.7 No Context ErrorI1 message. 5.6 I2 Message FormatShould a host receive a packet with a shim PayloadThe I2 messageor shim6 control message, such a a locator update, and the host does not have any context state for the locators (inis theIPv6 source and destination fields) andthird message in the contexttag, then it will generate a No Context Error.establishment exchange. Theerror includes the packet that was received, subjectinitiator sends this in response to a R1 message, after checking thepacket not exceeding 1280 octets.Initiator Nonce, etc. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type =53 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Initiator Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Initiator Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Responder Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type:53 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Initiator Context Tag: 32-bit field. The Context Tag the initiator has allocated for the context. Initiator Nonce: 32-bit unsigned integer. A random number picked by the initiator which the responder will return in the R2 message. Responder Nonce: 32-bit unsigned integer. Copied from the R1 message. The following options are allowed in the message:Packet in Error:Responder Validator: Variable lengthoption containingoption. Just a copy of theIPv6 packet that wasValidator option inerror, starting withtheIPv6 header, and normally containingR1 message. ULID pair: TBD Do we need to carry thefull packet. IfULIDs, or assume they are theresulting No Context Error message would exceed 1280 octets,same as thePacket In Error option will not include the full packet in erroraddress fields inorder to limittheerrorIPv6 header? We also need it to1280 octets. 5.8 Update Request Message Format The Update Request Message is usedbe able toupdate eitherreestablish the host-pair context after a failure when one end has lost the context state. Locator list: Optionally sent when the initiator immediately wants to tell the responder its listor locators,of locators. When it is sent, the necessary HBA/CGA information for validating the locatorpreferences, and both. Whenlist MUST also be included. Locator Preferences: Optionally sent when the locators don't all have equal preference. CGA Parameter Data Structure: Included when the locator list is included so the receiver can verify the locator list. CGA Signature: Included when the some of the locators in the list use CGA (and not HBA) for validation. 5.7 R2 Message Format The R2 message isupdated,the fourth messagealso containsin theoption(s) necessary for HBA/CGAcontext establishment exchange. The responder sends this in response tosecure this.an I2 message. Thebasic sanity check that prevents off-path attackers from generating bogus updatesR2 message is also used when both hosts send I1 messages at thecontext tag insame time and themessage.I1 messages cross in flight. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type =64 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |ReceiverResponder Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |RequestInitiator Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type:64 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt.ReceiverResponder Context Tag: 32-bit field. The Context Tag thereceiverresponder has allocated for the context.RequestInitiator Nonce: 32-bit unsigned integer.A random number picked by the initiator which the peer will return inCopied from theacknowledgementI2 message. The following options are allowed in the message: Locator List:The list of the senders (new) locators. The locators might be unchanged and only the preferences have changed. Locator Preferences:Optionally sent when thelocators don't all have equal preference.responder immediately wants to tell the initiator its list of locators. When it is sent, the necessary HBA/CGA information for validating the locator list MUST also be included. Locator Preferences: Optionally sent when the locators don't all have equal preference. CGA Parameter Data Structure: Included when the locator list is included so the receiver can verify the locator list. CGA Signature: Included when the some of the locators in the list use CGA (and not HBA) for validation.5.9 Update Acknowledgement5.8 No Context Error Message FormatThisShould a host receive a packet with a shim Payload messageis sent in response toor shim6 control message, such aUpdate Request message. It implies that the Update Request has been received,a locator update, andthat any new locators in the Update Request can now be used asthesource locators of packets. But ithost does notimply thathave any context state for the(new)locatorshave been verified(in the IPv6 source and destination fields) and the context tag, then it willbe used asgenerate adestination, sinceNo Context Error. The error includes thehost might deferpacket that was received, subject to theverification of a locator until it is used as a destination.packet not exceeding 1280 octets. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type =75 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Receiver Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Request Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ || + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type:75 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt.Receiver Context Tag: 32-bit field.TheContext Tagfollowing options are allowed in thereceiver has allocated formessage: Packet in Error: Variable length option containing thecontext. Request Nonce: 32-bit unsigned integer. Copied fromIPv6 packet that was in error, starting with theUpdate Request message.IPv6 header, and normally containing the full packet. If the resulting Nooptions are currently defined for this message. 5.10 Reachability ProbeContext Error message would exceed 1280 octets, the Packet In Error option will not include the full packet in error in order to limit the error to 1280 octets. 5.9 Update Request Message Format TheReachability Probe messageUpdate Request Message is used toprevent 3rd party DoS attacks, and can also be used to verify whether a context is reachable at a given locator should that be needed forupdate either thegeneral reachability detection mechanism (e.g., if we picklist or locators, theCUD mechanism where one end sends probes and expects a reply). Before a host uses alocatorforpreferences, and both. When thepeer thatlist of locators isdifferent thanupdated, theULID, it needsmessage also contains the option(s) necessary for HBA/CGA toverifysecure this. The basic sanity check thatthe peerprevents off-path attackers from generating bogus updates isindeed present at that locator by sending a Context Verify and receiving an acknowledgement. This message includes the ULID pair as well asthe contexttag, so thattag in thepeer can indeed verify that it has that ULIDmessage. The update message contains options (the Locator List andthatthecontext tagLocator Preferences) that, when included, completely replace the previous locator list and locator preferences, respectively. Thus there iscorrect.no mechanisms to just send deltas to the locator list. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type =86 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Receiver Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Request Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type:86 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Receiver Context Tag: 32-bit field. The Context Tag the receiver has allocated for the context. Request Nonce: 32-bit unsigned integer. A random number picked by the initiator which theresponderpeer will return in the acknowledgement message. The following options are allowed in the message:ULID pair:Locator List: TheULID pair that is being probed. 5.11 Reachability Reply Message Format This is sent in response to a Reachability Probe message. Although, if the receiverlist of theReachability Probe does not have a matching context it will sendsenders (new) locators. The locators might be unchanged and only the preferences have changed. Locator Preferences: Optionally sent when the locators don't all have equal preference. CGA Signature: Included when the some of the locators in the list use CGA (and not HBA) for validation. 5.10 Update Acknowledgement Message Format This message is sent in response to aNo Context ErrorUpdate Request message. It implies that the Update Request has been received, and that any new locators in the Update Request can now be used as the source locators of packets. But it does not imply that the (new) locators have been verified to be used as a destination, since the host might defer the verification of a locator until it sees a need to use a locator as the destination. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type =97 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Receiver Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Request Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type:97 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Receiver Context Tag: 32-bit field. The Context Tag the receiver has allocated for the context. Request Nonce: 32-bit unsigned integer. Copied from therequestUpdate Request message.The followingNo options areallowed in the message: ULID pair: The ULID pair that is being probed. Copied from the Probecurrently defined for this message.5.12 Keepalive5.11 Reachability Probe Message Format TBD: Given [8] we do not need this message any more. ThekeepaliveReachability Probe messagewouldis used to prevent 3rd party DoS attacks, and can also be used to verify whether a context is reachable at a given locator should that be needed for the general reachability detection mechanism (e.g., if wedecide to dopick theForce Bidirectional communication asCUD mechanism where one end sends probes and expects away to get verificationreply). Before a host uses a locator for the peer that is different than thelocator pair continuesULID, it needs towork. If we are not going to do FBD we probably will not need this message.verify that the peer is indeed present at that locator by sending a Context Verify and receiving an acknowledgement. This message includes the ULID pair as well as the context tag, so that the peer can indeed verify that it has that ULID and that the context tag is correct. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type =108 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Receiver Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Request Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type:108 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Receiver Context Tag: 32-bit field. The Context Tag the receiver has allocated for the context. Request Nonce: 32-bit unsigned integer.Copied fromA random number picked by theReachability Probeinitiator which the responder will return in the acknowledgement message.NoThe following options arecurrently defined for this message. 5.13 Context Locator Pair Explore Message Format This is a placeholder for the protocol mechanism outlinedallowed in[7].the message: ULID pair: Theidea behindULID pair thatmechanismisto be able to handle the case when one locator pair works in from A to B, and another locator pair works from B to A, but therebeing probed. 5.12 Reachability Reply Message Format TBD: Given [8] we do not need this message any more. This isno locator pair which workssent inboth directions. The protocol mechanism is that as A is sending explore messagesresponse toB, B will observe which locator pairs it has received from and report that back in explore messagesa Reachability Probe message. Although, if the receiver of the Reachability Probe does not have a matching context itis sending to A.will send a No Context Error message. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type =119 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Sequence Number |Checksum | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Receiver Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Request Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type:119 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt.Sequence Number:Reserved2: 16-bitunsigned integer. Used to determine which messages have been received by the peer.field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Receiver Context Tag: 32-bit field. The Context Tag the receiver has allocated for the context. Request Nonce: 32-bit unsigned integer. Copied from the request message. The following options are allowed in the message:Explorer Results: Indication of what Explorer messages the sender has recently receivedULID pair: The ULID pair that is being probed. Copied from thepeer. 5.14 Option Formats All of the TLV parameters have a length (including Type and Length fields) which is a multiple of 8 bytes. When needed, padding MUSTProbe message. 5.13 Keepalive Message Format TBD: Given [8] we do not need this message any more. The keepalive message would beaddedused if we decide to do theend of the parameter so that the total length becomesForce Bidirectional communication as amultiple of 8 bytes. This rule ensures proper alignment of data. If padding is added, the Length field MUST NOT include the padding. Any added padding bytes MUST be zeroed by the sender, and their values SHOULD NOT be checked by the receiver. Consequently, the Length field indicates the length of the Contents field (in bytes). The total length of the TLV parameter (including Type, Length, Contents, and Padding) is relatedway to get verification that theLength field accordinglocator pair continues tothe following formula: Total Length = 11 + Length - (Length + 3) % 8;work. If we are not going to do FBD we probably will not need this message. 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 59 | Hdr Ext Len |0| Type|C| Length= 10 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum |/ Contents / / +-+-+-+-+-+-+-+-+Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |PaddingReceiver Context Tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Fields: Type: 15-bit identifier of the type of option. The options defined in this document| Request Nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Next Header: NO_NXT_HDR (59). Type: 10 Reserved1: 7-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Reserved2: 16-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Receiver Context Tag: 32-bit field. The Context Tag the receiver has allocated for the context. Request Nonce: 32-bit unsigned integer. Copied from the Reachability Probe message. No options arebelow. C: Critical. One ifcurrently defined for thisparametermessage. 5.14 SHIM6 Probe Message Format This message and its semantics are defined in [8]. The idea behind that mechanism iscritical,to be able to handle the case when one locator pair works in from A to B, and another locator pair works from B to A, but there is no locator pair which works in both directions. The protocol mechanism is that as A is sending probe messages to B, B will observe which locator pairs it has received from and report that back in probe messages it is sending to A. 5.15 Option Formats All of the TLV parameters have a length (including Type and Length fields) which is a multiple of 8 bytes. When needed, padding MUST berecognized byadded to therecipient, zero otherwise. An implementation might viewend of theC bit as partparameter so that the total length becomes a multiple of 8 bytes. This rule ensures proper alignment of data. If padding is added, the Length field MUST NOT include the padding. Any added padding bytes MUST be zeroed by the sender, and their values SHOULD NOT be checked by the receiver. Consequently, the Length field indicates the length of the Contents field (in bytes). The total length of the TLV parameter (including Type, Length, Contents, and Padding) is related to the Length field according to the following formula: Total Length = 11 + Length - (Length + 3) % 8; 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 |C| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | / Contents / / +-+-+-+-+-+-+-+-+ | | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Type: 15-bit identifier of the type of option. The options defined in this document are below. C: Critical. One if this parameter is critical, and MUST be recognized by the recipient, zero otherwise. An implementation might view the C bit as part of the Type field, by multiplying the type values in this specification by two. Length: Length of the Contents, in bytes. Contents: Parameter specific, defined by Type. Padding: Padding, 0-7 bytes, added if needed. +------------------------------+------+ | Option Name | Type | +------------------------------+------+ | Validator | 1 | | Locator List | 2 | | Locator Preferences | 3 | | CGA Parameter Data Structure | 4 | | CGA Signature | 5 | | ULID Pair | 6 | | Packet In Error | 7 | | SHIM6 Event Option | 8 | +------------------------------+------+ Table 2 5.15.1 Validator Option Format The responder can choose exactly what input uses to compute the validator, and what one-way function (MD5, SHA1) it uses, as long as the responder can verify that the validator it receives back in the I2 message is indeed one that 1) it computed, 2) it computed for the particular context, and 3) that it isn't a replayed I2 message. One way for the responder to do this is to maintain a single secret (S) and a running counter for the Responder Nonce. For each I1 message, the responder can then increase the counter, use the counter value as the responder nonce, and use the following information as input to the one-way function: o The the secret S o That Responder Nonce o The Initiator Context Tag from the I1 message o The ULIDs from the I1 message o The locators from the I1 message (strictly only needed if they are different from the ULIDs) 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 = 1 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Validator ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Validator: Variable length content whose interpretation is local to the responder. 5.15.2 Locator List Option Format The Locator List Option is used to carry all the locators of the sender. Note that the order of the locators is important, since the Locator Preferences refers to the locators by using the index in the list. Note that we carry all the locators in this option even though some of them can be created automatically from the CGA Parameter Data Structure. TBD: We can get a simpler format if we split this into two options: one with the locators and one with just the verification methods. 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 = 2 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Locator List Generation | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Num Locators | N Octets of Verification Method | +-+-+-+-+-+-+-+-+ | ~ ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Locators 1 through N ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Locator List Generation: 32-bit unsigned integer. Indicates a generation number which is increased by one for each new locator list. This is used to ensure that the index in the Locator Preferences refer to the right version of the locator list. Num Locators: 8-bit unsigned integer. The number of locators that are included in the option. We call this number "N" below. Verification Method: N octets. The i'th octet specifies the verification method for the i'th locator. Locators: N 128-bit locators. The defined verification methods are: +-------+----------+ | Value | Method | +-------+----------+ | 0 | Reserved | | 1 | HBA | | 2 | CGA | | 3-255 | Reserved | +-------+----------+ Table 3 5.15.3 Locator Preferences Option Format The Locator Preferences option can have some flags to indicate whether or not a locator is known to work. In addition, the sender can include a notion of preferences. It might make sense to define "preferences" as a combination of priority and weight the same way that DNS SRV records has such information. The priority would provide a way to rank the locators, and within a given priority, the weight would provide a way to do some load sharing. See [9] for how SRV defines the interaction of priority and weight. The minimum notion of preferences we need is to be able to indicate that a locator is "dead". We can handle this using a single octet flag for each locator. We can extend that by carrying a larger "element" for each locator. This document presently also defines 2-octet and 3-octet elements, and we can add more information by having even larger elements if need be. The locators are not included in the preference list. Instead, the first element refers to locator that was in the first element in the Locator List option. The generation number carried in this option and the Locator List option is used to verify that they refer to the same version of the locator list. 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 = 3 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Locator List Generation | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Element Len | Element[1] | Element[2] | Element[3] | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ ... ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Case of Element Len = 1 is depicted. Fields: Locator List Generation: 32-bit unsigned integer. Indicates a generation number for the locator list to which the elements should apply. Element Len: 8-bit unsigned integer. The length in octets of each element. This draft defines the cases when the length is 1, 2, or 3. Element[i]: A field with a number of octets defined by the Element Len field. Provides preferences for the i'th locator in the Locator List option that is in use. When the Element length equals one, then the element consists of only a flags field. The set of flags is TBD: Assume there will be two initially: BROKEN and TEMPORARY. The intent of the latter is to allow the distinction between more stable addresses and less stable addresses when shim6 is combined with IP mobility, when we might have more stable home locators, and less stable care-of-locators. When the Element length equals two, the the element consists of a 1 octet flags field followed by a 1 octet priority field. The priority has the same semantics as the priority in DNS SRV records. When the Element length equals three, the the element consists of a 1 octet flags field followed by a 1 octet priority field, and a 1 octet weight field. The weight has the same semantics as the weight in DNS SRV records. 5.15.4 CGA Parameter Data Structure Option Format This option contains the CGA parameter data structure (hereafter called the PDS). When HBA is used to validate the locators, the PDS contains the HBA multiprefix extension. When CGA is used to validate the locators, in addition to the CGA PDS, the signature will need to be included as a CGA Signature option. 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 = 4 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ CGA Parameter Data Structure ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: CGA Parameter Data Structure: Variable length content. Content defined in [5] and [6]. 5.15.5 CGA Signature Option Format When CGA is used for validation of one or more of the locators in the PDS, then the message in question will need to contain this option. 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 = 5 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ CGA Signature ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: CGA Signature: A variable-length field containing a PKCS#1 v1.5 signature, constructed by using the sender's private key over the following sequence of octets: 1. The 128-bit CGA Message Type tag [CGA] value for SHIM6, 0x4A 30 5662 4858 574B 3655 416F 506A 6D48. (The tag value has been generated randomly by the editor of this specification.). 2. The Locator List Generation value of the correspondent Locator List Option. 3. The subset of locators included in the correspondent Locator List Option which validation method is set to CGA. The locators MUST be included in the order they are listed in the Locator List Option. 5.15.6 ULID Pair Option Format It isn't clear whether we need this option. It depends whether we want to be able to setup a context for a ULID pair when that ULID pair can't be used to communicate. Thus the IPv6 addresses in the context establishment would not be the ULIDs. 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 = 2 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Sender ULID + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Receiver ULID + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Reserved: 48-bit field. Reserved for future use. Zero on transmit. MUST be ignored on receipt. Sender ULID: A 128-bit IPv6 address. Receiver ULID: A 128-bit IPv6 address. 5.15.7 Packet In Error Option Format 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 = 7 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ IPv6 header, shim6/TCP/UDP header, etc ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Packet: A variable length field which contains the packet in error starting with the IPv6 header. 5.15.8 SHIM6 Event Option Format This option is defined in [8]. 6. Conceptual Model of a Host This section describes a conceptual model of one possible data structure organization that hosts will maintain for the purposes of shim6. The described organization is provided to facilitate the explanation of how the shim6 protocol should behave. This document does not mandate that implementations adhere to this model as long as their external behavior is consistent with that described in this document. 6.1 Conceptual Data Structures The key conceptual data structure for the shim6 protocol is the host pair context. This is a data structure which contains the following information: o The peer ULID; ULID(peer) o The local ULID; ULID(local) o The list of peer locators, with their preferences; Ls(peer) o For each peer locator, the validation method to use (from the Locator List option). o For each peer locator, a bit whether it has been validated using HBA or CGA, and a bit whether the locator has been probed to verify that the ULID is present at that location. o The preferred peer locator - used as destination; Lp(peer) o The set of local locators and the preferences; Ls(local) o The preferred local locator - used as source; Lp(local) o The context tag used to transmit control messages and ULP packets - allocated by the peer; CT(peer) o The context to expect in received control messages and extension headers - allocated by the local host; CT(local) o Reachability state for the locator pairs. o During pair exploration, information about the probe messages that have been sent and received. The receiver finds the context by looking it up using <Source Locator, Destination Locator, CT(local)>, where the context tag is in the shim header. The sender needs to be able to find the context state when a ULP packet is passed down from the ULP. In that case the lookup key is the pair of ULIDs. 7. Establishing Host Pair Contexts Host pair contexts are established using a 4-way exchange, which allows the responder to avoid creating state on the first packet. As part of this exchange each end allocates a context tag, and it shares this context tag and its set of locators with the peer. In some cases the 4-way exchange is not necessary, for instance when both ends try to setup the context at the same time, or when recovering from a context that has been garbage collected or lost at one of the hosts. 7.1 Normal context establishment The normal context establishment consists of a 4 message exchange in the order of I1, R1, I2, R2. Initiator Responder ------------- I1 --------------> <------------ R1 --------------- ------------- I2 --------------> <------------ R2 --------------- Figure 24 7.2 Concurrent context establishment When both ends try to initiate a context for the same ULID pair, then we might end up with crossing I1 messages, or since the no state is created when receiving the I1, a host might send a I1 after having sent a R1 message. Since a host remembers that it has sent an I1, it can respond to an I1 from the peer (for the same ULID), with a R2. Initiator Responder -\ ---\ ---\ /--- --- I1 ---\ /--- ---\ /--- I1 ---/ ---\ /--- --> <--- -\ ---\ ---\ /--- --- R2 ---\ /--- ---\ /--- R2 ---/ ---\ /--- --> <--- Figure 25 If a host has received an I1 and sent an R1, then a ULP can trigger it to send an I1 message itself, since it doesn't retain any state when receiving the I1 message. Thus while one end is sending an I1 the other is sending an I2. Initiator Responder -\ ---\ ---\ --- I1 ---\ ---\ ---\ --> /--- /--- --- /--- R1--/ /--- <--- -\ ---\ ---\ /--- --- I2---\ /--- ---\ /--- I1 ---/ ---\ /--- --> <--- -\ ---\ ---\ /--- --- R2 ---\ /--- ---\ /--- R2 ---/ ---\ /--- --> <--- Figure 26 7.3 Context recovery Due to garbage collection, we can end up with one end having and using the context state, and the other end not having any state. We need to be able to recover this state at the end that has lost it, before we can use it. This need can arise in two cases: o The communication is working using the ULID pair as the locator pair, but a problem arises, and the end that has retained the context state decides to probe and explore alternate locator pairs. o The communication is working using a locator pair that is not the ULID pair, hence the ULP packets sent from a peer that has retained the context state use the shim payload header. In both cases the result is that the peer without state receives a shim message for which it has to context for the <source locator, destination locator, context tag>. In both of those case we can recover the context by having the node which doesn't have a context state, send back an R1bis [TBD] message, and have this complete a recover with a I2 and R2 message. If one end has garbage collected or lost the context state, it might try to create the context state (for the same ULID pair), by sending an I1 message. The peer can simply reply with an R2 message in this case. 7.4 Context confusion Since each end might garbage collect the context state we can have the case when one end has retained the context state and tries to use it, while the other end has lost the state. We discussed this in the previous section on recovery. But for the same reasons, when one host retains context tag X for ULID pair <A1, B1>, the other end might end up allocating that context tag for another ULID pair, e.g., <A3, B1> between the same hosts. In this case we can not use the recovery mechanisms since there needs to be separate context tags for the two ULID pairs. This type of "confusion" can be observed in two cases (assuming it is A that has retained the state and B has dropped it): o B decides to create a context for ULID pair <A3, B1>, and allocates X as its context tag for this, and sends an I1 to A. o A decides to create a context for ULID pair <A3, B1>, and starts the exchange by sending I1 to B. When B receives the I2 message, it allocates X as the context tag for this context. In both cases, A can detect that B has allocated X for ULID pair <A3, B1> even though that A still X as CT(peer) for ULID pair <A1, B1>. Thus A can detect that B must have lost the context for <A1, B1>. The solution to this issue is TBD. The know possibilities are: o Have A forcibly destroy the context for <A1, B1>, so that it can accept the new context for <A3, B1>. o Have A accept the context for <A3, B1>, forget about the old context, but initiate a new (replacement) context for <A1, B1> by sending an I1 message. That I1 through R2 exchange will make B allocate a new context tag for <A1, B1>. o Avoid the problem by changing the context tag allocation so that A and B allocates half of the bits (16 each) of the context tags, so that even if one end looses state, the peer can make sure that the context tags for each context are unique. 7.5 Sending I1 messages When the shim layer decides to setup a context for a ULID pair, it starts by allocating and initializing the context state for its end. As part of this it assigns its context tag to the context. Then it can send an I1 message. If the host does not receive an I2 or R2 message in response to the I1 message, then it needs to retransmit the I1 message. The retransmissions should use a retransmission timer with binary exponential backoff to avoid creating congestion issues for the network when lots of hosts perform this. If, after several retransmissions, there is no response, then most likely the peer does not implement the shim6 protocol, or there could be a firewall that blocks the protocol. In this case it makes sense for the host to remember to not try again to establish a host pair context with that ULID. However, any such negative caching should retained for a limit time; a few minutes would be appropriate, to allow things to recover should the host not be reachable at all when the shim tries to establish the context. If the host receives an ICMP error with "payload type unknown" and the included packet is the I1 packet it just sent, then this is a more reliable indication that the peer ULID does not implement shim6. 7.6 Receiving I1 messages If the host looks up a context for the ULID pair and the peer's (not its) context tag. If it finds such a context, the it needs to verify that the locators in the message are in fact part of the locator sets that are recorded in the existing context state. If this is not the case, then the I1 message MUST be silently ignored. (This can only happen when there is an ULID pair option in the I1 message.) If the locators are ok, then the host can respond with an R2 message as if it had received an I2 message and not an I1 message. If there is no existing context state, then the host forms a verifier and sends this back to the peer in an I2 message. No state is created on the host in this case. 7.7 Receiving R1 messages When the host receives an R1 message, it verifies that the nonce matches what it sent in the I1 message, and that it has context state for the ULID pair. It then sends an I2 message, which includes the verifier option that was in the R1 message. The I2 message also includes A's locator list and the CGA parameter data structure. If CGA (and not HBA) is used to verify the locator list, then A also signs the key parts of the message and includes a CGA signature option containing the signature. The host may receive an R1[bis] TBD message that was not sent in response to an I1 message but instead sent as a result of context recovery. The difference between an R1bis and an R1 message is that the former use the context tag of the responder. TBD how there are handled and whether they are identical to an R1. 7.8 Retransmitting I2 messages If the initiator does not receive an R2 message after sending an I2 message it MAY retransmit the I2 message. But since the verifier option might have a limited lifetime, that is, the peer might reject verifier options that are too old to avoid replay attacks, the initiator SHOULD fall back to retransmitting the I1 message when there is no response to one or a few I2 messages. 7.9 Receiving I2 messages The responder checks that the nonce and the verifier option is consistent with what it might have sent in a recent R1 message (by verifying the hash it computed.) If this is ok, then the host checks if it already has context state for the ULID pair and the CT(peer). If it has such state, the I2 message was probably a retransmission. In this case the host sends an R2 message. If there is no context state, the responder allocates a context tag (CT(local)) and creates the context state for the context. It records the peer's locator set as well as its own locator set in the context. It MAY verify the peers locator set at this point in time, but the requirement is that a locator MUST be verified before the host starts sending packets to that locator, thus the host MAY defer the verification until later. The host forms an R2 message with its locators and its context tag, and includes the necessary options so that the peer can verify the locators. R2 messages are never retransmitted. If the R2 message is lost, then the initiator will retransmit either the I2 or I1 message. Either retransmission will cause the responder to find the context state and respond with an R2 message. 7.10 Receiving R2 messages The initiator can receive an R2 message in response to either an I1 or an I2 message, but the handling of the R2 is the same in both cases. The host first verifies that the nonce is the same as the one it sent (in the I1 or I2 message). If it doesn't match, the R2 message is silently dropped. Then the host records the information from the R2 message in the context state. It records the peer's locator set in the context. It MAY verify the peers locator set at this point in time, but the requirement is that a locator MUST be verified before the host starts sending packets to that locator, thus the host MAY defer the verification until later. 8. No Such Content Errors TBD The Interim Meeting discussed ways to recover the context state at one end when the other end sees a failure (and starts sending Probe messages). The discussed approach is to use a R1 (or R1bis) message in response to a message with an unknown context, which would cause the context to be recreated. The idea is that on receipt of a SHIM6 payload packet where there is no current SHIM6 context at the receiver, the receiver is to respond with an R1bis packet in order to re-establish SHIM6 context. The R1bis packet differs from the R1 packet in that an R1 packet echoes the I1 fields, while this R1bis offers state back to the sender. One key difference is that the I1 packet contains the initiator's context tag, while the payload message header contains the receivers context tag. Either way the next control packet is an I2 in response. The senders previous context state is to be flushed in receipt of theType field, by multiplyingR2 packet following thetype values inR1bis, I2 exchange. The details of thisspecification by two. Length: Lengthtype of exchange needs to be worked out, but theContents, in bytes. Contents: Parameter specific, defined by Type. Padding: Padding, 0-7 bytes, added if needed. +------------------------------+------+ | Option Name | Type | +------------------------------+------+ | Validator | 1 | | Locator List | 2 | | Locator Preferences | 3 | | CGA Parameter Data Structure | 4 | | CGA Signature | 5 | | ULID Pair | 6 | | Packet Inlikely result is that we will not need a separate "No context" error message. 9. Handling ICMP Error| 7 | | Explorer Results | 8 | +------------------------------+------+ Table 2 5.14.1 Validator Option FormatMessages Theresponder can choose exactly what input uses to computerouters in thevalidator, and what one-way function (MD5, SHA1) it uses,path aslongwell as theresponder can verifydestination might generate various ICMP error messages, such as host unreachable, packet too big, and payload type unknown. It is critical thatthe validatorthese packets make itreceivesback up to the ULPs so that they can take appropriate action. When the ULP packets are sent unmodified, that is, while the initial locators=ULIDs are working, this introduces no new concerns; an implementation's existing mechanism for delivering these errors to the ULP will work. But when the shim on the transmitting side replaces the ULIDs in theI2 messageIP address fields with some other locators, then an ICMP error coming back will have a "packet in error" which isindeed onenot a packet that1) it computed, 2) it computed fortheparticular context, and 3) that it isn't a replayed I2 message. One way forULP sent. Thus theresponderimplementation will have todo this isapply the reverse mapping tomaintain a single secret (S) and a running counter fortheResponder Nonce. For each I1 message,"packet in error" before passing theresponder can then increaseICMP error up to thecounter, useULP. This mapping is different than when receiving ULP packets from thecounter value aspeer, because in that case theresponder nonce, and usepackets contain CT(local). But thefollowing information as inputICMP errors have a "packet in error" with CT(peer) since they were intended to be received by theone-way function: o The the secret S o That Responder Nonce o The Initiator Context Tag from the I1 message o The ULIDs frompeer. In any case, since theI1 message o The locators from<Source Locator, Destination Locator, CT(peer)> has to be unique when received by theI1 message (strictly only needed if they are different frompeer, theULIDs) 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 = 1 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Validator ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Validator: Variable length content whose interpretation islocal host should also only be able to find one context that matches this tuple. If theresponder. 5.14.2 Locator List Option FormatULP packet had been encapsulated in a shim6 payload message, then this extension header must be removed. TheLocator List Option is usedresult needs tocarry all the locators of the sender. Notebe that theorder ofULP receives an ICMP error where thelocators is important, sincecontained "packet in error" looks as if theLocator Preferences andshim did not exist. 10. Teardown of theExplorer message refersHost Pair Context Each host can unilaterally decide when to tear down a host-pair context. It is RECOMMENDED that hosts not tear down thelocators by using the index in the list. Notecontext when they know thatwe carry allthere is some upper layer protocol that might use thelocators incontext. For example, an implementation might know thisoption even though some of them canis there is an open socket which is connected to the ULID(peer). However, there might becreated automatically fromcases when theCGA Parameter Data Structure. 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 = 2 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Locator List Generation | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Num Locators | N Octets of Verification Method | +-+-+-+-+-+-+-+-+ | ~ ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Locators 1 through N ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Locator List Generation: 32-bit unsigned integer. Indicates a generation numberknowledge is not readily available to the shim layer, for instance for UDP applications which not not connect their sockets, or any application which retains some higher level state across (TCP) connections and UDP packets. Thus it isincreasedRECOMMENDED that implementations minimize premature teardown byone for each new locator list. Thisobserving the amount of traffic that isusedsent and received using the context, and only after it appears quiescent, tear down the state. TBD: The Interim meeting discussed whether it was feasible toensurerelax this so that one can end up with an asymmetric distribution of theindex in the Locator Preferencescontext state andExplorer results referstill get (most of) the shim benefits. For example, the busy server would go through the context setup but would quickly remove the context state after this (in order to save memory) but theright version ofnot-so-busy client would retain thelocator list. Num Locators: 8-bit unsigned integer.context state. Thenumber of locators that are includedcontext recover mechanism presented in Section 7.3 would then be recreate theoption. We call this number "N" below. Verification Method: N octets. The i'th octet specifiesstate should theverification methodclient send either a shim control message (e.g., probe message because it sees a problem), or a ULP packet in an payload extension header (because it had earlier failed over to an alternative locator pair, but had been silent for a while). This seems to provide the benefits of the shim as long as the client can detect the failure. If the client doesn't send anything, and it is the server that tries to send, then it will not be able to recover because the shim on the server has no context state, hence doesn't know any alternate locator pairs. 11. Updating thei'th locator. Locators: N 128-bit locators. The defined verification methods are: +-------+----------+ | Value | Method | +-------+----------+ | 0 | Reserved | | 1 | HBA | | 2 | CGA | | 3-255 | Reserved | +-------+----------+ Table 3 5.14.3LocatorPreferences Option FormatPairs TBD The validation issues for the locators carried in the LocatorPreferences option can have some flagsUpdate message are specified in Section 4.4. 12. Various Probe Mechanisms TBD 13. Rehoming toindicate whether or notalocatorDifferent Locator Pair TBD 14. Sending ULP Payloads When there isknown to work. In addition,no context state for thesender can includeULID pair on the sender, there is no effect on how ULP packets are sent. If the host is using some heuristic for determining when to perform anotion of preferences. Itdeferred context establishment, then the host mightmake senseneed todefine "preferences" as a combinationdo some accounting (count the number ofprioritypackets sent andweight the same way that DNS SRV records has such information. The priority would providereceived) even before there is awayhost- pair context. If there is a host-pair context for the ULID pair, then the sender needs torankverify whether context uses the ULIDs as locators, that is, whether Lp(peer) == ULID(peer) andwithin a given priority,Lp(local) == ULID(local). If this is theweight would provide a waycase, then packets will be sent unmodified by the shim. If it is not the case, then the logic in Section 14.1 will need todobe used. There will also be someload sharing. See [8] for how SRV defines the interaction of priority and weight.maintenance activity relating to (un)reachability detection, whether packets are sent with the original locators or not. Theminimum notiondetails ofpreferences we needthis istoout of scope for this document and will beablecovered is follow-ons toindicate that[7]. 14.1 Sending ULP Payload after alocatorSwitch When sending packets, if there is"dead". We can handle this using a single octet flag for each locator. We can extend that by carryingalarger "element"host-pair context foreach locator. This document presently also defines 2-octet and 3-octet elements,the ULID pair, andwe can add more information by having even larger elements if need be. The locators are not included inthepreference list. Instead,ULID pair is no longer used as thefirst element refers tolocatorthat was inpair, then thefirst element insender needs to transform theLocator List option. The generation number carried in this option andpacket. Apart from replacing theLocator List optionIPv6 source and destination fields with a locator pair, an 8-octet header isused to verifyadded so thatthey refer tothesame version ofreceiver can find thelocator list. 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 = 3 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Locator List Generation | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Element Len | Element[1] ... | Element[2] | | ... | Element[3] ... | ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ~ ... ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Locator List Generation: 32-bit unsigned integer. Indicates a generation number forcontext and inverse thelocator list to whichtransformation. First, theelements should apply. Element Len: 8-bit unsigned integer.IP address fields are replaced. Thelength in octetsIPv6 source address field is set to Lp(local) and the destination address field is set to Lp(peer). NOTE that this MUST NOT cause any recalculation ofeach element. This draft definesthecases whenULP checksums, since thelengthULP checksums are carried end-to-end and the ULP pseudo-header contains the ULIDs which are preserved end-to-end. The sender skips any "routing sub-layer extension headers" that the ULP might have included, thus it skips any hop-by-hop extension header, any routing header, and any destination options header that is1, 2,followed by a routing header. After any such headers the shim6 extension header will be added. This might be before a Fragment header, a Destination Options header, an ESP or AH header, or3. Element[i]: A field withanumber of octets defined byULP header. The inserted shim6 Payload extension header includes theElement Len field. Provides preferences forpeer's context tag. 15. Receiving Packets As in normal IPv6 receive side packet processing thei'th locatorreceiver parses the (extension) headers in order. Should it find a shim6 extension header it will look at theLocator List option that istype field inuse. Whenthat header. If theElement length equals one,type is Payload message, then theelement consists of only a flags field. The set of flags is TBD: Assume there willpacket must betwo initially: BROKEN and TEMPORARY. The intentpassed to the shim6 payload handling for rewriting. (Otherwise, the shim6 control messages are handled as specified in other parts of this document.) The receiver extracts thelatter is to allowcontext tag from thedistinction between more stable addressespayload message header, andless stable addresses when shim6 is combineduses this together withIP mobility, when we might have more stable home locators,the IPv6 source andless stable care-of-locators. Whendestination address fields to find a host-pair context. If no context is found, theElement length equals two,receiver SHOULD generate a No Such Context error message (see Section 8). With the context in hand, theelement consists of a 1 octet flags field followed by a 1 octet priority field. The priority hasreceiver can now replace thesame semantics asIP address fields with thepriorityULIDs kept inDNS SRV records. WhentheElement length equals three,context. Finally, the Payload extension header is removed from the packet (so that theelement consists of a 1 octet flags field followedULP doesn't get confused bya 1 octet priority field,it), anda 1 octet weight field. The weight has the same semantics astheweightnext header value inDNS SRV records. 5.14.4 CGA Parameter Data Structure Option Format This option containstheCGA parameter data structure (hereafter called the PDS). When HBApreceding header isusedset tovalidatebe thelocators,actual protocol number for thePDS containspayload. Then theHBA multiprefix extension. When CGApacket can be passed to the protocol identified by the next header value (which might be some function associated with the IP endpoint sublayer, or a ULP). If the host isusedusing some heuristic for determining when tovalidateperform a deferred context establishment, then thelocators, in additionhost might need to do some accounting (count theCGA PDS,number of packets sent and received) for packets that does not have a shim6 extension header. But thesignature willneedto be included as a CGA Signature option. 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 = 4 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ CGA Parameter Data Structure ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: CGA Parameter Data Structure: Variable length content. Content defined in [5]. 5.14.5 CGA Signature Option Format When CGA is usedforvalidationthis depends on what heuristics the implementation has chosen. 16. Initial Contact TBD Describe what inital contact is (basically some non-shim communication starts between two ULIDs), and what the implications are ofone or morefailures. Basic option is to rely on the application retrying and RFC 3484bis ordering of source and destination ULIDs. 17. Open Issues The following open issues are known: o Forking thelocators incontext state. On thePDS, thenmailing list we've discussed themessage in question willneed tocontain this option. 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 = 5 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: CGA Signature: Variable length content. Content defined in [5]. 5.14.6 ULID Pair Option Format It isn't clear whether we need this option. It depends whetherfork the context state, so that different ULP streams can be sent using different locator pairs. No protocol extensions are needed if any forking is done independently by each endpoint. But if we want A to be able tosetup a context for a ULID pair whentell B thatULID pair can'tcertain traffic (a 5-tuple?) should beusedforked, then we need a way tocommunicate. Thus the IPv6 addressesconvey this in thecontext establishmentshim6 protocol. The hard part wouldnotbethe ULIDs. 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 = 2 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Sender ULID + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Receiver ULID + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Reserved: 48-bit field. Reserved for future use. Zero on transmit. MUSTdefining what selectors can beignored on receipt. Sender ULID: A 128-bit IPv6 address. Receiver ULID: A 128-bit IPv6 address. 5.14.7 Packet In Error Option Format 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 = 7 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ IPv6 header, shim6/TCP/UDP header, etc ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Packet: A variable length field which containsspecified for thepacket in error starting withfilter which determines which traffic uses which of theIPv6 header. 5.14.8 Explorer Results Option Format TBD: This needsforks. So the question is whether we really need signaling for forking, or whether it is sufficient toindicate which explorer messages (sequence numbers, source and destination locators?) that have been recently received, in orderallow each endpoint todetectdo its own selection of which locatorpairs work when therepair it isnousing for which traffic. o If we allow forking, it seems like the mechanism for reachability detection, whether it is CUD or FBD, must be applied separately for each locator pairwhich worksthat is inboth directions.use. Without forking a single locator pair will be in use for each host-pair context, hence things would be simpler. o What happens when a host runs out of N bit context tags? Whenindicating locatorsis itmakes sensesafe for a host touse the offset inreuse a context tag? With theLocator List (that was carries inunilateral teardown one end might discard theLocator List option), since this takes less space than includingcontext state long before thelocators themselves. TBD: add that data andothershim control messages are included in the learned results. p 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 = 8 |0| Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sender Locator List Generation | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Receiver Locator List Generation | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ ~ Explorer Results ~ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Sender Locator List Generation: The generation number for the sender's locator list to whichend. o Should a host explicitly fail communication when a ULID becomes invalid (based on RFC 2462 lifetimes or DHCPv6), or should we let theindices below refer. Receiver Locator List Generation: The generation number forcommunication continue using thereceiver's locator listinvalidated ULID (it can certainly work since other locators will be used). o Should we rename "host-pair context" towhich the indices below refer. Explorer Results: This field contains a list of elements, where each element indicates one locatorbe "ULID-pair context"? If we've decided this is per ULID pair that might make sense. o We need to pick some initial retransmit timers forwhich the sender ofI1 and I2. Is 4 seconds ok? o Should we require that theoption has recently received a message. Each result occupies 32 bits. The list shouldR1 verifier beorderedusable for some minimum time so that themost recently heard locator pairs are first. SHOULD NOT include locator pairs that were last received more than some number of seconds ago. p 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sender Index | Receiver Index| Sequence Number | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Sender Index: 8-bit unsigned Integer. The Index is relativeinitiator knows for how long time it can safely retransmit I2 before it needs to go back to sending I1 again? o Should we expand thesender's locator list. Receiver Index: 8-bit unsigned Integer. The Index is relativecontext tag from 32 to 47 bits? o Should we make the receiver not use the source locatorlist. Sequence Number: 16-bit unsigned Integer. The Sequence number ofto find theexplorer message incontext, but instead only use the context tag? (and optionally, the destination locator). This would provide some flexibility for the future. The potential downside, which we would need to understand, is packet injection. *If* there is ingress filtering, then we get some extra checking by including the source locatorpair < sender index, receiver index> was last heard. If this locator pair was last heardina message other thanthe lookup. But anExplore message, then this numberon-path attacker can inject packets at will, whether the source locator iszero. 6. Conceptual Modelpart of the lookup or not. An off- path attacker would have aHost This section describeshard time to guess aconceptual model of one possible data structure organization that hosts will maintain for the purposes of shim6. The described organization is provided47-bit number. o Include locator list in R1 message tofacilitate the explanation of how the shim6 protocol should behave. This document does not mandate that implementations adheredeal with R2 being dropped? o Should we allow a host tothis model as long as their external behavior is consistentintentionally discard the context state, with the assumption thatdescribed in this document. 6.1 Conceptual Data Structures The key conceptual data structure fortheshim6 protocolpeer isthe host pair context.responsible to maintain it, and detect failures? Thisismight be useful in asymetric case, e.g. adata structuresserver whichcontains the following information: o The peer ULID; ULID(peer) o The local ULID; ULID(local) o The listserves lots ofpeer locators, with their preferences; Ls(peer) oclients, but it can't recover from all failures. Foreach peer locator,instance, if the client doesn't send anything for abit whether it has been validated using HBA,while, anda bit whetherwhen the server starts to send the locatorhas been probedpair doesn't work any more. In this case the server can do nothing since it doesn't have a context with alternate locators, and the client can't possibly know that the server might be having problems reaching it. o When does a host need to verifythattheULID is present at that location. o The preferred peerlocator- used as destination; Lp(peer) o The set of locallist? Immediately i.e. before accepting packets from those locatorsand the preferences; Ls(local) o The preferred local locator - usedassource; Lp(local) o The context tag used to transmit control messages and ULP packets - allocated bythepeer; CT(peer) o The contextsource address? Or before sending packets toexpect in received controlthose locators? There are some issues if it isn't verified immediately since it allows an on-path attacker to send bogus update messagesand extension headers - allocated bywhich can not be verified; that would potentially make thelocal host; CT(local) o Reachability state forhost no longer accept packets from the actual locatorpairs. o During pair exploration, information about the explore messagesthathave been sent and received. The receiver finds the context by looking it up using <Source Locator, Destination Locator, CT(local)>, wherethecontext tagpeer isin the shim header. The sender needs to be ableusing, and when it tries tofindverify thecontext state when a ULP packetlocators it would find that they are "bad" and has no alternate peer locator it can use. This ispassed down fromtheULP. In thatcase even if thelookup key ispeer has sent a locator list as long as thepairattacker has sent a more recent one. 18. Implications Elsewhere The general shim6 approach, as well as the specifics ofULIDs. 7. Establishing Host Pair Contexts Host pair contexts are establishedthis proposed solution, has implications elsewhere. The key implications are: o Applications that perform referrals, or callbacks usinga 4-way exchange, which allowsIP addresses as theresponder'identifiers' can still function in limited ways, as described in [18]. But in order for such applications toavoid creating state on the first packet. As part of this exchange each end allocates a context tag, and it shares this context tag and its setbe able to take advantage of the multiple locatorswithfor redundancy, thepeer. In some casesapplications need to be modified to either use fully qualified domain names as the4-way exchange is not necessary, for instance when both ends try'identifiers', or they need tosetuppass all thecontext atlocators as thesame time, or when recovering'identifiers' i.e., the 'identifier' from the applications perspective becomes acontext that has been garbage collected or lost at oneset ofthe hosts. 7.1 Normal context establishment The normal context establishment consistsIP addresses instead of a4 message exchange insingle IP address. o Firewalls that today pass limited traffic, e.g., outbound TCP connections, would presumably block theorder of I1, R1, I2, R2. Initiator Responder ------------- I1 --------------> <------------ R1 --------------- ------------- I2 --------------> <------------ R2 --------------- Figure 26 7.2 Concurrent context establishment When both ends try to initiate a context forshim6 protocol. This means that even when shim6 capable hosts are communicating, thesame ULID pair, then we might end up with crossingI1messages, or sincemessages would be dropped, hence theno statehosts would not discover that their peer iscreated when receivingshim6 capable. This is in fact a feature, since if the hosts managed to establish a host-pair context, then theI1,firewall would probably drop the "different" packets that are sent after ahost might sendfailure (those using the shim6 payload message with aI1TCP packet inside it). Thus stateful firewalls that are modified to allow shim6 messages through should also be modified to allow the payload messages through afterhaving sent a R1 message. Sinceahost remembersfailure. This presumably implies thatit has sent an I1, it can respondthe firewall needs toan I1 fromtrack thepeer (forset of locators in use by looking at thesame ULID), with a R2. Initiator Responder -\ ---\ ---\ /--- --- I1 ---\ /--- ---\ /--- I1 ---/ ---\ /--- --> <--- -\ ---\ ---\ /--- --- R2 ---\ /--- ---\ /--- R2 ---/ ---\ /--- --> <--- Figure 27 If a host has received an I1 and sent an R1, then a ULP can trigger itshim6 exchanges. Such firewalls might even want tosend an I1 message itself, since it doesn't retain any state when receivingverify theI1 message. Thus while one end is sending an I1locators using the HBA/CGA verification themselves. o Signaling protocols for QoS or otheris sending an I2. Initiator Responder -\ ---\ ---\ --- I1 ---\ ---\ ---\ --> /--- /--- --- /--- R1--/ /--- <--- -\ ---\ ---\ /--- --- I2---\ /--- ---\ /--- I1 ---/ ---\ /--- --> <--- -\ ---\ ---\ /--- --- R2 ---\ /--- ---\ /--- R2 ---/ ---\ /--- --> <--- Figure 28 7.3 Context recovery Due to garbage collection, we can end up with one endthings that involve havingand usingdevices in thecontext state,network path look at IP addresses andthe other end not having any state. Weport numbers, or IP addresses and Flow Labels, need to beableinvoked on the hosts when the locator pair changes due torecover this state ata failure. At that point in time those protocols need to inform theenddevices thathas lost it, beforea new pair of IP addresses will be used for the flow. Note that this is the case even though wecan use it. Thisno longer overload the flow label as a context tag; the in-path devices needcan arise in two cases:to know about the use of the new locators even though the flow label stays the same. o MTU implications. Thecommunication is working usingpath MTU mechanisms we use are robust against different packets taking different paths through theULID pair asInternet, by computing a minimum over the recently observed path MTUs. When shim6 fails over from using one locator pair to another pair,butthis means that packets might travel over aproblem arises, anddifferent path through theendInternet, hence the path MTU might be quite different. Perhaps such a path change would be a good hint to the path MTU mechanism to try a larger MTU? The fact thathas retainedthecontext state decidesshim, at least for uncommon payload types, will add an 8 octet extension header (the payload message) after a locator switch, can also affect the usable path MTU for the ULPs. In this case the MTU change is local to the sending host, thus conveying the change toexplore alternate locator pairs. The communication is working using a locator pair thatthe ULPs isnotan implementation matter. 19. Security Considerations This document satisfies theULID pair, henceconcerns specified in [17] as follows: o TBD: Using HBA or CGA for ... Some of theULP packets sent from a peer that has retainedresidual threats in this proposal are: o An attacker which arrives late on the path (after the contextstatehas been established) can use theshim payload header. In both casesNo Such Context error to cause one peer to recreate theresult iscontext, and at that point in time thepeer without state receives a shim message for which it hasattacker can observe all of the exchange. But this doesn't seem tocontextopen any new doors for the<source locator, destination locator, context tag>. In both of those case weattacker since such an attacker canrecover the context by havingobserve thenode which doesn't have a context state, send back an R1bis [TBD] message, and have this complete a recover with a I2Context tags that are being used, andR2 message. If one end has garbage collected or lost the context state,once known itmight trycan use those tocreate the context state (forsend bogus messages. o An attacker which is present on thesame ULID pair), by sending an I1 message. The peerpath so that it cansimply reply with an R2 message in this case. 7.4 Context confusion Since each end might garbage collectfind out the contextstate wetags, canhave the case when one endgenerate a No Such Context error after it hasretainedmoved off thecontext state and triespath. For this packet to be effective it needs to have a source locator which belongs touse it, whiletheother end has lostcontext, thus there can not be "too much" ingress filtering between thestate. We discussed this inattackers new location and theprevious section on recovery.communicating peers. Butforthis doesn't seem to be that severe, because once the error causes thesame reasons, when one host retainscontexttag X for ULIDto be torn down and re-established, a new pair<A1, B1>, the other end might end up allocating thatof contexttag for another ULID pair, e.g., <A3, B1> betweentags will be used, which will not be known to thesame hosts. Inattacker. If thiscaseis still a concern, wecan not usecould require a 2-way handshake "did you really loose therecovery mechanisms since there needsstate?" in response to the error message. o It might beseparatepossible for an attacker to try random 32-bit context tags and see if they can cause disruption forthecommunication between twoULID pairs. This type of "confusion"hosts. We canbe observed in two cases (assuming itmake this harder by using a larger context tag; 47 bits isAthe largest thathas retainedfit in thestate8-octet payload header. If this isn't sufficient, one could use an even larger tag in the shim6 control messages, andB has dropped it): B decidesuse the low-order 47 bits in the payload header. 20. IANA Considerations IANA needs tocreateallocate acontext for ULID pair <A3, B1>, and allocates X as its context tagnew IP Next Header value forthis, and sends an I1 to A. A decidesthis protocol. IANA also needs tocreaterecord acontextCGA message type forULID pair <A3, B1>, and starts the exchange by sending I1 to B. When B receivesthis protocol in theI2 message, it allocates X as[CGA] namespace, 0x4A30 5662 4858 574B 3655 416F 506A 6D48. TBD: thecontext tagIANA rules for the shim6 message types and option types. 21. Possible Protocol Extensions During the development of thiscontext. In both cases, A can detect that B has allocated X for ULID pair <A3, B1> even though that A still Xprotocol, several issues have been brought up asCT(peer) for ULID pair <A1, B1>. Thus A can detectimportant one to address, but are ones thatB must have lost the context for <A1, B1>. The solutiondo not need tothis issue is TBD. The know possibilities are: Have A forcibly destroybe in thecontext for <A1, B1>, so that itbase protocol itself but canacceptinstead be done as extensions to thenew contextprotocol. The key ones are: o Is there need for<A3, B1>. Have A acceptkeeping thecontext for <A3, B1>, forget aboutlist of locators private between theold context,two communicating endpoints? We can potentially accomplish that when using CGA butinitiate a new (replacement) context for <A1, B1> by sending an I1 message. That I1 through R2 exchange will make B allocate a new context tag for <A1, B1>. Avoid the problem by changingnot with HBA, but it comes at thecontext tag allocation so that Acost of doing some public key encryption andB allocates half of the bits (16 each)decryption operations as part of the contexttags, so that even if one end looses state,establishment. The suggestion is to leave this for a future extension to thepeer can make sureprotocol. o Defining some form of end-to-end "compression" mechanism that removes thecontext tagsneed foreach context are unique. 7.5 Sending I1 messages Whenincluding the Shim6 Payload extension header when the locator pair is not theshim layer decides to setup a context for aULIDpair, it starts by allocatingpair. 22. Change Log The following changes have been made since draft-ietf-shim6-proto-00: o Removed the use of the flow label andinitializingthecontext state for its end. As partoverloading ofthis it assigns its context tag tothecontext. Then it can send an I1 message. IfIP protocol numbers. Instead, when thehost doeslocator pair is notreceivethe ULID pair, the ULP payloads will be carried with anI2 or R2 message in response8 octet extension header. The belief is that it is possible to remove these extra bytes by defining future shim6 extensions that exchange more information between theI1 message, then it needshosts, without having toretransmitoverload theI1 message. The retransmissions should use a retransmission timerflow label or the IP protocol numbers. o Grew the context tag from 20 bits to 32 bits, withbinary exponential backoffthe possibility to grow it to 47 bits. This implies changes toavoid creating congestion issues forthenetwork when lots of hosts perform this. If, after several retransmissions, theremessage formats. o Almost by accident, the new shim6 message format isno response, then most likelyvery close to thepeer does not implementHIP message format. o Adopted theshim6 protocol, or there could be a firewall that blocksHIP format for theprotocol. Inoptions, since thiscase itmakessense for the host to rememberit easier tonot try againdescribe variable length options. The original, ND-style, option format requires internal padding in the options toestablish a host pair context withmake them 8 octet length in total, while the HIP format handles thatULID. However, any such negative caching should retained for a limit time;using the option length field. o Removed some of the control messages, and renamed the other ones. o Added afew minutes would be appropriate, to allow things"generation" number torecover shouldthehost not be reachable at all whenLocator List option, so that theshim triespeers can ensure that the preferences refer toestablishthecontext. Ifright "version" of thehost receives an ICMP error with "payload type unknown"Locator List. o In order for FBD and exploration to work when there theincluded packetuse of the context is forked, that is different ULP messages are sent over different locator pairs, things are a lot easier if there is only one current locator pair used for each context. Thus theI1 packet it just sent, then thisforking of the context is now causing amore reliable indication thatnew context to be established for thepeer ULID does not implement shim6. 7.6 Receiving I1 messages Ifsame ULID; the new context having a new context tag. The original context is referred to as thehost looks up a"default" context for the ULIDpairpair. o Added more background material and textual descriptions. 23. Acknowledgements Over thepeer's (not its) context tag. If it finds such a context, the it needs to verify that the locatorsyears many people active in themessagemulti6 and shim6 WGs have contributed ideas a suggestions that are reflected infact partthis draft. Thanks to Marcelo Bagnulo for providing comments on earlier versions of this draft. Appendix A. Design Alternatives This document has picked a certain set of design choices in order to try to work out a bunch of thelocator sets thatdetails, and stimulate discussion. But as has been discussed on the mailing list, there arerecordedother choices that make sense. This appendix tries to enumerate some alternatives. Appendix A.1 Context granularity TBD Appendix A.2 Demultiplexing of data packets inthe existingshim6 communications Once a Host-pair contextstate. If thisisnot the case, thenestablished between two hosts, packets may carry locators that differ from theI1 message MUST be silently ignored. (This can only happen when there is an ULID pair option inULIDs presented to theI1 message.) IfULPs using thelocators are ok, thenestablished context. One of main functions of thehost can respond with an R2 message as if it had received an I2 message and not an I1 message. If thereSHIM6 layer isno existing context state, then the host forms a verifier and sends this backto perform thepeer in an I2 message. No state is created on the host in this case. 7.7 Receiving R1 messages When the host receives an R1 message, it verifies thatmapping between thenonce matches what it sent inlocators used to forward packets through theI1 message,network and the ULIDs presented to the ULP. In order to perform thatit has context statetranslation for incoming packets, theULID pair. It then sends an I2 message,SHIM6 layer needs to first identify whichincludesof theverifier option that was inincoming packets need to be translated and then perform theR1 message. The I2 message also includes A's locator listmapping between locators and ULIDs using theCGA parameter set. If CGA (and not HBA)associated context. Such operation is called demultiplexing. It should be noted that because any address can be usedto verify theboth as a locatorlist, then A also signs thingsandincludesas aCGA signature option. The host may receive an R1[bis] TBD message that was not sentULID, additional information other than the addresses carried inresponsepackets, need toan I1 message but instead sent asbe taken into account for this operation. For example, if aresult of context recovery. The difference between an R1bishost has address A1 andan R1 message is that the former use the context tag of the responder??? TBD how there are handledA2 andwhether they are identical to an R1. 7.8 Retransmitting I2 messages If the initiator does not receive an R2 message after sending an I2 message it MAY retransmit the I2 message. But since the verifier option might havestarts communicating with alimited lifetime, that is, thepeer with addresses B1 and B2, then some communication (connections) mightreject verifier options thatuse the pair <A1, B1> as ULID and others might use e.g., <A2, B2>. Initially there aretoo old to avoid replay attacks,no failures so these address pairs are used as locators i.e. in theinitiator SHOULD fall back to retransmittingIP address fields in theI1 messagepackets on the wire. But when there isno response to one orafew I2 messages. 7.9 Receiving I2 messages The responder checks that the nonce andfailure theverifier option is consistent with what itshim6 layer on A mighthave sent in a recent R1 message (by verifyingdecide to send packets that used <A1, B1> as ULIDs using <A2, B2> as thehash it computed.) Iflocators. In thisis ok, thencase B needs to be able to rewrite thehost checks if it already has context stateIP address field forthe ULID pairsome packets and not others, but theCT(peer). If it has such state,packets all have theI2 message was probably a retransmission.same locator pair. Inthis case the host sends an R2 message. If there is no context state,order to accomplish theresponder allocatesdemultiplexing operation successfully, data packets carry a context tag(CT(local)) and creates the context state for the context. It records the peer's locator set as well as its own locator set inthat allows thecontext. It MAY verifyreceiver of thepeers locator set at this point in time, butpacket to determine therequirement is that a locator MUSTshim context to beverified before the host starts sending packetsused tothat locator, thusperform thehost MAY deferoperation. Two mechanisms for carrying theverification until later. The host forms an R2 message with its locators and itscontexttag, and includestag information have been considered in depth during thenecessary options so thatshim protocol design. Those carrying the context tag in thepeer can verifyflow label field of thelocators. R2 messages are never retransmitted. IfIPv6 header and theR2 message is lost, thenusage of a new extension header to carry theinitiatorcontext tag. In this appendix we willretransmit eitherdescribe theI2 or I1 message. Either retransmission will causepros and cons of each approach and justify theresponderselected option. Appendix A.2.1 Flow-label A possible approach is tofindcarry the contextstate and respond with an R2 message. 7.10 Receiving R2 messages The initiator can receive an R2 messagetag inresponse to either an I1 or an I2 message, butthehandlingFlow Label field of theR2IPv6 header. This means that when a shim6 context isthe same in both cases.established, a Flow Label value is associated with this context (and perhaps a separate flow label for each direction). Thehost first verifiessimplest approach thatthe noncedoes this is to have thesame as the one it sent (intriple <Flow Label, Source Locator, Destination Locator> identify theI1 or I2 message). If it doesn't match,context at theR2 messagereceiver. The problem with this approach issilently dropped. Thenthat because thehost recordslocator sets are dynamic, it is not possible at any given moment to be sure that two contexts for which theinformation fromsame context tag is allocated will have disjoint locator sets during theR2 message inlifetime of thecontext state. It recordscontexts. Suppose that Node A has addresses IPA1, IPA2, IPA3 and IPA4 and that Host B has addresses IPB1 and IPB2. Suppose that two different contexts are established between HostA and HostB. Context #1 is using IPA1 and IPB1 as ULIDs. The locator set associated to IPA1 is IPA1 and IPA2 while thepeer'slocator setin the context. It MAY verifyassociated to IPB1 is just IPB1. Context #2 uses IPA3 and IPB2 as ULIDs. The locator set associated to IPA3 is IPA3 and IPA4 and thepeerslocator setat this point in time, but the requirementassociated to IPB2 isthat ajust IPB2. Because the locatorMUST be verified beforesets of thehost starts sending packets toContext #1 and Context # 2 are disjoint, hosts could think thatlocator, thus the host MAY defer the verification until later. 8. No Such Content Errors TBD The Interim Meeting discussed ways to recoverthe same contextstate at one endtag value can be assigned to both of them. The problem arrives when later on IPA3 is added as a valid locator for IPA1 and IPB2 is added as a valid locator for IPB1 in Context #1. In this case, theother end seestriple <Flow Label, Source Locator, Destination Locator> would not identify afailure (and starts sending Explore messages). The discussedunique context anymore and correct demultiplexing is no longer possible. A possible approach to overcome this limitation is simply not touse a R1 (or R1bis) messagerepeat the Flow Label values for any communication established inresponse toamessage with an unknown context, which would cause the contexthost. This basically means that each time a new communication that is using different ULIDs is established, a new Flow Label value is assigned to it. By this mean, each communication that is using different ULIDs can berecreated. 9. Handling ICMP Error Messagesdifferentiated because it has a different Flow Label value. Therouters in the path as well as the destination might generate various ICMP error messages,problem with suchas host unreachable, packet too big, and payload type unknown. Itapproach iscriticalthatthese packets makeitback uprequires that the receiver of the communication allocates the Flow Label value used for incoming packets, in order to assign them uniquely. For this, a shim negotiation of theULPs so thatFlow Label value to use in the communication is needed before exchanging data packets. This poses problems with non- shim capable hosts, since they would not be able to negotiate an acceptable value for the Flow Label. This limitation cantake appropriate action. Whenbe lifted by marking theULPpacketsare sent unmodified,thatis, whilebelong to shim sessions from those that do not. These marking would require at least a bit in theinitial locators=ULIDs are working, this introduces no new concerns; an implementation's existing mechanismIPv6 header that is not currently available, so more creative options would be required, fordelivering these errorsinstance using new Next Header values to indicate that theULP will work. But when the shim on the transmitting side replacespacket belongs to a shim6 enabled communication and that theULIDsFlow Label carries context information as proposed in theIP address fieldsnow expire NOID draft. . However, even if this is done, this approach is incompatible withsome other locators, then an ICMP error coming back will have a "packet in error"the deferred establishment capability of the shim protocol, which isnotapacket that the ULP sent. Thuspreferred function, since it suppresses theimplementation will havedelay due toapplythereverse mappingshim context establishment prior to initiation of the"packet in error" before passing the ICMP error upcommunication and it also allows nodes to define at which stage of theULP. This mapping is different than when receiving ULP packets from the peer, because incommunication they decide, based on their own policies, thatcase the packets contain CT(local). But the ICMP errors havea"packet in error" with CT(peer) since they were intendedgiven communication requires to bereceivedprotected by thepeer.shim. Inany case, since the <Source Locator, Destination Locator, CT(peer)> hasorder tobe unique when received bycope with thepeer,identified limitations, an alternative approach that does not constraints thelocal host should also only be able to find one contextflow label values used by communications thatmatches this tuple. Ifare using ULIDs equal to theULP packet had been encapsulatedlocators (i.e. no shim translation) is to only require that different flow label values are assigned to different shim contexts. In such approach communications start with unmodified flow label usage (could be zero, or as suggested in [15]). The packets sent after ashim6 payload message, thenfailure when a different locator pair is used would use a completely different flow label, and thisextension header must be removed. The result needs toflow label could bethat the ULP receives an ICMP error whereallocated by thecontained "packet in error" looksreceiver asifpart of the shimdid not exist. 10. Teardowncontext establishment. Since it is allocated during the context establishment, the receiver of theHost Pair Context Each host"failed over" packets canunilaterally decide whenpick a flow label of its choosing (that is unique in the sense that no other context is using it as a context tag), without any performance impact, and respecting that for each locator pair, the flow label value used for a given locator pair doesn't change due to the operation of the multihoming shim. In this approach, the constraint is that Flow Label values being used as context identifiers cannot be used by other communications that use non-disjoint locator sets. This means that once that a given Flow Label value has been assigned totear downahost-pair context. It is RECOMMENDED that hosts not tear down theshim contextwhen they knowthatthere is some upper layer protocolhas a certain locator sets associated, the same value cannot be used for other communications thatmightusethe context. For example, an implementation might know this is there isanopen socket whichaddress pair that isconnected tocontained in theULID(peer). However, there might be cases whenlocator sets of theknowledgecontext. This isnot readily available toa constraint in theshim layer, for instance for UDP applications which not not connect their sockets, or any application which retains some higher level state across (TCP) connections and UDP packets. Thus itpotential Flow Label allocation strategies. A possible workaround to this constraint isRECOMMENDEDto mark shim packets thatimplementations minimize premature teardown by observingrequire translation, in order to differentiate them from regular IPv6 packets, using theamountartificial Next Header values described above. In this case, the Flow Label values constrained are only those oftrafficthe packets that are being translated by the shim. This last approach would be the preferred approach if the context tag issent and received usingto be carried in thecontext, andFlow Label field. This is not onlyafterbecause itappears quiescent, tear downimposes thestate. 11. Updatingminimum constraints to theLocator Pairs TBD 12. Various Probe Mechanisms TBD 13. RehomingFlow Label allocation strategies, limiting the restrictions only toa Different Locator Pair TBD 14. Payload Packets before a Switch When there is no context state forthose packets that need to be translated by theULID pair onshim, but also because Context Loss detection mechanisms greatly benefit from thesender, there is no effect on how ULPfact that shim data packets aresent. Ifidentified as such, allowing thehost is using some heuristic for determining whenreceiving end toperformidentify if adeferredshim contextestablishment, then the host might needassociated todo some accounting (count the number of packets sent and received) even before there isahost- pair context. This needreceived packet is suppose tocount packets might also appear on the receive side, depending on what heuristicsexist, as it will be discussed in theimplementation has chosen. If thereContext Loss detection appendix below. Appendix A.2.2 Extension Header Another approach is to carry the context tag in ahost-pairnew Extension Header. These contextfor the ULID pair, thentags are allocated by thesender needs to verify whether context usesreceiving end during theULIDs as locators,shim6 protocol initial negotiation, implying thatis, whether Lp(peer) == ULID(peer) and Lp(local) == ULID(local). If this is the case, theneach context will have two context tags, one for each direction. Data packets will besent unmodified bydemultiplexed using theshim. Ifcontext tag carried in the Extension Header. This seems a clean approach since itisdoes notthe case, then the logicoverload existing fields. However, it introduces additional overhead inSection 15 will need to be used. There will also be some maintenance activity relatingthe packet due to(un)reachability detection, whether packets are sent withtheoriginal locators or not.additional header. Thedetails of thisadditional overhead introduced isout of scope for this document and will8 octets. However, it should becovered is follow-ons to [6]. 15. Payload Packets after a Switch When sending packets, if therenoted that the context tag is only required when ahost-pair context for the ULID pair, andlocator other than theULID pair is no longerone used asthe locator pair, then the sender needs to transformULID is contained in the packet.Apart from replacingPackets where both theIPv6source and destination address fieldswithcontain the ULIDs do not require alocator pair, an 8-octetcontext tag, since no rewriting is necessary at the receiver. This approach would reduce the overhead, because the additional header isadded so thatonly required after a failure. On thereceiver can findother hand, this approach would cause changes in the available MTU for some packets, since packets that include the Extension Header will have an MTU 8 octets shorter. Appendix A.3 Context Loss Detection In this appendix we will present different approaches considered to detect context loss andinverse the transformation. First,potential context recovery strategies. The scenario being considered is theIP address fieldsfollowing: Node A and Node B arereplaced. The IPv6 source address fieldcommunicating using IPA1 and IPB1. Sometime later, a shim context is established between them, with IPA1 and IPB1 as ULIDs and IPA1,...,IPAn and IPB1,...,IPBm as locator set respectively. It may happen, that later on, one of the hosts, e.g. Host A looses the shim context. The reason for this can be that Host A has a more aggressive garbage collection policy than HostB or that an error occurred in the shim layer at host A resulting in the loss of the context state. The mechanisms considered in this appendix are aimed toLp(local)deal with this problem. There are essentially two tasks that need to be performed in order to cope with this problem: first, the context loss must be detected and second thedestination address field is setcontext needs toLp(peer). NOTEbe recovered/ reestablished. Mechanisms for detecting context. loss These mechanisms basically consist in thatthis MUST NOT cause any recalculationeach end of theULP checksums, sincecontext periodically sends a packet containing context-specific information to theULP checksums are carried end-to-end andother end. Upon reception of such packets, theULP pseudo-header containsreceiver verifies that theULIDs which are preserved end-to-end. The sender skips any "routing sub-layer extension headers"required context exists. In case that theULP might have included, thuscontext does not exist, itskips any hop-by-hop extension header, any routing header, and any destination options header that is followed bysends arouting header. After any such headerspacket notifying theshim6 extension header will be added. This mightproblem to the sender. An obvious alternative for this would bebefore a Fragment header,to create aDestination Options header,specific context keepalive exchange, which consists in periodically sending packets with this purpose. This option was considered and discarded because it seemed anESP or AH header, oroverkill to define aULP header. The inserted shim6 Payload extension header includesnew packet exchange to deal with this issue. An alternative is to piggyback thepeer'scontexttag. The receiver parses the (extension) headersloss detection function inorder. Should it findother existent packet exchanges. In particular, both shim control and data packets can be used for this. Shim control packets can be trivially used for this, because they carry context specific information, so that when ashim6 extension headernode receives one of such packets, it willlook at the type field in that header. If the type is Payload message, thenverify if the context exists. However, shim control frequency may not be adequate for context loss detection since control packetmustexchanges can bepassed to the shim6 payload handlingvery limited forrewriting. (Otherwise,a session in certain scenarios. Data packets, on the other hand, are expected to be exchanged with a higher frequency but they do not necessarily carry context specific information. In particular, packets flowing before a locator change (i.e. packet carrying theshim6 control messages are handled as specifiedULIDs inother parts of this document.) The receiver extractsthe address fields) do not need contexttaginformation since they do not need any shim processing. Packets that carry locators that differ from thepayload message header, and uses this together with the IPv6 source and destination address fieldsULIDs carry context information. However, we need tofindmake ahost-pair context. If no context is found,distinction here between thereceiver SHOULD generate a No Such Context error message (see Section 8). Withdifferent approaches considered to carry the context tag, inhand, the receiver can now replace the IP address fields with the ULIDs keptparticular between those approaches where packets are explicitly marked as shim packets and those approaches where packets are not marked as such. For instance, in thecontext. Finally,case where thePayload extension headercontext tag isremoved from the packet (so thatcarried in theULP doesn't get confused by it),Flow Label and packets are not marked as shim packets (i.e. no new Next Header values are defined for shim), a receiver that has lost thenext header value in the preceding headerassociated context issetnot able tobe the actual protocol number fordetect that thepayload. Thenpacket is associated with a missing context. The result is that the packetcanwill be passed unchanged to theprotocol identified by the next header value (which might be some function associated with the IP endpoint sublayer, orupper layer protocol, which in turn will probably silently discard it due to aULP). 16. Open Issueschecksum error. Thefollowing open issues are known: o Is there need for keeping the list of locators private betweenresulting behavior is that thetwo communicating endpoints? We can potentially accomplishcontext loss is undetected. This is one additional reason to discard an approach thatwhen using CGA but not with HBA, but it comes atcarries thecost of doing some public key encryptioncontext tag in the Flow Label field anddecryption operationsdoes not explicitly mark the shim packets aspart ofsuch. On thecontext establishment. o Forkingother hand, approaches that mark shim data packets (like thecontext state. OnExtension Header or themailing list we've discussedFlow Label with new Next Header values approaches) allow theneedreceiver toforkdetect if the contextstate, so that different ULP streams can be sent using different locator pairs. No protocol extensions are needed if any forking is done independently by each endpoint. But if we want Aassociated to the received packet is missing. In this case, data packets also perform the function of a context loss detection exchange. However, it must beable to tell Bnoted thatcertain traffic (a 5-tuple?) should be forked, then we needonly those packets that carry away to convey this inlocator that differs form theshim6 protocol. The hard part would be defining what selectors canULID are marked. This basically means that context loss will bespecified fordetected after an outage has occurred i.e. alternative locators are being used. Summarizing, thefilter which determines which trafficproposed context loss detection mechanisms useswhichshim control packets and payload packets to detect context loss. Shim control packets detect context loss during the whole lifetime of theforks. Socontext, but thequestionexpected frequency in some cases iswhether we really need signaling for forking, or whethervery low. On the other hand, payload packets have a higher expected frequency in general, but they only detect context loss after an outage. This behavior implies that it will be common that context loss issufficient to allow each endpoint to do its own selection of which locator pairdetected after a failure i.e. once that it isusing for which traffic. o If we allow forking, it seems like theactually needed. Because of that, a mechanism forreachability detection, whether itrecovering from context loss isCUD or FBD, must be applied separately for each locator pair thatrequired if this approach isin use. Without forking a single locator pair will be in useused. Overall, the mechanism foreach host-pair context, hence thingsdetecting lost context wouldbe simpler. o The specified mechanism (of relying on No Such Context errors) doesn't always detectwork as follows: theloss ofend that still has the contextonavailable sends a message referring to thepeer whencontext. Upon theoriginal ULID=locators are used. See Section 17 for other options. o Inreception of such message, theLocator List option, do we need to indicate which locators need to be validated using HBA vs. CGA? Or it could tell which locators are inend that has lost theHBA extension incontext identifies thePDS,situation andassume any others need CGA validation. o What happens when a host runs out of N bitnotifies the contexttags? When is it safe for a hostloss event toreuse a context tag? Withtheunilateral teardown oneother endmight discardby sending a packet containing the lost contextstate long beforeinformation extracted from theother end. 17. Design Alternatives This document has picked a certain set of design choices in orderreceived packet. One option is totrysimply send an error message containing the received packets (or at least as much of the received packet that the MTU allows towork out a bunchfit in). One of thedetails, and stimulate discussion. But as has been discussed ongoals of this notification is to allow themailing list, there areotherchoicesend thatmake sense. This section tries to enumerate some alternatives. 17.1 State Cleanup This document uses a timer based cleanup mechanism, as specified in Section 10. An alternative would bestill retains context state, touse an explicit CLOSE mechanism, akinreestablish the lost context. The mechanism to reestablish theone specifiedloss context consists inHIP [22]. If an explicit CLOSE handshake and associated timerperforming the 4-way initial handshake. This isused, then there would no longera time consuming exchange and at this point time may be critical since we are reestablishing aneed forcontext that is currently needed (because context loss detection may occur after a failure). So, another option is to replace theNo Context Errorerror messagedue toby apeer having garbage collected its endmodified R1 message, so that the time required to perform the context establishment exchange can be reduced. Upon the reception of this modified R1 message, thecontext. However, there isend that stillpotentially a need to havehas the context state can finish the context establishment exchange and restore the lost context. Appendix A.4 Securing locator sets The adoption of aNo Context Error message inprotocol like SHIM that allows thecasebinding of acomplete state lossgiven ULID with a set of locators opens thepeer (also knowndoors for different types of redirection attacks asa crash followed by a reboot). Only if we assume thatdescribed in [17]. The goal in terms of security for thereboot takes at leastdesign of theCLOSE timer, or that itshim protocol isok tonotprovide complete service until CLOSE timer minutes after the crash, can we completely do away withto introduce any new vulnerability in theNo Context Error message. 17.2 Detecting Context Loss This document specifies that context lossInternet architecture. It isdetected by receivingaNo Such Context error message fromnon-goal to provide additional protection than thepeer. Such messages are generatedcurrently available inresponsethe single-homed IPv6 Internet. Multiple security mechanisms were considered to protect the shim protocol. In this appendix we will present some of them. The simplest option to protect the shim protocol was to use cookies i.e. ashim6 messagerandomly generated bit string thatcontain ais negotiated during thepeer'scontexttag, including the shim6 Payload messages, when the receiver doesn't have matching context. They are also generatedestablishment phase and then it is included inresponsefollowing signaling messages. By this mean, it would be possible todata packets after a locator switch (because such payload packets are identified as such by using the payload message header). This approach hasverify that thedisadvantageparty thatit doesn't detectwas involved in theloss of context state wheninitial handshake is theoriginal ULIDs are used as locators, because there might be no shim6 messages exchanged ifsame party that is introducing new locators. Moreover, before using a new locator, an exchange is performed through thereachability detection manages to suppress any extra messages. The Interim Meeting discussed ways to recovernew locator, verifying that thecontext stateparty located atone end whentheother end sees a failure (and starts sending Explore messages). The discussed approachnew locator knows the cookie i.e. that it isto use a R1 (or R1bis) message in response to a message with an unknown context, which would causethecontext to be recreated. 18. Implications Elsewhere The general shim6 approach, as well assame party that performed thespecifics ofinitial handshake. While thisproposed solution, has implications elsewhere. The key implications are: o Applicationssecurity mechanisms does indeed provide a fair amount of protection, it does leave the door open for the so-called time shifted attacks. In these attacks, an attacker thatperform referrals, or callbacks using IP addresses asonce was on the'identifiers'path, it discovers the cookie by sniffing any signaling message. After that, the attacker can leave the path and stillfunction in limited ways,perform a redirection attack, since asdescribed in [17]. Buthe is inorder for such applications to be able to take advantagepossession of themultiple locators for redundancy,cookie, he can introduce a new locator in theapplications need to be modified to either use fully qualified domain names aslocator set and he can also successfully perform the'identifiers', or they needreachability exchange if he is able topass allreceive packets at thelocators asnew locator. The difference with the'identifiers' i.e.,current single-homed IPv6 situation is that in the'identifier' fromcurrent situation theapplications perspective becomes a set of IP addresses insteadattacker needs to be on-path during the whole lifetime ofa single IP address. o Firewalls that today pass limited traffic, e.g., outbound TCP connections, would presumably blocktheshim6 protocol. This meansattack, while in this new situation where only cookie protection if provided, an attacker thateven when shim6 capable hosts are communicating,once was on the path can perform attacks after he has left the on-path location. Moreover, because theI1 messages would be dropped, hencecookie is included in signaling messages, thehosts would notattacker can discover the cookie by sniffing any of them, making the protocol vulnerable during the whole lifetime of the shim context. A possible approach to increase the security was to use a shared secret i.e. a bit string thattheir peerisshim6 capable. Thisnegotiated during the initial handshake but that isin factused as afeature, since if the hosts managedkey toestablish a host-pair context, thenprotect following messages. With this technique, thefirewall would probably dropattacker must be present on the"different"path sniffing packets during the initial handshake, since it is the only moment where the shared secret is exchanged. While this improves the security, it is still vulnerable to time shifted attacks, even though it imposes thatare sent after a failure (those usingtheshim6 payload message withattacker must be on path at aTCP packet inside it). Thus stateful firewalls that are modifiedvery specific moment (the establishment phase) toallow shim6 messages through should alsoactually bemodifiedable toallowlaunch thepayload messages through after a failure. This presumably implies thatattack. While this seems to substantially improve thefirewall needssituation, it should be noted that, depending on protocol details, an attacker may be able totrackforce thesetrecreation oflocators in usethe initial handshake (for instance bylooking atblocking messages and making theshim6 exchanges. Such firewalls might even want to verifyparties think that thelocators usingcontext has been lost), so theHBA/CGA verification themselves. o Signaling protocols for QoS or other thingsresulting situation may not differ thatinvolve having devices inmuch from thenetwork path look at IP addresses and port numbers, or IP addresses and Flow Labels, need to be invoked oncookie based approach. Another option that was discussed during thehosts whendesign of thelocator pair changes dueprotocol was the possibility of using IPSec for protecting the shim protocol. Now, the problem under consideration in this scenario is how to securely bind an address that is being used as ULID with afailure. Atlocator set thatpoint in time those protocols needcan be used toinformexchange packets. The mechanism provided by IPSec to securely bind thedevicesaddress used with the cryptographic keys is the usage of digital certificates. This implies thata new pairan IPSec based solution would require that the generation ofIP addresses will be useddigital certificates that bind the key and the ULID by a common third trusted party for both parties involved in theflow. Notecommunication. Considering thatthis isthecase even though we no longer overloadscope of application of theflow label asshim protocol is global, this would imply acontext tag;global public key infrastructure. The major issues with this approach are thein-path devices needdeployment difficulties associated with a global PKI. Finally two different technologies were selected toknow aboutprotect theuseshim protocol: HBA [6] and CGA [5]. These two approaches provide a similar level of protection but they provide different functionality with a different computational cost. The HBA mechanism relies on thenew locators even thoughcapability of generating all theflow label staysaddresses of a multihomed host as an unalterable set of intrinsically bound IPv6 addresses, known as an HBA set. In this approach, addresses incorporate a cryptographic one-way hash of thesame. o MTU implications.prefix-set available into the interface identifier part. Thepath MTU mechanisms we use are robust against different packets taking different paths throughresult is that theInternet, by computing a minimum overbinding between all therecently observed path MTUs. When shim6 fails over from using one locator pair to another pair, this meansavailable addresses is encoded within the addresses themselves, providing hijacking protection. Any peer using the shim protocol node can efficiently verify thatpackets might travel over a different path throughtheInternet, hencealternative addresses proposed for continuing thepath MTU might be quite different. Perhaps such a path change would be a good hintcommunication are bound to thepath MTU mechanism to tryinitial address through alarger MTU? The factsimple hash calculation. A limitation of the HBA technique is that once generated theshim, at least for uncommon payload types, will add an 8 octet extension header (the payload message) after a locator switch, canaddress set is fixed and cannot be changed without alsoaffectchanging all theusable path MTU foraddresses of theULPs.HBA set. Inthis caseother words, theMTU changeHBA technique does not support dynamic addition of address to a previously generated HBA set. An advantage of this approach islocalthat it requires only hash operations tothe sending host, thus conveying the changeverify a locator set, imposing very low computational cost to theULPs is an implementation matter. 19. Security Considerations This document satisfiesprotocol. In a CGA based approach theconcerns specified in [16]address used asfollows: o TBD: Using HBA orULID is a CGAfor ... Somethat contains a hash of a public key in its interface identifier. The result is a secure binding between theresidual threatsULID and the associated key pair. This allows each peer to use the corresponding private key to sign the shim messages that convey locator set information. The trust chain in thisproposal are: o An attacker which arrives late oncase is the following: the ULID used for the communication is securely bound to the key pair because it contains thepath (afterhash of thecontext has been established) can usepublic key, and theNo Such Context error to cause one peerlocator set is bound torecreatethecontext, and at that point in timepublic key through theattacker can observe allsignature. The CGA approach then supports dynamic addition of new locators in theexchange. But this doesn't seemlocator set, since in order toopen anydo that, the node only needs to sign the newdoors forlocator with theattacker since such an attacker can observeprivate key associated with theContext tagsCGA used as ULID. A limitation of this approach is thatare being used, and once knownitcan use those to send bogus messages. o An attacker whichimposes systematic usage of public key cryptography with its associate computational cost. Any of these two mechanisms HBA and CGA provide time-shifted attack protection, since the ULID ispresent onsecurely bound to a locator set that can only be defined by thepathowner of the ULID. So, the design decision adopted was that both mechanisms HBA and CGA are supported, so thatit can find outwhen only stable address sets are required, thecontext tags,nodes cangenerate a No Such Context error after it has moved offbenefit from thepath. Forlow computational cost offered by HBA while when dynamic locator sets are required, thispacket tocan beeffective it needs to haveachieved through CGAs with an additional cost. Moreover, because HBAs are defined as asource locator which belongs toCGA extension, thecontext, thus thereaddresses available in a node cannotsimultaneously be"too much" ingress filtering between the attackers new locationCGAs and HBAs, allowing thecommunicating peers. But this doesn't seem to be that severe, because onceusage of theerror causesHBA and CGA functionality when needed without requiring a change in the addresses used. Appendix A.5 Host-pair context establishment exchange Two options were considered for the host-pair contextto be torn downestablishment exchange: a 2-way handshake andre-established,anew pair of context tags will be used, which will not be known to4-way handshake. A key goal for theattacker. Ifdesign of thisis stillexchange was that protection against DoS attacks. The attack under consideration was basically aconcern, we could requiresituation where an attacker launches a2-way handshake "did you really loose the state?" in responsegreat amount of host-pair establishment request packets, exhausting victim's resources, similar to TCP SYN flooding attacks. A 4 way-handshake exchange protects against these attacks because theerror message. o It might be possible for an attackerreceiver does not creates any state associate totry random 32-bit context tags and see if they can cause disruption for communication between two hosts. We can make this harder by usingalargergiven contexttag; 47 bits isuntil thelargest that fitreception of the second packet which contains a prior contact proof in the8-octet payload header. Ifform of a token. At thisisn't sufficient, one could use an even larger tag inpoint theshim6 control messages, and usereceiver can verify that at least thelow-order 47 bits inaddress used by thepayload header. 20. IANA Considerations IANA needsinitiator is at some extent valid, since the initiator is able toallocatereceive packets at this address. In the worse case, the responder can track down the attacker using this address. The drawback of this approach is that it imposes anew IP Next Header value4 packet exchange for any context establishment. This would be a great deal if the shim context needed to be established up front, before the communication can proceed. However, thanks to deferred context establishment capability of the shim protocol, thisprotocol. TBD:limitation has a reduced impact in theIANA rules forperformance of theshim6 message types and option types. 21. Change Log The following changesprotocol. (It may however havebeen made since draft-ietf-shim6-proto-00: o Removeda greater impact in theusesituation of context recover as discussed earlier, but in this case, it is possible to perform optimizations to reduce theflow label and the overloadingnumber of packets as described above) The other option considered was a 2-way handshake with theIP protocol numbers. Instead, whenpossibility to fall back to a 4-way handshake in case of attack. In this approach, thelocatorhost pairisestablishment exchange normally consists in a 2-packet exchange and it does not verify that theULID pair, the ULP payloads will be carried with an 8 octet extension header. The belief isinitiator has performed a prior contact before creating context state. In case thatita DoS attack ispossible to remove these extra bytes by defining future shim6 extensions that exchange more information betweendetected, thehosts, without havingresponder falls back to a 4-way handshake similar tooverload the flow label ortheIP protocol numbers. o Grewone described previously in order to prevent thecontext tag from 20 bitsdetected attack to32 bits,proceed. The main difficulty withthe possibilitythis attack is how togrowdetect that a responder is currently under attack. It should be noted, that because this is 2-way exchange, it is not possible to47 bits. This implies changesuse the number of half open sessions (as in TCP) to detect an ongoing attack and different heuristics need to be considered. The design decision taken was that considering themessage formats. o Almost by accident,current impact of DoS attacks and thenew shim6 message format is very close tolow impact of theHIP message format. o Adopted4-way exchange in theHIP formatshim protocol thanks to the deferred context establishment capability, a 4-way exchange would be adopted for theoptions, since this makes it easierbase protocol. Appendix A.6 Updating locator sets There are two possible approaches todescribe variable length options.the addition and removal of locators: atomic and differential approaches. Theoriginal, ND-style, option format requires internal paddingatomic approach essentially send the complete locators set each time that a variation in theoptionslocator set occurs. The differential approach send the differences between the existing locator set and the new one. The atomic approach imposes additional overhead, since all the locator set has tomake them 8 octet length in total,be exchanged each time while theHIP format handlesdifferential approach requires re-synchronization of both ends through changes i.e. thatusingboth ends have theoption length field. o Removed somesame idea about what the current locator set is. Because of thecontrol messages, and renameddifficulties imposed by theother ones. o Addedsynchronization requirement, the atomic approach was selected. Appendix A.7 State Cleanup There are essentially two approaches for discarding an existing state about locators, keys and identifiers of a"generation" number tocorrespondent node: a coordinated approach and an unilateral approach. In theLocator List option, so thatunilateral approach, each node discards thepeers can ensure thatinformation about thepreferences refer toother node without coordination with theright "version"other node based on some local timers and heuristics. No packet exchange is required for this. In this case, it would be possible that one of theLocator List. onodes has discarded the state while the other node still hasn't. Inorder for FBD and explorationthis case, a No-Context error message may be required towork when thereinform about the situation and possibly a recovery mechanism is also needed. A coordinated approach would useofan explicit CLOSE mechanism, akin to thecontext is forked, thatone specified in HIP [23]. If an explicit CLOSE handshake and associated timer isdifferent ULP messages are sent over different locator pairs, things are a lot easier ifused, then thereis only one current locator pair usedwould no longer be a need foreach context. ThustheforkingNo Context Error message due to a peer having garbage collected its end of thecontextcontext. However, there isnow causingstill potentially anew contextneed tobe established for the same ULID; the new context havinghave anew context tag. The original context is referred to asNo Context Error message in the"default" context forcase of a complete state loss of theULID pair. o Added more background material and textual descriptions. 22. Acknowledgements Overpeer (also known as a crash followed by a reboot). Only if we assume that theyears many people active inreboot takes at least themulti6 and shim6 WGs have contributed ideas a suggestionsCLOSE timer, or thatare reflected in this draft. Thanksit is ok toMarcelo Bagnulo for providing comments on earlier versions of this draft. 23.not provide complete service until CLOSE timer minutes after the crash, can we completely do away with the No Context Error message. 24. References23.124.1 Normative References [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [2] Deering, S. and R. Hinden, "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998. [3] Narten, T., Nordmark, E., and W. Simpson, "Neighbor Discovery for IP Version 6 (IPv6)", RFC 2461, December 1998. [4] Thomson, S. and T. Narten, "IPv6 Stateless Address Autoconfiguration", RFC 2462, December 1998. [5] Aura, T., "Cryptographically Generated Addresses (CGA)", RFC 3972, March 2005. [6] Bagnulo, M., "Hash Based Addresses (HBA)", draft-ietf-shim6-hba-00 (work in progress), July 2005.[6][7] Beijnum, I., "Shim6 Reachability Detection", draft-ietf-shim6-reach-detect-00 (work in progress), July 2005.[7][8] Arkko, J., "Failure Detection and Locator Pair Exploration Design for IPv6 Multihoming", draft-ietf-shim6-failure-detection-01 (work in progress), October 2005.23.224.2 Informative References[8][9] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for specifying the location of services (DNS SRV)", RFC 2782, February 2000.[9][10] Ferguson, P. and D. Senie, "Network Ingress Filtering: Defeating Denial of Service Attacks which employ IP Source Address Spoofing", BCP 38, RFC 2827, May 2000.[10][11] Narten, T. and R. Draves, "Privacy Extensions for Stateless Address Autoconfiguration in IPv6", RFC 3041, January 2001.[11][12] Draves, R., "Default Address Selection for Internet Protocol version 6 (IPv6)", RFC 3484, February 2003.[12][13] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, "RTP: A Transport Protocol for Real-Time Applications", STD 64, RFC 3550, July 2003.[13][14] Abley, J., Black, B., and V. Gill, "Goals for IPv6 Site- Multihoming Architectures", RFC 3582, August 2003.[14][15] Rajahalme, J., Conta, A., Carpenter, B., and S. Deering, "IPv6 Flow Label Specification", RFC 3697, March 2004.[15][16] Hinden, R. and B. Haberman, "Unique Local IPv6 Unicast Addresses", RFC 4193, October 2005.[16][17] Nordmark, E., "Threats relating to IPv6 multihoming solutions", draft-ietf-multi6-multihoming-threats-03 (work in progress), January 2005.[17][18] Nordmark, E., "Shim6 Application Referral Issues", draft-ietf-shim6-app-refer-00 (work in progress), July 2005.[18][19] Abley, J., "Shim6 Applicability Statement", draft-ietf-shim6-applicability-00 (work in progress), July 2005.[19][20] Huston, G., "Architectural Commentary on Site Multi-homing using a Level 3 Shim", draft-ietf-shim6-arch-00 (work in progress), July 2005.[20][21] Bagnulo, M. and J. Arkko, "Functional decomposition of the multihoming protocol", draft-ietf-shim6-functional-dec-00 (work in progress), July 2005.[21][22] Nordmark, E. and M. Bagnulo, "Multihoming L3 Shim Approach", draft-ietf-shim6-l3shim-00 (work in progress), July 2005.[22][23] Moskowitz, R., "Host Identity Protocol", draft-ietf-hip-base-03 (work in progress), June 2005.[23][24] Lear, E. and R. Droms, "What's In A Name:Thoughts from the NSRG", draft-irtf-nsrg-report-10 (work in progress), September 2003. Author's Address Erik Nordmark Sun Microsystems 17 Network Circle Menlo Park, CA 94025 USA Phone: +1 650 786 2921 Email: erik.nordmark@sun.com Intellectual Property Statement 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. Disclaimer of Validity 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 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. Copyright Statement Copyright (C) The Internet Society (2005). 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. Acknowledgment Funding for the RFC Editor function is currently provided by the Internet Society.