idnits 2.17.1 draft-ietf-shim6-proto-12.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? -- It seems you're using the 'non-IETF stream' Licence Notice instead Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 3375 has weird spacing: '...payload exten...' -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (February 6, 2009) is 5558 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Looks like a reference, but probably isn't: 'CGA' on line 2201 -- Looks like a reference, but probably isn't: 'FII' on line 2388 -- Obsolete informational reference (is this intentional?): RFC 3484 (ref. '7') (Obsoleted by RFC 6724) -- Obsolete informational reference (is this intentional?): RFC 3697 (ref. '11') (Obsoleted by RFC 6437) == Outdated reference: A later version (-08) exists of draft-ietf-shim6-applicability-03 == Outdated reference: A later version (-17) exists of draft-ietf-shim6-multihome-shim-api-07 Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SHIM6 WG E. Nordmark 3 Internet-Draft Sun Microsystems 4 Intended status: Standards Track M. Bagnulo 5 Expires: August 10, 2009 UC3M 6 February 6, 2009 8 Shim6: Level 3 Multihoming Shim Protocol for IPv6 9 draft-ietf-shim6-proto-12.txt 11 Status of this Memo 13 This Internet-Draft is submitted to IETF in full conformance with the 14 provisions of BCP 78 and BCP 79. 16 Internet-Drafts are working documents of the Internet Engineering 17 Task Force (IETF), its areas, and its working groups. Note that 18 other groups may also distribute working documents as Internet- 19 Drafts. 21 Internet-Drafts are draft documents valid for a maximum of six months 22 and may be updated, replaced, or obsoleted by other documents at any 23 time. It is inappropriate to use Internet-Drafts as reference 24 material or to cite them other than as "work in progress." 26 The list of current Internet-Drafts can be accessed at 27 http://www.ietf.org/ietf/1id-abstracts.txt. 29 The list of Internet-Draft Shadow Directories can be accessed at 30 http://www.ietf.org/shadow.html. 32 This Internet-Draft will expire on August 10, 2009. 34 Copyright Notice 36 Copyright (c) 2009 IETF Trust and the persons identified as the 37 document authors. All rights reserved. 39 This document is subject to BCP 78 and the IETF Trust's Legal 40 Provisions Relating to IETF Documents 41 (http://trustee.ietf.org/license-info) in effect on the date of 42 publication of this document. Please review these documents 43 carefully, as they describe your rights and restrictions with respect 44 to this document. 46 Abstract 48 This document defines the Shim6 protocol, a layer 3 shim for 49 providing locator agility below the transport protocols, so that 50 multihoming can be provided for IPv6 with failover and load sharing 51 properties, without assuming that a multihomed site will have a 52 provider independent IPv6 address prefix which is announced in the 53 global IPv6 routing table. The hosts in a site which has multiple 54 provider allocated IPv6 address prefixes, will use the Shim6 protocol 55 specified in this document to setup state with peer hosts, so that 56 the state can later be used to failover to a different locator pair, 57 should the original one stop working. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 62 1.1. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . 5 63 1.2. Non-Goals . . . . . . . . . . . . . . . . . . . . . . . . 6 64 1.3. Locators as Upper-layer IDentifiers (ULID) . . . . . . . 6 65 1.4. IP Multicast . . . . . . . . . . . . . . . . . . . . . . 7 66 1.5. Renumbering Implications . . . . . . . . . . . . . . . . 8 67 1.6. Placement of the shim . . . . . . . . . . . . . . . . . . 9 68 1.7. Traffic Engineering . . . . . . . . . . . . . . . . . . . 11 69 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 13 70 2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 13 71 2.2. Notational Conventions . . . . . . . . . . . . . . . . . 16 72 2.3. Conceptual . . . . . . . . . . . . . . . . . . . . . . . 16 73 3. Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . 17 74 4. Protocol Overview . . . . . . . . . . . . . . . . . . . . . . 19 75 4.1. Context Tags . . . . . . . . . . . . . . . . . . . . . . 21 76 4.2. Context Forking . . . . . . . . . . . . . . . . . . . . . 21 77 4.3. API Extensions . . . . . . . . . . . . . . . . . . . . . 22 78 4.4. Securing Shim6 . . . . . . . . . . . . . . . . . . . . . 22 79 4.5. Overview of Shim Control Messages . . . . . . . . . . . . 23 80 4.6. Extension Header Order . . . . . . . . . . . . . . . . . 24 81 5. Message Formats . . . . . . . . . . . . . . . . . . . . . . . 26 82 5.1. Common Shim6 Message Format . . . . . . . . . . . . . . . 26 83 5.2. Payload Extension Header Format . . . . . . . . . . . . . 27 84 5.3. Common Shim6 Control header . . . . . . . . . . . . . . . 27 85 5.4. I1 Message Format . . . . . . . . . . . . . . . . . . . . 29 86 5.5. R1 Message Format . . . . . . . . . . . . . . . . . . . . 30 87 5.6. I2 Message Format . . . . . . . . . . . . . . . . . . . . 32 88 5.7. R2 Message Format . . . . . . . . . . . . . . . . . . . . 34 89 5.8. R1bis Message Format . . . . . . . . . . . . . . . . . . 35 90 5.9. I2bis Message Format . . . . . . . . . . . . . . . . . . 37 91 5.10. Update Request Message Format . . . . . . . . . . . . . . 39 92 5.11. Update Acknowledgement Message Format . . . . . . . . . . 40 93 5.12. Keepalive Message Format . . . . . . . . . . . . . . . . 41 94 5.13. Probe Message Format . . . . . . . . . . . . . . . . . . 42 95 5.14. Error Message Format . . . . . . . . . . . . . . . . . . 42 96 5.15. Option Formats . . . . . . . . . . . . . . . . . . . . . 43 97 5.15.1. Responder Validator Option Format . . . . . . . . . 46 98 5.15.2. Locator List Option Format . . . . . . . . . . . . . 46 99 5.15.3. Locator Preferences Option Format . . . . . . . . . 48 100 5.15.4. CGA Parameter Data Structure Option Format . . . . . 50 101 5.15.5. CGA Signature Option Format . . . . . . . . . . . . 50 102 5.15.6. ULID Pair Option Format . . . . . . . . . . . . . . 51 103 5.15.7. Forked Instance Identifier Option Format . . . . . . 52 104 5.15.8. Keepalive Timeout Option Format . . . . . . . . . . 52 105 6. Conceptual Model of a Host . . . . . . . . . . . . . . . . . 53 106 6.1. Conceptual Data Structures . . . . . . . . . . . . . . . 53 107 6.2. Context STATES . . . . . . . . . . . . . . . . . . . . . 55 108 7. Establishing ULID-Pair Contexts . . . . . . . . . . . . . . . 57 109 7.1. Uniqueness of Context Tags . . . . . . . . . . . . . . . 57 110 7.2. Locator Verification . . . . . . . . . . . . . . . . . . 57 111 7.3. Normal context establishment . . . . . . . . . . . . . . 58 112 7.4. Concurrent context establishment . . . . . . . . . . . . 58 113 7.5. Context recovery . . . . . . . . . . . . . . . . . . . . 60 114 7.6. Context confusion . . . . . . . . . . . . . . . . . . . . 62 115 7.7. Sending I1 messages . . . . . . . . . . . . . . . . . . . 63 116 7.8. Retransmitting I1 messages . . . . . . . . . . . . . . . 64 117 7.9. Receiving I1 messages . . . . . . . . . . . . . . . . . . 64 118 7.10. Sending R1 messages . . . . . . . . . . . . . . . . . . . 65 119 7.10.1. Generating the R1 Validator . . . . . . . . . . . . 66 120 7.11. Receiving R1 messages and sending I2 messages . . . . . . 66 121 7.12. Retransmitting I2 messages . . . . . . . . . . . . . . . 67 122 7.13. Receiving I2 messages . . . . . . . . . . . . . . . . . . 68 123 7.14. Sending R2 messages . . . . . . . . . . . . . . . . . . . 69 124 7.15. Match for Context Confusion . . . . . . . . . . . . . . . 70 125 7.16. Receiving R2 messages . . . . . . . . . . . . . . . . . . 70 126 7.17. Sending R1bis messages . . . . . . . . . . . . . . . . . 71 127 7.17.1. Generating the R1bis Validator . . . . . . . . . . . 72 128 7.18. Receiving R1bis messages and sending I2bis messages . . . 72 129 7.19. Retransmitting I2bis messages . . . . . . . . . . . . . . 73 130 7.20. Receiving I2bis messages and sending R2 messages . . . . 74 131 8. Handling ICMP Error Messages . . . . . . . . . . . . . . . . 76 132 9. Teardown of the ULID-Pair Context . . . . . . . . . . . . . . 79 133 10. Updating the Peer . . . . . . . . . . . . . . . . . . . . . . 80 134 10.1. Sending Update Request messages . . . . . . . . . . . . . 80 135 10.2. Retransmitting Update Request messages . . . . . . . . . 80 136 10.3. Newer Information While Retransmitting . . . . . . . . . 81 137 10.4. Receiving Update Request messages . . . . . . . . . . . . 81 138 10.5. Receiving Update Acknowledgement messages . . . . . . . . 83 139 11. Sending ULP Payloads . . . . . . . . . . . . . . . . . . . . 85 140 11.1. Sending ULP Payload after a Switch . . . . . . . . . . . 85 142 12. Receiving Packets . . . . . . . . . . . . . . . . . . . . . . 87 143 12.1. Receiving payload without extension headers . . . . . . . 87 144 12.2. Receiving Payload Extension Headers . . . . . . . . . . . 87 145 12.3. Receiving Shim Control messages . . . . . . . . . . . . . 88 146 12.4. Context Lookup . . . . . . . . . . . . . . . . . . . . . 88 147 13. Initial Contact . . . . . . . . . . . . . . . . . . . . . . . 91 148 14. Protocol constants . . . . . . . . . . . . . . . . . . . . . 92 149 15. Implications Elsewhere . . . . . . . . . . . . . . . . . . . 93 150 15.1. Congestion Control Considerations . . . . . . . . . . . . 93 151 15.2. Middle-boxes considerations . . . . . . . . . . . . . . . 93 152 15.3. Operation and Management Considerations . . . . . . . . . 94 153 15.4. Other considerations . . . . . . . . . . . . . . . . . . 95 154 16. Security Considerations . . . . . . . . . . . . . . . . . . . 97 155 16.1. Interaction with IPSec . . . . . . . . . . . . . . . . . 98 156 16.2. Residual Threats . . . . . . . . . . . . . . . . . . . . 99 157 17. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 101 158 18. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 103 159 19. Appendix: Possible Protocol Extensions . . . . . . . . . . . 104 160 20. Appendix: Simplified STATE Machine . . . . . . . . . . . . . 106 161 20.1. Simplified STATE Machine diagram . . . . . . . . . . . . 111 162 21. Appendix: Context Tag Reuse . . . . . . . . . . . . . . . . . 113 163 21.1. Context Recovery . . . . . . . . . . . . . . . . . . . . 113 164 21.2. Context Confusion . . . . . . . . . . . . . . . . . . . . 113 165 21.3. Three Party Context Confusion . . . . . . . . . . . . . . 114 166 21.4. Summary . . . . . . . . . . . . . . . . . . . . . . . . . 114 167 22. Appendix: Design Alternatives . . . . . . . . . . . . . . . . 115 168 22.1. Context granularity . . . . . . . . . . . . . . . . . . . 115 169 22.2. Demultiplexing of data packets in Shim6 communications . 115 170 22.2.1. Flow-label . . . . . . . . . . . . . . . . . . . . . 116 171 22.2.2. Extension Header . . . . . . . . . . . . . . . . . . 118 172 22.3. Context Loss Detection . . . . . . . . . . . . . . . . . 119 173 22.4. Securing locator sets . . . . . . . . . . . . . . . . . . 121 174 22.5. ULID-pair context establishment exchange . . . . . . . . 124 175 22.6. Updating locator sets . . . . . . . . . . . . . . . . . . 125 176 22.7. State Cleanup . . . . . . . . . . . . . . . . . . . . . . 125 177 23. Appendix: Change Log . . . . . . . . . . . . . . . . . . . . 128 178 24. References . . . . . . . . . . . . . . . . . . . . . . . . . 135 179 24.1. Normative References . . . . . . . . . . . . . . . . . . 135 180 24.2. Informative References . . . . . . . . . . . . . . . . . 135 181 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 137 183 1. Introduction 185 This document describes a layer 3 shim approach and protocol for 186 providing locator agility below the transport protocols, so that 187 multihoming can be provided for IPv6 with failover and load sharing 188 properties [10], without assuming that a multihomed site will have a 189 provider independent IPv6 address which is announced in the global 190 IPv6 routing table. The hosts in a site which has multiple provider 191 allocated IPv6 address prefixes, will use the Shim6 protocol 192 specified in this document to setup state with peer hosts, so that 193 the state can later be used to failover to a different locator pair, 194 should the original one stop working (the term locator is defined in 195 Section 2). 197 The Shim6 protocol is a site multihoming solution in the sense that 198 it allows existing communication to continue when a site that has 199 multiple connections to the internet experiences an outage on a 200 subset of these connections or further upstream. However, Shim6 201 processing is performed in individual hosts rather than through site- 202 wide mechanisms. 204 We assume that redirection attacks are prevented using Hash Based 205 Addresses (HBA) as defined in [3]. 207 The reachability and failure detection mechanisms, including how a 208 new working locator pair is discovered after a failure, are specified 209 in a separate document [4]. This document allocates message types 210 and option types for that sub-protocol, and leaves the specification 211 of the message and option formats as well as the protocol behavior to 212 that document. 214 1.1. Goals 216 The goals for this approach are to: 218 o Preserve established communications in the presence of certain 219 classes of failures, for example, TCP connections and UDP streams. 221 o Have minimal impact on upper layer protocols in general and on 222 transport protocols and applications in particular. 224 o Address the security threats in [14] through the combination of 225 the HBA/CGA approach specified in a separate document [3] and 226 techniques described in this document. 228 o Not require extra roundtrip up front to setup shim specific state. 229 Instead allow the upper layer traffic (e.g., TCP) to flow as 230 normal and defer the setup of the shim state until some number of 231 packets have been exchanged. 233 o Take advantage of multiple locators/addresses for load spreading 234 so that different sets of communication to a host (e.g., different 235 connections) might use different locators of the host. Note that 236 this might cause load to be spread unevenly, thus we use the term 237 "load spreading" instead of "load balancing". This capability 238 might enable some forms of traffic engineering, but the details 239 for traffic engineering, including what requirements can be 240 satisfied, are not specified in this document, and form part of a 241 potential extensions to this protocol. 243 1.2. Non-Goals 245 The assumption is that the problem we are trying to solve is site 246 multihoming, with the ability to have the set of site prefixes change 247 over time due to site renumbering. Further, we assume that such 248 changes to the set of locator prefixes can be relatively slow and 249 managed; slow enough to allow updates to the DNS to propagate (since 250 the protocol defined in this document depends on the DNS to find the 251 appropriate locator sets). Note, however that it is an explicit non- 252 goal to make communication survive a renumbering event (which causes 253 all the locators of a host to change to a new set of locators). This 254 proposal does not attempt to solve the related problem of host 255 mobility. However, it might turn out that the Shim6 protocol can be 256 a useful component for future host mobility solutions, e.g., for 257 route optimization. 259 Finally, this proposal also does not try to provide a new network 260 level or transport level identifier name space distinct from the 261 current IP address name space. Even though such a concept would be 262 useful to Upper Layer Protocols (ULPs) and applications, especially 263 if the management burden for such a name space was negligible and 264 there was an efficient yet secure mechanism to map from identifiers 265 to locators, such a name space isn't necessary (and furthermore 266 doesn't seem to help) to solve the multihoming problem. 268 The Shim6 proposal doesn't fully separate the identifier and locator 269 functions that have traditionally been overloaded in the IP address. 270 However, throughout this document the term "identifier", or more 271 specifically, Upper Layer Identifier (ULID) refers to the identifying 272 function of an IPv6 address, and "locator" to the network layer 273 routing and forwarding properties of an IPv6 address. 275 1.3. Locators as Upper-layer IDentifiers (ULID) 277 The approach described in this document does not introduce a new 278 identifier name space but instead uses the locator that is selected 279 in the initial contact with the remote peer as the preserved Upper- 280 Layer Identifier (ULID). While there may be subsequent changes in 281 the selected network level locators over time in response to failures 282 in using the original locator, the upper level protocol stack 283 elements will continue to use this upper level identifier without 284 change. 286 This implies that the ULID selection is performed as today's default 287 address selection as specified in RFC 3484 [7]. Some extensions are 288 needed to RFC 3484 to try different source addresses, whether or not 289 the Shim6 protocol is used, as outlined in [8]. Underneath, and 290 transparently, the multihoming shim selects working locator pairs 291 with the initial locator pair being the ULID pair. If communication 292 subsequently fails the shim can test and select alternate locators. 293 A subsequent section discusses the issues when the selected ULID is 294 not initially working hence there is a need to switch locators up 295 front. 297 Using one of the locators as the ULID has certain benefits for 298 applications which have long-lived session state or performs 299 callbacks or referrals, because both the FQDN and the 128-bit ULID 300 work as handles for the applications. However, using a single 128- 301 bit ULID doesn't provide seamless communication when that locator is 302 unreachable. See [17] for further discussion of the application 303 implications. 305 There has been some discussion of using non-routable addresses, such 306 as Unique-Local Addresses (ULAs) [13], as ULIDs in a multihoming 307 solution. While this document doesn't specify all aspects of this, 308 it is believed that the approach can be extended to handle the non- 309 routable address case. For example, the protocol already needs to 310 handle ULIDs that are not initially reachable. Thus the same 311 mechanism can handle ULIDs that are permanently unreachable from 312 outside their site. The issue becomes how to make the protocol 313 perform well when the ULID is known a priori to be not reachable 314 (e.g. the ULID is a ULA), for instance, avoiding any timeout and 315 retries in this case. In addition one would need to understand how 316 the ULAs would be entered in the DNS to avoid a performance impact on 317 existing, non-Shim6 aware, IPv6 hosts potentially trying to 318 communicate to the (unreachable) ULA. 320 1.4. IP Multicast 322 IP Multicast requires that the IP source address field contain a 323 topologically correct locator for interface that is used to send the 324 packet, since IP multicast routing uses both the source address and 325 the destination group to determine where to forward the packet. In 326 particular, it need to be able to do the RPF check. (This isn't much 327 different than the situation with widely implemented ingress 328 filtering [6] for unicast.) 330 While in theory it would be possible to apply the shim re-mapping of 331 the IP address fields between ULIDs and locators, the fact that all 332 the multicast receivers would need to know the mapping to perform, 333 makes such an approach difficult in practice. Thus it makes sense to 334 have multicast ULPs operate directly on locators and not use the 335 shim. This is quite a natural fit for protocols which use RTP [9], 336 since RTP already has an explicit identifier in the form of the SSRC 337 field in the RTP headers. Thus the actual IP address fields are not 338 important to the application. 340 In summary, IP multicast will not need the shim to remap the IP 341 addresses. 343 This doesn't prevent the receiver of multicast to change its 344 locators, since the receiver is not explicitly identified; the 345 destination address is a multicast address and not the unicast 346 locator of the receiver. 348 1.5. Renumbering Implications 350 As stated above, this approach does not try to make communication 351 survive renumbering in the general case. 353 When a host is renumbered, the effect is that one or more locators 354 become invalid, and zero or more locators are added to the host's 355 network interface. This means that the set of locators that is used 356 in the shim will change, which the shim can handle as long as not all 357 the original locators become invalid at the same time and depending 358 on the time that is required to update the DNS and for those updates 359 to propagate. 361 But IP addresses are also used as ULIDs, and making the communication 362 survive locators becoming invalid can potentially cause some 363 confusion at the upper layers. The fact that a ULID might be used 364 with a different locator over time open up the possibility that 365 communication between two ULIDs might continue to work after one or 366 both of those ULIDs are no longer reachable as locators, for example 367 due to a renumbering event. This opens up the possibility that the 368 ULID (or at least the prefix on which it is based) is reassigned to 369 another site while it is still being used (with another locator) for 370 existing communication. 372 In the worst case we could end up with two separate hosts using the 373 same ULID while both of them are communicating with the same host. 375 This potential source for confusion is avoided requiring that any 376 communication using a ULID MUST be terminated when the ULID becomes 377 invalid (due to the underlying prefix becoming invalid). This 378 behavior can be accomplished by explicitly discarding the shim state 379 when the ULID becomes invalid. The context recovery mechanism will 380 then make the peer aware that the context is gone, and that the ULID 381 is no longer present at the same locator(s). 383 1.6. Placement of the shim 385 ----------------------- 386 | Transport Protocols | 387 ----------------------- 389 -------------- ------------- IP endpoint 390 | Frag/reass | | Dest opts | sub-layer 391 -------------- ------------- 393 --------------------- 394 | Shim6 shim layer | 395 --------------------- 397 ------ IP routing 398 | IP | sub-layer 399 ------ 401 Figure 1: Protocol stack 403 The proposal uses a multihoming shim layer within the IP layer, i.e., 404 below the ULPs, as shown in Figure 1, in order to provide ULP 405 independence. The multihoming shim layer behaves as if it is 406 associated with an extension header, which would be placed after any 407 routing-related headers in the packet (such as any hop-by-hop 408 options, or routing header). However, when the locator pair is the 409 ULID pair there is no data that needs to be carried in an extension 410 header, thus none is needed in that case. 412 Layering the fragmentation header above the multihoming shim makes 413 reassembly robust in the case that there is broken multi-path routing 414 which results in using different paths, hence potentially different 415 source locators, for different fragments. Thus, the multihoming shim 416 layer is placed between the IP endpoint sublayer, which handles 417 fragmentation, reassembly, and the IP routing sublayer, which selects 418 which next hop and interface to use for sending out packets. 420 Applications and upper layer protocols use ULIDs which the Shim6 421 layer map to/from different locators. The Shim6 layer maintains 422 state, called ULID-pair context, per ULID pair (that is, applies to 423 all ULP connections between the ULID pair) in order to perform this 424 mapping. The mapping is performed consistently at the sender and the 425 receiver so that ULPs see packets that appear to be sent using ULIDs 426 from end to end. This property is maintained even though the packets 427 travel through the network containing locators in the IP address 428 fields, and even though those locators may be changed by the 429 transmitting Shim6 layer. 431 The context state is maintained per remote ULID i.e. approximately 432 per peer host, and not at any finer granularity. In particular, it 433 is independent of the ULPs and any ULP connections. However, the 434 forking capability enables shim-aware ULPs to use more than one 435 locator pair at a time for an single ULID pair. 437 ---------------------------- ---------------------------- 438 | Sender A | | Receiver B | 439 | | | | 440 | ULP | | ULP | 441 | | src ULID(A)=L1(A) | | ^ | 442 | | dst ULID(B)=L1(B) | | | src ULID(A)=L1(A) | 443 | v | | | dst ULID(B)=L1(B) | 444 | multihoming shim | | multihoming shim | 445 | | src L2(A) | | ^ | 446 | | dst L3(B) | | | src L2(A) | 447 | v | | | dst L3(B) | 448 | IP | | IP | 449 ---------------------------- ---------------------------- 450 | ^ 451 ------- cloud with some routers ------- 453 Figure 2: Mapping with changed locators 455 The result of this consistent mapping is that there is no impact on 456 the ULPs. In particular, there is no impact on pseudo-header 457 checksums and connection identification. 459 Conceptually, one could view this approach as if both ULIDs and 460 locators are being present in every packet, and with a header 461 compression mechanism applied that removes the need for the ULIDs to 462 be carried in the packets once the compression state has been 463 established. In order for the receiver to recreate a packet with the 464 correct ULIDs there is a need to include some "compression tag" in 465 the data packets. This serves to indicate the correct context to use 466 for decompression when the locator pair in the packet is insufficient 467 to uniquely identify the context. 469 There are different types of interactions between the Shim6 layer and 470 other protocols. Those intereactions are influenced by the usage of 471 the addresses that these other protocols do and the impact of the 472 Shim6 mapping on these usages. A detailed analysis of the 473 interactions of different portocols, including SCTP, MIP and HIP can 474 be found in [18]. Moreover, some applications may need to have a 475 richer interaction with the Shim6 sub-layer. In order to enable 476 that, a API [22] has been defined to enable greater control and 477 information exchange for those applications that need it. 479 1.7. Traffic Engineering 481 At the time of this writing it is not clear what requirements for 482 traffic engineering make sense for the Shim6 protocol, since the 483 requirements must both result in some useful behavior as well as be 484 implementable using a host-to-host locator agility mechanism like 485 Shim6. 487 Inherent in a scalable multihoming mechanism that separates the 488 locator function of the IP address from identifying function of the 489 IP address is that each host ends up with multiple locators. This 490 means that at least for initial contact, it is the remote peer 491 application (or layer working on its behalf) needs to select an 492 initial ULID, which automatically becomes the initial locator. In 493 the case of Shim6 this is performed by applying RFC 3484 address 494 selection. 496 This is quite different than the common case of IPv4 multihoming 497 where the site has a single IP address prefix, since in that case the 498 peer performs no destination address selection. 500 Thus in "single prefix multihoming" the site, and in many cases its 501 upstream ISPs, can use BGP to exert some control of the ingress path 502 used to reach the site. This capability does not by itself exist 503 "multiple prefix multihoming" such as Shim6. It is conceivable that 504 extensions allowing site or provider guidance of host-based 505 mechanisms could be developed. But t should be noted that traffic 506 engineering via BGP, MPLS or other similar techniques can still be 507 applied for traffic on each individual prefix; Shim6 does not remove 508 the capability for this. It does provide some additional 509 capabilities for hosts to choose between prefixes. 511 These capabilities also carry some risk for non-optimal behaviour 512 when more than one mechanism attempts to correct problems at the same 513 time. However, it should be noted that this is not necessarily a 514 situation brought about by Shim6. A more constrained form of this 515 capability already exists in IPv6 itself via its support of multiple 516 prefixes and address selection rules for starting new communications. 517 Even IPv4 hosts with multiple interfaces may have limited 518 capabilities to choose interfaces on which they communicate. 520 Similarly, upper layers may choose different addresses. 522 In general, it is expected that Shim6 is applicable in relatively 523 small sites and individual hosts where BGP-style traffic engineering 524 operations are unavailable, unlikely or, if run with provider 525 independent addressing, might even be harmful considering the growth 526 rates in the global routing table. 528 The protocol provides a placeholder, in the form of the Locator 529 Preferences option, which can be used by hosts to express priority 530 and weight values for each locator. This option is merely a place 531 holder when it comes to providing traffic engineering; in order to 532 use this in a large site there would have to be a mechanism by which 533 the host can find out what preference values to use, either 534 statically (e.g., some new DHCPv6 option) or dynamically. 536 Thus traffic engineering is listed as a possible extension in 537 Section 19. 539 2. Terminology 541 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 542 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 543 document are to be interpreted as described in RFC 2119 [1]. 545 2.1. Definitions 547 This document introduces the following terms: 549 upper layer protocol (ULP) 550 A protocol layer immediately above IP. Examples 551 are transport protocols such as TCP and UDP, 552 control protocols such as ICMP, routing protocols 553 such as OSPF, and internet or lower-layer 554 protocols being "tunneled" over (i.e., 555 encapsulated in) IP such as IPX, AppleTalk, or IP 556 itself. 558 interface A node's attachment to a link. 560 address An IP layer name that contains both topological 561 significance and acts as a unique identifier for 562 an interface. 128 bits. This document only uses 563 the "address" term in the case where it isn't 564 specific whether it is a locator or an 565 identifier. 567 locator An IP layer topological name for an interface or 568 a set of interfaces. 128 bits. The locators are 569 carried in the IP address fields as the packets 570 traverse the network. 572 identifier An IP layer name for an IP layer endpoint. The 573 transport endpoint name is a function of the 574 transport protocol and would typically include 575 the IP identifier plus a port number. 576 NOTE: This proposal does not specify any new form 577 of IP layer identifier, but still separates the 578 identifying and locating properties of the IP 579 addresses. 581 upper-layer identifier (ULID) 582 An IP address which has been selected for 583 communication with a peer to be used by the upper 584 layer protocol. 128 bits. This is used for 585 pseudo-header checksum computation and connection 586 identification in the ULP. Different sets of 587 communication to a host (e.g., different 588 connections) might use different ULIDs in order 589 to enable load spreading. 591 Since the ULID is just one of the IP locators/ 592 addresses of the node, there is no need for a 593 separate name space and allocation mechanisms. 595 address field The source and destination address fields in the 596 IPv6 header. As IPv6 is currently specified this 597 fields carry "addresses". If identifiers and 598 locators are separated these fields will contain 599 locators for packets on the wire. 601 FQDN Fully Qualified Domain Name 603 ULID-pair context The state that the multihoming shim maintains 604 between a pair of Upper-layer identifiers. The 605 context is identified by a context tag for each 606 direction of the communication, and also 607 identified by the pair of ULID and a Forked 608 Instance Identifier (see below). 610 Context tag Each end of the context allocates a context tag 611 for the context. This is used to uniquely 612 associate both received control packets and 613 payload extension headers as belonging to the 614 context. 616 Current locator pair 617 Each end of the context has a current locator 618 pair which is used to send packets to the peer. 619 The two ends might use different current locator 620 pairs though. 622 Default context At the sending end, the shim uses the ULID pair 623 (passed down from the ULP) to find the context 624 for that pair. Thus, normally, a host can have 625 at most one context for a ULID pair. We call 626 this the "default context". 628 Context forking A mechanism which allows ULPs that are aware of 629 multiple locators to use separate contexts for 630 the same ULID pair, in order to be able use 631 different locator pairs for different 632 communication to the same ULID. Context forking 633 causes more than just the default context to be 634 created for a ULID pair. 636 Forked Instance Identifier (FII) 637 In order to handle context forking, a context is 638 identified by a ULID-pair and a forked context 639 identifier. The default context has a FII of 640 zero. 642 Initial contact We use this term to refer to the pre-shim 643 communication when some ULP decides to start 644 communicating with a peer by sending and 645 receiving ULP packets. Typically this would not 646 invoke any operations in the shim, since the shim 647 can defer the context establishment until some 648 arbitrary later point in time. 650 Hash Based Addresses (HBA) 651 A form of IPv6 address where the interface ID is 652 derived from a cryptographic hash of all the 653 prefixes assigned to the host. See [3]. 655 Cryptographically Generated Addresses (CGA) 656 A form of IPv6 address where the interface ID is 657 derived from a cryptographic hash of the public 658 key. See [2]. 660 CGA Parameter Data Structure (PDS) 661 The information that CGA and HBA exchanges in 662 order to inform the peer of how the interface ID 663 was computed. See [2], [3]. 665 2.2. Notational Conventions 667 A, B, and C are hosts. X is a potentially malicious host. 669 FQDN(A) is the Fully qualified Domain Name for A. 671 Ls(A) is the locator set for A, which consists of the locators L1(A), 672 L2(A), ... Ln(A). The locator set in not ordered in any particular 673 way other than maybe what is returned by the DNS. A host might form 674 different locators sets containing different subnets of the hosts IP 675 addresses. This is necessary in some cases for security reasons. 676 See Section 16.1. 678 ULID(A) is an upper-layer ID for A. In this proposal, ULID(A) is 679 always one member of A's locator set. 681 CT(A) is a context tag assigned by A. 683 STATE (in uppercase) refers to the the specific state of the state 684 machine described in Section 6.2 686 2.3. Conceptual 688 This document also makes use of internal conceptual variables to 689 describe protocol behavior and external variables that an 690 implementation must allow system administrators to change. The 691 specific variable names, how their values change, and how their 692 settings influence protocol behavior are provided to demonstrate 693 protocol behavior. An implementation is not required to have them in 694 the exact form described here, so long as its external behavior is 695 consistent with that described in this document. See Section 6 for a 696 description of the conceptual data structures. 698 3. Assumptions 700 The design intent is to ensure that the Shim6 protocol is capable of 701 handling path failures independently of the number of IP addresses 702 (locators) available to the two communicating hosts, and 703 independently of which host detects the failure condition. 705 Consider, for example, the case in which both A and B have active 706 Shim6 state and where A has only one locator while B has multiple 707 locators. In this case, it might be that B is trying to send a 708 packet to A, and has detected a failure condition with the current 709 locator pair. Since B has multiple locators it presumably has 710 multiple ISPs, and consequently likely has alternate egress paths 711 toward A. B cannot vary the destination address (i.e., A's locator), 712 since A has only one locator. However, B may need to vary the source 713 address in order to ensure packet delivery. 715 In many cases normal operation of IP routing may cause the packets to 716 follow a path towards the correct (currently operational) egress. In 717 some cases it is possible that a path may be selected based on the 718 source address, implying that B will need to select a source address 719 corresponding to the currently operating egress. The details of how 720 routing can be accomplished is beyond the scope of this document 722 Also, when the site's ISPs perform ingress filtering based on packet 723 source addresses, Shim6 assumes that packets sent with different 724 source and destination combinations have a reasonable chance of 725 making it through the relevant ISP's ingress filters. This can be 726 accomplished in several ways (all outside the scope of this 727 document), such as having the ISPs relax their ingress filters, or 728 selecting the egress such that it matches the IP source address 729 prefix. In the case that one egress path has failed but another is 730 operating correctly, it may be necessary for the packet's source 731 (node B in the previous paragraph) to select a source address that 732 corresponds to the operational egress, in order to pass the ISP's 733 ingress filters. 735 The Shim6 approach assumes that there are no IPv6-to-IPv6 NATs on the 736 paths, i.e., that the two ends can exchange their own notion of their 737 IPv6 addresses and that those addresses will also make sense to their 738 peer. 740 The security of the Shim6 protocol relies on the usage of Hash Based 741 Addresses (HBA) [3] and/or Cryptographically Generated Addresses 742 (CGA) [2]. In the case that HBAs are used, all the addresses 743 assigned to the host that are included in the Shim6 protocol (either 744 as a locator or as a ULID) must be part of the same HBA set. In the 745 case that CGAs are used, the address used as ULID must be a CGA but 746 the other addresses that are used as locators do not need to be 747 neither CGAs nor HBAs. It should be noted that it is perfectly 748 acceptable to run the Shim6 protocol between a host that has multiple 749 locators and another host that has a single IP address. In this 750 case, the address of the host with a single address does not need to 751 be an HBA nor a CGA. 753 4. Protocol Overview 755 The Shim6 protocol operates in several phases over time. The 756 following sequence illustrates the concepts: 758 o An application on host A decides to contact an application on host 759 B using some upper-layer protocol. This results in the ULP on 760 host A sending packets to host B. We call this the initial 761 contact. Assuming the IP addresses selected by Default Address 762 Selection [7] and its extensions [8] work, then there is no action 763 by the shim at this point in time. Any shim context establishment 764 can be deferred until later. 766 o Some heuristic on A or B (or both) determine that it is 767 appropriate to pay the Shim6 overhead to make this host-to-host 768 communication robust against locator failures. For instance, this 769 heuristic might be that more than 50 packets have been sent or 770 received, or a timer expiration while active packet exchange is in 771 place. This makes the shim initiate the 4-way context 772 establishment exchange. The purpose of this heuristic is to avoid 773 setting up a shim context when only a small number of packets is 774 exchanged between two hosts. 776 As a result of this exchange, both A and B will know a list of 777 locators for each other. 779 If the context establishment exchange fails, the initiator will 780 then know that the other end does not support Shim6, and will 781 continue with standard (non-Shim6) behavior for the session. 783 o Communication continues without any change for the ULP packets. 784 In particular, there are no shim extension headers added to the 785 ULP packets, since the ULID pair is the same as the locator pair. 786 In addition, there might be some messages exchanged between the 787 shim sub-layers for (un)reachability detection. 789 o At some point in time something fails. Depending on the approach 790 to reachability detection, there might be some advice from the 791 ULP, or the shim (un)reachability detection might discover that 792 there is a problem. 794 At this point in time one or both ends of the communication need 795 to probe the different alternate locator pairs until a working 796 pair is found, and switch to using that locator pair. 798 o Once a working alternative locator pair has been found, the shim 799 will rewrite the packets on transmit, and tag the packets with 800 Shim6 Payload extension header, which contains the receiver's 801 context tag. The receiver will use the context tag to find the 802 context state which will indicate which addresses to place in the 803 IPv6 header before passing the packet up to the ULP. The result 804 is that from the perspective of the ULP the packet passes 805 unmodified end-to-end, even though the IP routing infrastructure 806 sends the packet to a different locator. 808 o The shim (un)reachability detection will monitor the new locator 809 pair as it monitored the original locator pair, so that subsequent 810 failures can be detected. 812 o In addition to failures detected based on end-to-end observations, 813 one endpoint might know for certain that one or more of its 814 locators is not working. For instance, the network interface 815 might have failed or gone down (at layer 2), or an IPv6 address 816 might have become deprecated or invalid. In such cases the host 817 can signal its peer that this address is no longer recommended to 818 try. This triggers something similar to a failure handling and a 819 new working locator pair must be found. 821 The protocol also has the ability to express other forms of 822 locator preferences. A change in any preferences can be signaled 823 to the peer, which will have made the peer record the new 824 preferences. A change in the preferences might optionally make 825 the peer want to use a different locator pair. In this case, the 826 peer follows the same locator switching procedure as after a 827 failure (by verifying that its peer is indeed present at the 828 alternate locator, etc). 830 o When the shim thinks that the context state is no longer used, it 831 can garbage collect the state; there is no coordination necessary 832 with the peer host before the state is removed. There is a 833 recovery message defined to be able to signal when there is no 834 context state, which can be used to detect and recover from both 835 premature garbage collection, as well as complete state loss 836 (crash and reboot) of a peer. 838 The exact mechanism to determine when the context state is no 839 longer used is implementation dependent. For example, an 840 implementation might use the existence of ULP state (where known 841 to the implementation) as an indication that the state is still 842 used, combined with a timer (to handle ULP state that might not be 843 known to the shim sub-layer) to determine when the state is likely 844 to no longer be used. 846 NOTE 1: The ULP packets in Shim6 can be carried completely unmodified 847 as long as the ULID pair is used as the locator pair. After a switch 848 to a different locator pair the packets are "tagged" with a Shim6 849 extension header, so that the receiver can always determine the 850 context to which they belong. This is accomplished by including an 851 8-octet Shim6 Payload Extension header before the (extension) headers 852 that are processed by the IP endpoint sublayer and ULPs. If 853 subsequently the original ULIDs are selected as the active locator 854 pair then the tagging of packets with the Shim6 extension header is 855 no longer necessary. 857 4.1. Context Tags 859 A context between two hosts is actually a context between two ULIDs. 860 The context is identified by a pair of context tags. Each end gets 861 to allocate a context tag, and once the context is established, most 862 Shim6 control messages contain the context tag that the receiver of 863 the message allocated. Thus at a minimum the combination of have to uniquely identify one 865 context. But since the Payload extension headers are demultiplexed 866 without looking at the locators in the packet, the receiver will need 867 to allocate context tags that are unique for all its contexts. The 868 context tag is a 47-bit number (the largest which can fit in an 869 8-octet extension header), while preserving one bit to differentiate 870 the Shim6 signalling messages from the Shim6 header included in data 871 packets, allowing both to use the same protocol number. 873 The mechanism for detecting a loss of context state at the peer 874 assumes that the receiver can tell the packets that need locator 875 rewriting, even after it has lost all state (e.g., due to a crash 876 followed by a reboot). This is achieved because after a rehoming 877 event the packets that need receive-side rewriting, carry the Payload 878 extension header. 880 4.2. Context Forking 882 It has been asserted that it will be important for future ULPs, in 883 particular, future transport protocols, to be able to control which 884 locator pairs are used for different communication. For instance, 885 host A and host B might communicate using both VoIP traffic and ftp 886 traffic, and those communications might benefit from using different 887 locator pairs. However, the basic Shim6 mechanism uses a single 888 current locator pair for each context, thus a single context cannot 889 accomplish this. 891 For this reason, the Shim6 protocol supports the notion of context 892 forking. This is a mechanism by which a ULP can specify (using some 893 API not yet defined) that a context for e.g., the ULID pair 894 should be forked into two contexts. In this case the forked-off 895 context will be assigned a non-zero Forked Instance Identifier, while 896 the default context has FII zero. 898 The Forked Instance Identifier (FII) is a 32-bit identifier which has 899 no semantics in the protocol other then being part of the tuple which 900 identifies the context. For example, a host might allocate FIIs as 901 sequential numbers for any given ULID pair. 903 No other special considerations are needed in the Shim6 protocol to 904 handle forked contexts. 906 Note that forking as specified does NOT allow A to be able to tell B 907 that certain traffic (a 5-tuple?) should be forked for the reverse 908 direction. The Shim6 forking mechanism as specified applies only to 909 the sending of ULP packets. If some ULP wants to fork for both 910 directions, it is up to the ULP to set this up, and then instruct the 911 shim at each end to transmit using the forked context. 913 4.3. API Extensions 915 Several API extensions have been discussed for Shim6, but their 916 actual specification is out of scope for this document. The simplest 917 one would be to add a socket option to be able to have traffic bypass 918 the shim (not create any state, and not use any state created by 919 other traffic). This could be an IPV6_DONTSHIM socket option. Such 920 an option would be useful for protocols, such as DNS, where the 921 application has its own failover mechanism (multiple NS records in 922 the case of DNS) and using the shim could potentially add extra 923 latency with no added benefits. 925 Some other API extensions are discussed in Section 19. The actual 926 API extensions are defined in [22]. 928 4.4. Securing Shim6 930 The mechanisms are secured using a combination of techniques: 932 o The HBA technique [3] for verifying the locators to prevent an 933 attacker from redirecting the packet stream to somewhere else. 935 o Requiring a Reachability Probe+Reply /defined in [4]) before a new 936 locator is used as the destination, in order to prevent 3rd party 937 flooding attacks. 939 o The first message does not create any state on the responder. 940 Essentially a 3-way exchange is required before the responder 941 creates any state. This means that a state-based DoS attack 942 (trying to use up all of memory on the responder) at least 943 provides an IPv6 address that the attacker was using. 945 o The context establishment messages use nonces to prevent replay 946 attacks, and to prevent off-path attackers from interfering with 947 the establishment. 949 o Every control message of the Shim6 protocol, past the context 950 establishment, carry the context tag assigned to the particular 951 context. This implies that an attacker needs to discover that 952 context tag before being able to spoof any Shim6 control message. 953 Such discovery probably requires any potential attacker to be 954 along the path in order to be sniff the context tag value. The 955 result is that through this technique, the Shim6 protocol is 956 protected against off-path attackers. 958 4.5. Overview of Shim Control Messages 960 The Shim6 context establishment is accomplished using four messages; 961 I1, R1, I2, R2. Normally they are sent in that order from initiator 962 and responder, respectively. Should both ends attempt to set up 963 context state at the same time (for the same ULID pair), then their 964 I1 messages might cross in flight, and result in an immediate R2 965 message. [The names of these messages are borrowed from HIP [19].] 967 R1bis and I2bis messages are defined, which are used to recover a 968 context after it has been lost. A R1bis message is sent when a Shim6 969 control or Payload extension header arrives and there is no matching 970 context state at the receiver. When such a message is received, it 971 will result in the re-creation of the Shim6 context using the I2bis 972 and R2 messages. 974 The peers' lists of locators are normally exchanged as part of the 975 context establishment exchange. But the set of locators might be 976 dynamic. For this reason there are Update Request and Update 977 Acknowledgement messages, and a Locator List option. 979 Even when the list of locators is fixed, a host might determine that 980 some preferences might have changed. For instance, it might 981 determine that there is a locally visible failure that implies that 982 some locator(s) are no longer usable. This uses a Locator 983 Preferences option in the Update Request message. 985 The mechanism for (un)reachability detection is called Forced 986 Bidirectional Communication (FBD). FBD uses a Keepalive message 987 which is sent when a host has received packets from its peer but has 988 not yet sent any packets from its ULP to the peer. The message type 989 is reserved in this document, but the message format and processing 990 rules are specified in [4]. 992 In addition, when the context is established and there is a 993 subsequent failure there needs to be a way to probe the set of 994 locator pairs to efficiently find a working pair. This document 995 reserves a Probe message type, with the packet format and processing 996 rules specified in [4]. 998 The above probe and keepalive messages assume we have an established 999 ULID-pair context. However, communication might fail during the 1000 initial contact (that is, when the application or transport protocol 1001 is trying to setup some communication). This is handled using the 1002 mechanisms in the ULP to try different address pairs as specified in 1003 [7] [8]. In the future versions of the protocol, and with a richer 1004 API between the ULP and the shim, the shim might be help optimize 1005 discovering a working locator pair during initial contact. This is 1006 for further study. 1008 4.6. Extension Header Order 1010 Since the shim is placed between the IP endpoint sub-layer and the IP 1011 routing sub-layer, the shim header will be placed before any endpoint 1012 extension headers (fragmentation headers, destination options header, 1013 AH, ESP), but after any routing related headers (hop-by-hop 1014 extensions header, routing header, a destinations options header 1015 which precedes a routing header). When tunneling is used, whether 1016 IP-in-IP tunneling or the special form of tunneling that Mobile IPv6 1017 uses (with Home Address Options and Routing header type 2), there is 1018 a choice whether the shim applies inside the tunnel or outside the 1019 tunnel, which affects the location of the Shim6 header. 1021 In most cases IP-in-IP tunnels are used as a routing technique, thus 1022 it makes sense to apply them on the locators which means that the 1023 sender would insert the Shim6 header after any IP-in-IP 1024 encapsulation; this is what occurs naturally when routers apply IP- 1025 in-IP encapsulation. Thus the packets would have: 1027 o Outer IP header 1029 o Inner IP header 1031 o Shim6 extension header (if needed) 1033 o ULP 1034 But the shim can also be used to create "shimmed tunnels" i.e., where 1035 an IP-in-IP tunnel uses the shim to be able to switch the tunnel 1036 endpoint addresses between different locators. In such a case the 1037 packets would have: 1039 o Outer IP header 1041 o Shim6 extension header (if needed) 1043 o Inner IP header 1045 o ULP 1047 In any case, the receiver behavior is well-defined; a receiver 1048 processes the extension headers in order. However, the precise 1049 interaction between Mobile IPv6 and Shim6 is for further study, but 1050 it might make sense to have Mobile IPv6 operate on locators as well, 1051 meaning that the shim would be layered on top of the MIPv6 mechanism. 1053 5. Message Formats 1055 The Shim6 messages are all carried using a new IP protocol number [to 1056 be assigned by IANA]. The Shim6 messages have a common header, 1057 defined below, with some fixed fields, followed by type specific 1058 fields. 1060 The Shim6 messages are structured as an IPv6 extension header since 1061 the Payload extension header is used to carry the ULP packets after a 1062 locator switch. The Shim6 control messages use the same extension 1063 header formats so that a single "protocol number" needs to be allowed 1064 through firewalls in order for Shim6 to function across the firewall. 1066 5.1. Common Shim6 Message Format 1068 The first 17 bits of the Shim6 header is common for the Payload 1069 extension header and the control messages and looks as follows: 1071 0 1 1072 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 1073 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1074 | Next Header | Hdr Ext Len |P| 1075 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1077 Fields: 1079 Next Header: The payload which follows this header. 1081 Hdr Ext Len: 8-bit unsigned integer. Length of the Shim6 header in 1082 8-octet units, not including the first 8 octets. 1084 P: A single bit to distinguish Payload extension headers 1085 from control messages. 1087 Shim6 signalling packets may not be larger than 1280 bytes, including 1088 the IPv6 header and any intermediate headers between the IPv6 header 1089 and the Shim6 header. One way to meet this requirement is to omit 1090 part of the locator address information if with this information 1091 included, the packet would become larger than 1280 bytes. Another 1092 option is to perform option engineering, dividing into different 1093 Shim6 messages the information to be transmitted. An implementation 1094 may impose administrative restrictions to avoid excessively large 1095 Shim6 packets, such as a limitation on the number of locators to be 1096 used. 1098 5.2. Payload Extension Header Format 1100 The payload extension headers is used to carry ULP packets where the 1101 receiver must replace the content of the source and/or destination 1102 fields in the IPv6 header before passing the packet to the ULP. Thus 1103 this extension header is required when the locators pair that is used 1104 is not the same as the ULID pair. 1106 0 1 2 3 1107 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 1108 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1109 | Next Header | 0 |1| | 1110 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1111 | Receiver Context Tag | 1112 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1114 Fields: 1116 Next Header: The payload which follows this header. 1118 Hdr Ext Len: 0 (since the header is 8 octets). 1120 P: Set to one. A single bit to distinguish this from the 1121 Shim6 control messages. 1123 Receiver Context Tag: 47-bit unsigned integer. Allocated by the 1124 receiver for use to identify the context. 1126 5.3. Common Shim6 Control header 1128 The common part of the header has a next header and header extension 1129 length field which is consistent with the other IPv6 extension 1130 headers, even if the next header value is always "NO NEXT HEADER" for 1131 the control messages. 1133 The Shim6 headers must be a multiple of 8 octets, hence the minimum 1134 size is 8 octets. 1136 The common shim control message header is as follows: 1138 0 1 2 3 1139 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 1140 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1141 | Next Header | Hdr Ext Len |P| Type |Type-specific|S| 1142 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1143 | Checksum | | 1144 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1145 | Type-specific format | 1146 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1148 Fields: 1150 Next Header: 8-bit selector. Normally set to NO_NXT_HDR (59). 1152 Hdr Ext Len: 8-bit unsigned integer. Length of the Shim6 header in 1153 8-octet units, not including the first 8 octets. 1155 P: Set to zero. A single bit to distinguish this from 1156 the Shim6 payload extension header. 1158 Type: 7-bit unsigned integer. Identifies the actual message 1159 from the table below. Type codes 0-63 will not 1160 trigger R1bis messages on a missing context, while 64- 1161 127 will trigger R1bis. 1163 S: A single bit set to zero which allows Shim6 and HIP to 1164 have a common header format yet telling Shim6 and HIP 1165 messages apart. 1167 Checksum: 16-bit unsigned integer. The checksum is the 16-bit 1168 one's complement of the one's complement sum of the 1169 entire Shim6 header message starting with the Shim6 1170 next header field, and ending as indicated by the Hdr 1171 Ext Len. Thus when there is a payload following the 1172 Shim6 header, the payload is NOT included in the Shim6 1173 checksum. Note that unlike protocol like ICMPv6, 1174 there is no pseudo-header checksum part of the 1175 checksum, in order to provide locator agility without 1176 having to change the checksum. 1178 Type-specific: Part of message that is different for different 1179 message types. 1181 +------------+-----------------------------------------------------+ 1182 | Type Value | Message | 1183 +------------+-----------------------------------------------------+ 1184 | 1 | I1 (first establishment message from the initiator) | 1185 | | | 1186 | 2 | R1 (first establishment message from the responder) | 1187 | | | 1188 | 3 | I2 (2nd establishment message from the initiator) | 1189 | | | 1190 | 4 | R2 (2nd establishment message from the responder) | 1191 | | | 1192 | 5 | R1bis (Reply to reference to non-existent context) | 1193 | | | 1194 | 6 | I2bis (Reply to a R1bis message) | 1195 | | | 1196 | 64 | Update Request | 1197 | | | 1198 | 65 | Update Acknowledgement | 1199 | | | 1200 | 66 | Keepalive | 1201 | | | 1202 | 67 | Probe Message | 1203 | | | 1204 | 68 | Error Message | 1205 +------------+-----------------------------------------------------+ 1207 Table 1 1209 5.4. I1 Message Format 1211 The I1 message is the first message in the context establishment 1212 exchange. 1214 0 1 2 3 1215 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 1216 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1217 | 59 | Hdr Ext Len |0| Type = 1 | Reserved1 |0| 1218 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1219 | Checksum |R| | 1220 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1221 | Initiator Context Tag | 1222 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1223 | Initiator Nonce | 1224 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1225 | | 1226 + Options + 1227 | | 1228 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1229 Fields: 1231 Next Header: NO_NXT_HDR (59). 1233 Hdr Ext Len: At least 1, since the header is 16 octets when there 1234 are no options. 1236 Type: 1 1238 Reserved1: 7-bit field. Reserved for future use. Zero on 1239 transmit. MUST be ignored on receipt. 1241 R: 1-bit field. Reserved for future use. Zero on 1242 transmit. MUST be ignored on receipt. 1244 Initiator Context Tag: 47-bit field. The Context Tag the initiator 1245 has allocated for the context. 1247 Initiator Nonce: 32-bit unsigned integer. A random number picked by 1248 the initiator which the responder will return in the 1249 R1 message. 1251 The following options are defined for this message: 1253 ULID pair: When the IPv6 source and destination addresses in the 1254 IPv6 header does not match the ULID pair, this option 1255 MUST be included. An example of this is when 1256 recovering from a lost context. 1258 Forked Instance Identifier: When another instance of an existent 1259 context with the same ULID pair is being created, a 1260 Forked Instance Identifier option MUST be included to 1261 distinguish this new instance from the existent one. 1263 Future protocol extensions might define additional options for this 1264 message. The C-bit in the option format defines how such a new 1265 option will be handled by an implementation. See Section 5.15. 1267 5.5. R1 Message Format 1269 The R1 message is the second message in the context establishment 1270 exchange. The responder sends this in response to an I1 message, 1271 without creating any state specific to the initiator. 1273 0 1 2 3 1274 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 1275 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1276 | 59 | Hdr Ext Len |0| Type = 2 | Reserved1 |0| 1277 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1278 | Checksum | Reserved2 | 1279 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1280 | Initiator Nonce | 1281 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1282 | Responder Nonce | 1283 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1284 | | 1285 + Options + 1286 | | 1287 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1289 Fields: 1291 Next Header: NO_NXT_HDR (59). 1293 Hdr Ext Len: At least 1, since the header is 16 octets when there 1294 are no options. 1296 Type: 2 1298 Reserved1: 7-bit field. Reserved for future use. Zero on 1299 transmit. MUST be ignored on receipt. 1301 Reserved2: 16-bit field. Reserved for future use. Zero on 1302 transmit. MUST be ignored on receipt. 1304 Initiator Nonce: 32-bit unsigned integer. Copied from the I1 1305 message. 1307 Responder Nonce: 32-bit unsigned integer. A number picked by the 1308 responder which the initiator will return in the I2 1309 message. 1311 The following options are defined for this message: 1313 Responder Validator: Variable length option. This option MUST be 1314 included in the R1 message. Typically it contains a 1315 hash generated by the responder, which the responder 1316 uses together with the Responder Nonce value to verify 1317 that an I2 message is indeed sent in response to a R1 1318 message, and that the parameters in the I2 message are 1319 the same as those in the I1 message. 1321 Future protocol extensions might define additional options for this 1322 message. The C-bit in the option format defines how such a new 1323 option will be handled by an implementation. See Section 5.15. 1325 5.6. I2 Message Format 1327 The I2 message is the third message in the context establishment 1328 exchange. The initiator sends this in response to a R1 message, 1329 after checking the Initiator Nonce, etc. 1331 0 1 2 3 1332 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 1333 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1334 | 59 | Hdr Ext Len |0| Type = 3 | Reserved1 |0| 1335 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1336 | Checksum |R| | 1337 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1338 | Initiator Context Tag | 1339 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1340 | Initiator Nonce | 1341 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1342 | Responder Nonce | 1343 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1344 | Reserved2 | 1345 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1346 | | 1347 + Options + 1348 | | 1349 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1351 Fields: 1353 Next Header: NO_NXT_HDR (59). 1355 Hdr Ext Len: At least 2, since the header is 24 octets when there 1356 are no options. 1358 Type: 3 1360 Reserved1: 7-bit field. Reserved for future use. Zero on 1361 transmit. MUST be ignored on receipt. 1363 R: 1-bit field. Reserved for future use. Zero on 1364 transmit. MUST be ignored on receipt. 1366 Initiator Context Tag: 47-bit field. The Context Tag the initiator 1367 has allocated for the context. 1369 Initiator Nonce: 32-bit unsigned integer. A random number picked by 1370 the initiator which the responder will return in the 1371 R2 message. 1373 Responder Nonce: 32-bit unsigned integer. Copied from the R1 1374 message. 1376 Reserved2: 32-bit field. Reserved for future use. Zero on 1377 transmit. MUST be ignored on receipt. (Needed to 1378 make the options start on a multiple of 8 octet 1379 boundary.) 1381 The following options are defined for this message: 1383 Responder Validator: Variable length option. This option MUST be 1384 included in the I2 message and MUST be generated 1385 copying the Responder Validator option received in the 1386 R1 message. 1388 ULID pair: When the IPv6 source and destination addresses in the 1389 IPv6 header does not match the ULID pair, this option 1390 MUST be included. An example of this is when 1391 recovering from a lost context. 1393 Forked Instance Identifier: When another instance of an existent 1394 context with the same ULID pair is being created, a 1395 Forked Instance Identifier option MUST be included to 1396 distinguish this new instance from the existent one. 1398 Locator list: Optionally sent when the initiator immediately wants 1399 to tell the responder its list of locators. When it 1400 is sent, the necessary HBA/CGA information for 1401 verifying the locator list MUST also be included. 1403 Locator Preferences: Optionally sent when the locators don't all 1404 have equal preference. 1406 CGA Parameter Data Structure: This option MUST be included in the I2 1407 message when the locator list is included so the 1408 receiver can verify the locator list. 1410 CGA Signature: This option MUST be included in the I2 message when 1411 some of the locators in the list use CGA (and not HBA) 1412 for verification. 1414 Future protocol extensions might define additional options for this 1415 message. The C-bit in the option format defines how such a new 1416 option will be handled by an implementation. See Section 5.15. 1418 5.7. R2 Message Format 1420 The R2 message is the fourth message in the context establishment 1421 exchange. The responder sends this in response to an I2 message. 1422 The R2 message is also used when both hosts send I1 messages at the 1423 same time and the I1 messages cross in flight. 1425 0 1 2 3 1426 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 1427 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1428 | 59 | Hdr Ext Len |0| Type = 4 | Reserved1 |0| 1429 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1430 | Checksum |R| | 1431 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1432 | Responder Context Tag | 1433 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1434 | Initiator Nonce | 1435 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1436 | | 1437 + Options + 1438 | | 1439 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1441 Fields: 1443 Next Header: NO_NXT_HDR (59). 1445 Hdr Ext Len: At least 1, since the header is 16 octets when there 1446 are no options. 1448 Type: 4 1450 Reserved1: 7-bit field. Reserved for future use. Zero on 1451 transmit. MUST be ignored on receipt. 1453 R: 1-bit field. Reserved for future use. Zero on 1454 transmit. MUST be ignored on receipt. 1456 Responder Context Tag: 47-bit field. The Context Tag the responder 1457 has allocated for the context. 1459 Initiator Nonce: 32-bit unsigned integer. Copied from the I2 1460 message. 1462 The following options are defined for this message: 1464 Locator List: Optionally sent when the responder immediately wants 1465 to tell the initiator its list of locators. When it 1466 is sent, the necessary HBA/CGA information for 1467 verifying the locator list MUST also be included. 1469 Locator Preferences: Optionally sent when the locators don't all 1470 have equal preference. 1472 CGA Parameter Data Structure: Included when the locator list is 1473 included so the receiver can verify the locator list. 1475 CGA Signature: Included when the some of the locators in the list use 1476 CGA (and not HBA) for verification. 1478 Future protocol extensions might define additional options for this 1479 message. The C-bit in the option format defines how such a new 1480 option will be handled by an implementation. See Section 5.15. 1482 5.8. R1bis Message Format 1484 Should a host receive a packet with a shim Payload extension header 1485 or Shim6 control message with type code 64-127 (such as an Update or 1486 Probe message), and the host does not have any context state for the 1487 received context tag, then it will generate a R1bis message. 1489 This message allows the sender of the packet referring to the non- 1490 existent context to re-establish the context with a reduced context 1491 establishment exchange. Upon the reception of the R1bis message, the 1492 receiver can proceed reestablishing the lost context by directly 1493 sending an I2bis message. 1495 0 1 2 3 1496 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 1497 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1498 | 59 | Hdr Ext Len |0| Type = 5 | Reserved1 |0| 1499 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1500 | Checksum |R| | 1501 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1502 | Packet Context Tag | 1503 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1504 | Responder Nonce | 1505 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1506 | | 1507 + Options + 1508 | | 1509 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1511 Fields: 1513 Next Header: NO_NXT_HDR (59). 1515 Hdr Ext Len: At least 1, since the header is 16 octets when there 1516 are no options. 1518 Type: 5 1520 Reserved1: 7-bit field. Reserved for future use. Zero on 1521 transmit. MUST be ignored on receipt. 1523 R: 1-bit field. Reserved for future use. Zero on 1524 transmit. MUST be ignored on receipt. 1526 Packet Context Tag: 47-bit unsigned integer. The context tag 1527 contained in the received packet that triggered the 1528 generation of the R1bis message. 1530 Responder Nonce: 32-bit unsigned integer. A number picked by the 1531 responder which the initiator will return in the I2bis 1532 message. 1534 The following options are defined for this message: 1536 Responder Validator: Variable length option. Typically a hash 1537 generated by the responder, which the responder uses 1538 together with the Responder Nonce value to verify that 1539 an I2bis message is indeed sent in response to a R1bis 1540 message. 1542 Future protocol extensions might define additional options for this 1543 message. The C-bit in the option format defines how such a new 1544 option will be handled by an implementation. See Section 5.15. 1546 5.9. I2bis Message Format 1548 The I2bis message is the third message in the context recovery 1549 exchange. This is sent in response to a R1bis message, after 1550 checking that the R1bis message refers to an existing context, etc. 1552 0 1 2 3 1553 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 1554 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1555 | 59 | Hdr Ext Len |0| Type = 6 | Reserved1 |0| 1556 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1557 | Checksum |R| | 1558 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1559 | Initiator Context Tag | 1560 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1561 | Initiator Nonce | 1562 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1563 | Responder Nonce | 1564 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1565 | Reserved2 | 1566 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1567 | | | 1568 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1569 | Packet Context Tag | 1570 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1571 | | 1572 + Options + 1573 | | 1574 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1576 Fields: 1578 Next Header: NO_NXT_HDR (59). 1580 Hdr Ext Len: At least 3, since the header is 32 octets when there 1581 are no options. 1583 Type: 6 1585 Reserved1: 7-bit field. Reserved for future use. Zero on 1586 transmit. MUST be ignored on receipt. 1588 R: 1-bit field. Reserved for future use. Zero on 1589 transmit. MUST be ignored on receipt. 1591 Initiator Context Tag: 47-bit field. The Context Tag the initiator 1592 has allocated for the context. 1594 Initiator Nonce: 32-bit unsigned integer. A random number picked by 1595 the initiator which the responder will return in the 1596 R2 message. 1598 Responder Nonce: 32-bit unsigned integer. Copied from the R1bis 1599 message. 1601 Reserved2: 49-bit field. Reserved for future use. Zero on 1602 transmit. MUST be ignored on receipt. (Note that 17 1603 bits are not sufficient since the options need start 1604 on a multiple of 8 octet boundary.) 1606 Packet Context Tag: 47-bit unsigned integer. Copied from the Packet 1607 Context Tag contained in the received R1bis. 1609 The following options are defined for this message: 1611 Responder Validator: Variable length option. Just a copy of the 1612 Responder Validator option in the R1bis message. 1614 ULID pair: When the IPv6 source and destination addresses in the 1615 IPv6 header does not match the ULID pair, this option 1616 MUST be included. 1618 Forked Instance Identifier: When another instance of an existent 1619 context with the same ULID pair is being created, a 1620 Forked Instance Identifier option is included to 1621 distinguish this new instance from the existent one. 1623 Locator list: Optionally sent when the initiator immediately wants 1624 to tell the responder its list of locators. When it 1625 is sent, the necessary HBA/CGA information for 1626 verifying the locator list MUST also be included. 1628 Locator Preferences: Optionally sent when the locators don't all 1629 have equal preference. 1631 CGA Parameter Data Structure: Included when the locator list is 1632 included so the receiver can verify the locator list. 1634 CGA Signature: Included when the some of the locators in the list use 1635 CGA (and not HBA) for verification. 1637 Future protocol extensions might define additional options for this 1638 message. The C-bit in the option format defines how such a new 1639 option will be handled by an implementation. See Section 5.15. 1641 5.10. Update Request Message Format 1643 The Update Request Message is used to update either the list of 1644 locators, the locator preferences, and both. When the list of 1645 locators is updated, the message also contains the option(s) 1646 necessary for HBA/CGA to secure this. The basic sanity check that 1647 prevents off-path attackers from generating bogus updates is the 1648 context tag in the message. 1650 The update message contains options (the Locator List and the Locator 1651 Preferences) that, when included, completely replace the previous 1652 locator list and locator preferences, respectively. Thus there is no 1653 mechanism to just send deltas to the locator list. 1655 0 1 2 3 1656 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 1657 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1658 | 59 | Hdr Ext Len |0| Type = 64 | Reserved1 |0| 1659 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1660 | Checksum |R| | 1661 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1662 | Receiver Context Tag | 1663 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1664 | Request Nonce | 1665 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1666 | | 1667 + Options + 1668 | | 1669 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1671 Fields: 1673 Next Header: NO_NXT_HDR (59). 1675 Hdr Ext Len: At least 1, since the header is 16 octets when there 1676 are no options. 1678 Type: 64 1679 Reserved1: 7-bit field. Reserved for future use. Zero on 1680 transmit. MUST be ignored on receipt. 1682 R: 1-bit field. Reserved for future use. Zero on 1683 transmit. MUST be ignored on receipt. 1685 Receiver Context Tag: 47-bit field. The Context Tag the receiver 1686 has allocated for the context. 1688 Request Nonce: 32-bit unsigned integer. A random number picked by 1689 the initiator which the peer will return in the 1690 acknowledgement message. 1692 The following options are defined for this message: 1694 Locator List: The list of the sender's (new) locators. The locators 1695 might be unchanged and only the preferences have 1696 changed. 1698 Locator Preferences: Optionally sent when the locators don't all 1699 have equal preference. 1701 CGA Parameter Data Structure (PDS): Included when the locator list 1702 is included and the PDS was not included in the I2/ 1703 I2bis/R2 messages, so the receiver can verify the 1704 locator list. 1706 CGA Signature: Included when the some of the locators in the list use 1707 CGA (and not HBA) for verification. 1709 Future protocol extensions might define additional options for this 1710 message. The C-bit in the option format defines how such a new 1711 option will be handled by an implementation. See Section 5.15. 1713 5.11. Update Acknowledgement Message Format 1715 This message is sent in response to a Update Request message. It 1716 implies that the Update Request has been received, and that any new 1717 locators in the Update Request can now be used as the source locators 1718 of packets. But it does not imply that the (new) locators have been 1719 verified to be used as a destination, since the host might defer the 1720 verification of a locator until it sees a need to use a locator as 1721 the destination. 1723 0 1 2 3 1724 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 1725 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1726 | 59 | Hdr Ext Len |0| Type = 65 | Reserved1 |0| 1727 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1728 | Checksum |R| | 1729 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 1730 | Receiver Context Tag | 1731 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1732 | Request Nonce | 1733 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1734 | | 1735 + Options + 1736 | | 1737 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1739 Fields: 1741 Next Header: NO_NXT_HDR (59). 1743 Hdr Ext Len: At least 1, since the header is 16 octets when there 1744 are no options. 1746 Type: 65 1748 Reserved1: 7-bit field. Reserved for future use. Zero on 1749 transmit. MUST be ignored on receipt. 1751 R: 1-bit field. Reserved for future use. Zero on 1752 transmit. MUST be ignored on receipt. 1754 Receiver Context Tag: 47-bit field. The Context Tag the receiver 1755 has allocated for the context. 1757 Request Nonce: 32-bit unsigned integer. Copied from the Update 1758 Request message. 1760 No options are currently defined for this message. 1762 Future protocol extensions might define additional options for this 1763 message. The C-bit in the option format defines how such a new 1764 option will be handled by an implementation. See Section 5.15. 1766 5.12. Keepalive Message Format 1768 This message format is defined in [4]. 1770 The message is used to ensure that when a peer is sending ULP packets 1771 on a context, it always receives some packets in the reverse 1772 direction. When the ULP is sending bidirectional traffic, no extra 1773 packets need to be inserted. But for a unidirectional ULP traffic 1774 pattern, the shim will send back some Keepalive messages when it is 1775 receiving ULP packets. 1777 5.13. Probe Message Format 1779 This message and its semantics are defined in [4]. 1781 The goal of this mechanism is to test whether locator pairs work or 1782 not in the general case. In particular, this mechanism is to be able 1783 to handle the case when one locator pair works in from A to B, and 1784 another locator pair works from B to A, but there is no locator pair 1785 which works in both directions. The protocol mechanism is that as A 1786 is sending probe messages to B, B will observe which locator pairs it 1787 has received from and report that back in probe messages it is 1788 sending to A. 1790 5.14. Error Message Format 1792 The Error Message is generated by a Shim6 receiver upon the reception 1793 of a Shim6 message containing critical information that cannot be 1794 processed properly. 1796 In the case that a Shim6 node receives a Shim6 packet which contains 1797 information that is critical for the Shim6 protocol that is not 1798 supported by the receiver, it sends an Error Message back to the 1799 originator of the Shim6 message. The Error Message is 1800 unacknowledged. 1802 In addition, Shim6 Error messages defined in this section can be used 1803 to identify problems with Shim6 implementations. In order to do 1804 that, a range of Error Code Types is reserved for that purpose. In 1805 particular, implementations may generate Shim6 Error messages with 1806 Code Type in that range instead of silently discarding Shim6 packets 1807 during the debugging process. 1809 0 1 2 3 1810 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 1811 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1812 | 59 | Hdr Ext Len |0| Type = 68 | Error Code |0| 1813 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1814 | Checksum | Pointer | 1815 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1816 | | 1817 + Packet in error + 1818 | | 1819 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1821 Fields: 1823 Next Header: NO_NXT_HDR (59). 1825 Hdr Ext Len: At least 1, since the header is 16 octets. Depends on 1826 the specific Error Data. 1828 Type: 68 1830 Error Code: 7-bit field describing the error that generated the 1831 Error Message. See Error Code list below 1833 Pointer: 16-bit field.Identifies the octet offset within the 1834 invoking packet where the error was detected. 1836 Packet in error: As much of invoking packet as possible without the 1837 Error message packet exceeding the minimum IPv6 MTU. 1839 The following Error Codes are defined: 1841 +---------+---------------------------------------------------------+ 1842 | Code | Description | 1843 | Value | | 1844 +---------+---------------------------------------------------------+ 1845 | 0 | Unknown Shim6 message type | 1846 | | | 1847 | 1 | Critical Option not recognized | 1848 | | | 1849 | 2 | Locator verification method failed (Pointer to the | 1850 | | inconsistent Verification method octet) | 1851 | | | 1852 | 3 | Locator List Generation number out of sync. | 1853 | | | 1854 | 4 | Error in the number of locators in a Locator Preference | 1855 | | option | 1856 | | | 1857 | 120-127 | Reserved for debugging purposes | 1858 +---------+---------------------------------------------------------+ 1860 Table 2 1862 5.15. Option Formats 1864 The format of the options is a snapshot of the current HIP option 1865 format [19]. However, there is no intention to track any changes to 1866 the HIP option format, nor is there an intent to use the same name 1867 space for the option type values. But using the same format will 1868 hopefully make it easier to import HIP capabilities into Shim6 as 1869 extensions to Shim6, should this turn out to be useful. 1871 All of the TLV parameters have a length (including Type and Length 1872 fields) which is a multiple of 8 bytes. When needed, padding MUST be 1873 added to the end of the parameter so that the total length becomes a 1874 multiple of 8 bytes. This rule ensures proper alignment of data. If 1875 padding is added, the Length field MUST NOT include the padding. Any 1876 added padding bytes MUST be zeroed by the sender, and their values 1877 SHOULD NOT be checked by the receiver. 1879 Consequently, the Length field indicates the length of the Contents 1880 field (in bytes). The total length of the TLV parameter (including 1881 Type, Length, Contents, and Padding) is related to the Length field 1882 according to the following formula: 1884 Total Length = 11 + Length - (Length + 3) mod 8; 1886 The Total Length of the option is the smallest multiple of 8 bytes 1887 that allows for the 4 bytes of option header and the option itself. 1888 The amount of padding required can be calculated as follows: 1890 padding = 7 - ((Length + 3) mod 8) 1892 And: 1894 Total Length = 4 + Length + padding 1896 0 1 2 3 1897 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 1898 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1899 | Type |C| Length | 1900 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1901 ~ ~ 1902 ~ Contents ~ 1903 ~ +-+-+-+-+-+-+-+-+ 1904 ~ | Padding | 1905 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1907 Fields: 1909 Type: 15-bit identifier of the type of option. The options 1910 defined in this document are below. 1912 C: Critical. One if this parameter is critical, and MUST 1913 be recognized by the recipient, zero otherwise. An 1914 implementation might view the C bit as part of the 1915 Type field, by multiplying the type values in this 1916 specification by two. 1918 Length: Length of the Contents, in bytes. 1920 Contents: Parameter specific, defined by Type. 1922 Padding: Padding, 0-7 bytes, added if needed. 1924 +------+------------------------------+ 1925 | Type | Option Name | 1926 +------+------------------------------+ 1927 | 1 | Responder Validator | 1928 | | | 1929 | 2 | Locator List | 1930 | | | 1931 | 3 | Locator Preferences | 1932 | | | 1933 | 4 | CGA Parameter Data Structure | 1934 | | | 1935 | 5 | CGA Signature | 1936 | | | 1937 | 6 | ULID Pair | 1938 | | | 1939 | 7 | Forked Instance Identifier | 1940 | | | 1941 | 10 | Keepalive Timeout Option | 1942 +------+------------------------------+ 1944 Table 3 1946 Future protocol extensions might define additional options for the 1947 Shim6 messages. The C-bit in the option format defines how such a 1948 new option will be handled by an implementation. 1950 If a host receives an option that it does not understand (an option 1951 that was defined in some future extension to this protocol) or is not 1952 listed as a valid option for the different message types above, then 1953 the Critical bit in the option determines the outcome. 1955 o If C=0 then the option is silently ignored, and the rest of the 1956 message is processed. 1958 o If C=1 then the host SHOULD send back a Shim6 Error Message with 1959 Error Code=1, with the Pointer referencing the first octet in the 1960 Option Type field. When C=1 the rest of the message MUST NOT be 1961 processed. 1963 5.15.1. Responder Validator Option Format 1965 The responder can choose exactly what input is used to compute the 1966 validator, and what one-way function (such as MD5, SHA1) it uses, as 1967 long as the responder can check that the validator it receives back 1968 in the I2 or I2bis message is indeed one that: 1970 1)- it computed, 1972 2)- it computed for the particular context, and 1974 3)- that it isn't a replayed I2/I2bis message. 1976 Some suggestions on how to generate the validators are captured in 1977 Section 7.10.1 and Section 7.17.1. 1979 0 1 2 3 1980 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 1981 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1982 | Type = 1 |0| Length | 1983 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1984 ~ Validator ~ 1985 ~ +-+-+-+-+-+-+-+-+ 1986 ~ | Padding | 1987 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1989 Fields: 1991 Validator: Variable length content whose interpretation is local 1992 to the responder. 1994 Padding: Padding, 0-7 bytes, added if needed. See 1995 Section 5.15. 1997 5.15.2. Locator List Option Format 1999 The Locator List Option is used to carry all the locators of the 2000 sender. Note that the order of the locators is important, since the 2001 Locator Preferences refers to the locators by using the index in the 2002 list. 2004 Note that we carry all the locators in this option even though some 2005 of them can be created automatically from the CGA Parameter Data 2006 Structure. 2008 0 1 2 3 2009 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 2010 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2011 | Type = 2 |0| Length | 2012 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2013 | Locator List Generation | 2014 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2015 | Num Locators | N Octets of Verification Method | 2016 +-+-+-+-+-+-+-+-+ | 2017 ~ ~ 2018 ~ +-+-+-+-+-+-+-+-+ 2019 ~ | Padding | 2020 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2021 ~ Locators 1 through N ~ 2022 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2024 Fields: 2026 Locator List Generation: 32-bit unsigned integer. Indicates a 2027 generation number which is increased by one for each 2028 new locator list. This is used to ensure that the 2029 index in the Locator Preferences refer to the right 2030 version of the locator list. 2032 Num Locators: 8-bit unsigned integer. The number of locators that 2033 are included in the option. We call this number "N" 2034 below. 2036 Verification Method: N octets. The i'th octet specifies the 2037 verification method for the i'th locator. 2039 Padding: Padding, 0-7 bytes, added if needed so that the 2040 Locators start on a multiple of 8 octet boundary. 2041 NOTE that for this option there is never a need to pad 2042 at the end, since the locators are a multiple of 8 2043 octets in length. This internal padding is included 2044 in the length field. 2046 Locators: N 128-bit locators. 2048 The defined verification methods are: 2050 +-------+----------+ 2051 | Value | Method | 2052 +-------+----------+ 2053 | 0 | Reserved | 2054 | | | 2055 | 1 | HBA | 2056 | | | 2057 | 2 | CGA | 2058 | | | 2059 | 3-255 | Reserved | 2060 +-------+----------+ 2062 Table 4 2064 5.15.3. Locator Preferences Option Format 2066 The Locator Preferences option can have some flags to indicate 2067 whether or not a locator is known to work. In addition, the sender 2068 can include a notion of preferences. It might make sense to define 2069 "preferences" as a combination of priority and weight the same way 2070 that DNS SRV records has such information. The priority would 2071 provide a way to rank the locators, and within a given priority, the 2072 weight would provide a way to do some load sharing. See [5] for how 2073 SRV defines the interaction of priority and weight. 2075 The minimum notion of preferences we need is to be able to indicate 2076 that a locator is "dead". We can handle this using a single octet 2077 flag for each locator. 2079 We can extend that by carrying a larger "element" for each locator. 2080 This document presently also defines 2-octet and 3-octet elements, 2081 and we can add more information by having even larger elements if 2082 need be. 2084 The locators are not included in the preference list. Instead, the 2085 first element refers to locator that was in the first element in the 2086 Locator List option. The generation number carried in this option 2087 and the Locator List option is used to verify that they refer to the 2088 same version of the locator list. 2090 0 1 2 3 2091 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 2092 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2093 | Type = 3 |0| Length | 2094 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2095 | Locator List Generation | 2096 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2097 | Element Len | Element[1] | Element[2] | Element[3] | 2098 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2099 ~ ... ~ 2100 ~ +-+-+-+-+-+-+-+-+ 2101 ~ | Padding | 2102 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2104 Case of Element Len = 1 is depicted. 2106 Fields: 2108 Locator List Generation: 32-bit unsigned integer. Indicates a 2109 generation number for the locator list to which the 2110 elements should apply. 2112 Element Len: 8-bit unsigned integer. The length in octets of each 2113 element. This specification defines the cases when 2114 the length is 1, 2, or 3. 2116 Element[i]: A field with a number of octets defined by the Element 2117 Len field. Provides preferences for the i'th locator 2118 in the Locator List option that is in use. 2120 Padding: Padding, 0-7 bytes, added if needed. See 2121 Section 5.15. 2123 When the Element length equals one, then the element consists of only 2124 a one octet flags field. The currently defined set of flags are: 2126 BROKEN: 0x01 2128 TRANSIENT: 0x02 2130 The intent of the BROKEN flag is to inform the peer that a given 2131 locator is known to be not working. The intent of TRANSIENT is to 2132 allow the distinction between more stable addresses and less stable 2133 addresses when Shim6 is combined with IP mobility, when we might have 2134 more stable home locators, and less stable care-of-locators. 2136 When the Element length equals two, then the element consists of a 1 2137 octet flags field followed by a 1 octet priority field. The priority 2138 has the same semantics as the priority in DNS SRV records. 2140 When the Element length equals three, then the element consists of a 2141 1 octet flags field followed by a 1 octet priority field, and a 1 2142 octet weight field. The weight has the same semantics as the weight 2143 in DNS SRV records. 2145 This document doesn't specify the format when the Element length is 2146 more than three, except that any such formats MUST be defined so that 2147 the first three octets are the same as in the above case, that is, a 2148 of a 1 octet flags field followed by a 1 octet priority field, and a 2149 1 octet weight field. 2151 5.15.4. CGA Parameter Data Structure Option Format 2153 This option contains the CGA Parameter Data Structure (PDS). When 2154 HBA is used to verify the locators, the PDS contains the HBA 2155 multiprefix extension in addition to the PDS mandatory fields and 2156 other extensions unrelated to Shim6 that the PDS might have. When 2157 CGA is used to verify the locators, in addition to the PDS option, 2158 the host also needs to include the signature in the form of a CGA 2159 Signature option. 2161 0 1 2 3 2162 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 2163 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2164 | Type = 4 |0| Length | 2165 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2166 ~ CGA Parameter Data Structure ~ 2167 ~ +-+-+-+-+-+-+-+-+ 2168 ~ | Padding | 2169 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2171 Fields: 2173 CGA Parameter Data Structure: Variable length content. Content 2174 defined in [2] and [3]. 2176 Padding: Padding, 0-7 bytes, added if needed. See 2177 Section 5.15. 2179 5.15.5. CGA Signature Option Format 2181 When CGA is used for verification of one or more of the locators in 2182 the Locator List option, then the message in question will need to 2183 contain this option. 2185 0 1 2 3 2186 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 2187 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2188 | Type = 5 |0| Length | 2189 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2190 ~ CGA Signature ~ 2191 ~ +-+-+-+-+-+-+-+-+ 2192 ~ | Padding | 2193 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2195 Fields: 2197 CGA Signature: A variable-length field containing a PKCS#1 v1.5 2198 signature, constructed by using the sender's private 2199 key over the following sequence of octets: 2201 1. The 128-bit CGA Message Type tag [CGA] value for 2202 Shim6, 0x4A 30 5662 4858 574B 3655 416F 506A 6D48. 2203 (The tag value has been generated randomly by the 2204 editor of this specification.). 2206 2. The Locator List Generation value of the 2207 correspondent Locator List Option. 2209 3. The subset of locators included in the 2210 correspondent Locator List Option which 2211 verification method is set to CGA. The locators 2212 MUST be included in the order they are listed in 2213 the Locator List Option. 2215 Padding: Padding, 0-7 bytes, added if needed. See 2216 Section 5.15. 2218 5.15.6. ULID Pair Option Format 2220 I1, I2, and I2bis messages MUST contain the ULID pair; normally this 2221 is in the IPv6 source and destination fields. In case that the ULID 2222 for the context differ from the address pair included in the source 2223 and destination address fields of the IPv6 packet used to carry the 2224 I1/I2/I2bis message, the ULID pair option MUST be included in the I1/ 2225 I2/I2bis message. 2227 0 1 2 3 2228 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 2229 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2230 | Type = 6 |0| Length = 36 | 2231 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2232 | Reserved2 | 2233 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2234 | | 2235 + Sender ULID + 2236 | | 2237 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2238 | | 2239 + Receiver ULID + 2240 | | 2241 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2243 Fields: 2245 Reserved2: 32-bit field. Reserved for future use. Zero on 2246 transmit. MUST be ignored on receipt. (Needed to 2247 make the ULIDs start on a multiple of 8 octet 2248 boundary.) 2250 Sender ULID: A 128-bit IPv6 address. 2252 Receiver ULID: A 128-bit IPv6 address. 2254 5.15.7. Forked Instance Identifier Option Format 2256 0 1 2 3 2257 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 2258 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2259 | Type = 7 |0| Length = 4 | 2260 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2261 | Forked Instance Identifier | 2262 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2264 Fields: 2266 Forked Instance Identifier: 32-bit field containing the identifier 2267 of the particular forked instance. 2269 5.15.8. Keepalive Timeout Option Format 2271 This option is defined in [4]. 2273 6. Conceptual Model of a Host 2275 This section describes a conceptual model of one possible data 2276 structure organization that hosts will maintain for the purposes of 2277 Shim6. The described organization is provided to facilitate the 2278 explanation of how the Shim6 protocol should behave. This document 2279 does not mandate that implementations adhere to this model as long as 2280 their external behavior is consistent with that described in this 2281 document. 2283 6.1. Conceptual Data Structures 2285 The key conceptual data structure for the Shim6 protocol is the ULID 2286 pair context. This is a data structure which contains the following 2287 information: 2289 o The state of the context. See Section 6.2. 2291 o The peer ULID; ULID(peer) 2293 o The local ULID; ULID(local) 2295 o The Forked Instance Identifier; FII. This is zero for the default 2296 context i.e., when there is no forking. 2298 o The list of peer locators, with their preferences; Ls(peer) 2300 o The generation number for the most recently received, verified 2301 peer locator list. 2303 o For each peer locator, the verification method to use (from the 2304 Locator List option). 2306 o For each peer locator, a flag whether it has been verified using 2307 HBA or CGA, and a bit whether the locator has been probed to 2308 verify that the ULID is present at that location. 2310 o The current peer locator, is the locator used as destination 2311 address when sending packets; Lp(peer) 2313 o The set of local locators and the preferences; Ls(local) 2315 o The generation number for the most recently sent Locator List 2316 option. 2318 o The current local locator, is the locator used as source address 2319 when sending packets; Lp(local) 2321 o The context tag used to transmit control messages and payload 2322 extension headers - allocated by the peer; CT(peer) 2324 o The context to expect in received control messages and payload 2325 extension headers - allocated by the local host; CT(local) 2327 o Timers for retransmission of the messages during context 2328 establishment and update messages. 2330 o Depending how an implementation determines whether a context is 2331 still in use, there might be a need to track the last time a 2332 packet was sent/received using the context. 2334 o Reachability state for the locator pairs as specified in [4]. 2336 o During pair exploration, information about the probe messages that 2337 have been sent and received as specified in [4]. 2339 o During context establishment phase, Init Nonce, Responder Nonce, 2340 Responder Validator and timers related to the different packets 2341 sent (I1,I2, R2), as described in Section 7 2343 6.2. Context STATES 2345 The STATES that are used to describe the Shim6 protocol are as 2346 follows: 2348 +---------------------+---------------------------------------------+ 2349 | STATE | Explanation | 2350 +---------------------+---------------------------------------------+ 2351 | IDLE | State machine start | 2352 | | | 2353 | I1-SENT | Initiating context establishment exchange | 2354 | | | 2355 | I2-SENT | Waiting to complete context establishment | 2356 | | exchange | 2357 | | | 2358 | I2BIS-SENT | Potential context loss detected | 2359 | | | 2360 | | | 2361 | ESTABLISHED | SHIM context established | 2362 | | | 2363 | E-FAILED | Context establishment exchange failed | 2364 | | | 2365 | NO-SUPPORT | ICMP Unrecognized Next Header type | 2366 | | (type 4, code 1) received indicating | 2367 | | that Shim6 is not supported | 2368 +---------------------+---------------------------------------------+ 2369 In addition, in each of the aforementioned STATES, the following 2370 state information is stored: 2372 +---------------------+---------------------------------------------+ 2373 | STATE | Information | 2374 +---------------------+---------------------------------------------+ 2375 | IDLE | None | 2376 | | | 2377 | I1-SENT | ULID(peer), ULID(local), [FII], CT(local), | 2378 | | INIT nonce, Lp(local), Lp(peer), Ls(local) | 2379 | | | 2380 | I2-SENT | ULID(peer), ULID(local), [FII], CT(local), | 2381 | | INIT nonce, RESP nonce, Lp(local), Lp(peer),| 2382 | | Ls(local), Responder Validator | 2383 | | | 2384 | ESTABLISHED | ULID(peer), ULID(local), [FII], CT(local), | 2385 | | CT(peer), Lp(local), Lp(peer), Ls(local) | 2386 | | Ls(peer), INIT nonce?(to receive late R2) | 2387 | | | 2388 | I2BIS-SENT | ULID(peer), ULID(local), [FII], CT(local), | 2389 | | CT(peer), Lp(local), Lp(peer), Ls(local) | 2390 | | Ls(peer), CT(R1bis), RESP nonce, | 2391 | | INIT nonce, Responder validator | 2392 | | | 2393 | E-FAILED | ULID(peer), ULID(local) | 2394 | | | 2395 | NO-SUPPORT | ULID(peer), ULID(local) | 2396 +---------------------+---------------------------------------------+ 2398 7. Establishing ULID-Pair Contexts 2400 ULID-pair contexts are established using a 4-way exchange, which 2401 allows the responder to avoid creating state on the first packet. As 2402 part of this exchange each end allocates a context tag, and it shares 2403 this context tag and its set of locators with the peer. 2405 In some cases the 4-way exchange is not necessary, for instance when 2406 both ends try to setup the context at the same time, or when 2407 recovering from a context that has been garbage collected or lost at 2408 one of the hosts. 2410 7.1. Uniqueness of Context Tags 2412 As part of establishing a new context, each host has to assign a 2413 unique context tag. Since the Payload Extension headers are 2414 demultiplexed based solely on the context tag value (without using 2415 the locators), the context tag MUST be unique for each context. 2417 It is important that context tags are hard to guess for off-path 2418 attackers. Therefore, if an implementation uses structure in the 2419 context tag to facilitate efficient lookups, at least 30 bits of the 2420 context tag MUST be unstructured and populated by random or pseudo- 2421 random bits. 2423 In addition, in order to minimize the reuse of context tags, the host 2424 SHOULD randomly cycle through the unstructured tag name space 2425 reserved for randomly assigned context tag values,(e.g. following the 2426 guidelines described in [12]). 2428 7.2. Locator Verification 2430 The peer's locators might need to be verified during context 2431 establishment as well as when handling locator updates in Section 10. 2433 There are two separate aspects of locator verification. One is to 2434 verify that the locator is tied to the ULID, i.e., that the host 2435 which "owns" the ULID is also the one that is claiming the locator 2436 "ownership". The Shim6 protocol uses the HBA or CGA techniques for 2437 doing this verification. The other is to verify that the host is 2438 indeed reachable at the claimed locator. Such verification is needed 2439 both to make sure communication can proceed, but also to prevent 3rd 2440 party flooding attacks [14]. These different verifications happen at 2441 different times, since the first might need to be performed before 2442 packets can be received by the peer with the source locator in 2443 question, but the latter verification is only needed before packets 2444 are sent to the locator. 2446 Before a host can use a locator (different than the ULID) as the 2447 source locator, it must know that the peer will accept packets with 2448 that source locator as being part of this context. Thus the HBA/CGA 2449 verification SHOULD be performed by the host before the host 2450 acknowledges the new locator, by sending an Update Acknowledgement 2451 message, or an R2 message. 2453 Before a host can use a locator (different than the ULID) as the 2454 destination locator it MUST perform the HBA/CGA verification if this 2455 was not performed before upon the reception of the locator set. In 2456 addition, it MUST verify that the ULID is indeed present at that 2457 locator. This verification is performed by doing a return- 2458 routability test as part of the Probe sub-protocol [4]. 2460 If the verification method in the Locator List option is not 2461 supported by the host, or if the verification method is not 2462 consistent with the CGA Parameter Data Structure (e.g., the Parameter 2463 Data Structure doesn't contain the multiprefix extension, and the 2464 verification method says to use HBA), then the host MUST ignore the 2465 Locator List and the message in which it is contained, and the host 2466 SHOULD generate a Shim6 Error Message with Error Code=2, with the 2467 Pointer referencing the octet in the Verification method that was 2468 found inconsistent. 2470 7.3. Normal context establishment 2472 The normal context establishment consists of a 4 message exchange in 2473 the order of I1, R1, I2, R2 as can be seen in Figure 3. 2475 Initiator Responder 2477 IDLE IDLE 2478 ------------- I1 --------------> 2479 I1-SENT 2480 <------------ R1 --------------- 2481 IDLE 2482 ------------- I2 --------------> 2483 I2-SENT 2484 <------------ R2 --------------- 2485 ESTABLISHED ESTABLISHED 2487 Figure 3: Normal context establishment 2489 7.4. Concurrent context establishment 2491 When both ends try to initiate a context for the same ULID pair, then 2492 we might end up with crossing I1 messages. Alternatively, since no 2493 state is created when receiving the I1, a host might send a I1 after 2494 having sent a R1 message. 2496 Since a host remembers that it has sent an I1, it can respond to an 2497 I1 from the peer (for the same ULID-pair), with a R2, resulting in 2498 the message exchange shown in Figure 4. Such behavior is needed for 2499 other reasons such as to correctly respond to retransmitted I1 2500 messages, which occur when the R2 message has been lost. 2502 Host A Host B 2504 IDLE IDLE 2505 -\ 2506 I1-SENT---\ 2507 ---\ /--- 2508 --- I1 ---\ /--- I1-SENT 2509 ---\ 2510 /--- I1 ---/ ---\ 2511 /--- --> 2512 <--- 2514 -\ 2515 I1-SENT---\ 2516 ---\ /--- 2517 --- R2 ---\ /--- I1-SENT 2518 ---\ 2519 /--- R2 ---/ ---\ 2520 /--- --> 2521 <--- ESTABLISHED 2522 ESTABLISHED 2524 Figure 4: Crossing I1 messages 2526 If a host has received an I1 and sent an R1, it has no state to 2527 remember this. Thus if the ULP on the host sends down packets, this 2528 might trigger the host to send an I1 message itself. Thus while one 2529 end is sending an I1 the other is sending an I2 as can be seen in 2530 Figure 5. 2532 Host A Host B 2534 IDLE IDLE 2535 -\ 2536 ---\ 2537 I1-SENT ---\ 2538 --- I1 ---\ 2539 ---\ 2540 ---\ 2541 --> 2543 /--- 2544 /--- IDLE 2545 --- 2546 /--- R1--/ 2547 /--- 2548 <--- 2550 -\ 2551 I2-SENT---\ 2552 ---\ /--- 2553 --- I2---\ /--- I1-SENT 2554 ---\ 2555 /--- I1 ---/ ---\ 2556 /--- --> 2557 <--- ESTABLISHED 2559 -\ 2560 I2-SENT---\ 2561 ---\ /--- 2562 --- R2 ---\ /--- 2563 ---\ 2564 /--- R2 ---/ ---\ 2565 /--- --> 2566 <--- ESTABLISHED 2567 ESTABLISHED 2569 Figure 5: Crossing I2 and I1 2571 7.5. Context recovery 2573 Due to garbage collection, we can end up with one end having and 2574 using the context state, and the other end not having any state. We 2575 need to be able to recover this state at the end that has lost it, 2576 before we can use it. 2578 This need can arise in the following cases: 2580 o The communication is working using the ULID pair as the locator 2581 pair, but a problem arises, and the end that has retained the 2582 context state decides to probe alternate locator pairs. 2584 o The communication is working using a locator pair that is not the 2585 ULID pair, hence the ULP packets sent from a peer that has 2586 retained the context state use the Shim6 Payload extension header. 2588 o The host that retained the state sends a control message (e.g. an 2589 Update Request message). 2591 In all the cases the result is that the peer without state receives a 2592 shim message for which it has no context for the context tag. 2594 In all of those cases we can recover the context by having the node 2595 which doesn't have a context state, send back an R1bis message, and 2596 have then complete the recovery with a I2bis and R2 message as can be 2597 seen in Figure 6. 2599 Host A Host B 2601 Context for 2602 CT(peer)=X Discards context for 2603 CT(local)=X 2605 ESTABLISHED IDLE 2607 ---- payload, probe, etc. -----> No context state 2608 for CT(local)=X 2610 <------------ R1bis ------------ 2611 IDLE 2613 ------------- I2bis -----------> 2614 I2BIS_SENT 2615 <------------ R2 --------------- 2616 ESTABLISHED ESTABLISHED 2618 Figure 6: Context loss at receiver 2620 If one end has garbage collected or lost the context state, it might 2621 try to create a new context state (for the same ULID pair), by 2622 sending an I1 message. The peer (that still has the context state) 2623 will reply with an R1 message and the full 4-way exchange will be 2624 performed again in this case as can be seen in Figure 7. 2626 Host A Host B 2628 Context for 2629 CT(peer)=X Discards context for 2630 ULIDs A1, B1 CT(local)=X 2632 ESTABLISHED IDLE 2634 Finds <------------ I1 --------------- Tries to setup 2635 existing for ULIDs A1, B1 2636 context, 2637 but CT(peer) I1-SENT 2638 doesn't match 2639 ------------- R1 ---------------> 2640 Left old context 2641 in ESTABLISHED 2643 <------------ I2 --------------- 2644 Recreate context 2646 with new CT(peer) I2-SENT 2647 and Ls(peer). 2649 ESTABLISHED 2650 ------------- R2 --------------> 2651 ESTABLISHED ESTABLISHED 2653 Figure 7: Context loss at sender 2655 7.6. Context confusion 2657 Since each end might garbage collect the context state we can have 2658 the case when one end has retained the context state and tries to use 2659 it, while the other end has lost the state. We discussed this in the 2660 previous section on recovery. But for the same reasons, when one 2661 host retains context tag X as CT(peer) for ULID pair , the 2662 other end might end up allocating that context tag as CT(local) for 2663 another ULID pair, e.g., between the same hosts. In this 2664 case we can not use the recovery mechanisms since there need to be 2665 separate context tags for the two ULID pairs. 2667 This type of "confusion" can be observed in two cases (assuming it is 2668 A that has retained the state and B has dropped it): 2670 o B decides to create a context for ULID pair , and 2671 allocates X as its context tag for this, and sends an I1 to A. 2673 o A decides to create a context for ULID pair , and starts 2674 the exchange by sending I1 to B. When B receives the I2 message, 2675 it allocates X as the context tag for this context. 2677 In both cases, A can detect that B has allocated X for ULID pair even though that A still X as CT(peer) for ULID pair . 2679 Thus A can detect that B must have lost the context for . 2681 The confusion can be detected when I2/I2bis/R2 is received since we 2682 require that those messages MUST include a sufficiently large set of 2683 locators in a Locator List option that the peer can determine whether 2684 or not two contexts have the same host as the peer by comparing if 2685 there is any common locators in Ls(peer). 2687 The requirement is that the old context which used the context tag 2688 MUST be removed; it can no longer be used to send packets. Thus A 2689 would forcibly remove the context state for , so that it 2690 can accept the new context for . An implementation MAY 2691 re-create a context to replace the one that was removed; in this case 2692 for . The normal I1, R1, I2, R2 establishment exchange would 2693 then pick unique context tags for that replacement context. This re- 2694 creation is OPTIONAL, but might be useful when there is ULP 2695 communication which is using the ULID pair whose context was removed. 2697 Note that an I1 message with a duplicate context tag should not cause 2698 the removal of the old context state; this operation needs to be 2699 deferred until the reception of the I2 message. 2701 7.7. Sending I1 messages 2703 When the shim layer decides to setup a context for a ULID pair, it 2704 starts by allocating and initializing the context state for its end. 2705 As part of this it assigns a random context tag to the context that 2706 is not being used as CT(local) by any other context . In the case 2707 that a new API is used and the ULP requests a forked context, the 2708 Forked Instance Identifier value will be set to a non-zero value. 2709 Otherwise, the FII value is zero. Then the initiator can send an I1 2710 message and set the context STATE to I1-SENT. The I1 message MUST 2711 include the ULID pair; normally in the IPv6 source and destination 2712 fields. But if the ULID pair for the context is not used as locator 2713 pair for the I1 message, then a ULID option MUST be included in the 2714 I1 message. In addition, if a Forked Instance Identifier value is 2715 non-zero, the I1 message MUST include a Context Instance Identifier 2716 option containing the correspondent value. 2718 7.8. Retransmitting I1 messages 2720 If the host does not receive an I2 or R2 message in response to the 2721 I1 message after I1_TIMEOUT time, then it needs to retransmit the I1 2722 message. The retransmissions should use a retransmission timer with 2723 binary exponential backoff to avoid creating congestion issues for 2724 the network when lots of hosts perform I1 retransmissions. Also, the 2725 actual timeout value should be randomized between 0.5 and 1.5 of the 2726 nominal value to avoid self-synchronization. 2728 If, after I1_RETRIES_MAX retransmissions, there is no response, then 2729 most likely the peer does not implement the Shim6 protocol, or there 2730 could be a firewall that blocks the protocol. In this case it makes 2731 sense for the host to remember to not try again to establish a 2732 context with that ULID. However, any such negative caching should 2733 retained for at most NO_R1_HOLDDOWN_TIME, to be able to later setup a 2734 context should the problem have been that the host was not reachable 2735 at all when the shim tried to establish the context. 2737 If the host receives an ICMP error with "Unrecognized Next Header" 2738 type (type 4, code 1) and the included packet is the I1 message it 2739 just sent, then this is a more reliable indication that the peer ULID 2740 does not implement Shim6. Again, in this case, the host should 2741 remember to not try again to establish a context with that ULID. 2742 Such negative caching should retained for at most ICMP_HOLDDOWN_TIME, 2743 which should be significantly longer than the previous case. 2745 7.9. Receiving I1 messages 2747 A host MUST silently discard any received I1 messages that do not 2748 satisfy all of the following validity checks in addition to those 2749 specified in Section 12.3: 2751 o The Hdr Ext Len field is at least 1, i.e., the length is at least 2752 16 octets. 2754 Upon the reception of an I1 message, the host extracts the ULID pair 2755 and the Forked Instance Identifier from the message. If there is no 2756 ULID-pair option, then the ULID pair is taken from the source and 2757 destination fields in the IPv6 header. If there is no FII option in 2758 the message, then the FII value is taken to be zero. 2760 Next the host looks for an existing context which matches the ULID 2761 pair and the FII. 2763 If no state is found (i.e., the STATE is IDLE), then the host replies 2764 with a R1 message as specified below. 2766 If such a context exists in ESTABLISHED STATE, the host verifies that 2767 the locator of the Initiator is included in Ls(peer) (This check is 2768 unnecessary if there is no ULID-pair option in the I1 message). 2770 If the state exists in ESTABLISHED STATE and the locators do not fall 2771 in the locator sets, then the host replies with a R1 message as 2772 specified below. This completes the I1 processing, with the context 2773 STATE being unchanged. 2775 If the state exists in ESTABLISHED STATE and the locators do fall in 2776 the sets, then the host compares CT(peer) for the context with the CT 2777 contained in the I1 message. 2779 o If the context tags match, then this probably means that the R2 2780 message was lost and this I1 is a retransmission. In this case, 2781 the host replies with a R2 message containing the information 2782 available for the existent context. 2784 o If the context tags do not match, then it probably means that the 2785 Initiator has lost the context information for this context and it 2786 is trying to establish a new one for the same ULID-pair. In this 2787 case, the host replies with a R1 message as specified below. This 2788 completes the I1 processing, with the context STATE being 2789 unchanged. 2791 If the state exists in other STATE (I1-SENT, I2-SENT, I2BIS-SENT), we 2792 are in the situation of Concurrent context establishment described in 2793 Section 7.4. In this case, the host leaves CT(peer) unchanged, and 2794 replies with a R2 message. This completes the I1 processing, with 2795 the context STATE being unchanged. 2797 7.10. Sending R1 messages 2799 When the host needs to send a R1 message in response to the I1 2800 message, it copies the Initiator Nonce from the I1 message to the R1 2801 message, generates a Responder Nonce and calculates a Responder 2802 Validator option as suggested in the following section. No state is 2803 created on the host in this case.(Note that the information used to 2804 generate the R1 reply message is either contained in the received I1 2805 message or it is global information that is not associated with the 2806 particular requested context (the S and the Responder nonce values)). 2808 When the host needs to send a R2 message in response to the I1 2809 message, it copies the Initiator Nonce from the I1 message to the R2 2810 message, and otherwise follows the normal rules for forming an R2 2811 message (see Section 7.14). 2813 7.10.1. Generating the R1 Validator 2815 As it is stated in Section 5.15.1, the Validator generation mechanism 2816 is a local choice since the validator is generated and verified by 2817 the same node i.e. the responder. However, in order to provide the 2818 required protection, the Validator needs to be generated fullflling 2819 the conditions described in Section 5.15.1. One way for the 2820 responder to properly generate validators is to maintain a single 2821 secret (S) and a running counter (C) for the Responder Nonce that is 2822 incremented in fixed periods of time (this allows the Responder to 2823 verify the age of a Responder Nonce, independently of the context in 2824 which it is used). 2826 When the validator is generated to be included in a R1 message, that 2827 is sent in respose to a specific I1 message, the responder can 2828 perform the following procedure to generate the validator value: 2830 First, the responder uses the current counter C value as the 2831 Responder Nonce. 2833 Second, it uses the following information (concatenated) as input to 2834 the one-way function: 2836 o The secret S 2838 o That Responder Nonce 2840 o The Initiator Context Tag from the I1 message 2842 o The ULIDs from the I1 message 2844 o The locators from the I1 message (strictly only needed if they are 2845 different from the ULIDs) 2847 o The forked instance identifier if such option was included in the 2848 I1 message 2850 Third, it uses the output of the hash function as the validator value 2851 included in the R1 message. 2853 7.11. Receiving R1 messages and sending I2 messages 2855 A host MUST silently discard any received R1 messages that do not 2856 satisfy all of the following validity checks in addition to those 2857 specified in Section 12.3: 2859 o The Hdr Ext Len field is at least 1, i.e., the length is at least 2860 16 octets. 2862 Upon the reception of an R1 message, the host extracts the Initiator 2863 Nonce and the Locator Pair from the message (the latter from the 2864 source and destination fields in the IPv6 header). Next the host 2865 looks for an existing context which matches the Initiator Nonce and 2866 where the locators are contained in Ls(peer) and Ls(local), 2867 respectively. If no such context is found, then the R1 message is 2868 silently discarded. 2870 If such a context is found, then the host looks at the STATE: 2872 o If the STATE is I1-SENT, then it sends an I2 message as specified 2873 below. 2875 o In any other STATE (I2-SENT, I2BIS-SENT, ESTABLISHED) then the 2876 host has already sent an I2 message then this is probably a reply 2877 to a retransmitted I1 message, so this R1 message MUST be silently 2878 discarded. 2880 When the host sends an I2 message, then it includes the Responder 2881 Validator option that was in the R1 message. The I2 message MUST 2882 include the ULID pair; normally in the IPv6 source and destination 2883 fields. If a ULID-pair option was included in the I1 message then it 2884 MUST be included in the I2 message as well. In addition, if the 2885 Forked Instance Identifier value for this context is non-zero, the I2 2886 message MUST contain a Forked Instance Identifier Option carrying 2887 this value. Besides, the I2 message contains an Initiator Nonce. 2888 This is not required to be the same than the one included in the 2889 previous I1 message. 2891 The I2 message may also include the Initiator's locator list. If 2892 this is the the case, then it must also include the CGA Parameter 2893 Data Structure. If CGA (and not HBA) is used to verify one or more 2894 of the locators included in the locator list, then Initiator must 2895 also include a CGA signature option containing the signature. 2897 When the I2 message has been sent, the STATE is set to I2-SENT. 2899 7.12. Retransmitting I2 messages 2901 If the initiator does not receive an R2 message after I2_TIMEOUT time 2902 after sending an I2 message it MAY retransmit the I2 message, using 2903 binary exponential backoff and randomized timers. The Responder 2904 Validator option might have a limited lifetime, that is, the peer 2905 might reject Responder Validator options that are older than 2906 VALIDATOR_MIN_LIFETIME to avoid replay attacks. In the case that the 2907 initiator decides not to retransmit I2 messages or in the case that 2908 the initiator still does not receive an R2 message after 2909 retransmitting I2 messages I2_RETRIES_MAX times, the initiator SHOULD 2910 fall back to retransmitting the I1 message. 2912 7.13. Receiving I2 messages 2914 A host MUST silently discard any received I2 messages that do not 2915 satisfy all of the following validity checks in addition to those 2916 specified in Section 12.3: 2918 o The Hdr Ext Len field is at least 2, i.e., the length is at least 2919 24 octets. 2921 Upon the reception of an I2 message, the host extracts the ULID pair 2922 and the Forked Instance identifier from the message. If there is no 2923 ULID-pair option, then the ULID pair is taken from the source and 2924 destination fields in the IPv6 header. If there is no FII option in 2925 the message, then the FII value is taken to be zero. 2927 Next the host verifies that the Responder Nonce is a recent one 2928 (Nonces that are no older than VALIDATOR_MIN_LIFETIME SHOULD be 2929 considered recent), and that the Responder Validator option matches 2930 the validator the host would have computed for the ULID, locators, 2931 responder nonce, initiator nonce and FII. 2933 If a CGA Parameter Data Structure (PDS) is included in the message, 2934 then the host MUST verify if the actual PDS contained in the message 2935 corresponds to the ULID(peer). 2937 If any of the above verifications fails, then the host silently 2938 discards the message and it has completed the I2 processing. 2940 If all the above verifications are successful, then the host proceeds 2941 to look for a context state for the Initiator. The host looks for a 2942 context with the extracted ULID pair and FII. If none exist then 2943 STATE of the (non-existing) context is viewed as being IDLE, thus the 2944 actions depend on the STATE as follows: 2946 o If the STATE is IDLE (i.e., the context does not exist) the host 2947 allocates a context tag (CT(local)), creates the context state for 2948 the context, and sets its STATE to ESTABLISHED. It records 2949 CT(peer), and the peer's locator set as well as its own locator 2950 set in the context. It SHOULD perform the HBA/CGA verification of 2951 the peer's locator set at this point in time, as specified in 2952 Section 7.2. Then the host sends an R2 message back as specified 2953 below. 2955 o If the STATE is I1-SENT, then the host verifies if the source 2956 locator is included in Ls(peer) or, it is included in the Locator 2957 List contained in the I2 message and the HBA/CGA verification for 2958 this specific locator is successful 2960 * If this is not the case, then the message is silently discarded 2961 and the context STATE remains unchanged. 2963 * If this is the case, then the host updates the context 2964 information (CT(peer), Ls(peer)) with the data contained in the 2965 I2 message and the host MUST send a R2 message back as 2966 specified below. Note that before updating Ls(peer) 2967 information, the host SHOULD perform the HBA/CGA validation of 2968 the peer's locator set at this point in time as specified in 2969 Section 7.2. The host moves to ESTABLISHED STATE. 2971 o If the STATE is ESTABLISHED, I2-SENT, or I2BIS-SENT, then the host 2972 verifies if the source locator is included in Ls(peer) or, it is 2973 included in the Locator List contained in the I2 message and the 2974 HBA/CGA verification for this specific locator is successful 2976 * If this is not the case, then the message is silently discarded 2977 and the context STATE remains unchanged. 2979 * If this is the case, then the host updates the context 2980 information (CT(peer), Ls(peer)) with the data contained in the 2981 I2 message and the host MUST send a R2 message back as 2982 specified in Section 7.14. Note that before updating Ls(peer) 2983 information, the host SHOULD perform the HBA/CGA validation of 2984 the peer's locator set at this point in time as specified in 2985 Section 7.2. The context STATE remains unchanged. 2987 7.14. Sending R2 messages 2989 Before the host sends the R2 message it MUST look for a possible 2990 context confusion i.e. where it would end up with multiple contexts 2991 using the same CT(peer) for the same peer host. See Section 7.15. 2993 When the host needs to send an R2 message, the host forms the message 2994 its context tag, copies the Initiator Nonce from the triggering 2995 message (I2, I2bis, or I1). In addition, it may include alternative 2996 locators and the the necessary options so that the peer can verify 2997 them. In particular, the R2 message may include the Responder's 2998 locator list and the PDS option. If CGA (and not HBA) is used to 2999 verify the locator list, then the Responder also signs the key parts 3000 of the message and includes a CGA Signature option containing the 3001 signature. 3003 R2 messages are never retransmitted. If the R2 message is lost, then 3004 the initiator will retransmit either the I2/I2bis or I1 message. 3005 Either retransmission will cause the responder to find the context 3006 state and respond with an R2 message. 3008 7.15. Match for Context Confusion 3010 When the host receives an I2, I2bis, or R2 it MUST look for a 3011 possible context confusion i.e. where it would end up with multiple 3012 contexts using the same CT(peer) for the same peer host. This can 3013 happen when it has received the above messages since they create a 3014 new context with a new CT(peer). Same issue applies when CT(peer) is 3015 updated for an existing context. 3017 The host takes CT(peer) for the newly created or updated context, and 3018 looks for other contexts which: 3020 o Are in STATE ESTABLISHED or I2BIS-SENT. 3022 o Have the same CT(peer). 3024 o Where Ls(peer) has at least one locator in common with the newly 3025 created or updated context. 3027 If such a context is found, then the host checks if the ULID pair or 3028 the Forked Instance Identifier different than the ones in the newly 3029 created or updated context: 3031 o If either or both are different, then the peer is reusing the 3032 context tag for the creation of a context with different ULID pair 3033 or FII, which is an indication that the peer has lost the original 3034 context. In this case, we are in the Context confusion situation, 3035 and the host MUST NOT use the old context to send any packets. It 3036 MAY just discard the old context (after all, the peer has 3037 discarded it), or it MAY attempt to re-establish the old context 3038 by sending a new I1 message and moving its STATE to I1-SENT. In 3039 any case, once that this situation is detected, the host MUST NOT 3040 keep two contexts with overlapping Ls(peer) locator sets and the 3041 same context tag in ESTABLISHED STATE, since this would result in 3042 demultiplexing problems on the peer. 3044 o If both are the same, then this context is actually the context 3045 that is created or updated, hence there is no confusion. 3047 7.16. Receiving R2 messages 3049 A host MUST silently discard any received R2 messages that do not 3050 satisfy all of the following validity checks in addition to those 3051 specified in Section 12.3: 3053 o The Hdr Ext Len field is at least 1, i.e., the length is at least 3054 16 octets. 3056 Upon the reception of an R2 message, the host extracts the Initiator 3057 Nonce and the Locator Pair from the message (the latter from the 3058 source and destination fields in the IPv6 header). Next the host 3059 looks for an existing context which matches the Initiator Nonce and 3060 where the locators are Lp(peer) and Lp(local), respectively. Based 3061 on the STATE: 3063 o If no such context is found, i.e., the STATE is IDLE, then the 3064 message is silently dropped. 3066 o If STATE is I1-SENT, I2-SENT, or I2BIS-SENT then the host performs 3067 the following actions: If a CGA Parameter Data Structure (PDS) is 3068 included in the message, then the host MUST verify that the actual 3069 PDS contained in the message corresponds to the ULID(peer) as 3070 specified in Section 7.2. If the verification fails, then the 3071 message is silently dropped. If the verification succeeds, then 3072 the host records the information from the R2 message in the 3073 context state; it records the peer's locator set and CT(peer). 3074 The host SHOULD perform the HBA/CGA verification of the peer's 3075 locator set at this point in time, as specified in Section 7.2. 3076 The host sets its STATE to ESTABLISHED. 3078 o If the STATE is ESTABLISHED, the R2 message is silently ignored, 3079 (since this is likely to be a reply to a retransmitted I2 3080 message). 3082 Before the host completes the R2 processing it MUST look for a 3083 possible context confusion i.e. where it would end up with multiple 3084 contexts using the same CT(peer) for the same peer host. See 3085 Section 7.15. 3087 7.17. Sending R1bis messages 3089 Upon the receipt of a Shim6 payload extension header where there is 3090 no current Shim6 context at the receiver, the receiver is to respond 3091 with an R1bis message in order to enable a fast re-establishment of 3092 the lost Shim6 context. 3094 Also a host is to respond with a R1bis upon receipt of any control 3095 messages that has a message type in the range 64-127 (i.e., excluding 3096 the context setup messages such as I1, R1, R1bis, I2, I2bis, R2 and 3097 future extensions), where the control message refers to a non 3098 existent context. 3100 We assume that all the incoming packets that trigger the generation 3101 of an R1bis message contain a locator pair (in the address fields of 3102 the IPv6 header) and a Context Tag. 3104 Upon reception of any of the packets described above, the host will 3105 reply with an R1bis including the following information: 3107 o The Responder Nonce is a number picked by the responder which the 3108 initiator will return in the I2bis message. 3110 o Packet Context Tag is the context tag contained in the received 3111 packet that triggered the generation of the R1bis message. 3113 o The Responder Validator option is included, with a validator that 3114 is computed as suggested in the next section. 3116 7.17.1. Generating the R1bis Validator 3118 One way for the responder to properly generate validators is to 3119 maintain a single secret (S) and a running counter C for the 3120 Responder Nonce that is incremented in fixed periods of time (this 3121 allows the Responder to verify the age of a Responder Nonce, 3122 independently of the context in which it is used). 3124 When the validator is generated to be included in a R1bis message, 3125 that is sent in respose to a specific controls packet or packet 3126 containing the Shim6 payload extension header message, the responder 3127 can perform the following procedure to generate the validator value: 3129 First, the responder uses the counter C value as the Responder Nonce. 3131 Second, it uses the following information (concatenated) as input to 3132 the one-way function: 3134 o The secret S 3136 o That Responder Nonce 3138 o The Receiver Context tag included in the received packet 3140 o The locators from the received packet 3142 Third, it uses the output of the hash function as the validator 3143 string. 3145 7.18. Receiving R1bis messages and sending I2bis messages 3147 A host MUST silently discard any received R1bis messages that do not 3148 satisfy all of the following validity checks in addition to those 3149 specified in Section 12.3: 3151 o The Hdr Ext Len field is at least 1, i.e., the length is at least 3152 16 octets. 3154 Upon the reception of an R1bis message, the host extracts the Packet 3155 Context Tag and the Locator Pair from the message (the latter from 3156 the source and destination fields in the IPv6 header). Next the host 3157 looks for an existing context where the Packet Context Tag matches 3158 CT(peer) and where the locators match Lp(peer) and Lp(local), 3159 respectively. 3161 o If no such context is not found, i.e., the STATE is IDLE, then the 3162 R1bis message is silently discarded. 3164 o If the STATE is I1-SENT, I2-SENT, or I2BIS-SENT, then the R1bis 3165 message is silently discarded. 3167 o If the STATE is ESTABLISHED, then we are in the case where the 3168 peer has lost the context and the goal is to try to re-establish 3169 it. For that, the host leaves CT(peer) unchanged in the context 3170 state, transitions to I2BIS-SENT STATE, and sends a I2bis message, 3171 including the computed Responder Validator option, the Packet 3172 Context Tag, and the Responder Nonce received in the R1bis 3173 message. This I2bis message is sent using the locator pair 3174 included in the R1bis message. In the case that this locator pair 3175 differs from the ULID pair defined for this context, then an ULID 3176 option MUST be included in the I2bis message. In addition, if the 3177 Forked Instance Identifier for this context is non-zero, then a 3178 Forked Instance Identifier option carrying the instance identifier 3179 value for this context MUST be included in the I2bis message. The 3180 I2bis message may also include a locator list. If this is the the 3181 case, then it must also include the CGA Parameter Data Structure. 3182 If CGA (and not HBA) is used to verify one or more of the locators 3183 included in the locator list, then Initiator must also include a 3184 CGA signature option containing the signature. 3186 7.19. Retransmitting I2bis messages 3188 If the initiator does not receive an R2 message after I2bis_TIMEOUT 3189 time after sending an I2bis message it MAY retransmit the I2bis 3190 message, using binary exponential backoff and randomized timers. The 3191 Responder Validator option might have a limited lifetime, that is, 3192 the peer might reject Responder Validator options that are older than 3193 VALIDATOR_MIN_LIFETIME to avoid replay attacks. In the case that the 3194 initiator decides not to retransmit I2bis messages or in the case 3195 that the initiator still does not receive an R2 message after 3196 retransmitting I2bis messages I2bis_RETRIES_MAX times, the initiator 3197 SHOULD fallback to retransmitting the I1 message. 3199 7.20. Receiving I2bis messages and sending R2 messages 3201 A host MUST silently discard any received I2bis messages that do not 3202 satisfy all of the following validity checks in addition to those 3203 specified in Section 12.3: 3205 o The Hdr Ext Len field is at least 3, i.e., the length is at least 3206 32 octets. 3208 Upon the reception of an I2bis message, the host extracts the ULID 3209 pair and the Forked Instance identifier from the message. If there 3210 is no ULID-pair option, then the ULID pair is taken from the source 3211 and destination fields in the IPv6 header. If there is no FII option 3212 in the message, then the FII value is taken to be zero. 3214 Next the host verifies that the Responder Nonce is a recent one 3215 (Nonces that are no older than VALIDATOR_MIN_LIFETIME SHOULD be 3216 considered recent), and that the Responder Validator option matches 3217 the validator the host would have computed for the locators, 3218 Responder Nonce, and Receiver Context tag as part of sending an R1bis 3219 message. 3221 If a CGA Parameter Data Structure (PDS) is included in the message, 3222 then the host MUST verify if the actual PDS contained in the message 3223 corresponds to the ULID(peer). 3225 If any of the above verifications fails, then the host silently 3226 discard the message and it has completed the I2bis processing. 3228 If both verifications are successful, then the host proceeds to look 3229 for a context state for the Initiator. The host looks for a context 3230 with the extracted ULID pair and FII. If none exist then STATE of 3231 the (non-existing) context is viewed as being IDLE, thus the actions 3232 depend on the STATE as follows: 3234 o If the STATE is IDLE (i.e., the context does not exist) the host 3235 allocates a context tag (CT(local)), creates the context state for 3236 the context, and sets its STATE to ESTABLISHED. The host SHOULD 3237 NOT use the Packet Context Tag in the I2bis message for CT(local); 3238 instead it should pick a new random context tag just as when it 3239 processes an I2 message. It records CT(peer), and the peer's 3240 locator set as well as its own locator set in the context. It 3241 SHOULD perform the HBA/CGA verification of the peer's locator set 3242 at this point in time as specified in Section 7.2. Then the host 3243 sends an R2 message back as specified in Section 7.14. 3245 o If the STATE is I1-SENT, then the host verifies if the source 3246 locator is included in Ls(peer) or, it is included in the Locator 3247 List contained in the I2 message and the HBA/CGA verification for 3248 this specific locator is successful 3250 * If this is not the case, then the message is silently 3251 discarded. The the context STATE remains unchanged. 3253 * If this is the case, then the host updates the context 3254 information (CT(peer), Ls(peer)) with the data contained in the 3255 I2 message and the host MUST send a R2 message back as 3256 specified below. Note that before updating Ls(peer) 3257 information, the host SHOULD perform the HBA/CGA validation of 3258 the peer's locator set at this point in time as specified in 3259 Section 7.2. The host moves to ESTABLISHED STATE. 3261 o If the STATE is ESTABLISHED, I2-SENT, or I2BIS-SENT, then the host 3262 whther at least one of the two following conditions hold: i) if 3263 the source locator is included in Ls(peer) or, ii) if the source 3264 locator is included in the Locator List contained in the I2 3265 message and the HBA/CGA verification for this specific locator is 3266 successful 3268 * If none of the two aforementioned conditions hold, then the 3269 message is silently discarded. The the context STATE remains 3270 unchanged. 3272 * If at least one of the two aforementioned conditions hold, then 3273 the host updates the context information (CT(peer), Ls(peer)) 3274 with the data contained in the I2 message and the host MUST 3275 send a R2 message back as specified in Section 7.14. Note that 3276 before updating Ls(peer) information, the host SHOULD perform 3277 the HBA/CGA validation of the peer's locator set at this point 3278 in time as specified in Section 7.2. The context STATE remains 3279 unchanged. 3281 8. Handling ICMP Error Messages 3283 The routers in the path as well as the destination might generate 3284 ICMP error messages. In some cases, the Shim6 can take action and 3285 solve the solve the problem that resulted in the error. In other 3286 cases, the Shim6 layer can not solve the problem and it is critical 3287 that these packets make it back up to the ULPs so that they can take 3288 appropriate action. 3290 This is an implementation issue in the sense that the mechanism is 3291 completely local to the host itself. But the issue of how ICMP 3292 errors are correctly dispatched to the ULP on the host are important, 3293 hence this section specifies the issue. 3295 All ICMP messages MUST be delivered to the ULP in all cases except 3296 when Shim6 successfully acts on the message (e.g. selects a new 3297 path). There SHOULD be a configuration option to unconditionally 3298 deliver all ICMP messages (including ones acted on by shim6) to the 3299 ULP. 3301 According to that recommendation, the following ICMP error messages 3302 should be processed by the Shim6 layer and not passed to the ULP: 3303 ICMP error Destination unreachable with codes 0 (No route to 3304 destination), 1 (Communication with destination administratively 3305 prohibited), 2 (Beyond scope of source address), 3 (Address 3306 unreachable), 5 (Source address failed ingress/egress policy), 6 3307 (Reject route to destination), ICMP Time exceeded error, ICMP 3308 Parameter problem error with the parameter that caused the error 3309 being a Shim6 parameter. 3311 The following ICMP error messages report problems that cannot be 3312 addressed by the Shim6 layer and that should be passed to the ULP (as 3313 described below): ICMP Packet too big error, ICMP Destination 3314 Unreachable with Code 4 (Port unreachable) ICMP Parameter problem (if 3315 the parameter that caused the problem is not a Shim6 parameter). 3317 +--------------+ 3318 | IPv6 Header | 3319 | | 3320 +--------------+ 3321 | ICMPv6 | 3322 | Header | 3323 - - +--------------+ - - 3324 | IPv6 Header | 3325 | src, dst as | Can be dispatched 3326 IPv6 | sent by ULP | unmodified to ULP 3327 | on host | ICMP error handler 3328 Packet +--------------+ 3329 | ULP | 3330 in | Header | 3331 +--------------+ 3332 Error | | 3333 ~ Data ~ 3334 | | 3335 - - +--------------+ - - 3337 Figure 8: ICMP error handling without payload extension header 3339 When the ULP packets are sent without the payload extension header, 3340 that is, while the initial locators=ULIDs are working, this 3341 introduces no new concerns; an implementation's existing mechanism 3342 for delivering these errors to the ULP will work. See Figure 8. 3344 But when the shim on the transmitting side inserts the payload 3345 extension header and replaces the ULIDs in the IP address fields with 3346 some other locators, then an ICMP error coming back will have a 3347 "packet in error" which is not a packet that the ULP sent. Thus the 3348 implementation will have to apply the reverse mapping to the "packet 3349 in error" before passing the ICMP error up to the ULP, including the 3350 ICMP extensions defined in [24]. See Figure 9. 3352 +--------------+ 3353 | IPv6 Header | 3354 | | 3355 +--------------+ 3356 | ICMPv6 | 3357 | Header | 3358 - - +--------------+ - - 3359 | IPv6 Header | 3360 | src, dst as | Needs to be 3361 IPv6 | modified by | transformed to 3362 | shim on host | have ULIDs 3363 +--------------+ in src, dst fields, 3364 Packet | Shim6 ext. | and Shim6 ext. 3365 | Header | header removed 3366 in +--------------+ before it can be 3367 | Transport | dispatched to the ULP 3368 Error | Header | ICMP error handler. 3369 +--------------+ 3370 | | 3371 ~ Data ~ 3372 | | 3373 - - +--------------+ - - 3375 Figure 9: ICMP error handling with payload extension header 3377 Note that this mapping is different than when receiving packets from 3378 the peer with a payload extension headers, because in that case the 3379 packets contain CT(local). But the ICMP errors have a "packet in 3380 error" with an payload extension header containing CT(peer). This is 3381 because they were intended to be received by the peer. In any case, 3382 since the has to be 3383 unique when received by the peer, the local host should also only be 3384 able to find one context that matches this tuple. 3386 If the ICMP error is a Packet Too Big, the reported MTU must be 3387 adjusted to be 8 octets less, since the shim will add 8 octets when 3388 sending packets. 3390 After the "packet in error" has had the original ULIDs inserted, then 3391 this payload extension header can be removed. The result is a 3392 "packet in error" that is passed to the ULP which looks as if the 3393 shim did not exist. 3395 9. Teardown of the ULID-Pair Context 3397 Each host can unilaterally decide when to tear down a ULID-pair 3398 context. It is RECOMMENDED that hosts do not tear down the context 3399 when they know that there is some upper layer protocol that might use 3400 the context. For example, an implementation might know this if there 3401 is an open socket which is connected to the ULID(peer). However, 3402 there might be cases when the knowledge is not readily available to 3403 the shim layer, for instance for UDP applications which do not 3404 connect their sockets, or any application which retains some higher 3405 level state across (TCP) connections and UDP packets. 3407 Thus it is RECOMMENDED that implementations minimize premature 3408 teardown by observing the amount of traffic that is sent and received 3409 using the context, and only after it appears quiescent, tear down the 3410 state. A reasonable approach would be not to tear down a context 3411 until at least 5 minutes have passed since the last message was sent 3412 or received using the context. (Note that packets that use the ULID 3413 pair as locator pair and that do not require address rewriting by the 3414 Shim6 layer are also considered as packets using the associated Shim6 3415 context) 3417 Since there is no explicit, coordinated removal of the context state, 3418 there are potential issues around context tag reuse. One end might 3419 remove the state, and potentially reuse that context tag for some 3420 other communication, and the peer might later try to use the old 3421 context (which it didn't remove). The protocol has mechanisms to 3422 recover from this, which work whether the state removal was total and 3423 accidental (e.g., crash and reboot of the host), or just a garbage 3424 collection of shim state that didn't seem to be used. However, the 3425 host should try to minimize the reuse of context tags by trying to 3426 randomly cycle through the 2^47 context tag values. (See Section 21 3427 for a summary how the recovery works in the different cases.) 3429 10. Updating the Peer 3431 The Update Request and Acknowledgement are used both to update the 3432 list of locators (only possible when CGA is used to verify the 3433 locator(s)), as well as updating the preferences associated with each 3434 locator. 3436 10.1. Sending Update Request messages 3438 When a host has a change in the locator set, then it can communicate 3439 this to the peer by sending an Update Request. When a host has a 3440 change in the preferences for its locator set, it can also 3441 communicate this to the peer. The Update Request message can include 3442 just a Locator List option, to convey the new set of locators, just a 3443 Locator Preferences option, or both a new Locator List and new 3444 Locator Preferences. 3446 Should the host send a new Locator List, the host picks a new random 3447 local generation number, records this in the context, and puts it in 3448 the Locator List option. Any Locator Preference option, whether send 3449 in the same Update Request or in some future Update Request, will use 3450 that generation number to make sure the preferences get applied to 3451 the correct version of the locator list. 3453 The host picks a random Request Nonce for each update, and keeps the 3454 same nonce for any retransmissions of the Update Request. The nonce 3455 is used to match the acknowledgement with the request. 3457 The UPDATE message can also include a CGA Parameter Data Structure 3458 (this is needed if the CGA PDS was not previously exchanged,). If 3459 CGA (and not HBA) is used to verify one or more of the locators 3460 included in the locator list, then a CGA signature option containing 3461 the signature must also be included in the UPDATE message. 3463 10.2. Retransmitting Update Request messages 3465 If the host does not receive an Update Acknowledgement R2 message in 3466 response to the Update Request message after UPDATE_TIMEOUT time, 3467 then it needs to retransmit the Update Request message. The 3468 retransmissions should use a retransmission timer with binary 3469 exponential backoff to avoid creating congestion issues for the 3470 network when lots of hosts perform Update Request retransmissions. 3471 Also, the actual timeout value should be randomized between 0.5 and 3472 1.5 of the nominal value to avoid self-synchronization. 3474 Should there be no response, the retransmissions continue forever. 3475 The binary exponential backoff stops at MAX_UPDATE_TIMEOUT. But the 3476 only way the retransmissions would stop when there is no 3477 acknowledgement, is when the shim, through the Probe protocol or some 3478 other mechanism, decides to discard the context state due to lack of 3479 ULP usage in combination with no responses to the Probes. 3481 10.3. Newer Information While Retransmitting 3483 There can be at most one outstanding Update Request message at any 3484 time. Thus until e.g. an update with a new Locator List has been 3485 acknowledged, any even newer Locator List or new Locator Preferences 3486 can not just be sent. However, when there is newer information and 3487 the older information has not yet been acknowledged, the host can 3488 instead of waiting for an acknowledgement, abandon the previous 3489 update and construct a new Update Request (with a new Request Nonce) 3490 which includes the new information as well as the information that 3491 hadn't yet been acknowledged. 3493 For example, if the original locator list was just (A1, A2), and if 3494 an Update Request with the Locator List (A1, A3) is outstanding, and 3495 the host determines that it should both add A4 to the locator list, 3496 and mark A1 as BROKEN, then it would need to: 3498 o Pick a new random Request Nonce for the new Update Request. 3500 o Pick a new random Generation number for the new locator list. 3502 o Form the new locator list - (A1, A3, A4) 3504 o Form a Locator Preference option which uses the new generation 3505 number and has the BROKEN flag for the first locator. 3507 o Send the Update Request and start a retransmission timer. 3509 Any Update Acknowledgement which doesn't match the current request 3510 nonce, for instance an acknowledgement for the abandoned Update 3511 Request, will be silently ignored. 3513 10.4. Receiving Update Request messages 3515 A host MUST silently discard any received Update Request messages 3516 that do not satisfy all of the following validity checks in addition 3517 to those specified in Section 12.3: 3519 o The Hdr Ext Len field is at least 1, i.e., the length is at least 3520 16 octets. 3522 Upon the reception of an Update Request message, the host extracts 3523 the Context Tag from the message. It then looks for a context which 3524 has a CT(local) that matches the context tag. If no such context is 3525 found, it sends a R1bis message as specified in Section 7.17. 3527 Since context tags can be reused, the host MUST verify that the IPv6 3528 source address field is part of Ls(peer) and that the IPv6 3529 destination address field is part of Ls(local). If this is not the 3530 case, the sender of the Update Request has a stale context which 3531 happens to match the CT(local) for this context. In this case the 3532 host MUST send a R1bis message, and otherwise ignore the Update 3533 Request message. 3535 If a CGA Parameter Data Structure (PDS) is included in the message, 3536 then the host MUST verify if the actual PDS contained in the packet 3537 corresponds to the ULID(peer). If this verification fails, the 3538 message is silently discarded. 3540 Then, depending on the STATE of the context: 3542 o If ESTABLISHED: Proceed to process message. 3544 o If I1-SENT, discard the message and stay in I1-SENT. 3546 o If I2-SENT, then send I2 and proceed to process the message. 3548 o If I2BIS-SENT, then send I2bis and proceed to process the message. 3550 The verification issues for the locators carried in the Locator 3551 Update message are specified in Section 7.2. If the locator list can 3552 not be verified, this procedure should send a Shim6 Error message 3553 with Error Code=2. In any case, if it can not be verified, there is 3554 no further processing of the Update Request. 3556 Once any Locator List option in the Update Request has been verified, 3557 the peer generation number in the context is updated to be the one in 3558 the Locator List option. 3560 If the Update message contains a Locator Preference option, then the 3561 Generation number in the preference option is compared with the peer 3562 generation number in the context. If they do not match, then the 3563 host generates a Shim6 Error Message with Error Code=3 with the 3564 Pointer field referring to the first octet in the Generation number 3565 in the Locator Preference option. In addition, if the number of 3566 elements in the Locator Preference option does not match the number 3567 of locators in Ls(peer), then a Shim6 Error Message with Error Code=4 3568 is sent with the Pointer referring to the first octet of the Length 3569 field in the Locator Preference option. In both cases of failures, 3570 no further processing is performed for the Locator Update message. 3572 If the generation number matches, the locator preferences are 3573 recorded in the context. 3575 Once the Locator List option (if present) has been verified and any 3576 new locator list or locator preferences have been recorded, the host 3577 sends an Update Acknowledgement message, copying the nonce from the 3578 request, and using the CT(peer) in as the Receiver Context Tag. 3580 Any new locators, or more likely new locator preferences, might 3581 result in the host wanting to select a different locator pair for the 3582 context. For instance, if the Locator Preferences lists the current 3583 Lp(peer) as BROKEN. The host uses the reachability exploration 3584 procedure described in [4] to verify that the new locator is 3585 reachable before changing Lp(peer). 3587 10.5. Receiving Update Acknowledgement messages 3589 A host MUST silently discard any received Update Acknowledgement 3590 messages that do not satisfy all of the following validity checks in 3591 addition to those specified in Section 12.3: 3593 o The Hdr Ext Len field is at least 1, i.e., the length is at least 3594 16 octets. 3596 Upon the reception of an Update Acknowledgement message, the host 3597 extracts the Context Tag and the Request Nonce from the message. It 3598 then looks for a context which has a CT(local) that matches the 3599 context tag. If no such context is found, it sends a R1bis message 3600 as specified in Section 7.17. 3602 Since context tags can be reused, the host MUST verify that the IPv6 3603 source address field is part of Ls(peer) and that the IPv6 3604 destination address field is part of Ls(local). If this is not the 3605 case, the sender of the Update Acknowledgement has a stale context 3606 which happens to match the CT(local) for this context. In this case 3607 the host MUST send a R1bis message, and otherwise ignore the Update 3608 Acknowledgement message. 3610 Then, depending on the STATE of the context: 3612 o If ESTABLISHED: Proceed to process message. 3614 o If I1-SENT, discard the message and stay in I1-SENT. 3616 o If I2-SENT, then send R2 and proceed to process the message. 3618 o If I2BIS-SENT, then send R2 and proceed to process the message. 3620 If the Request Nonce doesn't match the Nonce for the last sent Update 3621 Request for the context, then the Update Acknowledgement is silently 3622 ignored. If the nonce matches, then the update has been completed 3623 and the Update retransmit timer can be reset. 3625 11. Sending ULP Payloads 3627 When there is no context state for the ULID pair on the sender, there 3628 is no effect on how ULP packets are sent. If the host is using some 3629 heuristic for determining when to perform a deferred context 3630 establishment, then the host might need to do some accounting (count 3631 the number of packets sent and received) even before there is a ULID- 3632 pair context. 3634 If the context is not in ESTABLISHED or I2BIS-SENT STATE, then it 3635 there is also no effect on how the ULP packets are sent. Only in the 3636 ESTABLISHED and I2BIS-SENT STATES does the host have CT(peer) and 3637 Ls(peer) set. 3639 If there is a ULID-pair context for the ULID pair, then the sender 3640 needs to verify whether context uses the ULIDs as locators, that is, 3641 whether Lp(peer) == ULID(peer) and Lp(local) == ULID(local). 3643 If this is the case, then packets can be sent unmodified by the shim. 3644 If it is not the case, then the logic in Section 11.1 will need to be 3645 used. 3647 There will also be some maintenance activity relating to 3648 (un)reachability detection, whether packets are sent with the 3649 original locators or not. The details of this is out of scope for 3650 this document and is specified in [4]. 3652 11.1. Sending ULP Payload after a Switch 3654 When sending packets, if there is a ULID-pair context for the ULID 3655 pair, and the ULID pair is no longer used as the locator pair, then 3656 the sender needs to transform the packet. Apart from replacing the 3657 IPv6 source and destination fields with a locator pair, an 8-octet 3658 header is added so that the receiver can find the context and inverse 3659 the transformation. 3661 If there has been a failure causing a switch, and later the context 3662 switches back to sending things using the ULID pair as the locator 3663 pair, then there is no longer a need to do any packet transformation 3664 by the sender, hence there is no need to include the 8-octet 3665 extension header. 3667 First, the IP address fields are replaced. The IPv6 source address 3668 field is set to Lp(local) and the destination address field is set to 3669 Lp(peer). NOTE that this MUST NOT cause any recalculation of the ULP 3670 checksums, since the ULP checksums are carried end-to-end and the ULP 3671 pseudo-header contains the ULIDs which are preserved end-to-end. 3673 The sender skips any "routing sub-layer extension headers" that the 3674 ULP might have included, thus it skips any hop-by-hop extension 3675 header, any routing header, and any destination options header that 3676 is followed by a routing header. After any such headers the Shim6 3677 extension header will be added. This might be before a Fragment 3678 header, a Destination Options header, an ESP or AH header, or a ULP 3679 header. 3681 The inserted Shim6 Payload extension header includes the peer's 3682 context tag. It takes on the next header value from the preceding 3683 extension header, since that extension header will have a next header 3684 value of Shim6. 3686 12. Receiving Packets 3688 The receive side of the communication can receive packets associated 3689 to a Shim6 context with or without the Shim6 extension header. In 3690 case that the ULID pair is being used as locator pair, the packets 3691 received will not have the Shim6 extension header and will be 3692 processed by the Shim6 layer as described below. If the received 3693 packet does carry the Shim6 extension header, as in normal IPv6 3694 receive side packet processing the receiver parses the (extension) 3695 headers in order. Should it find a Shim6 extension header it will 3696 look at the "P" field in that header. If this bit is zero, then the 3697 packet must be passed to the Shim6 payload handling for rewriting. 3698 Otherwise, the packet is passed to the Shim6 control handling. 3700 12.1. Receiving payload without extension headers 3702 The receiver extracts the IPv6 source and destination fields, and 3703 uses this to find a ULID-pair context, such that the IPv6 address 3704 fields match the ULID(local) and ULID(peer). If such a context is 3705 found, the context appears not to be quiescent and this should be 3706 remembered in order to avoid tearing down the context and for 3707 reachability detection purposes as described in [4]. The host 3708 continues with the normal processing of the IP packet. 3710 12.2. Receiving Payload Extension Headers 3712 The receiver extracts the context tag from the payload extension 3713 header, and uses this to find a ULID-pair context. If no context is 3714 found, the receiver SHOULD generate a R1bis message (see 3715 Section 7.17). 3717 Then, depending on the STATE of the context: 3719 o If ESTABLISHED: Proceed to process message. 3721 o If I1-SENT, discard the message and stay in I1-SENT. 3723 o If I2-SENT, then send I2 and proceed to process the message. 3725 o If I2BIS-SENT, then send I2bis and proceed to process the message. 3727 With the context in hand, the receiver can now replace the IP address 3728 fields with the ULIDs kept in the context. Finally, the Payload 3729 extension header is removed from the packet (so that the ULP doesn't 3730 get confused by it), and the next header value in the preceding 3731 header is set to be the actual protocol number for the payload. Then 3732 the packet can be passed to the protocol identified by the next 3733 header value (which might be some function associated with the IP 3734 endpoint sublayer, or a ULP). 3736 If the host is using some heuristic for determining when to perform a 3737 deferred context establishment, then the host might need to do some 3738 accounting (count the number of packets sent and received) for 3739 packets that does not have a Shim6 extension header and for which 3740 there is no context. But the need for this depends on what 3741 heuristics the implementation has chosen. 3743 12.3. Receiving Shim Control messages 3745 A shim control message has the checksum field verified. The Shim 3746 header length field is also verified against the length of the IPv6 3747 packet to make sure that the shim message doesn't claim to end past 3748 the end of the IPv6 packet. Finally, it checks that the neither the 3749 IPv6 destination field nor the IPv6 source field is a multicast 3750 address nor the unspecified address. If any of those checks fail, 3751 the packet is silently dropped. 3753 The message is then dispatched based on the shim message type. Each 3754 message type is then processed as described elsewhere in this 3755 document. If the packet contains a shim message type which is 3756 unknown to the receiver, then a Shim6 Error Message with Error Code=0 3757 is generated and sent back. The Pointer field is set to point at the 3758 first octet of the shim message type. 3760 All the control messages can contain any options with C=0. If there 3761 is any option in the message with C=1 that isn't known to the host, 3762 then the host MUST send a Shim6 Error Message with Error Code=1, with 3763 the Pointer field referencing the first octet of the Option Type. 3765 12.4. Context Lookup 3767 We assume that each shim context has its own STATE machine. We 3768 assume that a dispatcher delivers incoming packets to the STATE 3769 machine that it belongs to. Here we describe the rules used for the 3770 dispatcher to deliver packets to the correct shim context STATE 3771 machine. 3773 There is one STATE machine per context identified that is 3774 conceptually identified by ULID pair and Forked Instance Identifier 3775 (which is zero by default), or identified by CT(local). However, the 3776 detailed lookup rules are more complex, especially during context 3777 establishment. 3779 Clearly, if the required context is not established, it will be in 3780 IDLE STATE. 3782 During context establishment, the context is identified as follows: 3784 o I1 packets: Deliver to the context associated with the ULID pair 3785 and the Forked Instance Identifier. 3787 o I2 packets: Deliver to the context associated with the ULID pair 3788 and the Forked Instance Identifier. 3790 o R1 packets: Deliver to the context with the locator pair included 3791 in the packet and the Initiator nonce included in the packet (R1 3792 does not contain ULID pair nor the CT(local)). If no context 3793 exist with this locator pair and Initiator nonce, then silently 3794 discard. 3796 o R2 packets: Deliver to the context with the locator pair included 3797 in the packet and the Initiator nonce included in the packet (R2 3798 does not contain ULID pair nor the CT(local)). If no context 3799 exists with this locator pair and INIT nonce, then silently 3800 discard. 3802 o R1bis packet: deliver to the context that has the locator pair and 3803 the CT(peer) equal to the Packet Context Tag included in the R1bis 3804 packet. 3806 o I2bis packets: Deliver to the context associated with the ULID 3807 pair and the Forked Instance Identifier. 3809 o Payload extension headers: Deliver to the context with CT(local) 3810 equal to the Receiver Context Tag included in the packet. 3812 o Other control messages (Update, Keepalive, Probe): Deliver to the 3813 context with CT(local) equal to the Receiver Context Tag included 3814 in the packet. Verify that the IPv6 source address field is part 3815 of Ls(peer) and that the IPv6 destination address field is part of 3816 Ls(local). If not, send a R1bis message. 3818 o Shim6 Error Messages and ICMP errors which contain a Shim6 payload 3819 extension header or other shim control packet in the "packet in 3820 error": Use the "packet in error" for dispatching as follows. 3821 Deliver to the context with CT(peer) equal to the Receiver Context 3822 Tag, Lp(local) being the IPv6 source address, and Lp(peer) being 3823 the IPv6 destination address. 3825 In addition, the shim on the sending side needs to be able to find 3826 the context state when a ULP packet is passed down from the ULP. In 3827 that case the lookup key is the pair of ULIDs and FII=0. If we have 3828 a ULP API that allows the ULP to do context forking, then presumably 3829 the ULP would pass down the Forked Instance Identifier. 3831 13. Initial Contact 3833 The initial contact is some non-shim communication between two ULIDs, 3834 as described in Section 2. At that point in time there is no 3835 activity in the shim. 3837 Whether the shim ends up being used or not (e.g., the peer might not 3838 support Shim6) it is highly desirable that the initial contact can be 3839 established even if there is a failure for one or more IP addresses. 3841 The approach taken is to rely on the applications and the transport 3842 protocols to retry with different source and destination addresses, 3843 consistent with what is already specified in Default Address 3844 Selection [7], and some fixes to that specification [8] to make it 3845 try different source addresses and not only different destination 3846 addresses. 3848 The implementation of such an approach can potentially result in long 3849 timeouts. For instance, a naive implementation at the socket API 3850 which uses getaddrinfo() to retrieve all destination addresses and 3851 then tries to bind() and connect() to try all source and destination 3852 address combinations waiting for TCP to time out for each combination 3853 before trying the next one. 3855 However, if implementations encapsulate this in some new connect-by- 3856 name() API, and use non-blocking connect calls, it is possible to 3857 cycle through the available combinations in a more rapid manner until 3858 a working source and destination pair is found. Thus the issues in 3859 this domain are issues of implementations and the current socket API, 3860 and not issues of protocol specification. In all honesty, while 3861 providing an easy to use connect-by-name() API for TCP and other 3862 connection-oriented transports is easy; providing a similar 3863 capability at the API for UDP is hard due to the protocol itself not 3864 providing any "success" feedback. But even the UDP issue is one of 3865 APIs and implementation. 3867 14. Protocol constants 3869 The protocol uses the following constants: 3871 I1_RETRIES_MAX = 4 3873 I1_TIMEOUT = 4 seconds 3875 NO_R1_HOLDDOWN_TIME = 1 min 3877 ICMP_HOLDDOWN_TIME = 10 min 3879 I2_TIMEOUT = 4 seconds 3881 I2_RETRIES_MAX = 2 3883 I2bis_TIMEOUT = 4 seconds 3885 I2bis_RETRIES_MAX = 2 3887 VALIDATOR_MIN_LIFETIME = 30 seconds 3889 UPDATE_TIMEOUT = 4 seconds 3891 MAX_UPDATE_TIMEOUT = 120 seconds 3893 The retransmit timers (I1_TIMEOUT, I2_TIMEOUT, UPDATE_TIMEOUT) are 3894 subject to binary exponential backoff, as well as randomization 3895 across a range of 0.5 and 1.5 times the nominal (backed off) value. 3896 This removes any risk of synchronization between lots of hosts 3897 performing independent shim operations at the same time. 3899 The randomization is applied after the binary exponential backoff. 3900 Thus the first retransmission would happen based on a uniformly 3901 distributed random number in the range [0.5*4, 1.5*4] seconds, the 3902 second retransmission [0.5*8, 1.5*8] seconds after the first one, 3903 etc. 3905 15. Implications Elsewhere 3907 15.1. Congestion Control Considerations 3909 When the locator pair currently used for exchanging packets in a 3910 Shim6 context becomes unreachable, the Shim6 layer will divert the 3911 communication through an alternative locator pair, which in most 3912 cases will result in redirecting the packet flow through an 3913 alternative network path. In this case, it recommended that the 3914 Shim6 follows the recommendation defined in [20] and it informs the 3915 upper layers about the path change, in order to allow the congestion 3916 control mechanisms of the upper layers to react accordingly. 3918 15.2. Middle-boxes considerations 3920 Data packets belonging to a Shim6 context carrying the Shim6 Payload 3921 Header contain alternative locators other than the ULIDs in the 3922 source and destination address fields of the IPv6 header. On the 3923 other hand, the upper layers of the peers involved in the 3924 communication operate on the ULID pair presented by the Shim6 layer 3925 to them, rather on the locator pair contained in the IPv6 header of 3926 the actual packets. It should be noted that the Shim6 layer does not 3927 modify the data packets, but because a constant ULID pair is 3928 presented to upper layers irrespective of the locator pair changes, 3929 the relation between the upper layer header (such as TCP, UDP, ICMP, 3930 ESP, etc) and the IPv6 header is modified. In particular, when the 3931 Shim6 Extension header is present in the packet, if those data 3932 packets are TCP, UDP or ICMP packets, the pseudoheader used for the 3933 checksum calculation will contain the ULID pair, rather than the 3934 locator pair contained in the data packet. 3936 It is possible that some firewalls or other middle boxes try to 3937 verify the validity of upper layer sanity checks of the packet on the 3938 fly. If they do that based on the actual source and destination 3939 addresses contained in the IPv6 header without considering the Shim6 3940 context information (in particular without replacing the locator pair 3941 by the ULID pair used by the Shim6 context) such verifications may 3942 fail. Those middle-boxes need to be updated in order to be able to 3943 parse the Shim6 payload header and find the next header header after 3944 that. It is recommended that firewalls and other middle-boxes do not 3945 drop packets that carry the Shim6 Payload header with apparently 3946 incorrect upper layer validity checks that involve the addresses in 3947 the IPv6 header for their computation, unless they are able to 3948 determine the ULID pair of the Shim6 context associated to the data 3949 packet and use the ULID pair for the verification of the validity 3950 check. 3952 In the particular case of TCP, UDP and ICMP checksums, it is 3953 recommended that firewalls and other middle-boxes do not drop TCP, 3954 UDP and ICMP packets that carry the Shim6 Payload header with 3955 apparently incorrect checksums when using the addresses in the IPv6 3956 header for the pseudoheader computation, unless they implement are 3957 able to determine the ULID pair of the Shim6 context associated to 3958 the data packet and use the ULID pair to determine the checksum that 3959 must be present in a packet with addresses rewritten by Shim6. 3961 In addition, firewalls that today pass limited traffic, e.g., 3962 outbound TCP connections, would presumably block the Shim6 protocol. 3963 This means that even when Shim6 capable hosts are communicating, the 3964 I1 messages would be dropped, hence the hosts would not discover that 3965 their peer is Shim6 capable. This is in fact a feature, since if the 3966 hosts managed to establish a ULID-pair context, then the firewall 3967 would probably drop the "different" packets that are sent after a 3968 failure (those using the Shim6 payload extension header with a TCP 3969 packet inside it). Thus stateful firewalls that are modified to pass 3970 Shim6 messages should also be modified to pass the payload extension 3971 header, so that the shim can use the alternate locators to recover 3972 from failures. This presumably implies that the firewall needs to 3973 track the set of locators in use by looking at the Shim6 control 3974 exchanges. Such firewalls might even want to verify the locators 3975 using the HBA/CGA verification themselves, which they can do without 3976 modifying any of the Shim6 packets they pass through. 3978 15.3. Operation and Management Considerations 3980 This section considers some aspects related to the operations and 3981 management of the Shim6 protocol. 3983 Deployment of th Shim6 protocol: The Shim6 protocol is a host based 3984 solution, so, in order to be deployed, the stacks of the hosts using 3985 the Shim6 protocol need to be updated to support it. This enables an 3986 incremental deployment of the protocol, since it does not requires a 3987 flag day for the deployment, just single host updates. If the Shim6 3988 solution will be deployed in a site, host can be gradually updated to 3989 support the solution. Moreover, for supporting the Shim6 protocol, 3990 only end hosts need to be updated and no router changes are required. 3991 However, it should be noted that in order to benefit from the Shim6 3992 protocol, both ends of a communication should support the protocol, 3993 meaning that both hosts must be updated to be able to use the Shim6 3994 protocol. Nevertheless, the Shim6 protocol uses a deferred context 3995 setup capability, that allows to establish normal IPv6 communications 3996 and later on, if both endpoints are Shim6-capable, protect the 3997 communication with the Shim6 protocol. This has an important 3998 deployment benefit, since Shim6 enabled nodes can perfectly talk to 3999 non-Shim6 capable nodes wihtout introducing any problem in the 4000 communication. 4002 Configuration of Shim6-capable nodes: The Shim6 protocol itself does 4003 not requires any spcific configuration to provide its basic features. 4004 The Shim6 protocol is designed to provide a default service to upper 4005 layers that should satisfy general applications. Th Shim6 layer 4006 would automatically attempt to protect long lived communications, by 4007 triggering the establishment of the Shim6 context using some 4008 predefined heuristics. Of course, if some special tunning is 4009 required by some applications, this may required additional 4010 configuration. Similar considerations apply to a site attempting to 4011 perform some forms of traffic engineering using different preferences 4012 for different locators. 4014 Address and prefix configuration: The Shim6 protocol assumes that in 4015 a multihomed site multiple prefixes will be available. Such 4016 configuration can increase the operation work in a network. However, 4017 it should be noted that the capability of having multiupl prefixes in 4018 a site and multiple addresses assigned to an interface is an IPv6 4019 capability that goes beyond the Shim6 case and it is expected to be 4020 widely used. So, even though this is the case for Shim6, we consider 4021 that the implications of such a configuration is beyond the 4022 particular case of Shim6 and must be addressed for the generic IPv6 4023 case. Nevertheless, Shim6 also assumes the usage of CGA/HBA 4024 addresses by Shim6 hosts. this implies that Shim6 capable hosts 4025 should configure addresses using HBA/CGA generation mechanims. 4026 Additional consideration about this issue can be found at [18] 4028 15.4. Other considerations 4030 The general Shim6 approach, as well as the specifics of this proposed 4031 solution, has implications elsewhere, including: 4033 o Applications that perform referrals, or callbacks using IP 4034 addresses as the 'identifiers' can still function in limited ways, 4035 as described in [17]. But in order for such applications to be 4036 able to take advantage of the multiple locators for redundancy, 4037 the applications need to be modified to either use fully qualified 4038 domain names as the 'identifiers', or they need to pass all the 4039 locators as the 'identifiers' i.e., the 'identifier' from the 4040 applications perspective becomes a set of IP addresses instead of 4041 a single IP address. 4043 o Signaling protocols for QoS or other things that involve having 4044 devices in the network path look at IP addresses and port numbers, 4045 or IP addresses and Flow Labels, need to be invoked on the hosts 4046 when the locator pair changes due to a failure. At that point in 4047 time those protocols need to inform the devices that a new pair of 4048 IP addresses will be used for the flow. Note that this is the 4049 case even though this protocol, unlike some earlier proposals, 4050 does not overload the flow label as a context tag; the in-path 4051 devices need to know about the use of the new locators even though 4052 the flow label stays the same. 4054 o MTU implications. The path MTU mechanisms we use are robust 4055 against different packets taking different paths through the 4056 Internet, by computing a minimum over the recently observed path 4057 MTUs. When Shim6 fails over from using one locator pair to 4058 another pair, this means that packets might travel over a 4059 different path through the Internet, hence the path MTU might be 4060 quite different. In order to deal with this changes in the MTU, 4061 the usage of Packetization Layer Path MTU Discovery as defined in 4062 [23] is reccommended. 4064 The fact that the shim will add an 8 octet Payload Extension 4065 header to the ULP packets after a locator switch, can also affect 4066 the usable path MTU for the ULPs. In this case the MTU change is 4067 local to the sending host, thus conveying the change to the ULPs 4068 is an implementation matter. By conveying the information to the 4069 transport layer, it can adapt and reduce the MSS accordingly. 4071 16. Security Considerations 4073 This document satisfies the concerns specified in [14] as follows: 4075 o The HBA [2] and CGA technique [3] for verifying the locators to 4076 prevent an attacker from redirecting the packet stream to 4077 somewhere else, preventing threats described in sections 4.1.1, 4078 4.1.2, 4.1.3 and 4.2 of [14]. These two approaches provide a 4079 similar level of protection but they provide different 4080 functionality with a different computational cost. The HBA 4081 mechanism relies on the capability of generating all the addresses 4082 of a multihomed host as an unalterable set of intrinsically bound 4083 IPv6 addresses, known as an HBA set. In this approach, addresses 4084 incorporate a cryptographic one-way hash of the prefix-set 4085 available into the interface identifier part. The result is that 4086 the binding between all the available addresses is encoded within 4087 the addresses themselves, providing hijacking protection. Any 4088 peer using the shim protocol node can efficiently verify that the 4089 alternative addresses proposed for continuing the communication 4090 are bound to the initial address through a simple hash 4091 calculation. In a CGA based approach the address used as ULID is 4092 a CGA that contains a hash of a public key in its interface 4093 identifier. The result is a secure binding between the ULID and 4094 the associated key pair. This allows each peer to use the 4095 corresponding private key to sign the shim messages that convey 4096 locator set information. The trust chain in this case is the 4097 following: the ULID used for the communication is securely bound 4098 to the key pair because it contains the hash of the public key, 4099 and the locator set is bound to the public key through the 4100 signature. Any of these two mechanisms HBA and CGA provide time- 4101 shifted attack protection (as described in section 4.1.2 of [14]), 4102 since the ULID is securely bound to a locator set that can only be 4103 defined by the owner of the ULID. The minimum acceptable key 4104 length for RSA keys used in the generation of CGAs MUST be at 4105 least 1024 bits. Any implementation should follow prudent 4106 cryptographic practice in determining the appropriate key lengths. 4108 o 3rd party flooding attacks described in section 4.3 of [14] are 4109 prevented by requiring a Shim6 peer to perform a successful 4110 Reachability probe + reply exchange before accepting a new locator 4111 for use as a packet destination.. 4113 o The first message does not create any state on the responder. 4114 Essentially a 3-way exchange is required before the responder 4115 creates any state. This means that a state-based DoS attack 4116 (trying to use up all of memory on the responder) at least 4117 requires the attacker to create state, consuming his own resources 4118 and also it provides an IPv6 address that the attacker was using. 4120 o The context establishment messages use nonces to prevent replay 4121 attacks as described in section 4.1.4 of [14], and to prevent off- 4122 path attackers from interfering with the establishment. 4124 o Every control message of the Shim6 protocol, past the context 4125 establishment, carry the context tag assigned to the particular 4126 context. This implies that an attacker needs to discover that 4127 context tag before being able to spoof any Shim6 control message 4128 as described in section 4.4 of [14]. Such discovery probably 4129 requires to be along the path in order to be sniff the context tag 4130 value. The result is that through this technique, the Shim6 4131 protocol is protected against off-path attackers. 4133 16.1. Interaction with IPSec 4135 Shim6 has two modes of processing data packets. If the ULID pair is 4136 as well the locator pair being used, then the data packet is not 4137 modified by Shim6. In this case, the interaction with IPSec is 4138 exactly the same as if the Shim6 layer was not present in the host. 4140 If the ULID pair differs from the current locator pair for that Shim6 4141 context, then Shim6 will take the data packet, replace the ULIDs 4142 contained in the IP source and destination address fields by the 4143 current locator pair and add the Shim6 extension with the 4144 correspondent Context Tag. In this case, as it is mentioned in 4145 section 1.6,, Shim6 conceptually works as a tunnel mechanism where 4146 the inner header contains the ULID and the outer header contains the 4147 locators. The main difference being that the inner header is 4148 "compressed" and a compression tag, namely the Context tag, is added 4149 to decompress the inner header at the receiving end. 4151 In this case, the interaction between IPSec and Shim6 is then similar 4152 to the interaction between IPSec and a tunnel mechanism. When the 4153 packet is generated by the upper layer protocol is passed to the IP 4154 layer containing the ULIDs in the IP source and destination field. 4155 IPSec is then applied to this packet. Then, the packet is passed to 4156 the Shim6 sub-layer, which "encapsulates" the received packet and 4157 includes a new IP header containing the locator pair in the IP source 4158 and destination field. This new IP packet is in turn passed to IPSec 4159 for processing, just as in the case of a tunnel. This can be viewed 4160 as if IPSec is located both above and below the Shim6 sublayer and 4161 that IPSec policies apply both to ULIDs and locators. 4163 When IPSec processed the packet after the Shim6 sublayer has 4164 processed it i.e. the packet carrying the locators in the IP source 4165 and destination address field, the Shim6 sublayer may have added the 4166 Shim6 extension header. In that case, IPSec needs to skip the Shim6 4167 extension header to find the selectors for the next layer protocols 4168 (e.g., TCP, UDP, Stream Control Transmission Protocol (SCTP)) 4170 When a packet is received at the other end, it is processed based on 4171 the order of the extension headers. Thus if an ESP or AH header 4172 precedes a Shim6 header that determines the order. Shim6 introduces 4173 the need to do policy checks, analogous to how they are done for 4174 tunnels, when Shim6 receives a packet a the ULID pair for the packet 4175 is not identical to the locator pair in the packet. 4177 16.2. Residual Threats 4179 Some of the residual threats in this proposal are: 4181 o An attacker which arrives late on the path (after the context has 4182 been established) can use the R1bis message to cause one peer to 4183 recreate the context, and at that point in time the attacker can 4184 observe all of the exchange. But this doesn't seem to open any 4185 new doors for the attacker since such an attacker can observe the 4186 context tags that are being used, and once known it can use those 4187 to send bogus messages. 4189 o An attacker which is present on the path so that it can find out 4190 the context tags, can generate a R1bis message after it has moved 4191 off the path. For this packet to be effective it needs to have a 4192 source locator which belongs to the context, thus there can not be 4193 "too much" ingress filtering between the attackers new location 4194 and the communicating peers. But this doesn't seem to be that 4195 severe, because once the R1bis causes the context to be re- 4196 established, a new pair of context tags will be used, which will 4197 not be known to the attacker. If this is still a concern, we 4198 could require a 2-way handshake "did you really lose the state?" 4199 in response to the error message. 4201 o It might be possible for an attacker to try random 47-bit context 4202 tags and see if they can cause disruption for communication 4203 between two hosts. In particular, in the case of payload packets, 4204 the effects of such attack would be similar of those of an 4205 attacker sending packets with spoofed source address. In the case 4206 of control packets, it is not enough to find the correct context 4207 tag, but additional information is required (e.g. nonces, proper 4208 source addresses) (see previous bullet for the case of R1bis). If 4209 a 47-bit tag, which is the largest that fits in an 8-octet 4210 extension header, isn't sufficient, one could use an even larger 4211 tag in the Shim6 control messages, and use the low-order 47 bits 4212 in the payload extension header. 4214 o When the payload extension header is used, an attacker that can 4215 guess the 47-bit random context tag, can inject packets into the 4216 context with any source locator. Thus if there is ingress 4217 filtering between the attacker, this could potentially allow to 4218 bypass the ingress filtering. However, in addition to guessing 4219 the 47-bit context tag, the attacker also needs to find a context 4220 where, after the receiver's replacement of the locators with the 4221 ULIDs, the the ULP checksum is correct. But even this wouldn't be 4222 sufficient with ULPs like TCP, since the TCP port numbers and 4223 sequence numbers must match an existing connection. Thus, even 4224 though the issues for off-path attackers injecting packets are 4225 different than today with ingress filtering, it is still very hard 4226 for an off-path attacker to guess. If IPsec is applied then the 4227 issue goes away completely. 4229 o The validator included in the R1 and R1bis packets are generated 4230 as a hash of several input parameters. While most of the inputs 4231 are actually determined by the sender, and only the secret value S 4232 is unknown to the sender, the resulting protection is deemed to be 4233 enough since it would be easier for the attacker to just obtain a 4234 new validator sending a I1 packet than performing all the 4235 computations required to determine the secret S. Nevertheless, it 4236 is recommended that the host changes the secret S periodically. 4238 17. IANA Considerations 4240 IANA is directed to allocate a new IP Protocol Number value for the 4241 Shim6 Protocol. 4243 IANA is directed to record a CGA message type for the Shim6 Protocol 4244 in the CGA Extension Type Tags registry with the value 0x4A30 5662 4245 4858 574B 3655 416F 506A 6D48. 4247 IANA is directed to establish a Shim6 Parameter Registry with three 4248 components: Shim6 Type registrations, Shim6 Options registrations 4249 Shim6 Error Code registrations. 4251 The initial contents of the Shim6 Type registry are as follows: 4253 +------------+-----------------------------------------------------+ 4254 | Type Value | Message | 4255 +------------+-----------------------------------------------------+ 4256 | 0 | RESERVED | 4257 | | | 4258 | 1 | I1 (first establishment message from the initiator) | 4259 | | | 4260 | 2 | R1 (first establishment message from the responder) | 4261 | | | 4262 | 3 | I2 (2nd establishment message from the initiator) | 4263 | | | 4264 | 4 | R2 (2nd establishment message from the responder) | 4265 | | | 4266 | 5 | R1bis (Reply to reference to non-existent context) | 4267 | | | 4268 | 6 | I2bis (Reply to a R1bis message) | 4269 | | | 4270 | 7-59 | Can be allocated using Standards Action | 4271 | | | 4272 | 60-63 | For Experimental use | 4273 | | | 4274 | 64 | Update Request | 4275 | | | 4276 | 65 | Update Acknowledgement | 4277 | | | 4278 | 66 | Keepalive | 4279 | | | 4280 | 67 | Probe Message | 4281 | | | 4282 | 68-123 | Can be allocated using Standards Action | 4283 | | | 4284 | 124-127 | For Experimental use | 4285 +------------+-----------------------------------------------------+ 4286 The initial contents of the Shim6 Options registry are as follows: 4288 +-------------+----------------------------------+ 4289 | Type | Option Name | 4290 +-------------+----------------------------------+ 4291 | 0 | RESERVED | 4292 | | | 4293 | 1 | Responder Validator | 4294 | | | 4295 | 2 | Locator List | 4296 | | | 4297 | 3 | Locator Preferences | 4298 | | | 4299 | 4 | CGA Parameter Data Structure | 4300 | | | 4301 | 5 | CGA Signature | 4302 | | | 4303 | 6 | ULID Pair | 4304 | | | 4305 | 7 | Forked Instance Identifier | 4306 | | | 4307 | 8-9 | Allocated using Standards action | 4308 | | | 4309 | 10 | Keepalive Timeout Option | 4310 | | | 4311 | 11-16383 | Allocated using Standards action | 4312 | | | 4313 | 16384-32767 | For Experimental use | 4314 +-------------+----------------------------------+ 4316 The initial contents of the Shim6 Error Code registry are as follows: 4318 +------------+--------------------------------------------+ 4319 | Code Value | Description | 4320 +------------+--------------------------------------------+ 4321 | 0 | Unknown Shim6 message type | 4322 | | | 4323 | 1 | Critical Option not recognized | 4324 | | | 4325 | 2 | Locator verification method failed | 4326 | | | 4327 | 3 | Locator List Generation number out of sync | 4328 | | | 4329 | 4 | Error in the number of locators | 4330 | | | 4331 | 120-127 | Reserved for debugging purposes | 4332 +------------+--------------------------------------------+ 4334 18. Acknowledgements 4336 Over the years many people active in the multi6 and shim6 WGs have 4337 contributed ideas a suggestions that are reflected in this 4338 specification. Special thanks to the careful comments from Sam 4339 Hartman, Cullen Jennings, Magnus Nystrom, Stephen Kent, Geoff Huston, 4340 Shinta Sugimoto, Pekka Savola, Dave Meyer, Deguang Le, Jari Arkko, 4341 Iljitsch van Beijnum, Jim Bound, Brian Carpenter, Sebastien Barre, 4342 Matthijs Mekking, Dave Thaler, Bob Braden Wesley Eddy, Pari Eronen 4343 and Tom Henderson on earlier versions of this document. 4345 19. Appendix: Possible Protocol Extensions 4347 During the development of this protocol, several issues have been 4348 brought up as important one to address, but are ones that do not need 4349 to be in the base protocol itself but can instead be done as 4350 extensions to the protocol. The key ones are: 4352 o As stated in the assumptions in Section 3, the in order for the 4353 Shim6 protocol to be able to recover from a wide range of 4354 failures, for instance when one of the communicating hosts is 4355 single-homed, and cope with a site's ISPs that do ingress 4356 filtering based on the source IPv6 address, there is a need for 4357 the host to be able to influence the egress selection from its 4358 site. Further discussion of this issue is captured in [15]. 4360 o Is there need for keeping the list of locators private between the 4361 two communicating endpoints? We can potentially accomplish that 4362 when using CGA but not with HBA, but it comes at the cost of doing 4363 some public key encryption and decryption operations as part of 4364 the context establishment. The suggestion is to leave this for a 4365 future extension to the protocol. 4367 o Defining some form of end-to-end "compression" mechanism that 4368 removes the need for including the Shim6 Payload extension header 4369 when the locator pair is not the ULID pair. 4371 o Supporting the dynamic setting of locator preferences on a site- 4372 wide basis, and use the Locator Preference option in the Shim6 4373 protocol to convey these preferences to remote communicating 4374 hosts. This could mirror the DNS SRV record's notion of priority 4375 and weight. 4377 o Specifying APIs for the ULPs to be aware of the locators the shim 4378 is using, and be able to influence the choice of locators 4379 (controlling preferences as well as triggering a locator pair 4380 switch). This includes providing APIs the ULPs can use to fork a 4381 shim context. 4383 o Whether it is feasible to relax the suggestions for when context 4384 state is removed, so that one can end up with an asymmetric 4385 distribution of the context state and still get (most of) the shim 4386 benefits. For example, the busy server would go through the 4387 context setup but would quickly remove the context state after 4388 this (in order to save memory) but the not-so-busy client would 4389 retain the context state. The context recovery mechanism 4390 presented in Section 7.5 would then be recreate the state should 4391 the client send either a shim control message (e.g., probe message 4392 because it sees a problem), or a ULP packet in an payload 4393 extension header (because it had earlier failed over to an 4394 alternative locator pair, but had been silent for a while). This 4395 seems to provide the benefits of the shim as long as the client 4396 can detect the failure. If the client doesn't send anything, and 4397 it is the server that tries to send, then it will not be able to 4398 recover because the shim on the server has no context state, hence 4399 doesn't know any alternate locator pairs. 4401 o Study what it would take to make the Shim6 control protocol not 4402 rely at all on a stable source locator in the packets. This can 4403 probably be accomplished by having all the shim control messages 4404 include the ULID-pair option. 4406 o If each host might have lots of locators, then the currently 4407 requirement to include essentially all of them in the I2 and R2 4408 messages might be constraining. If this is the case we can look 4409 into using the CGA Parameter Data Structure for the comparison, 4410 instead of the prefix sets, to be able to detect context 4411 confusion. This would place some constraint on a (logical) only 4412 using e.g., one CGA public key, and would require some carefully 4413 crafted rules on how two PDSs are compared for "being the same 4414 host". But if we don't expect more than a handful locators per 4415 host, then we don't need this added complexity. 4417 o ULP specified timers for the reachability detection mechanism 4418 (which can be useful particularly when there are forked contexts). 4420 o Pre-verify some "backup" locator pair, so that the failover time 4421 can be shorter. 4423 o Study how Shim6 and Mobile IPv6 might interact. There existing an 4424 initial draft on this topic [16]. 4426 20. Appendix: Simplified STATE Machine 4428 The STATES are defined in Section 6.2. The intent is that the 4429 stylized description below be consistent with the textual description 4430 in the specification, but should they conflict, the textual 4431 description is normative. 4433 The following table describes the possible actions in STATE IDLE and 4434 their respective triggers: 4436 +---------------------+---------------------------------------------+ 4437 | Trigger | Action | 4438 +---------------------+---------------------------------------------+ 4439 | Receive I1 | Send R1 and stay in IDLE | 4440 | | | 4441 | Heuristics trigger | Send I1 and move to I1-SENT | 4442 | a new context | | 4443 | establishment | | 4444 | | | 4445 | Receive I2, verify | If successful, send R2 and move to | 4446 | validator and | ESTABLISHED | 4447 | RESP nonce | | 4448 | | If fail, stay in IDLE | 4449 | | | 4450 | Receive I2bis, | If successful, send R2 and move to | 4451 | verify validator | ESTABLISHED | 4452 | and RESP nonce | | 4453 | | If fail, stay in IDLE | 4454 | | | 4455 | R1, R1bis, R2 | N/A (This context lacks the required info | 4456 | | for the dispatcher to deliver them) | 4457 | | | 4458 | Receive payload | Send R1bis and stay in IDLE | 4459 | extension header | | 4460 | or other control | | 4461 | packet | | 4462 +---------------------+---------------------------------------------+ 4463 The following table describes the possible actions in STATE I1-SENT 4464 and their respective triggers: 4466 +---------------------+---------------------------------------------+ 4467 | Trigger | Action | 4468 +---------------------+---------------------------------------------+ 4469 | Receive R1, verify | If successful, send I2 and move to I2-SENT | 4470 | INIT nonce | | 4471 | | If fail, discard and stay in I1-SENT | 4472 | | | 4473 | Receive I1 | Send R2 and stay in I1-SENT | 4474 | | | 4475 | Receive R2, verify | If successful, move to ESTABLISHED | 4476 | INIT nonce | | 4477 | | If fail, discard and stay in I1-SENT | 4478 | | | 4479 | Receive I2, verify | If successful, send R2 and move to | 4480 | validator and RESP | ESTABLISHED | 4481 | nonce | | 4482 | | If fail, discard and stay in I1-SENT | 4483 | | | 4484 | Receive I2bis, | If successful, send R2 and move to | 4485 | verify validator | ESTABLISHED | 4486 | and RESP nonce | | 4487 | | If fail, discard and stay in I1-SENT | 4488 | | | 4489 | Timeout, increment | If counter =< I1_RETRIES_MAX, send I1 and | 4490 | timeout counter | stay in I1-SENT | 4491 | | | 4492 | | If counter > I1_RETRIES_MAX, go to E-FAILED | 4493 | | | 4494 | Receive ICMP payload| Move to E-FAILED | 4495 | unknown error | | 4496 | | | 4497 | R1bis | N/A (Dispatcher doesn't deliver since | 4498 | | CT(peer) is not set) | 4499 | | | 4500 | Receive Payload or | Discard and stay in I1-SENT | 4501 | extension header | | 4502 | or other control | | 4503 | packet | | 4504 +---------------------+---------------------------------------------+ 4505 The following table describes the possible actions in STATE I2-SENT 4506 and their respective triggers: 4508 +---------------------+---------------------------------------------+ 4509 | Trigger | Action | 4510 +---------------------+---------------------------------------------+ 4511 | Receive R2, verify | If successful move to ESTABLISHED | 4512 | INIT nonce | | 4513 | | If fail, stay in I2-SENT | 4514 | | | 4515 | Receive I1 | Send R2 and stay in I2-SENT | 4516 | | | 4517 | Receive I2 | Send R2 and stay in I2-SENT | 4518 | verify validator | | 4519 | and RESP nonce | | 4520 | | | 4521 | Receive I2bis | Send R2 and stay in I2-SENT | 4522 | verify validator | | 4523 | and RESP nonce | | 4524 | | | 4525 | Receive R1 | Discard and stay in I2-SENT | 4526 | | | 4527 | Timeout, increment | If counter =< I2_RETRIES_MAX, send I2 and | 4528 | timeout counter | stay in I2-SENT | 4529 | | | 4530 | | If counter > I2_RETRIES_MAX, send I1 and go | 4531 | | to I1-SENT | 4532 | | | 4533 | R1bis | N/A (Dispatcher doesn't deliver since | 4534 | | CT(peer) is not set) | 4535 | | | 4536 | Receive payload or | Accept and send I2 (probably R2 was sent | 4537 | extension header | by peer and lost) | 4538 | other control | | 4539 | packet | | 4540 +---------------------+---------------------------------------------+ 4541 The following table describes the possible actions in STATE I2BIS- 4542 SENT and their respective triggers: 4544 +---------------------+---------------------------------------------+ 4545 | Trigger | Action | 4546 +---------------------+---------------------------------------------+ 4547 | Receive R2, verify | If successful move to ESTABLISHED | 4548 | INIT nonce | | 4549 | | If fail, stay in I2BIS-SENT | 4550 | | | 4551 | Receive I1 | Send R2 and stay in I2BIS-SENT | 4552 | | | 4553 | Receive I2 | Send R2 and stay in I2BIS-SENT | 4554 | verify validator | | 4555 | and RESP nonce | | 4556 | | | 4557 | Receive I2bis | Send R2 and stay in I2BIS-SENT | 4558 | verify validator | | 4559 | and RESP nonce | | 4560 | | | 4561 | Receive R1 | Discard and stay in I2BIS-SENT | 4562 | | | 4563 | Timeout, increment | If counter =< I2_RETRIES_MAX, send I2bis | 4564 | timeout counter | and stay in I2BIS-SENT | 4565 | | | 4566 | | If counter > I2_RETRIES_MAX, send I1 and | 4567 | | go to I1-SENT | 4568 | | | 4569 | R1bis | N/A (Dispatcher doesn't deliver since | 4570 | | CT(peer) is not set) | 4571 | | | 4572 | Receive payload or | Accept and send I2bis (probably R2 was | 4573 | extension header | sent by peer and lost) | 4574 | other control | | 4575 | packet | | 4576 +---------------------+---------------------------------------------+ 4577 The following table describes the possible actions in STATE 4578 ESTABLISHED and their respective triggers: 4580 +---------------------+---------------------------------------------+ 4581 | Trigger | Action | 4582 +---------------------+---------------------------------------------+ 4583 | Receive I1, compare | If no match, send R1 and stay in ESTABLISHED| 4584 | CT(peer) with | | 4585 | received CT | If match, send R2 and stay in ESTABLISHED | 4586 | | | 4587 | | | 4588 | Receive I2, verify | If successful, then send R2 and stay in | 4589 | validator and RESP | ESTABLISHED | 4590 | nonce | | 4591 | | Otherwise, discard and stay in ESTABLISHED | 4592 | | | 4593 | Receive I2bis, | If successful, then send R2 and stay in | 4594 | verify validator | ESTABLISHED | 4595 | and RESP nonce | | 4596 | | Otherwise, discard and stay in ESTABLISHED | 4597 | | | 4598 | Receive R2 | Discard and stay in ESTABLISHED | 4599 | | | 4600 | Receive R1 | Discard and stay in ESTABLISHED | 4601 | | | 4602 | Receive R1bis | Send I2bis and move to I2BIS-SENT | 4603 | | | 4604 | | | 4605 | Receive payload or | Process and stay in ESTABLISHED | 4606 | extension header | | 4607 | other control | | 4608 | packet | | 4609 | | | 4610 | Implementation | Discard state and go to IDLE | 4611 | specific heuristic | | 4612 | (E.g., No open ULP | | 4613 | sockets and idle | | 4614 | for some time ) | | 4615 +---------------------+---------------------------------------------+ 4616 The following table describes the possible actions in STATE E-FAILED 4617 and their respective triggers: 4619 +---------------------+---------------------------------------------+ 4620 | Trigger | Action | 4621 +---------------------+---------------------------------------------+ 4622 | Wait for | Go to IDLE | 4623 | NO_R1_HOLDDOWN_TIME | | 4624 | | | 4625 | Any packet | Process as in IDLE | 4626 +---------------------+---------------------------------------------+ 4628 The following table describes the possible actions in STATE NO- 4629 SUPPORT and their respective triggers: 4631 +---------------------+---------------------------------------------+ 4632 | Trigger | Action | 4633 +---------------------+---------------------------------------------+ 4634 | Wait for | Go to IDLE | 4635 | ICMP_HOLDDOWN_TIME | | 4636 | | | 4637 | Any packet | Process as in IDLE | 4638 +---------------------+---------------------------------------------+ 4640 20.1. Simplified STATE Machine diagram 4641 Timeout/Null +------------+ 4642 I1/R1 +------------------| NO SUPPORT | 4643 Payload or Control/R1bis | +------------+ 4644 +---------+ | ^ 4645 | | | ICMP Error/Null| 4646 | V V | 4647 +-----------------+ Timeout/Null +----------+ | 4648 | |<---------------| E-FAILED | | 4649 +-| IDLE | +----------+ | 4650 I2 or I2bis/R2 | | | ^ | 4651 | +-----------------+ (Tiemout#>MAX)/Null| | 4652 | ^ | | | 4653 | | +------+ | | 4654 I2 or I2bis/R2 | | Heuristic/I1| I1/R2 | | 4655 Payload/Null | | | Control/Null | | 4656 I1/R1 or R2 | +--+ | Payload/Null | | 4657 R1 or R2/Null | |Heuristic/Null | (Tiemout#| | 4662 | ESTABLISHED |<----------------------------| I1-SENT | 4663 | | | | 4664 +-------------------+ +----------------+ 4665 | ^ ^ | ^ ^ 4666 | | |R2/Null +-------------+ | | 4667 | | +----------+ |R1/I2 | | 4668 | | | V | | 4669 | | +------------------+ | | 4670 | | | |-------------+ | 4671 | | | I2-SENT | (Timeout#>Max)/I1 | 4672 | | | | | 4673 | | +------------------+ | 4674 | | | ^ | 4675 | | +--------------+ | 4676 | | I1 or I2bis or I2/R2 | 4677 | | (Timeout#Max)/I1 | 4680 | R2/Null| +------------------------------------------+ 4681 | V | 4682 | +-------------------+ 4683 | | |<-+ (Timeout#| I2bis-SENT | | I1 or I2 or I2bis/R2 4685 R1bis/I2bis | |--+ R1 or R1bis/Null 4686 +-------------------+ Payload/I2bis 4688 21. Appendix: Context Tag Reuse 4690 The Shim6 protocol doesn't have a mechanism for coordinated state 4691 removal between the peers, because such state removal doesn't seem to 4692 help given that a host can crash and reboot at any time. A result of 4693 this is that the protocol needs to be robust against a context tag 4694 being reused for some other context. This section summarizes the 4695 different cases in which a tag can be reused, and how the recovery 4696 works. 4698 The different cases are exemplified by the following case. Assume 4699 host A and B were communicating using a context with the ULID pair 4700 , and that B had assigned context tag X to this context. We 4701 assume that B uses only the context tag to demultiplex the received 4702 payload extension headers, since this is the more general case. 4703 Further we assume that B removes this context state, while A retains 4704 it. B might then at a later time assign CT(local)=X to some other 4705 context, and we have several cases: 4707 o The context tag is reassigned to a context for the same ULID pair 4708 . We've called this "Context Recovery" in this document. 4710 o The context tag is reassigned to a context for a different ULID 4711 pair between the same to hosts, e.g., . We've called this 4712 "Context Confusion" in this document. 4714 o The context tag is reassigned to a context between B and other 4715 host C, for instance for the ULID pair . That is a form 4716 of three party context confusion. 4718 21.1. Context Recovery 4720 This case is relatively simple, and is discussed in Section 7.5. The 4721 observation is that since the ULID pair is the same, when either A or 4722 B tries to establish the new context, A can keep the old context 4723 while B re-creates the context with the same context tag CT(B) = X. 4725 21.2. Context Confusion 4727 This cases is a bit more complex, and is discussed in Section 7.6. 4728 When the new context is created, whether A or B initiates it, host A 4729 can detect when it receives B's locator set (in the I2, or R2 4730 message), that it ends up with two contexts to the same peer host 4731 (overlapping Ls(peer) locator sets) that have the same context tag 4732 CT(peer) = X. At this point in time host A can clear up any 4733 possibility of causing confusion by not using the old context to send 4734 any more packets. It either just discards the old context (it might 4735 not be used by any ULP traffic, since B had discarded it), or it 4736 recreates a different context for the old ULID pair (), for 4737 which B will assign a unique CT(B) as part of the normal context 4738 establishment mechanism. 4740 21.3. Three Party Context Confusion 4742 The third case does not have a place where the old state on A can be 4743 verified, since the new context is established between B and C. Thus 4744 when B receives payload extension headers with X as the context tag, 4745 it will find the context for , hence rewrite the packets to 4746 have C3 in the source address field and B2 in the destination address 4747 field before passing them up to the ULP. This rewriting is correct 4748 when the packets are in fact sent by host C, but if host A ever 4749 happens to send a packet using the old context, then the ULP on A 4750 sends a packet with ULIDs and the packet arrives at the ULP 4751 on B with ULIDs . 4753 This is clearly an error, and the packet will most likely be rejected 4754 by the ULP on B due to a bad pseudo-header checksum. Even if the 4755 checksum is ok (probability 2^-16), the ULP isn't likely to have a 4756 connection for those ULIDs and port numbers. And if the ULP is 4757 connection-less, processing the packet is most likely harmless; such 4758 a ULP must be able to copy with random packets being sent by random 4759 peers in any case. 4761 This broken state, where packets sent from A to B using the old 4762 context on host A might persist for some time, but it will not remain 4763 for very long. The unreachability detection on host A will kick in, 4764 because it does not see any return traffic (payload or Keepalive 4765 messages) for the context. This will result in host A sending Probe 4766 messages to host B to find a working locator pair. The effect of 4767 this is that host B will notice that it does not have a context for 4768 the ULID pair and CT(B) = X, which will make host B send an 4769 R1bis packet to re-establish that context. The re-established 4770 context, just like in the previous section, will get a unique CT(B) 4771 assigned by host B, thus there will no longer be any confusion. 4773 21.4. Summary 4775 In summary, there are cases where a context tag might be reused while 4776 some peer retains the state, but the protocol can recover from it. 4777 The probability of these events is low given the 47 bit context tag 4778 size. However, it is important that these recovery mechanisms be 4779 tested. Thus during development and testing it is recommended that 4780 implementations not use the full 47 bit space, but instead keep e.g. 4781 the top 40 bits as zero, only leaving the host with 128 unique 4782 context tags. This will help test the recovery mechanisms. 4784 22. Appendix: Design Alternatives 4786 This document has picked a certain set of design choices in order to 4787 try to work out a bunch of the details, and stimulate discussion. 4788 But as has been discussed on the mailing list, there are other 4789 choices that make sense. This appendix tries to enumerate some 4790 alternatives. 4792 22.1. Context granularity 4794 Over the years various suggestions have been made whether the shim 4795 should, even if it operates at the IP layer, be aware of ULP 4796 connections and sessions, and as a result be able to make separate 4797 shim contexts for separate ULP connections and sessions. A few 4798 different options have been discussed: 4800 o Each ULP connection maps to its own shim context. 4802 o The shim is unaware of the ULP notion of connections and just 4803 operates on a host-to-host (IP address) granularity. 4805 o Hybrids where the shim is aware of some ULPs (such as TCP) and 4806 handles other ULPs on a host-to-host basis. 4808 Having shim state for every ULP connection potentially means higher 4809 overhead since the state setup overhead might become significant; 4810 there is utility in being able to amortize this over multiple 4811 connections. 4813 But being completely unaware of the ULP connections might hamper ULPs 4814 that want different communication to use different locator pairs, for 4815 instance for quality or cost reasons. 4817 The protocol has a shim which operates with host-level granularity 4818 (strictly speaking, with ULID-pair granularity, to be able to 4819 amortize the context establishment over multiple ULP connections. 4820 This is combined with the ability for shim-aware ULPs to request 4821 context forking so that different ULP traffic can use different 4822 locator pairs. 4824 22.2. Demultiplexing of data packets in Shim6 communications 4826 Once a ULID-pair context is established between two hosts, packets 4827 may carry locators that differ from the ULIDs presented to the ULPs 4828 using the established context. One of main functions of the Shim6 4829 layer is to perform the mapping between the locators used to forward 4830 packets through the network and the ULIDs presented to the ULP. In 4831 order to perform that translation for incoming packets, the Shim6 4832 layer needs to first identify which of the incoming packets need to 4833 be translated and then perform the mapping between locators and ULIDs 4834 using the associated context. Such operation is called 4835 demultiplexing. It should be noted that because any address can be 4836 used both as a locator and as a ULID, additional information other 4837 than the addresses carried in packets, need to be taken into account 4838 for this operation. 4840 For example, if a host has address A1 and A2 and starts communicating 4841 with a peer with addresses B1 and B2, then some communication 4842 (connections) might use the pair as ULID and others might 4843 use e.g., . Initially there are no failures so these address 4844 pairs are used as locators i.e. in the IP address fields in the 4845 packets on the wire. But when there is a failure the Shim6 layer on 4846 A might decide to send packets that used as ULIDs using as the locators. In this case B needs to be able to rewrite the 4848 IP address field for some packets and not others, but the packets all 4849 have the same locator pair. 4851 In order to accomplish the demultiplexing operation successfully, 4852 data packets carry a context tag that allows the receiver of the 4853 packet to determine the shim context to be used to perform the 4854 operation. 4856 Two mechanisms for carrying the context tag information have been 4857 considered in depth during the shim protocol design. Those carrying 4858 the context tag in the flow label field of the IPv6 header and the 4859 usage of a new extension header to carry the context tag. In this 4860 appendix we will describe the pros and cons of each approach and 4861 justify the selected option. 4863 22.2.1. Flow-label 4865 A possible approach is to carry the context tag in the Flow Label 4866 field of the IPv6 header. This means that when a Shim6 context is 4867 established, a Flow Label value is associated with this context (and 4868 perhaps a separate flow label for each direction). 4870 The simplest approach that does this is to have the triple identify the context at 4872 the receiver. 4874 The problem with this approach is that because the locator sets are 4875 dynamic, it is not possible at any given moment to be sure that two 4876 contexts for which the same context tag is allocated will have 4877 disjoint locator sets during the lifetime of the contexts. 4879 Suppose that Node A has addresses IPA1, IPA2, IPA3 and IPA4 and that 4880 Host B has addresses IPB1 and IPB2. 4882 Suppose that two different contexts are established between HostA and 4883 HostB. 4885 Context #1 is using IPA1 and IPB1 as ULIDs. The locator set 4886 associated to IPA1 is IPA1 and IPA2 while the locator set associated 4887 to IPB1 is just IPB1. 4889 Context #2 uses IPA3 and IPB2 as ULIDs. The locator set associated 4890 to IPA3 is IPA3 and IPA4 and the locator set associated to IPB2 is 4891 just IPB2. 4893 Because the locator sets of the Context #1 and Context #2 are 4894 disjoint, hosts could think that the same context tag value can be 4895 assigned to both of them. The problem arrives when later on IPA3 is 4896 added as a valid locator for IPA1 and IPB2 is added as a valid 4897 locator for IPB1 in Context #1. In this case, the triple would not identify a 4899 unique context anymore and correct demultiplexing is no longer 4900 possible. 4902 A possible approach to overcome this limitation is simply not to 4903 repeat the Flow Label values for any communication established in a 4904 host. This basically means that each time a new communication that 4905 is using different ULIDs is established, a new Flow Label value is 4906 assigned to it. By this mean, each communication that is using 4907 different ULIDs can be differentiated because it has a different Flow 4908 Label value. 4910 The problem with such approach is that it requires that the receiver 4911 of the communication allocates the Flow Label value used for incoming 4912 packets, in order to assign them uniquely. For this, a shim 4913 negotiation of the Flow Label value to use in the communication is 4914 needed before exchanging data packets. This poses problems with non- 4915 shim capable hosts, since they would not be able to negotiate an 4916 acceptable value for the Flow Label. This limitation can be lifted 4917 by marking the packets that belong to shim sessions from those that 4918 do not. These marking would require at least a bit in the IPv6 4919 header that is not currently available, so more creative options 4920 would be required, for instance using new Next Header values to 4921 indicate that the packet belongs to a Shim6 enabled communication and 4922 that the Flow Label carries context information as proposed in the 4923 now expired NOID draft. However, even if this is done, this approach 4924 is incompatible with the deferred establishment capability of the 4925 shim protocol, which is a preferred function, since it suppresses the 4926 delay due to the shim context establishment prior to initiation of 4927 the communication and it also allows nodes to define at which stage 4928 of the communication they decide, based on their own policies, that a 4929 given communication requires to be protected by the shim. 4931 In order to cope with the identified limitations, an alternative 4932 approach that does not constraints the flow label values used by 4933 communications that are using ULIDs equal to the locators (i.e. no 4934 shim translation) is to only require that different flow label values 4935 are assigned to different shim contexts. In such approach 4936 communications start with unmodified flow label usage (could be zero, 4937 or as suggested in [11]). The packets sent after a failure when a 4938 different locator pair is used would use a completely different flow 4939 label, and this flow label could be allocated by the receiver as part 4940 of the shim context establishment. Since it is allocated during the 4941 context establishment, the receiver of the "failed over" packets can 4942 pick a flow label of its choosing (that is unique in the sense that 4943 no other context is using it as a context tag), without any 4944 performance impact, and respecting that for each locator pair, the 4945 flow label value used for a given locator pair doesn't change due to 4946 the operation of the multihoming shim. 4948 In this approach, the constraint is that Flow Label values being used 4949 as context identifiers cannot be used by other communications that 4950 use non-disjoint locator sets. This means that once that a given 4951 Flow Label value has been assigned to a shim context that has a 4952 certain locator sets associated, the same value cannot be used for 4953 other communications that use an address pair that is contained in 4954 the locator sets of the context. This is a constraint in the 4955 potential Flow Label allocation strategies. 4957 A possible workaround to this constraint is to mark shim packets that 4958 require translation, in order to differentiate them from regular IPv6 4959 packets, using the artificial Next Header values described above. In 4960 this case, the Flow Label values constrained are only those of the 4961 packets that are being translated by the shim. This last approach 4962 would be the preferred approach if the context tag is to be carried 4963 in the Flow Label field. This is not only because it imposes the 4964 minimum constraints to the Flow Label allocation strategies, limiting 4965 the restrictions only to those packets that need to be translated by 4966 the shim, but also because Context Loss detection mechanisms greatly 4967 benefit from the fact that shim data packets are identified as such, 4968 allowing the receiving end to identify if a shim context associated 4969 to a received packet is suppose to exist, as it will be discussed in 4970 the Context Loss detection appendix below. 4972 22.2.2. Extension Header 4974 Another approach, which is the one selected for this protocol, is to 4975 carry the context tag in a new Extension Header. These context tags 4976 are allocated by the receiving end during the Shim6 protocol initial 4977 negotiation, implying that each context will have two context tags, 4978 one for each direction. Data packets will be demultiplexed using the 4979 context tag carried in the Extension Header. This seems a clean 4980 approach since it does not overload existing fields. However, it 4981 introduces additional overhead in the packet due to the additional 4982 header. The additional overhead introduced is 8 octets. However, it 4983 should be noted that the context tag is only required when a locator 4984 other than the one used as ULID is contained in the packet. Packets 4985 where both the source and destination address fields contain the 4986 ULIDs do not require a context tag, since no rewriting is necessary 4987 at the receiver. This approach would reduce the overhead, because 4988 the additional header is only required after a failure. On the other 4989 hand, this approach would cause changes in the available MTU for some 4990 packets, since packets that include the Extension Header will have an 4991 MTU 8 octets shorter. However, path changes through the network can 4992 result in different MTU in any case, thus having a locator change, 4993 which implies a path change, affect the MTU doesn't introduce any new 4994 issues. 4996 22.3. Context Loss Detection 4998 In this appendix we will present different approaches considered to 4999 detect context loss and potential context recovery strategies. The 5000 scenario being considered is the following: Node A and Node B are 5001 communicating using IPA1 and IPB1. Sometime later, a shim context is 5002 established between them, with IPA1 and IPB1 as ULIDs and 5003 IPA1,...,IPAn and IPB1,...,IPBm as locator set respectively. 5005 It may happen, that later on, one of the hosts, e.g. Host A loses 5006 the shim context. The reason for this can be that Host A has a more 5007 aggressive garbage collection policy than HostB or that an error 5008 occurred in the shim layer at host A resulting in the loss of the 5009 context state. 5011 The mechanisms considered in this appendix are aimed to deal with 5012 this problem. There are essentially two tasks that need to be 5013 performed in order to cope with this problem: first, the context loss 5014 must be detected and second the context needs to be recovered/ 5015 reestablished. 5017 Mechanisms for detecting context loss. 5019 These mechanisms basically consist in that each end of the context 5020 periodically sends a packet containing context-specific information 5021 to the other end. Upon reception of such packets, the receiver 5022 verifies that the required context exists. In case that the context 5023 does not exist, it sends a packet notifying the problem to the 5024 sender. 5026 An obvious alternative for this would be to create a specific context 5027 keepalive exchange, which consists in periodically sending packets 5028 with this purpose. This option was considered and discarded because 5029 it seemed an overkill to define a new packet exchange to deal with 5030 this issue. 5032 An alternative is to piggyback the context loss detection function in 5033 other existent packet exchanges. In particular, both shim control 5034 and data packets can be used for this. 5036 Shim control packets can be trivially used for this, because they 5037 carry context specific information, so that when a node receives one 5038 of such packets, it will verify if the context exists. However, shim 5039 control frequency may not be adequate for context loss detection 5040 since control packet exchanges can be very limited for a session in 5041 certain scenarios. 5043 Data packets, on the other hand, are expected to be exchanged with a 5044 higher frequency but they do not necessarily carry context specific 5045 information. In particular, packets flowing before a locator change 5046 (i.e. packet carrying the ULIDs in the address fields) do not need 5047 context information since they do not need any shim processing. 5048 Packets that carry locators that differ from the ULIDs carry context 5049 information. 5051 However, we need to make a distinction here between the different 5052 approaches considered to carry the context tag, in particular between 5053 those approaches where packets are explicitly marked as shim packets 5054 and those approaches where packets are not marked as such. For 5055 instance, in the case where the context tag is carried in the Flow 5056 Label and packets are not marked as shim packets (i.e. no new Next 5057 Header values are defined for shim), a receiver that has lost the 5058 associated context is not able to detect that the packet is 5059 associated with a missing context. The result is that the packet 5060 will be passed unchanged to the upper layer protocol, which in turn 5061 will probably silently discard it due to a checksum error. The 5062 resulting behavior is that the context loss is undetected. This is 5063 one additional reason to discard an approach that carries the context 5064 tag in the Flow Label field and does not explicitly mark the shim 5065 packets as such. On the other hand, approaches that mark shim data 5066 packets (like the Extension Header or the Flow Label with new Next 5067 Header values approaches) allow the receiver to detect if the context 5068 associated to the received packet is missing. In this case, data 5069 packets also perform the function of a context loss detection 5070 exchange. However, it must be noted that only those packets that 5071 carry a locator that differs form the ULID are marked. This 5072 basically means that context loss will be detected after an outage 5073 has occurred i.e. alternative locators are being used. 5075 Summarizing, the proposed context loss detection mechanisms uses shim 5076 control packets and payload extension headers to detect context loss. 5077 Shim control packets detect context loss during the whole lifetime of 5078 the context, but the expected frequency in some cases is very low. 5079 On the other hand, payload extension headers have a higher expected 5080 frequency in general, but they only detect context loss after an 5081 outage. This behavior implies that it will be common that context 5082 loss is detected after a failure i.e. once that it is actually 5083 needed. Because of that, a mechanism for recovering from context 5084 loss is required if this approach is used. 5086 Overall, the mechanism for detecting lost context would work as 5087 follows: the end that still has the context available sends a message 5088 referring to the context. Upon the reception of such message, the 5089 end that has lost the context identifies the situation and notifies 5090 the context loss event to the other end by sending a packet 5091 containing the lost context information extracted from the received 5092 packet. 5094 One option is to simply send an error message containing the received 5095 packets (or at least as much of the received packet that the MTU 5096 allows to fit in). One of the goals of this notification is to allow 5097 the other end that still retains context state, to reestablish the 5098 lost context. The mechanism to reestablish the loss context consists 5099 in performing the 4-way initial handshake. This is a time consuming 5100 exchange and at this point time may be critical since we are 5101 reestablishing a context that is currently needed (because context 5102 loss detection may occur after a failure). So, another option, which 5103 is the one used in this protocol, is to replace the error message by 5104 a modified R1 message, so that the time required to perform the 5105 context establishment exchange can be reduced. Upon the reception of 5106 this modified R1 message, the end that still has the context state 5107 can finish the context establishment exchange and restore the lost 5108 context. 5110 22.4. Securing locator sets 5112 The adoption of a protocol like SHIM that allows the binding of a 5113 given ULID with a set of locators opens the doors for different types 5114 of redirection attacks as described in [14]. The goal in terms of 5115 security for the design of the shim protocol is not to introduce any 5116 new vulnerability in the Internet architecture. It is a non-goal to 5117 provide additional protection than the currently available in the 5118 single-homed IPv6 Internet. 5120 Multiple security mechanisms were considered to protect the shim 5121 protocol. In this appendix we will present some of them. 5123 The simplest option to protect the shim protocol was to use cookies 5124 i.e. a randomly generated bit string that is negotiated during the 5125 context establishment phase and then it is included in following 5126 signaling messages. By this mean, it would be possible to verify 5127 that the party that was involved in the initial handshake is the same 5128 party that is introducing new locators. Moreover, before using a new 5129 locator, an exchange is performed through the new locator, verifying 5130 that the party located at the new locator knows the cookie i.e. that 5131 it is the same party that performed the initial handshake. 5133 While this security mechanisms does indeed provide a fair amount of 5134 protection, it does leave the door open for the so-called time 5135 shifted attacks. In these attacks, an attacker that once was on the 5136 path, it discovers the cookie by sniffing any signaling message. 5137 After that, the attacker can leave the path and still perform a 5138 redirection attack, since as he is in possession of the cookie, he 5139 can introduce a new locator in the locator set and he can also 5140 successfully perform the reachability exchange if he is able to 5141 receive packets at the new locator. The difference with the current 5142 single-homed IPv6 situation is that in the current situation the 5143 attacker needs to be on-path during the whole lifetime of the attack, 5144 while in this new situation where only cookie protection if provided, 5145 an attacker that once was on the path can perform attacks after he 5146 has left the on-path location. 5148 Moreover, because the cookie is included in signaling messages, the 5149 attacker can discover the cookie by sniffing any of them, making the 5150 protocol vulnerable during the whole lifetime of the shim context. A 5151 possible approach to increase the security was to use a shared secret 5152 i.e. a bit string that is negotiated during the initial handshake but 5153 that is used as a key to protect following messages. With this 5154 technique, the attacker must be present on the path sniffing packets 5155 during the initial handshake, since it is the only moment where the 5156 shared secret is exchanged. While this improves the security, it is 5157 still vulnerable to time shifted attacks, even though it imposes that 5158 the attacker must be on path at a very specific moment (the 5159 establishment phase) to actually be able to launch the attack. While 5160 this seems to substantially improve the situation, it should be noted 5161 that, depending on protocol details, an attacker may be able to force 5162 the recreation of the initial handshake (for instance by blocking 5163 messages and making the parties think that the context has been 5164 lost), so the resulting situation may not differ that much from the 5165 cookie based approach. 5167 Another option that was discussed during the design of the protocol 5168 was the possibility of using IPsec for protecting the shim protocol. 5169 Now, the problem under consideration in this scenario is how to 5170 securely bind an address that is being used as ULID with a locator 5171 set that can be used to exchange packets. The mechanism provided by 5172 IPsec to securely bind the address used with the cryptographic keys 5173 is the usage of digital certificates. This implies that an IPsec 5174 based solution would require that the generation of digital 5175 certificates that bind the key and the ULID by a common third trusted 5176 party for both parties involved in the communication. Considering 5177 that the scope of application of the shim protocol is global, this 5178 would imply a global public key infrastructure. The major issues 5179 with this approach are the deployment difficulties associated with a 5180 global PKI. The other possibility would be to use some form of 5181 opportunistic IPSec, like BTNS [21]. However, this would still 5182 present some issues, in particular, this approach requires a leap-of- 5183 faith in order to bind a given address to the public ky that is being 5184 used, which would actually prevent from providing the most critical 5185 security feature that a Shim6 security solution needs to achieve, 5186 i.e. proving identifier ownership. On top of that, using IPsec would 5187 require to turn on per-packet AH/ESP just for multihoming to occur. 5189 Finally two different technologies were selected to protect the shim 5190 protocol: HBA [3] and CGA [2]. These two approaches provide a 5191 similar level of protection but they provide different functionality 5192 with a different computational cost. 5194 The HBA mechanism relies on the capability of generating all the 5195 addresses of a multihomed host as an unalterable set of intrinsically 5196 bound IPv6 addresses, known as an HBA set. In this approach, 5197 addresses incorporate a cryptographic one-way hash of the prefix-set 5198 available into the interface identifier part. The result is that the 5199 binding between all the available addresses is encoded within the 5200 addresses themselves, providing hijacking protection. Any peer using 5201 the shim protocol node can efficiently verify that the alternative 5202 addresses proposed for continuing the communication are bound to the 5203 initial address through a simple hash calculation. A limitation of 5204 the HBA technique is that once generated the address set is fixed and 5205 cannot be changed without also changing all the addresses of the HBA 5206 set. In other words, the HBA technique does not support dynamic 5207 addition of address to a previously generated HBA set. An advantage 5208 of this approach is that it requires only hash operations to verify a 5209 locator set, imposing very low computational cost to the protocol. 5211 In a CGA based approach the address used as ULID is a CGA that 5212 contains a hash of a public key in its interface identifier. The 5213 result is a secure binding between the ULID and the associated key 5214 pair. This allows each peer to use the corresponding private key to 5215 sign the shim messages that convey locator set information. The 5216 trust chain in this case is the following: the ULID used for the 5217 communication is securely bound to the key pair because it contains 5218 the hash of the public key, and the locator set is bound to the 5219 public key through the signature. The CGA approach then supports 5220 dynamic addition of new locators in the locator set, since in order 5221 to do that, the node only needs to sign the new locator with the 5222 private key associated with the CGA used as ULID. A limitation of 5223 this approach is that it imposes systematic usage of public key 5224 cryptography with its associate computational cost. 5226 Any of these two mechanisms HBA and CGA provide time-shifted attack 5227 protection, since the ULID is securely bound to a locator set that 5228 can only be defined by the owner of the ULID. 5230 So, the design decision adopted was that both mechanisms HBA and CGA 5231 are supported, so that when only stable address sets are required, 5232 the nodes can benefit from the low computational cost offered by HBA 5233 while when dynamic locator sets are required, this can be achieved 5234 through CGAs with an additional cost. Moreover, because HBAs are 5235 defined as a CGA extension, the addresses available in a node can 5236 simultaneously be CGAs and HBAs, allowing the usage of the HBA and 5237 CGA functionality when needed without requiring a change in the 5238 addresses used. 5240 22.5. ULID-pair context establishment exchange 5242 Two options were considered for the ULID-pair context establishment 5243 exchange: a 2-way handshake and a 4-way handshake. 5245 A key goal for the design of this exchange was that protection 5246 against DoS attacks. The attack under consideration was basically a 5247 situation where an attacker launches a great amount of ULID-pair 5248 establishment request packets, exhausting victim's resources, similar 5249 to TCP SYN flooding attacks. 5251 A 4 way-handshake exchange protects against these attacks because the 5252 receiver does not creates any state associate to a given context 5253 until the reception of the second packet which contains a prior 5254 contact proof in the form of a token. At this point the receiver can 5255 verify that at least the address used by the initiator is at some 5256 extent valid, since the initiator is able to receive packets at this 5257 address. In the worse case, the responder can track down the 5258 attacker using this address. The drawback of this approach is that 5259 it imposes a 4 packet exchange for any context establishment. This 5260 would be a great deal if the shim context needed to be established up 5261 front, before the communication can proceed. However, thanks to 5262 deferred context establishment capability of the shim protocol, this 5263 limitation has a reduced impact in the performance of the protocol. 5265 (It may however have a greater impact in the situation of context 5266 recover as discussed earlier, but in this case, it is possible to 5267 perform optimizations to reduce the number of packets as described 5268 above) 5270 The other option considered was a 2-way handshake with the 5271 possibility to fall back to a 4-way handshake in case of attack. In 5272 this approach, the ULID-pair establishment exchange normally consists 5273 in a 2-packet exchange and it does not verify that the initiator has 5274 performed a prior contact before creating context state. In case 5275 that a DoS attack is detected, the responder falls back to a 4-way 5276 handshake similar to the one described previously in order to prevent 5277 the detected attack to proceed. The main difficulty with this attack 5278 is how to detect that a responder is currently under attack. It 5279 should be noted, that because this is 2-way exchange, it is not 5280 possible to use the number of half open sessions (as in TCP) to 5281 detect an ongoing attack and different heuristics need to be 5282 considered. 5284 The design decision taken was that considering the current impact of 5285 DoS attacks and the low impact of the 4-way exchange in the shim 5286 protocol thanks to the deferred context establishment capability, a 5287 4-way exchange would be adopted for the base protocol. 5289 22.6. Updating locator sets 5291 There are two possible approaches to the addition and removal of 5292 locators: atomic and differential approaches. The atomic approach 5293 essentially send the complete locators set each time that a variation 5294 in the locator set occurs. The differential approach send the 5295 differences between the existing locator set and the new one. The 5296 atomic approach imposes additional overhead, since all the locator 5297 set has to be exchanged each time while the differential approach 5298 requires re-synchronization of both ends through changes i.e. that 5299 both ends have the same idea about what the current locator set is. 5301 Because of the difficulties imposed by the synchronization 5302 requirement, the atomic approach was selected. 5304 22.7. State Cleanup 5306 There are essentially two approaches for discarding an existing state 5307 about locators, keys and identifiers of a correspondent node: a 5308 coordinated approach and an unilateral approach. 5310 In the unilateral approach, each node discards the information about 5311 the other node without coordination with the other node based on some 5312 local timers and heuristics. No packet exchange is required for 5313 this. In this case, it would be possible that one of the nodes has 5314 discarded the state while the other node still hasn't. In this case, 5315 a No-Context error message may be required to inform about the 5316 situation and possibly a recovery mechanism is also needed. 5318 A coordinated approach would use an explicit CLOSE mechanism, akin to 5319 the one specified in HIP [19]. If an explicit CLOSE handshake and 5320 associated timer is used, then there would no longer be a need for 5321 the No Context Error message due to a peer having garbage collected 5322 its end of the context. However, there is still potentially a need 5323 to have a No Context Error message in the case of a complete state 5324 loss of the peer (also known as a crash followed by a reboot). Only 5325 if we assume that the reboot takes at least the CLOSE timer, or that 5326 it is ok to not provide complete service until CLOSE timer minutes 5327 after the crash, can we completely do away with the No Context Error 5328 message. 5330 In addition, other aspect that is relevant for this design choice is 5331 the context confusion issue. In particular, using an unilateral 5332 approach to discard context state clearly opens the possibility of 5333 context confusion, where one of the ends unilaterally discards the 5334 context state, while the peer does not. In this case, the end that 5335 has discarded the state can re-use the context tag value used for the 5336 discarded state for a another context, creating a potential context 5337 confusion situation. In order to illustrate the cases where problems 5338 would arise consider the following scenario: 5340 o Hosts A and B establish context 1 using CTA and CTB as context 5341 tags. 5343 o Later on, A discards context 1 and the context tag value CTA 5344 becomes available for reuse. 5346 o However, B still keeps context 1. 5348 This would become a context confusion situation in the following two 5349 cases: 5351 o A new context 2 is established between A and B with a different 5352 ULID pair (or Forked Instance Identifier), and A uses CTA as 5353 context tag, If the locator sets used for both contexts are not 5354 disjoint, we are in a context confusion situation. 5356 o A new context is established between A and C and A uses CTA as 5357 context tag value for this new context. Later on, B sends Payload 5358 extension header and/or control messages containing CTA, which 5359 could be interpreted by A as belonging to context 2 (if no proper 5360 care is taken). Again we are in a context confusion situation. 5362 One could think that using a coordinated approach would eliminate 5363 these context confusion situations, making the protocol much simpler. 5364 However, this is not the case, because even in the case of a 5365 coordinated approach using a CLOSE/CLOSE ACK exchange, there is still 5366 the possibility of a host rebooting without having the time to 5367 perform the CLOSE exchange. So, it is true that the coordinated 5368 approach eliminates the possibility of a context confusion situation 5369 because premature garbage collection, but it does not prevent the 5370 same situations due to a crash and reboot of one of the involved 5371 hosts. The result is that even if we went for a coordinated 5372 approach, we would still need to deal with context confusion and 5373 provide the means to detect and recover from this situations. 5375 23. Appendix: Change Log 5377 [RFC Editor: please remove this section] 5379 The following changes have been made since draft-ietf-shim6-proto-11: 5381 o Reworded the placement of shim6 w.r.t. IPsec 5383 o Updated text on the IPsec considerations 5385 The following changes have been made since draft-ietf-shim6-proto-10: 5387 o Reworded the placement of shim6 w.r.t. IPsec 5389 o Updated text on the IPsec considerations 5391 The following changes have been made since draft-ietf-shim6-proto-09: 5393 o Explicitly added a reference to the applicability document 5395 o Added text on why oportunistic IPSec was not used for securing 5396 locator sets 5398 o Reowrded the Validator generation text to make it clearer 5400 o Reworded security considerations to explicitly address RFC 4218 5401 threats 5403 o Added OandM section 5405 o Added text on TE considerations 5407 o Added requirement to properly support RFC4884 icmp messages 5409 o Added th usage of Packetization Layer Path MTU Discovery 5411 o Reworded the placement of shim6 w.r.t. IPsec 5413 o Added text on the IPsec considerations 5415 The following changes have been made since draft-ietf-shim6-proto-08: 5417 o Clarified that the validator option must be included in R1 and I2 5418 messages 5420 o changed preferred peer/local locator to current peer/local locator 5421 to align it with faliure detection draft 5423 o Reworded sections describing the generation and reception of 5424 I2,I2bis, R2 and Update message to clarify that the CGA PDS may be 5425 included in them 5427 o ruled out the unspcified address as posible address to be used in 5428 shim6 control messages 5430 o added clarifyig note that explains that is possible that one of 5431 the peers is not multiaddrssed and does not have CGA/HBA 5433 o added assumption explaining that ULIDs are HBAs or CGAs 5435 o Editorial changes 5437 The following changes have been made since draft-ietf-shim6-proto-07: 5439 o New Error Message format added in the Format section 5441 o Added new registry for Error codes in the IANA considerations 5442 section 5444 o Changed the Format section so a Shim6 error message is sent back 5445 when a crtical option is not recognized (instead of an ICMP error 5446 message) 5448 o Changed the ULID estbalishment section so that a Shim6 error 5449 message is sent back when the locator verification is not 5450 recgnized or not consistent with the current CGA PDS 5452 o Changed the Locator Update section so that Shim6 error messages 5453 are sent instead of ICMP error messages 5455 o Changed the receiving packet section so that Shim6 error messages 5456 are generated instead of ICMP error messages 5458 o added new section about middle box consideration in the 5459 implication elsewhere section 5461 o added text for allowing strcuture in context tag name space, while 5462 still randomly cycling though part of the tag name space 5464 o changed the name of TEMPORARY flag for the TRANSIENT flag 5466 o clarified option length calculation 5468 o Editorial commnets from Iljitsch review 5469 o added new sub-section in the introduction about congestion 5470 notification to upper layer and include a reference to 5471 I-D.schuetz-tcpm-tcp-rlci 5473 o added reccomendation to keep the shim6 message length below 1280 5474 bytes 5476 o added the init nonce in the description of the verification of the 5477 validator when receiving I2 messages 5479 o removed FII and ULID in the verification of the validator when 5480 receiving I2BIS meesages, and added receiver context tag. 5482 o Clarified section about retransmision of I2 and I2bis messages, in 5483 case that the initiator decides not to retransmit I2/I2bis 5484 messages and retransmits I1 message 5486 o Clarified the effect of packets associated with a context but 5487 without the shim6 header when considering tearing down a context 5489 o Added new section in section 12 about how to process packets 5490 associated with a context that do not carry the shim6 ext header 5492 o Added respon der validator as information stored in I2-SENT and 5493 Responder validator, init nonce and RESP nonce as information 5494 available in I2BISSENT 5496 o Added Init Nonce, Responder Nonce, and Responder validator as 5497 information available for a shim6 context in the conceptual model 5498 during establishment phase. 5500 o Clarified how the Responder Validator is calculated based on a 5501 running counter that is independent of any received message 5503 o Editorial corrections resulting from Dave Thaler and Bob Braden 5504 reviews. 5506 The following changes have been made since draft-ietf-shim6-proto-06: 5508 o Changed wording in the renumberin considerations section, so that 5509 a shim6 context using a ULID that has been renumbered, MUST be 5510 discarded 5512 o Included text in the security considerations about IPSec BITW and 5513 IPSec tunnels. 5515 o Added text about the minimum key length of CGA in the security 5516 considerations section 5518 o fixed Payload/update message processing 5520 o synchonized with READ draft 5522 The following changes have been made since draft-ietf-shim6-proto-05: 5524 o Removed the possibility to keep on using the ULID after a 5525 renumbering event 5527 o Editorial corrections resulting from Dave Meyer's and Jim Bound's 5528 reviews. 5530 The following changes have been made since draft-ietf-shim6-proto-04: 5532 o Defined I1_RETRIES_MAX as 4. 5534 o Added text in section 7.9 clarifying the no per context state is 5535 stored at the receiver in order to reply an I1 message. 5537 o Added text in section 5 and in section 5.14 in particular, on 5538 defining additional options (including critical and non critical 5539 options). 5541 o Added text in the security considerations about threats related to 5542 secret S for generating the validators and recommendation to 5543 change S periodically. 5545 o Added text in the security considerations about the effects of 5546 attacks based on guessing the context tag being similar to 5547 spoofing source addresses in the case of payload packets. 5549 o Added clarification on what a recent nonce is in I2 and I2bis. 5551 o Removed (empty) open issues section. 5553 o Editorial corrections. 5555 The following changes have been made since draft-ietf-shim6-proto-03: 5557 o Editorial clarifications based on comments from Geoff, Shinta, 5558 Jari. 5560 o Added "no IPv6 NATs as an explicit assumption. 5562 o Moving some things out of the Introduction and Overview sections 5563 to remove all SHOULDs and MUSTs from there. 5565 o Added requirement that any Locator Preference options which use an 5566 element length greater than 3 octets have the already defined 5567 first 3 octets of flags, priority and weight. 5569 o Fixed security hole where a single message (I1) could cause 5570 CT(peer) to be updated. Now a three-way handshake is required 5571 before CT(peer) is updated for an existing context. 5573 The following changes have been made since draft-ietf-shim6-proto-02: 5575 o Replaced the Context Error message with the R1bis message. 5577 o Removed the Packet In Error option, since it was only used in the 5578 Context Error message. 5580 o Introduced a I2bis message which is sent in response to an I1bis 5581 message, since the responders processing is quite in this case 5582 than in the regular R1 case. 5584 o Moved the packet formats for the Keepalive and Probe message types 5585 and Event option to [4]. Only the message type values and option 5586 type value are specified for those in this document. 5588 o Removed the unused message types. 5590 o Added a state machine description as an appendix. 5592 o Filled in all the TBDs - except the IANA assignment of the 5593 protocol number. 5595 o Specified how context recovery and forked contexts work together. 5596 This required the introduction of a Forked Instance option to be 5597 able to tell which of possibly forked instances is being 5598 recovered. 5600 o Renamed the "host-pair context" to be "ULID-pair context". 5602 o Picked some initial retransmit timers for I1 and I2; 4 seconds. 5604 o Added timer values as protocol constants. The retransmit timers 5605 use binary exponential backoff and randomization (between .5 and 5606 1.5 of the nominal value). 5608 o Require that the R1/R1bis verifiers be usable for some minimum 5609 time so that the initiator knows for how long time it can safely 5610 retransmit I2 before it needs to go back to sending I1 again. 5611 Picked 30 seconds. 5613 o Split the message type codes into 0-63, which will not generate 5614 R1bis messages, and 64-127 which will generate R1bis messages. 5615 This allows extensibility of the protocol with new message types 5616 while being able to control when R1bis is generated. 5618 o Expanded the context tag from 32 to 47 bits. 5620 o Specified that enough locators need to be included in I2 and R2 5621 messages. Specified that the HBA/CGA verification must be 5622 performed when the locator set is received. 5624 o Specified that ICMP parameter problem errors are sent in certain 5625 error cases, for instance when the verification method is unknown 5626 to the receiver, or there is an unknown message type or option 5627 type. 5629 o Renamed "payload message" to be "payload extension header". 5631 o Many editorial clarifications suggested by Geoff Huston. 5633 o Modified the dispatching of payload extension header to only 5634 compare CT(local) i.e., not compare the source and destination 5635 IPv6 address fields. 5637 The following changes have been made since draft-ietf-shim6-proto-00: 5639 o Removed the use of the flow label and the overloading of the IP 5640 protocol numbers. Instead, when the locator pair is not the ULID 5641 pair, the ULP payloads will be carried with an 8 octet extension 5642 header. The belief is that it is possible to remove these extra 5643 bytes by defining future Shim6 extensions that exchange more 5644 information between the hosts, without having to overload the flow 5645 label or the IP protocol numbers. 5647 o Grew the context tag from 20 bits to 32 bits, with the possibility 5648 to grow it to 47 bits. This implies changes to the message 5649 formats. 5651 o Almost by accident, the new Shim6 message format is very close to 5652 the HIP message format. 5654 o Adopted the HIP format for the options, since this makes it easier 5655 to describe variable length options. The original, ND-style, 5656 option format requires internal padding in the options to make 5657 them 8 octet length in total, while the HIP format handles that 5658 using the option length field. 5660 o Removed some of the control messages, and renamed the other ones. 5662 o Added a "generation" number to the Locator List option, so that 5663 the peers can ensure that the preferences refer to the right 5664 "version" of the Locator List. 5666 o In order for FBD and exploration to work when there the use of the 5667 context is forked, that is different ULP messages are sent over 5668 different locator pairs, things are a lot easier if there is only 5669 one current locator pair used for each context. Thus the forking 5670 of the context is now causing a new context to be established for 5671 the same ULID; the new context having a new context tag. The 5672 original context is referred to as the "default" context for the 5673 ULID pair. 5675 o Added more background material and textual descriptions. 5677 24. References 5679 24.1. Normative References 5681 [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement 5682 Levels", BCP 14, RFC 2119, March 1997. 5684 [2] Aura, T., "Cryptographically Generated Addresses (CGA)", 5685 RFC 3972, March 2005. 5687 [3] Bagnulo, M., "Hash Based Addresses (HBA)", 5688 draft-ietf-shim6-hba-05 (work in progress), December 2007. 5690 [4] Arkko, J. and I. Beijnum, "Failure Detection and Locator Pair 5691 Exploration Protocol for IPv6 Multihoming", 5692 draft-ietf-shim6-failure-detection-13 (work in progress), 5693 June 2008. 5695 24.2. Informative References 5697 [5] Gulbrandsen, A., Vixie, P., and L. Esibov, "A DNS RR for 5698 specifying the location of services (DNS SRV)", RFC 2782, 5699 February 2000. 5701 [6] Ferguson, P. and D. Senie, "Network Ingress Filtering: 5702 Defeating Denial of Service Attacks which employ IP Source 5703 Address Spoofing", BCP 38, RFC 2827, May 2000. 5705 [7] Draves, R., "Default Address Selection for Internet Protocol 5706 version 6 (IPv6)", RFC 3484, February 2003. 5708 [8] Bagnulo, M., "Updating RFC 3484 for multihoming support", 5709 draft-bagnulo-ipv6-rfc3484-update-00 (work in progress), 5710 December 2005. 5712 [9] Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson, 5713 "RTP: A Transport Protocol for Real-Time Applications", STD 64, 5714 RFC 3550, July 2003. 5716 [10] Abley, J., Black, B., and V. Gill, "Goals for IPv6 Site- 5717 Multihoming Architectures", RFC 3582, August 2003. 5719 [11] Rajahalme, J., Conta, A., Carpenter, B., and S. Deering, "IPv6 5720 Flow Label Specification", RFC 3697, March 2004. 5722 [12] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 5723 Requirements for Security", BCP 106, RFC 4086, June 2005. 5725 [13] Hinden, R. and B. Haberman, "Unique Local IPv6 Unicast 5726 Addresses", RFC 4193, October 2005. 5728 [14] Nordmark, E. and T. Li, "Threats Relating to IPv6 Multihoming 5729 Solutions", RFC 4218, October 2005. 5731 [15] Huitema, C., "Ingress filtering compatibility for IPv6 5732 multihomed sites", draft-huitema-shim6-ingress-filtering-00 5733 (work in progress), September 2005. 5735 [16] Bagnulo, M. and E. Nordmark, "SHIM - MIPv6 Interaction", 5736 draft-bagnulo-shim6-mip-00 (work in progress), July 2005. 5738 [17] Nordmark, E., "Shim6 Application Referral Issues", 5739 draft-ietf-shim6-app-refer-00 (work in progress), July 2005. 5741 [18] Bagnulo, M. and J. Abley, "Applicability Statement for the 5742 Level 3 Multihoming Shim Protocol (Shim6)", 5743 draft-ietf-shim6-applicability-03 (work in progress), 5744 July 2007. 5746 [19] Moskowitz, R., Nikander, P., Jokela, P., and T. Henderson, 5747 "Host Identity Protocol", draft-ietf-hip-base-10 (work in 5748 progress), October 2007. 5750 [20] Schuetz, S., Koutsianas, N., Eggert, L., Eddy, W., Swami, Y., 5751 and K. Le, "TCP Response to Lower-Layer Connectivity-Change 5752 Indications", draft-schuetz-tcpm-tcp-rlci-03 (work in 5753 progress), February 2008. 5755 [21] Williams, N. and M. Richardson, "Better-Than-Nothing-Security: 5756 An Unauthenticated Mode of IPsec", draft-ietf-btns-core-07 5757 (work in progress), August 2008. 5759 [22] Komu, M., Bagnulo, M., Slavov, K., and S. Sugimoto, "Socket 5760 Application Program Interface (API) for Multihoming Shim", 5761 draft-ietf-shim6-multihome-shim-api-07 (work in progress), 5762 November 2008. 5764 [23] Mathis, M. and J. Heffner, "Packetization Layer Path MTU 5765 Discovery", RFC 4821, March 2007. 5767 [24] Bonica, R., Gan, D., Tappan, D., and C. Pignataro, "Extended 5768 ICMP to Support Multi-Part Messages", RFC 4884, April 2007. 5770 Authors' Addresses 5772 Erik Nordmark 5773 Sun Microsystems 5774 17 Network Circle 5775 Menlo Park, CA 94025 5776 USA 5778 Phone: +1 650 786 2921 5779 Email: erik.nordmark@sun.com 5781 Marcelo Bagnulo 5782 Universidad Carlos III de Madrid 5783 Av. Universidad 30 5784 Leganes, Madrid 28911 5785 SPAIN 5787 Phone: +34 91 6248814 5788 Email: marcelo@it.uc3m.es 5789 URI: http://www.it.uc3m.es