Network Working Group J. ArkkoInternet-DraftRequest for Comments: 5534 EricssonIntended status:Category: Standards Track I.vanVan BeijnumExpires: December 26, 2008IMDEA NetworksJune 24, 2008May 2009 Failure Detection and Locator Pair Exploration Protocol for IPv6 Multihomingdraft-ietf-shim6-failure-detection-13Status ofthisThis MemoBy submittingThis document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of thisInternet-Draft, each author represents that any applicable patent or other IPR claimsprotocol. Distribution ofwhich he or shethis memo isaware have been or will be disclosed,unlimited. Copyright Notice Copyright (c) 2009 IETF Trust andanythe persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents in effect on the date ofwhich hepublication of this document (http://trustee.ietf.org/license-info). Please review these documents carefully, as they describe your rights and restrictions with respect to this document. This document may contain material from IETF Documents orshe becomes aware will be disclosed,IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright inaccordance with Section 6some ofBCP 79. Internet-Drafts are working documentsthis material may not have granted the IETF Trust the right to allow modifications of such material outside theInternet Engineering Task Force (IETF), its areas, and its working groups. Note that other groupsIETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document mayalso distribute working documents as Internet- Drafts. Internet-Drafts are draft documents valid for a maximum of six monthsnot be modified outside the IETF Standards Process, and derivative works of it may not beupdated, replaced, or obsoleted by other documents at any time. It is inappropriatecreated outside the IETF Standards Process, except touse Internet-Draftsformat it for publication asreference materialan RFC or tocite themtranslate it into languages other thanas "work in progress." The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expire on December 26, 2008.English. Abstract This document specifies how the level 3 multihomingshimshim6 protocol(SHIM6)(shim6) detects failures between two communicatinghosts.nodes. It also specifies an exploration protocol for switching to another pair of interfaces and/or addresses between the samehostsnodes if a failure occurs and an operational pair can be found. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . .43 2. RequirementslanguageLanguage . . . . . . . . . . . . . . . . . . . .64 3. Definitions . . . . . . . . . . . . . . . . . . . . . . . . .74 3.1. Available Addresses . . . . . . . . . . . . . . . . . .7. 4 3.2. Locally Operational Addresses . . . . . . . . . . . . .8. 5 3.3. Operational Address Pairs . . . . . . . . . . . . . . .8. 5 3.4. Primary Address Pair . . . . . . . . . . . . . . . . . .10. 7 3.5. Current Address Pair . . . . . . . . . . . . . . . . . .10. 7 4. Protocol Overview . . . . . . . . . . . . . . . . . . . . . .117 4.1. Failure Detection . . . . . . . . . . . . . . . . . . .11. 8 4.2. Full Reachability Exploration . . . . . . . . . . . . .13. 10 4.3. Exploration Order . . . . . . . . . . . . . . . . . . .14. 11 5. Protocol Definition . . . . . . . . . . . . . . . . . . . . .1713 5.1. Keepalive Message . . . . . . . . . . . . . . . . . . .17. 13 5.2. Probe Message . . . . . . . . . . . . . . . . . . . . .18. 14 5.3. Keepalive Timeout Option Format . . . . . . . . . . . .22. 18 6.BehaviourBehavior . . . . . . . . . . . . . . . . . . . . . . . . . .24. 19 6.1. Incomingpayload packetPayload Packet . . . . . . . . . . . . . . . .24. 20 6.2. Outgoingpayload packetPayload Packet . . . . . . . . . . . . . . . . .2521 6.3. KeepalivetimeoutTimeout . . . . . . . . . . . . . . . . . . .25. 21 6.4. SendtimeoutTimeout . . . . . . . . . . . . . . . . . . . . . .26. 21 6.5. Retransmission . . . . . . . . . . . . . . . . . . . . .26. 21 6.6. Reception of the KeepalivemessageMessage . . . . . . . . . . .26. 22 6.7. Reception of the ProbemessageMessage State=Exploring . . . . .27. 22 6.8. Reception of the ProbemessageMessage State=InboundOk . . . . .27. 22 6.9. Reception of the ProbemessageMessage State=Operational . . . .27. 23 6.10. Graphical Representation of the State Machine . . . . .28. 23 7. Protocol Constants and Variables . . . . . . . . . . . . . . .. . . . . . . 2923 8. Security Considerations . . . . . . . . . . . . . . . . . . .3024 9. Operational Considerations . . . . . . . . . . . . . . . . . .3226 10.IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 11.References . . . . . . . . . . . . . . . . . . . . . . . . . .35 11.1.28 10.1. Normative References . . . . . . . . . . . . . . . . . .35 11.2.. 28 10.2. Informative References . . . . . . . . . . . . . . . . .35. 28 Appendix A. Example Protocol Runs . . . . . . . . . . . . . . . .3829 Appendix B. Contributors . . . . . . . . . . . . . . . . . . . .4334 Appendix C. Acknowledgements . . . . . . . . . . . . . . . . . .44 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 45 Intellectual Property and Copyright Statements . . . . . . . . . . 4634 1. Introduction TheSHIM6shim6 protocol[I-D.ietf-shim6-proto][RFC5533] extends IPv6 to support multihoming. It is anIP layerIP-layer mechanism that hides multihoming from applications. A part of theSHIM6shim6 solution involves detecting when a currently used pair of addresses (or interfaces) between two communicationhostsnodes hasfailed,failed and picking another pair when this occurs. We call the formerfailure detection,"failure detection", and thelatter locatorlatter, "locator pairexploration.exploration". This document specifies the mechanisms and protocol messages to achieve both failure detection and locator pair exploration. This part of theSHIM6shim6 protocol is called the REAchability Protocol (REAP). Failure detection is made aslight weightlightweight as possible. Data traffic in bothdirectiondirections is observed, and in the case where there is no traffic because the communication is idle, failure detection is also idle and doesn't generate any packets. When data traffic is flowing in both directions, there is no need to send failure detection packets, either. Only when there is traffic in onedirection,direction does the failure detection mechanismgeneratesgenerate keepalives in the other direction. As a result, whenever there is outgoing traffic and no incoming return traffic or keepalives, there must be failure, at which point the locator pair exploration is performed to find a working address pair for each direction.TheThis document is structured as follows: Section 3 defines a set of useful terms, Section 4 gives an overview of REAP, and Section 5 provides a detailed definition. Section 6 specifiesthe message formatsbehavior, andbehaviour in detail.Section 7 discusses protocol constants. Section 8 discusses the security considerations of REAP. In this specification, we consider an address to be synonymous with a locator. Other parts of theSHIM6shim6 protocol ensure that the different locators used by a node actually belong together. That is, REAP is not responsible for ensuring thatitsaid node ends up with a legitimate locator. REAP has been designed to be used withSHIM6,shim6 and is therefore tailored to an environment where it runs onhosts,nodes, uses widely varying types ofpathspaths, and is unaware of application context. As a result, REAP attempts to be as self-configuring and unobtrusive as possible. In particular, it avoids sending any packets except where absolutely required and employs exponential back-off to avoid congestion. The downside is that it cannot offer the same granularity of detecting problems as mechanisms that have more application context and ability to negotiate or configure parameters. Future versions of this specification may consider extensions with such capabilities, forinstanceinstance, through inheriting some mechanisms from the Bidirectional Forwarding Detection (BFD) protocol[I-D.ietf-bfd-base].[BFD]. 2. RequirementslanguageLanguage The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. 3. Definitions This section defines terms useful for discussing failure detection and locator pair exploration. 3.1. Available AddressesSHIM6Shim6 nodes need to be aware of what addresses they themselves have. If a node loses the address it is currently using for communications, another address must replacethis address.it. And if a node loses an address that the node's peer knows about, the peer must be informed. Similarly, when a node acquires a new address it may generally wish the peer to know about it. Definition. Available address - an address is said to be available if all the following conditions are fulfilled: o The address has been assigned to an interface of the node. o The valid lifetime of the prefix(RFC(Section 4.6.2 of RFC 4861[RFC4861] Section 4.6.2)[RFC4861]) associated with the address has not expired. o The address is not tentative in the sense of RFC 4862 [RFC4862]. In other words, the address assignment is complete so that communications can be started. Note that this explicitly allows an address to be optimistic in the sense of OptimisticDADDuplicate Address Detection (DAD) [RFC4429] even though implementations may prefer using other addresses as long as there is an alternative. o The address is a global unicast or unique local address [RFC4193]. That is, it is not an IPv6 site-local or link-local address. With link-local addresses, the nodes would be unable to determine on which link the given address is usable. o The address and interfaceisare acceptable for use according to a local policy. Available addresses are discovered and monitored through mechanisms outside the scope ofSHIM6. SHIM6shim6. Shim6 implementations MUST be able to employ information provided by IPv6 Neighbor Discovery [RFC4861], Address Autoconfiguration [RFC4862], and DHCP [RFC3315] (when DHCP is implemented). This information includes the availability of a new address and status changes of existing addresses (such as when an address becomes invalid). 3.2. Locally Operational Addresses Two different granularity levels are needed for failure detection. The coarser granularity is for individualaddresses:addresses. Definition. LocallyOperational Addressoperational address - an available address is said to be locally operational when its use is known to be possiblelocally:locally. In other words, when the interface is up, a default router (if needed) suitable for this address is known to be reachable, and no other local information points to the address being unusable. Locally operational addresses are discovered and monitored through mechanisms outside theSHIM6shim6 protocol.SHIM6Shim6 implementations MUST be able to employ information provided from Neighbor Unreachability Detection [RFC4861]. Implementations MAY also employ additional,link layer specificlink-layer-specific mechanisms. Note 1: A part of the problem in ensuring that an address is operational is making sure that after a change inlink layer connectivitylink-layer connectivity, we are still connected to the same IP subnet. Mechanisms such asDNA CPL [I-D.ietf-dna-cpl] or DNAv6 [I-D.ietf-dna-protocol][DNA-SIM] can be used to ensure this. Note 2: In theory, it would also be possible forhostsnodes to learn about routing failures for a particular selected source prefix, if only suitable protocols for this purpose existed. Some proposals in this space have beenmade, see,made (see, for instance[I-D.bagnulo-shim6-addr-selection][ADD-SEL] and[I-D.huitema-multi6-addr-selection],[MULTI6]), but none have been standardized to date. 3.3. Operational Address Pairs The existence of locally operational addresses are not, however, a guarantee that communications can be established with the peer. A failure in the routing infrastructure can prevent packets from reaching their destination. For thisreasonreason, we need the definition of a second level of granularity, which is used for pairs ofaddresses:addresses. Definition. Bidirectionally operational address pair - a pair of locally operational addresses are said to be an operational address pair when bidirectional connectivity can be shown between the addresses. That is, a packet sent with one of the addresses in thesourceSource field and the other in thedestinationDestination field reaches the destination, and vice versa. Unfortunately, there are scenarios where bidirectionally operational address pairs do not exist. For instance, ingress filtering or network failures may result in one address pair being operational in one direction while another one is operational from the other direction. The following definition captures this generalsituation:situation. Definition. Unidirectionally operational address pair - a pair of locally operational addresses are said to beana unidirectionally operational address pair when packets sent with the first address as the source and the second address as the destinationreachesreach the destination.SHIM6Shim6 implementations MUST support the discovery of operational address pairs through the use of explicit reachability tests and Forced Bidirectional Communication (FBD), described later in this specification. Future extensions ofSHIM6shim6 may specify additional mechanisms. Some ideas of such mechanisms are listedbelow,below but are not fully specified in this document: o Positive feedback fromupper layerupper-layer protocols. For instance, TCP can indicate to the IP layer that it is making progress. This is similar to how IPv6 Neighbor Unreachability Detectioncancan, in somecasescases, be avoided when upper layers provide information about bidirectional connectivity [RFC4861]. In the case of unidirectional connectivity, theupper layerupper-layer protocol responses come back using another address pair, but show that the messages sent using the first address pair have been received. o Negative feedback fromupper layerupper-layer protocols. It is conceivable thatupper layerupper-layer protocols give an indication of a problem to the multihoming layer. For instance, TCP could indicate that there's either congestion or lack of connectivity in the path because it is not getting ACKs. o ICMP error messages. Given the ease of spoofing ICMP messages, one should be carefultonot to trust these blindly, however. One approach would be to use ICMP error messages only as a hint to perform an explicit reachability test or to move an address pair to a lower place in the list of address pairs to be probed, but not to use these messages as a reason to disrupt ongoing communications without other indications of problems. The situation may be different when certain verifications of the ICMP messages are being performed, as explained by Gont in[I-D.ietf-tcpm-icmp-attacks].[GONT]. These verifications can ensure that (practically) only on-path attackers can spoof the messages. 3.4. Primary Address Pair The primary address pair consists of the addresses thatupper layerupper-layer protocols use in their interaction with theSHIM6shim6 layer. Use of the primary address pair means that the communication is compatible with regularnon-SHIM6non-shim6 communication and that no contextIDtag needs to be present. 3.5. Current Address PairSHIM6Shim6 needs to avoid sending packetswhichthat belong to the same transport connection concurrently over multiple paths. This is because congestion control in commonly used transport protocols is based upon a notion of a single path. While routing can introduce path changes as well and transport protocols have means to deal with this, frequent changes will cause problems. Effective congestion control over multiple paths is considered a research topic at the time of publication of thisspecification is written. SHIM6document. Shim6 does not attempt to employ multiple paths simultaneously. Note:SCTPThe Stream Control Transmission Protocol (SCTP) and future multipath transport protocols are likely to require interaction withSHIM6,shim6, at least to ensure that they do not employSHIM6shim6 unexpectedly. For thesereasonsreasons, it is necessary to choose a particular pair of addresses as the current address pairwhich isthat will be used until problems occur, at least for the same session. It is theoretically possible to support multiple current address pairs for different transport sessions orSHIM6shim6 contexts. However, this is not supported in this version of theSHIM6shim6 protocol. A current address pair need not be operational at all times. If there is no traffic to send, we may not know if theprimarycurrent address pair is operational. Nevertheless, it makes sense to assume that the address pair that worked previously continues to be operational for new communications as well. 4. Protocol Overview This section discusses the design of the reachability detection and full reachability exploration mechanisms, and givesonan overview of the REAP protocol. Exploring the full set of communication options between twohostsnodes that both have two or more addresses is an expensive operation as the number of combinations to be explored increases very quickly with the number of addresses. For instance, with two addresses on both sides, there are four possible address pairs. Since we can't assume that reachability in one direction automatically means reachability for the complement pair in the other direction, the total number of two- way combinations is eight. (Combinations = nA * nB * 2.) An important observation in multihoming is that failures are relatively infrequent, sothatan operational pair that worked a few seconds ago is very likely tobestill be operational.SoThus, it makes sense to have alight-weightlightweight protocol that confirms existing reachability, and to only invoke heavier exploration mechanism whenathere is a suspected failure. 4.1. Failure Detection Failure detection consists of three parts: tracking local information, tracking remote peer status, and finally verifying reachability. Tracking local information consists of using, for instance, reachability information about the local router as an input. Nodes SHOULD employ techniques listed inSectionSections 3.1 andSection3.2 to track the local situation. It is also necessary to track remote address information from the peer. For instance, if the peer'scurrently usedaddress in the current address pair is no longerin use,locally operational, a mechanism to relay that information is needed. The Update Request message in theSHIM6shim6 protocol is used for this purpose[I-D.ietf-shim6-proto].[RFC5533]. Finally, when the local and remote information indicates that communication should be possible and there areupper layerupper-layer packets to be sent, reachability verification is necessary to ensure that the peers actually have an operational address pair. A technique called Forced Bidirectional Detection(FBD, originally defined in an earlier SHIM6 document [I-D.ietf-shim6-reach-detect])(FBD) is employed for the reachability verification. Reachability for the currently used address pair in aSHIM6shim6 context is determined by making sure that whenever there is data traffic in one direction, there is also traffic in the other direction. This can be data traffic as well,but also transport layeror it may be transport-layer acknowledgments or a REAP reachability keepalive if there is no other traffic. This way, it is no longer possible to have traffic in only onedirection,direction; so whenever there is data traffic going out, but there are no return packets, there must be a failure,soand the full exploration mechanism is started. A more detailed description of the currentpair reachabilitypair-reachability evaluation mechanism: 1. Toavoidprevent the other side from concluding that there is a reachability failure, it's necessary for ahostnode implementing thefailure detectionfailure-detection mechanism to generate periodic keepalives when there is no other traffic. FBD works by generating REAP keepalives if the node is receiving packets from its peer but not sending any of its own. The keepalives are sent at certain intervals so that the other side knows there is a reachability problem when it doesn't receive any incoming packets foritsthe duration of a Send Timeout period. Thehostnode communicates its Send Timeout value to the peer asana Keepalive Timeout Option(section(Section 5.3) in the I2, I2bis, R2, or UPDATE messages. The peer then maps this value to its Keepalive Timeout value. The interval after which keepalives are sent is named the Keepalive Interval. The RECOMMENDED approach for the Keepalive Interval issendingto send keepalives atone- halfone-half to one-third of the Keepalive Timeout interval, so that multiple keepalives are generated and have time to reach thecorrespondentpeer before it times out. 2. Whenever outgoingdatapayload packets are generated, a timer is started to reflect the requirement that the peer should generate return traffic fromdatapayload packets. The timeout value is set to the value of Send Timeout. For the purposes of this specification,"data"payload packet" refers to any packet that is part of aSHIM6shim6 context, including bothupper layerupper-layer protocol packets andSHIM6shim6 protocolmessagesmessages, except those defined in this specification. For those messages, section 6 specifies what happens to the timers when a message is transmitted or received. 3. Whenever incomingdatapayload packets are received, the timer associated with the return traffic from the peer is stopped, and another timer is started to reflect the requirement for this node to generate return traffic. This timeout value is set to the value of Keepalive Timeout. These two timers are mutually exclusive. In other words, either the node is expecting to see traffic from the peer based on the traffic that the node sent earlier or the node is expecting to respond to the peer based on the traffic that the peer sent earlier(or(otherwise, the node is in an idle state). 4. The reception of a REAPkeepalive packetKeepalive Message leads to stopping the timer associated with the return traffic from the peer. 5. Keepalive Interval seconds after the lastdatapayload packet has been received for a context,andif no other packet has been sent within this context since thedatapayload packet has been received, a REAPkeepalive packetKeepalive Message is generated for the context in question and transmitted to thecorrespondent.peer. Ahostnode may send the keepalive sooner than Keepalive Interval seconds if implementation considerations warrant this, but should take care to avoid sending keepalives at an excessive rate. REAPkeepalive packetsKeepalive Messages SHOULD continue to be sent at the Keepalive Interval until either adatapayload packet in theSHIM6shim6 context has been received from the peer or the Keepalive Timeout expires. Keepalives are not sent at all ifdata wasone or more payload packets were sent within thekeep-alive interval. A recommended value range forKeepaliveInterval is specified in Section 7. The actual value SHOULD be randomized in order to prevent synchronization.Interval. 6. Send Timeout seconds after the transmission of adatapayload packet with no return traffic on this context, a full reachability exploration is started. Section 7 provides some suggested defaults for these timeout values. The actual value SHOULD be randomized in order to prevent synchronization. Experience from the deployment of theSHIM6shim6 protocol is needed in order to determine what values are most suitable. 4.2. Full Reachability Exploration As explained in previous sections, the currently used address pair may becomeinvalidinvalid, either through one of the addressesbeingbecoming unavailable ornonoperational,nonoperational or through the pair itself being declared nonoperational. An exploration process attempts to find another operational pair so that communications can resume. What makes this process hard is the requirement to support unidirectionally operational address pairs. It is insufficient to probe address pairs by a simplerequest - responserequest-response protocol. Instead, the party that first detects the problem starts a process where it tries each of the different address pairs in turn by sending a message to its peer. These messages carry information about the state of connectivity between the peers, such as whether the sender has seen any traffic from the peer recently. When the peer receives a message that indicates a problem, it assists the process by starting its own parallel exploration to the other direction, again sending information about the recently received payload traffic or signaling messages. Specifically, when A decides that it needs to explore for an alternative address pair to B, it will initiate a set of Probemessages,Messages, in sequence, until it getsana ProbemessageMessage from B indicating that (a) B has received one of A's messages and, obviously, (b) that B's ProbemessageMessage gets back to A. B uses the same algorithm, but starts the process from the reception of the first ProbemessageMessage from A. Upon changing to a new address pair, the network path traversed most likely has changed, sothattheULPupper-layer protocol (ULP), SHOULD be informed. This can be a signal for the ULP toadaptadapt, due to the change inpathpath, sothat,that for example,TCPif the ULP is TCP, it could initiate a slow startprocedure, althoughprocedure. However, it's likely that the circumstances that led to the selection of a new path already caused enough packet loss to trigger slow start. REAP is designed to support failure recovery even in the case of having only unidirectionally operational address pairs. However, due to security concerns discussed in Section 8, the exploration process can typically be run only for a session that has already been established. Specifically, while REAP would in theory be capable of exploration even during connection establishment, its use within theSHIM6shim6 protocol does not allow this. 4.3. Exploration Order The exploration process assumes an ability to choose address pairs for testing. An overview of the choosing process used by REAP is as follows: o As an input to start the process, the node has knowledge of its own addresses and has been told viaSHIM6shim6 protocol messages what the addresses of the peer are. A list of possible pairs of addresses can be constructed by combining the two pieces of information. o By employing standard IPv6 address selection rules, the list is pruned by removing combinations that are inappropriate, such as attempting to use alink locallink-local address when contacting a peer that uses a global unicast address. o Similarly, standard IPv6 address selection rules provide a basic priority order for the pairs. o Local preferences may be applied for some additional tuning of the order in the list. The mechanisms for local preference settings are notspecified,specified but can involve, for instance, configuration that sets the preference for using one interface over another. o As a result, the node has a prioritized list of address pairs to try. However, the list may still be long, as there may be a combinatorial explosion when there are many addresses on both sides. REAP employs these pairs sequentially, however, and uses a back-off procedureisto avoid a "signaling storm". This ensures that the exploration process is relatively conservative or "safe". The tradeoff is thatfndingfinding a working path may take time if there are many addresses on both sides. In more detail, the process is as follows. Nodes first consult the RFC 3484 default address selection rules [RFC3484] to determine what combinations of addresses are allowed from a local point of view, as this reduces the search space. RFC 3484 also provides a priority ordering among different address pairs, possibly making the searchpossiblyfaster. (Additional mechanisms may be defined in the future for arriving at an initial ordering of address pairs before testing starts[I-D.ietf-shim6-locator-pair-selection].)[PAIR].) Nodes may also use local information, such as known quality of service parameters or interfacetypestypes, to determine what addresses are preferred over others, and try pairs containing such addresses first. TheSHIM6shim6 protocol also carries preference information in its messages. Out of the set of possible candidate address pairs, nodes SHOULD attempt to test through all of them until an operational pair is found, andretryingretry the process asisnecessary. However, all nodes MUST perform this process sequentially and with exponential back-off. This sequential process is necessary in order to avoid a "signaling storm" when an outage occurs (particularly for a complete site). However, it also limits the number of addresses thatcancan, inpracticepractice, be used for multihoming, considering thattransporttransport- andapplication layerapplication-layer protocols will fail if the switch to a new address pair takes too long. Section 7 suggests default values for the timers associated with the exploration process. The value Initial Probe Timeout (0.5 seconds) specifies the interval between initial attempts to send probes; the Number of Initial Probes (4) specifies how many initial probes can be sent before the exponentialbackoffback-off procedure needs to be employed. This process increases the time between every probe if there is no response. Typically, each increase doubles thetimetime, but this specification does not mandate a particular increase. Note: The rationale for sending four packets at a fixed rate before the exponentialbackoffback-off is employed is to avoid having to send these packets excessively fast. Without this, having 0.5 seconds between the third and fourth probe means that the time between the first and second probe would have to be 0.125 seconds, which gives very little time for a reply to the first packet to arrive. Also, this means that the first four packets are sent within 0.875 seconds rather than 2 seconds, increasing the potential for congestion if a large number ofshimshim6 contexts need to send probes at the same time after a failure. Finally, Max Probe Timeout (60 seconds) specifies a limit beyond which the probe interval may not grow. If the exploration process reaches this interval, it will continue sending at this rate until a suitable response is triggered or theSHIM6shim6 context is garbage collected, becauseupper layerupper-layer protocols using theSHIM6shim6 context in question are no longer attempting to send packets. Reaching the Max Probe Timeout may also serve as a hint to the garbage collection process that the context is no longer usable. 5. Protocol Definition 5.1. Keepalive Message The format of thekeepalive messageKeepalive Message 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len |0| Type = 66 | Reserved1 |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum |R| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ReceiverContext Tagcontext tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Next Header, Hdr Ext Len, 0, 0, Checksum These are as specified in Section 5.3 of theSHIM6shim6 protocol description[I-D.ietf-shim6-proto].[RFC5533]. Type This field identifies the KeepalivemessageMessage and MUST be set to 66 (Keepalive). Reserved1 This is a 7-bit field reserved for future use. It is set to zero ontransmit,transmit and MUST be ignored on receipt. R This is a 1-bit field reserved for future use. It is set to zero ontransmit,transmit and MUST be ignored on receipt. ReceiverContext Tagcontext tag This is a 47-bit field for theContext Tagcontext tag that the receiver has allocated for the context. Reserved2 This is a 32-bit field reserved for future use. It is set to zero ontransmit,transmit and MUST be ignored on receipt. Options This field MAY contain one or more SHIM6options.The inclusion of the latter options is not necessary, however, asoptions. However, there are currently no defined options that are useful in a Keepalivemessage. These options areMessage. The Options field is provided only for future extensibility reasons. A valid message conforms to the format above, has a ReceiverContext Tagcontext tag that matchestothe context known by the receiver, is a validshimshim6 control message as defined in Section12.212.3 of theSHIM6shim6 protocol description[I-D.ietf-shim6-proto],[RFC5533], andits shimhas a shim6 contextstatethat is in state ESTABLISHED. The receiver processes a valid message by inspecting itsoptions,options and executing any actions specified for such options. The processing rules for this message arethegiven in more detail in Section 6. 5.2. Probe Message This message performs REAP exploration. Its format 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len |0| Type = 67 | Reserved |0| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Checksum |R| | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | ReceiverContext Tagcontext tag | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Precvd| Psent |Sta| Reserved2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + First probe sent + | | + Source address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + First probe sent + | | + Destination address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | First probe nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | First probe data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ / / / Nth probe sent / | | + Source address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Nth probe sent + | | + Destination address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Nth probe nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Nth probe data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + First probe received + | | + Source address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + First probe received + | | + Destination address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | First probe nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | First probe data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Nth probe received + | | + Source address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Nth probe received + | | + Destination address + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Nth probe nonce | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Nth probe data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| | + Options + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +// Options+ | |// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Next Header, Hdr Ext Len, 0, 0, Checksum These are as specified in Section 5.3 of theSHIM6shim6 protocol description[I-D.ietf-shim6-proto].[RFC5533]. Type This field identifies the ProbemessageMessage and MUST be set to 67 (Probe). Reserved This is a 7-bit field reserved for future use. It is set to zero ontransmit,transmit and MUST be ignored on receipt. R This is a 1-bit field reserved for future use. It is set to zero ontransmit,transmit and MUST be ignored on receipt. ReceiverContext Tagcontext tag This is a 47-bit field for theContext Tagcontext tag that the receiver has allocated for the context. Psent This is a 4-bit field that indicates the number of sent probes included in thisprobe message.Probe Message. The first set ofprobeProbe fields pertains to the current message and MUST be present, so the minimum value for this field is 1. Additional sentprobeProbe fields are copies of the same fields sent in (recent) earlier probes and may be included or omitted as per any logic employed by the implementation. Precvd This is a 4-bit field that indicates the number of received probes included in thisprobe message.Probe Message. ReceivedprobeProbe fields are copies of the same fields in earlier received probes that arrived since the last transition to state Exploring. When a sender is in state InboundOk it MUST include copies of the fields of at least one of the inbound probes. A sender MAY include additional sets of these receivedprobeProbe fields in any state as per any logic employed by the implementation. The fields probe source, probe destination, probenoncenonce, and probe data may be repeated, depending on the value of Psent and Preceived. Sta (State) This 2-bit State field is used to inform the peer about the state of the sender. It has three legal values: 0 (Operational) implies that the sender both (a) believes it has no problem communicating and (b) believes that the recipient also has no problem communicating. 1 (Exploring) implies that the sender has a problem communicating with the recipient, e.g., it has not seen any traffic from the recipient even when it expected some. 2 (InboundOk) implies that the sender believes it has no problem communicating, i.e., it at least sees packets from therecipient,recipient but that the recipient either has a problem or has not yet confirmed to the sender that the problem has beensolved.resolved. Reserved2 MUST be set to0zero upon transmission and MUST be ignored upon reception. Probe source This 128-bit field contains the source IPv6 address used to send the probe. Probe destination This 128-bit field contains the destination IPv6 address used to send the probe. Probe nonce This is a 32-bit field that is initialized by the sender with a value that allows it to determine with which sent probes a received probecorrelates with.correlates. It is highly RECOMMENDED that thenonceNonce fieldisbe at least moderately hard to guess so that evenon-pathon- path attackers can't deduce the next nonce value that will be used. This value SHOULD be generated using a random number generator that is known to have good randomness properties as outlined in RFC 4086 [RFC4086]. Probe data This is a 32-bit field with no fixed meaning. Theprobe dataProbe Data field is copied back with no changes. Future flags may define a use for this field. Options For future extensions. 5.3. Keepalive Timeout Option Format Either side of aSHIM6shim6 context can notify the peer of the value that it would prefer the peer to use as its Keepalive Timeout value. If thehostnode is using a non-default Send Timeout value, itSHOULDMUST communicate this value as a Keepalive Timeout value to the peer in the below option. This option MAY be sent in the I2, I2bis, R2, or UPDATE messages. The option SHOULD only need to be sent once in a given shim6 association. If ahostnode receives thisoptionoption, it SHOULD update its Keepalive Timeout value for thecorrespondent.peer. 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 = 10 |0| Length = 4 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + Reserved | Keepalive Timeout | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fields: Type This field identifies the option and MUST be set to 10 (Keepalive Timeout). Length This field MUST be set as specified in Section5.145.1 of theSHIM6shim6 protocol description[I-D.ietf-shim6-proto]. That[RFC5533] -- that is,it isset to 4. Reserved A 16-bit field reserved for future use.SetIt is set to zero upon transmit and MUST be ignored upon receipt. Keepalive TimeoutValueThe value in seconds corresponding to the suggested Keepalive Timeout value for the peer. 6.BehaviourBehavior The requiredbehaviourbehavior of REAP nodes is specified below in the form of a state machine. The externally observablebehaviourbehavior of an implementation MUST conform to this state machine, but there is no requirement that the implementation actuallyemploysemploy a state machine. Intermixed with the followingdescriptiondescription, we also provide a state machine description inatabular form.ThatHowever, that form is onlyinformational, however.informational. On a given context with a given peer, the node can be in one of three states: Operational, Exploring, or InboundOK. In the Operationalstatestate, the underlying address pairs are assumed to be operational. In the Exploringstatestate, this nodehas observed a problem and has currently nothasn't seen any traffic from thepeer.peer for more than a Send Timer period. Finally, in the InboundOKstatestate, this node sees traffic from the peer, but the peer may not yet see any traffic from thisnodenode, sothatthe exploration process needs to continue. The nodemaintainsalso maintains the SendtimerTimer (Send Timeout seconds) and KeepalivetimerTimer (Keepalive Timeout seconds). The SendtimerTimer reflects the requirement that when this node sends a payloadpacketpacket, there should be some return traffic (either payload packets or Keepalivemessages)Messages) within Send Timeout seconds. The KeepalivetimerTimer reflects the requirement that when this node receives a payloadpacketpacket, there should a similar response towards the peer. The KeepalivetimerTimer is only used within the Operational state, and the Sendtimer inTimer within the Operational and InboundOK states. No timer is running in the Exploring state. As explained in Section 4.1, the two timers are mutually exclusive. That is, either the Keepalivetimer is runningTimer or the SendtimerTimer isrunning (or no timerrunning, or neither of them isrunning).running. Note that Appendix A gives some examples of typical protocol runs in order to illustrate thebehaviour.behavior. 6.1. Incomingpayload packetPayload Packet Upon the reception of a payload packet in the Operational state, the node starts the KeepalivetimerTimer if itiswas not yet running, and stops the SendtimerTimer if it was running. If the node is in the Exploringstatestate, it transitions to the InboundOK state, sends a Probemessage,Message, and starts the Sendtimer.Timer. It fills the Psent and corresponding Probesource address,Source Address, Probedestination address,Destination Address, Probenonce,Nonce, and ProbedataData fields with information about recent ProbemessagesMessages that have not yet been reported as seen by the peer. It also fills the Precvd and corresponding Probesource address,Source Address, Probedestination address,Destination Address, Probenonce,Nonce, and ProbedataData fields with information about recent ProbemessagesMessages it has seen from the peer. When sending a Probemessage,Message, the State field MUST be set to a value that matches the conceptual state of the sender after sending the Probe. In thiscasecase, the node therefore sets theStaState field to 2 (InboundOk). The IP source andanddestination addresses for sending the ProbemessageMessage are selected as discussed in Section 4.3. In the InboundOKstatestate, the node stops the SendtimerTimer if it was running, but does not do anything else. The reception ofSHIM6shim6 control messages other than the Keepalive and ProbemessagesMessages are treatedsimilarly withthe same as the reception of payload packets. While the KeepalivetimerTimer is running, the node SHOULD send KeepalivemessagesMessages to the peer with an interval of Keepalive Interval seconds. Conceptually, a separate timer is used to distinguish between the interval between KeepalivemessagesMessages and the overall Keepalive Timeout interval. However, this separate timer is not modelled in the tabular or graphical state machines. When sent, the KeepalivemessageMessage is constructed as described in Section 5.1. It is sent using the current address pair. "Start" and "Stop" refer to starting and stopping the Keepalive Timer or the Send Timer. Operational Exploring InboundOk--------------------------------------------------------------------------------------------------------------------------------- STOPSend;Send SEND ProbeInboundOk;InboundOk STOP Send START Keepalive STARTSend;Send GOTO InboundOk 6.2. Outgoingpayload packetPayload Packet Upon sending a payload packet in the Operational state, the node stops the KeepalivetimerTimer if it was running and starts the SendtimerTimer if it was not running. In the Exploring state there is no effect, and in the InboundOK state the node simply starts the SendtimerTimer if it was not yet running. (The sending ofSHIM6shim6 control messages is again treatedsimilarly here.)the same.) Operational Exploring InboundOk----------------------------------------------------------------------------------------------------------------------------- STARTSend;Send - START Send STOP Keepalive 6.3. KeepalivetimeoutTimeout Upon a timeout on the Keepalivetimer,Timer, the node sends one last Keepalivemessage.Message. This can only happen in the Operational state. The KeepalivemessageMessage is constructed as described in Section 5.1. It is sent using the current address pair. Operational Exploring InboundOk----------------------------------------------------------------------------------------------------------------------------- SEND Keepalive - - 6.4. SendtimeoutTimeout Upon a timeout on the Sendtimer,Timer, the node enters the Exploring state and sends a Probemessage.Message. The ProbemessageMessage is constructed as explained in Section 6.1, except that theStaState field is set to 1 (Exploring). Operational Exploring InboundOk----------------------------------------------------------------------------------------------------------------------------- SEND ProbeExploring;Exploring - SEND ProbeExploring;Exploring GOTO Exploring GOTO Exploring 6.5. Retransmission While in the Exploringstatestate, the node keeps retransmitting its ProbemessagesMessages to different (or the same) addresses as defined in Section 4.3. A similar process is employed in the InboundOk state, except that upon suchretransmissionretransmission, the SendtimerTimer is started if it was not running already. The ProbemessagesMessages are constructed as explained in Section 6.1, except that theStaState field is set to 1 (Exploring) or 2 (InboundOk), depending on which state the sender is in. Operational Exploring InboundOk--------------------------------------------------------------------------------------------------------------------------- - SEND Probe Exploring SEND Probe InboundOk START Send 6.6. Reception of the KeepalivemessageMessage Upon the reception of a KeepalivemessageMessage in the Operational state, the node stops the Sendtimer,Timer if it was running. If the node is in the Exploringstatestate, it transitions to the InboundOK state, sends a Probemessage,Message, and starts the Sendtimer.Timer. The ProbemessageMessage is constructed as explained in Section 6.1. In the InboundOKstatestate, the SendtimerTimer isstopped,stopped if it was running. Operational Exploring InboundOk----------------------------------------------------------------------------------------------------------------------------- STOP Send SEND ProbeInboundOk;InboundOk STOP Send STARTSend;Send GOTO InboundOk 6.7. Reception of the ProbemessageMessage State=Exploring Upon receiving a Probe with State set to Exploring, the node enters the InboundOK state, sends a Probe as described in Section 6.1, stops the KeepalivetimerTimer if it was running, and restarts the Sendtimer.Timer. Operational Exploring InboundOk----------------------------------------------------------------------------------------------------------------------------- SEND ProbeInboundOk;InboundOk SEND ProbeInboundOk;InboundOk SEND Probe InboundOk STOPKeepalive;Keepalive STARTSend; InboundOk;Send Restart Send RESTARTSend;Send GOTO InboundOkRESTART SendGOTO InboundOk 6.8. Reception of the ProbemessageMessage State=InboundOk Upon the reception of a ProbemessageMessage with State set to InboundOk, the node sends a Probemessage,Message, restarts the Sendtimer,Timer, stops the KeepalivetimerTimer if it was running, and transitions to the Operational state.NewA new current address pair is chosen for the connection, based on the reports of received probes in the message that we just received. If no received probes have been reported, the current address pair is unchanged. The ProbemessageMessage is constructed as explained in Section 6.1, except that theStaState field is set to0zero (Operational). Operational Exploring InboundOk--------------------------------------------------------------------------------------------------------------------------------- SEND ProbeOperational;Operational SEND ProbeOperational;Operational SEND Probe Operational RESTART Send RESTARTSend;Send RESTARTSend; Operational;Send STOP Keepalive GOTO OperationalRESTART Send;GOTO Operational 6.9. Reception of the ProbemessageMessage State=Operational Upon the reception of a ProbemessageMessage with State set to Operational, the node stops the SendtimerTimer if it was running, starts the KeepalivetimerTimer if it was not yet running, and transitions to the Operational state. The ProbemessageMessage is constructed as explained in Section 6.1, except that theStaState field is set to0zero (Operational). Note: This terminates the exploration process when both parties are happy and know that their peer is happy as well. Operational Exploring InboundOk----------------------------------------------------------------------------------------------------------------------------- STOP Send STOPSend;Send STOPSend;Send START Keepalive START Keepalive START Keepalive GOTO Operational GOTO Operational The reachability detection and exploration process has no effect on payload communications until a new operational addresspairs havepair has actually been confirmed. Prior tothatthat, the payload packets continue to be sent to the previously used addresses. 6.10. Graphical Representation of the State Machine In the PDF version of this specification, an informational drawing illustrates the state machine. Where the text and the drawing differ, the text takes precedence. 7. Protocol Constants and Variables The following protocol constants are defined: Initial Probe Timeout 0.5 seconds Number of Initial Probes 4 probes And these variables have the following default values: Send Timeout 15 seconds KeepaliveIntervalTimeout X seconds, where X isone thirdthe peer's Send Timeout as communicated in the Keepalive Timeout Option 15 seconds if the peer didn't send a Keepalive Timeout option Keepalive Interval Y seconds, where Y is one-third toone halfone-half of the Keepalive Timeout value (see Section 4.1)Initial Probe Timeout 0.5 seconds Number of Initial Probes 4 probes Max Probe Timeout 60 secondsAlternate values of the Send Timeout may be selected by ahostnode and communicated to the peer in the Keepalive Timeout Option. A very small value of the Send Timeout may affect the ability to exchange keepalives over a path that has a long roundtrip delay. Similarly, it may causeSHIM6shim6 to react to temporary failures more often than necessary. As a result, it is RECOMMENDED that an alternate Send Timeout value not be under 10 seconds. Choosing a higher value than the one recommended above is also possible, but there is a relationship between Send Timeout and the ability of REAP to discover and correct errors in the communication path. In any case, in order forSHIM6shim6 to be useful, it should detect and repair communication problemsfarlong before upper layers give up. For this reason, it is RECOMMENDED that Send Timeout be at most 100 seconds (default TCP R2 timeout [RFC1122]).Note that itNote: It is not expected that the Send Timeout or other valuesneed towill be estimated based on experienced roundtrip times. Signaling exchanges are performed based on exponentialbackoff.back-off. The keepalive processes send packets only in the relatively rare condition that all traffic is unidirectional. Finally, because Send Timeout is far greater than usual roundtrip times, it merely divides the traffic into periods thatSHIM6shim6 looks at to decide whether to act. 8. Security Considerations Attackers may spoof various indications from lower layers and from the network in an effort to confuse the peers about which addresses are or are not operational. For example, attackers may spoof ICMP error messages in an effort to cause the parties to move their traffic elsewhere or even to disconnect. Attackers may also spoof information related to network attachments,router discovery,Router Discovery, and address assignments in an effort to make the parties believe they have Internet connectivity when in reality they do not. This may cause use of non-preferred addresses or evendenial-of-denial of service. This protocol does not provide any protection of its own for indications from other parts of the protocol stack. Unprotected indications SHOULD NOT be taken as a proof of connectivity problems. However, REAP has weak resistance against incorrect information even from unprotected indications in the sense that it performs its own tests prior to picking a new address pair.Denial-of- serviceDenial-of-service vulnerabilities remain, however, as do vulnerabilities againstonon- path attackers. Some aspects of these vulnerabilities can be mitigated through the use of techniques specific to the other parts of the stack, such as properly dealing with ICMP errors[I-D.ietf-tcpm-icmp-attacks], link layer[GONT], link-layer security, or the use of SEND [RFC3971] to protect IPv6 Router and Neighbor Discovery. Other parts of theSHIM6shim6 protocol ensure that the set of addresses we are switching between actually belong together. REAP itself provides no such assurances. Similarly, REAP provides some protection againstthird partythird-party flooding attacks [AURA02]; when REAP isrunrun, itsProbeprobe nonces can be used as a return routability check that the claimed address is indeed willing to receive traffic. However, this needs to be complemented with another mechanism to ensure that the claimed address is also the correcthost. SHIM6node. Shim6 does this by performing binding of all operations to context tags. The keepalive mechanism in this specification is vulnerable to spoofing.On path-attackersOn-path attackers that can see aSHIM6shim6 context tag can send spoofed KeepalivemessagesMessages once per Send Timeoutinterval,interval in order to prevent twoSHIM6shim6 nodes from sending Keepalives themselves. This vulnerability is only relevant to nodes involved in a one-way communication. The result of the attack is that the nodes enter the exploration phase needlessly, but they should be able to confirm connectivity unless, of course, the attacker is able to prevent the exploration phase from completing. Off-path attackers may not be able to generate spoofed results, given that the context tags are 47-bit random numbers. To protect against spoofed keepalive packets, a host implementing both shim6 and IPsec MAY ignore incoming REAP keepalives if it has good reason to assume that the other side will be sending IPsec- protected return traffic. I.e., if a host is sending TCP data, it can reasonably expect to receive TCP ACKs in return. If no IPsec- protected ACKs come back but unprotected keepalives do, this could be the result from an attacker trying to hide broken connectivity.bit random numbers. To protect against spoofedkeepalive packets,Keepalive Messages, ahostnode implementing both shim6 and IPsec MAY ignore incoming REAP keepalives if it has good reason to assume that the other side will be sending IPsec- protected return traffic.I.e.,In other words, if ahostnode is sending TCP data, it can reasonably expect to receive TCP ACKs in return. If noIPsec- protectedIPsec-protected ACKs come back but unprotected keepalives do, this could be the resultfromof an attacker trying to hide broken connectivity. The exploration phase is vulnerable to attackers that are on the path. Off-path attackers would find it hard to guess either the context tag or the correct probe identifiers. Given that IPsec operates above theshimshim6 layer, it is not possible to protect the exploration phase against on-pathattackers.attackers with IPsec. This is similar to theability to protectissues with protecting otherShim6shim6 control exchanges. There are mechanisms in place to prevent the redirection of communications to wrong addresses, but on-path attackers can cause denial-of-service, move communications to less-preferred address pairs, and so on. Finally, the exploration itself can cause a number of packets to be sent. As aresultresult, it may be used as a tool for packet amplification in flooding attacks.In order to prevent this itIt is required that the protocol employing REAP has built-in mechanisms to prevent this. For instance,in SHIM6shim6 contexts are created only after a relatively large number of packetshashave been exchanged, a costwhichthat reduces the attractiveness of usingSHIM6shim6 and REAP for amplification attacks. However, such protections are typically not present atconnection establishmentconnection-establishment time. When exploration would be needed for connection establishment to succeed, its usage would result in an amplification vulnerability. As a result,SHIM6shim6 does not support the use of REAP inconnectionthe connection- establishment stage. 9. Operational Considerations When there are no failures, thefailure detectionfailure-detection mechanism (andSHIM6shim6 in general) arelight-weight:lightweight: keepalives are not sent when aSHIM6shim6 context is idle or when there is traffic in both directions. So in normal TCP or TCP-likeoperation,operations, there would only be one or two keepalives when a session transitions from active to idle. Only when there arefailures, therefailures is there significantfailure detectionfailure-detection traffic,and thenespecially in the case where a link goes down that is shared by many active sessions and by multiplehosts.nodes. When this happens, one keepalive is sent and then a series of probes. This happens per active(traffic generating)(traffic-generating) context, all of which willall timeouttime out within1015 seconds after the failure. This makes the peak traffic thatSHIM6shim6 generates after a failure around one packet per second per context. Presumably, the sessions that run over those contexts were sending at least that much traffic and most likely more, but if the backup path is significantly lower bandwidth than the failed path, this could lead to temporary congestion. However, note that in the case of multihoming using BGP, if the failover is fast enough that TCP doesn't go into slow start, the full data traffic that flows over the failed path is switched over to the backup path, and if this backup path is of a lower capacity, there will be even morecongestion in that case.congestion. Although the failure detection probing does not perform congestion control as such, the exponentialbackoffback-off makes sure that the number of packets sent quickly goes down and eventually reaches one per context per minute, which should be sufficiently conservative even on the lowest bandwidth links. Section 7 specifies a number of protocol parameters. Possible tuning of these parameters and others that are not mandated in this specification may affect these properties. It is expected that further revisions of this specification provide additional information after sufficient deployment experience has been obtained from different environments. Implementations may provide means to monitor their performance and send alarms about problems. Their standardization is, however, the subject of future specifications. In general,SHIM6shim6 is most applicable for small sites andhosts,nodes, and it is expected that monitoring requirements on such deployments are relatively modest. In any case, where thehostnode is associated with a management system, it is RECOMMENDED that detected failures and failover events are reported via asynchronous notifications to the management system. Similarly, where logging mechanisms are available on thehost,node, these events should be recorded in event logs.SHIM6Shim6 uses the same header for both signaling and the encapsulation ofdatapayload packets after a rehoming event. This way, fate is shared between the two types of packets, so the situation where reachability probes or keepalives can be transmittedsuccessfully,successfully butdatapayload packetscan not,cannot, is largely avoided: either allSHIM6shim6 packets make it through, soSHIM6shim6 functions as intended, or none do, and noSHIM6shim6 state is negotiated. Even in the situation where some packets make it through andotherothers do not,SHIM6shim6 will generally either work as intended or provide a service that is no worse than in theabsenseabsence ofSHIM6,shim6, apart from the possible generationaof a small amount of signaling traffic. Sometimesdatapayload packetsand(and possiblydatapayload packets encapsulated in theSHIM6 headershim6 header) do not make it through, but signaling and keepalives do. This situation can occur when there is a path MTU discovery black hole on one of the paths. If only large packets are sent at some point, then reachability exploration will be turned on and REAP will likely select another path, which may or may not be affected by the PMTUD black hole. 10.IANA Considerations No IANA actions are required. The number assignments necessary for the messages defined in this document appear together with all the other IANA assignments in the main SHIM6 specification [I-D.ietf-shim6-proto]. 11.References11.1.10.1. Normative References [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., and M. Carney, "Dynamic Host Configuration Protocol for IPv6 (DHCPv6)", RFC 3315, July 2003. [RFC3484] Draves, R., "Default Address Selection for Internet Protocol version 6 (IPv6)", RFC 3484, February 2003. [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, June 2005. [RFC4193] Hinden, R. and B. Haberman, "Unique Local IPv6 Unicast Addresses", RFC 4193, October 2005. [RFC4429] Moore, N., "Optimistic Duplicate Address Detection (DAD) for IPv6", RFC 4429, April 2006. [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, September 2007. [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless Address Autoconfiguration", RFC 4862, September 2007.11.2.[RFC5533] Nordmark, E. and M. Bagnulo, "Shim6: Level 3 Multihoming Shim Protocol for IPv6", RFC 5533, May 2009. 10.2. Informative References [ADD-SEL] Bagnulo, M., "Address selection in multihomed environments", Work in Progress, October 2005. [AURA02] Aura, T., Roe, M., and J. Arkko, "Security of Internet Location Management",InProceedings of the 18th Annual Computer Security Applications Conference, Las Vegas, Nevada,USA.,USA, December 2002.[I-D.bagnulo-shim6-addr-selection] Bagnulo, M., "Address selection in multihomed environments", draft-bagnulo-shim6-addr-selection-00 (work in progress), October 2005. [I-D.huitema-multi6-addr-selection] Huitema, C., "Address selection in multihomed environments", draft-huitema-multi6-addr-selection-00 (work in progress), October 2004. [I-D.ietf-bfd-base][BFD] Katz, D. and D. Ward, "Bidirectional Forwarding Detection",draft-ietf-bfd-base-08 (workWork inprogress), March 2008. [I-D.ietf-dna-cpl] Nordmark, E.Progress, February 2009. [DNA-SIM] Krishnan, S. andJ. Choi, "DNA with unmodified routers: Prefix list based approach", draft-ietf-dna-cpl-02 (work in progress), January 2006. [I-D.ietf-dna-protocol] Narayanan, S., Kempf, J., Nordmark, E., Pentland, B., Choi, J.,G. Daley,G., and N. Montavont, "Detecting"Simple procedures for Detecting Network Attachment inIPv6 Networks (DNAv6)", draft-ietf-dna-protocol-07 (workIPv6", Work inprogress),Progress, February 2009. [GONT] Gont, F., "ICMP attacks against TCP", Work in Progress, October 2008.[I-D.ietf-hip-mm] Henderson, T., "End-Host Mobility and Multihoming with the Host Identity Protocol", draft-ietf-hip-mm-05 (work[MULTI6] Huitema, C., "Address selection inprogress), March 2007. [I-D.ietf-shim6-locator-pair-selection]multihomed environments", Work in Progress, October 2004. [PAIR] Bagnulo, M., "Default Locator-pair selection algorithm for theSHIM6 protocol", draft-ietf-shim6-locator-pair-selection-03 (work in progress), February 2008. [I-D.ietf-shim6-proto] Nordmark, E. and M. Bagnulo, "Shim6: Level 3 Multihoming Shim Protocol for IPv6", draft-ietf-shim6-proto-10 (work in progress), February 2008. [I-D.ietf-shim6-reach-detect] Beijnum, I., "Shim6 Reachability Detection", draft-ietf-shim6-reach-detect-01 (workshim6 protocol", Work inprogress),Progress, October2005. [I-D.ietf-tcpm-icmp-attacks] Gont, F., "ICMP attacks against TCP", draft-ietf-tcpm-icmp-attacks-03 (work in progress), March2008. [RFC1122] Braden, R., "Requirements for Internet Hosts - Communication Layers", STD 3, RFC 1122, October 1989. [RFC3971] Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure Neighbor Discovery (SEND)", RFC 3971, March 2005. [RFC4960] Stewart, R., "Stream Control Transmission Protocol", RFC 4960, September 2007. [RFC5206] Nikander, P., Henderson, T., Vogt, C., and J. Arkko, "End- Host Mobility and Multihoming with the Host Identity Protocol", RFC 5206, April 2008. Appendix A. Example Protocol Runs This appendix has examples of REAP protocol runs in typical scenarios. We start with the simplest scenario of twohosts,nodes, A and B, that have aSHIM6shim6 connection with each other but are not currently sending any data. As neither side sends anything, they also do not expect anything back, so there are no messages at all: EXAMPLE 1: NocommunicationsCommunications Peer A Peer B | | | | | | | | | | | | | | | | Our second example involves an active connection with bidirectional payload packet flows.HereHere, the reception of data from the peer is taken as an indication of reachability, so again there are no extrapackes:packets: EXAMPLE 2: BidirectionalcommunicationsCommunications Peer A Peer B | | | payload packet | |-------------------------------------------->| | | | payload packet | |<--------------------------------------------| | | | payload packet | |-------------------------------------------->| | | | | The third example is the first one that involves an actual REAP message.HereHere, thehostsnodes communicate in just one direction, so REAP messages are needed to indicate to the peer that sends payload packets that its packets are getting through: EXAMPLE 3: UnidirectionalcommunicationsCommunications Peer A Peer B | | | payload packet | |-------------------------------------------->| | | | payload packet | |-------------------------------------------->| | | | payload packet | |-------------------------------------------->| | | | Keepaliveid=pnonce=p | |<--------------------------------------------| | | | payload packet | |-------------------------------------------->| | | | | The next example involves a failure scenario.HereHere, A hasaddresses Aaddress A, and B has addresses B1 and B2. The currently used address pairs are (A, B1) and (B1, A). All connections via B1 become broken, which leads to an exploration process: EXAMPLE 4: FailurescenarioScenario Peer A Peer B | | State: | State: Operational | Operational | (A,B1) payload packet | |-------------------------------------------->| | | | (B1,A) payload packet | |<--------------------------------------------| At time T1 | | path A<->B1 | (A,B1) payload packet | becomes |----------------------------------------/ |brokenbroken. | | | ( B1,A) payload packet | | /-----------------------------------------| | | | (A,B1) payload packet | |----------------------------------------/ | | | | (B1,A) payload packet | | /-----------------------------------------| | | | (A,B1) payload packet | |----------------------------------------/ | | | | | Send Timeout | | seconds after | | T1, B happens to | | see the problem | (B1,A) Probeid=p,nonce=p, | first and sends a | state=exploring | complaint that | /-----------------------------------------| it is not rec- | | eivinganythinganything. | | State: | | Exploring | | | (B2,A) Probeid=q,nonce=q, | | state=exploring | Butitsit's lost, |<--------------------------------------------| retransmission | | uses another pair A realizes | that it needs | to start the | exploration.It| It picks B2 as the | most likely candidate, | as it appeared in the |ProbeProbe. | State: InboundOk | | | | (A, B2) Probeid=r,nonce=r, | | state=inboundok, | | received probe q | This one gets |-------------------------------------------->| through. | | State: | | Operational | | | | | (B2,A) Probeid=s,nonce=s, | | state=operational, | B now knows | received probe r | that A has no |<--------------------------------------------| problemto receivereceiving | | itspacketspackets. State: Operational | | | | (A,B2) payload packet | |-------------------------------------------->| Payload packets | | flowagainagain. | (B2,A) payload packet | |<--------------------------------------------| The next example shows when the failure for the current locator pair is in the other direction only. A has addresses A1 and A2, and B has addresses B1 and B2. The current communication is between A1 and B1, but A's packets no longer reach B using this pair. EXAMPLE 5:One-way failureOne-Way Failure Peer A Peer B | | State: | State: Operational | Operational | | | (A1,B1) payload packet | |-------------------------------------------->| | | | (B1,A1) payload packet | |<--------------------------------------------| | | | (A1,B1) payload packet | At time T1 |----------------------------------------/ | path A1->B1 | | becomes | |brokenbroken. | (B1,A1) payload packet | |<--------------------------------------------| | | | (A1,B1) payload packet | |----------------------------------------/ | | | | (B1,A1) payload packet | |<--------------------------------------------| | | | (A1,B1) payload packet | |----------------------------------------/ | | | | | Send Timeout | | seconds after | | T1, B notices | | the problem and | (B1,A1) Probeid=p,nonce=p, | sends a com- | state=exploring | plaint that |<--------------------------------------------| it is not rec- | | eivinganythinganything. Arespondsresponds. | State: Exploring State: InboundOk | | | | (A1, B1) Probeid=q,nonce=q, | | state=inboundok, | | received probe p | |----------------------------------------/ |ButA's response | | islostlost. | (B2,A2) Probeid=r,nonce=r, | | state=exploring |NextNext, try a different |<--------------------------------------------| locatorpairpair. | | | (A2, B2) Probeid=s,nonce=s, | | state=inboundok, | | received probes p, r | This one gets |-------------------------------------------->|throughthrough. | | State: Operational | | | | B now knows | | that A has no | (B2,A2) Probeid=t,nonce=t, | problemto receivereceiving | state=operational, | itspackets,packets and | received probe s | that A's probe |<--------------------------------------------| gets to B. It | | sends a State: Operational | confirmation toAA. | | | (A2,B2) payload packet | |-------------------------------------------->| Payload packets | | flowagainagain. | (B1,A1) payload packet | |<--------------------------------------------| Appendix B. Contributors Thisdraftdocument attempts to summarize the thoughts and unpublished contributions of many people, includingtheMULTI6 WG design team members Marcelo Bagnulo Braun, Erik Nordmark, Geoff Huston, Kurtis Lindqvist, Margaret Wasserman, and JukkaYlitalo, theYlitalo; MOBIKE WG contributors Pasi Eronen, Tero Kivinen, Francis Dupont, Spencer Dawkins, and JamesKempf,Kempf; and HIP WG contributors such as Pekka Nikander. Thisdraftdocument is also in debt to work done in the context of SCTP [RFC4960] andHIPthe Host Identity Protocol (HIP) multihoming and mobility extension[I-D.ietf-hip-mm].[RFC5206]. Appendix C. Acknowledgements The authors would also like to thank Christian Huitema, Pekka Savola, John Loughney, Sam Xia, Hannes Tschofenig,SebastianSebastien Barre, Thomas Henderson, Matthijs Mekking, Deguang Le, Eric Gray, Dan Romascanu, Stephen Kent, Alberto Garcia, Bernard Aboba, Lars Eggert, Dave Ward, and Tim Polk for interesting discussions in this problem space, and for review of this specification. Authors' Addresses Jari Arkko Ericsson Jorvas 02420 FinlandEmail:EMail: jari.arkko@ericsson.com Iljitsch van Beijnum IMDEA Networks Avda. del Mar Mediterraneo, 22 Leganes, Madrid 28918 SpainEmail:EMail: iljitsch@muada.comFull Copyright Statement Copyright (C) The IETF Trust (2008). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Property The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.