idnits 2.17.1 draft-ietf-hip-native-nat-traversal-24.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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 : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC6890-compliant IPv4 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Line 1799 has weird spacing: '...eserved zero...' == Line 1839 has weird spacing: '... Min Ta the ...' == Line 1870 has weird spacing: '...eserved rese...' == Line 1872 has weird spacing: '...Address an ...' == Line 2071 has weird spacing: '...eserved reser...' == (6 more instances...) == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: When UDP-ENCAPSULATION mode is chosen either explicitly or implicitly, the connectivity checks as defined in this document MUST not be used. When hosts lose connectivity, they MUST instead utilize [RFC8046] or [RFC8047] procedures, but with the difference being that UDP-based tunneling MUST be employed for the entire lifetime of the corresponding Host Association. -- The document date (November 29, 2017) is 2312 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) ** Downref: Normative reference to an Experimental RFC: RFC 5770 ** Obsolete normative reference: RFC 5389 (Obsoleted by RFC 8489) ** Obsolete normative reference: RFC 5226 (Obsoleted by RFC 8126) == Outdated reference: A later version (-20) exists of draft-ietf-ice-rfc5245bis-08 ** Downref: Normative reference to an Informational RFC: RFC 2475 -- Obsolete informational reference (is this intentional?): RFC 4423 (Obsoleted by RFC 9063) -- Obsolete informational reference (is this intentional?): RFC 5201 (Obsoleted by RFC 7401) Summary: 4 errors (**), 0 flaws (~~), 11 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 HIP Working Group A. Keranen 3 Internet-Draft J. Melen 4 Intended status: Standards Track M. Komu, Ed. 5 Expires: June 2, 2018 Ericsson 6 November 29, 2017 8 Native NAT Traversal Mode for the Host Identity Protocol 9 draft-ietf-hip-native-nat-traversal-24 11 Abstract 13 This document specifies a new Network Address Translator (NAT) 14 traversal mode for the Host Identity Protocol (HIP). The new mode is 15 based on the Interactive Connectivity Establishment (ICE) methodology 16 and UDP encapsulation of data and signaling traffic. The main 17 difference from the previously specified modes is the use of HIP 18 messages for all NAT traversal procedures. 20 Status of This Memo 22 This Internet-Draft is submitted in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF). Note that other groups may also distribute 27 working documents as Internet-Drafts. The list of current Internet- 28 Drafts is at http://datatracker.ietf.org/drafts/current/. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 This Internet-Draft will expire on June 2, 2018. 37 Copyright Notice 39 Copyright (c) 2017 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents 44 (http://trustee.ietf.org/license-info) in effect on the date of 45 publication of this document. Please review these documents 46 carefully, as they describe your rights and restrictions with respect 47 to this document. Code Components extracted from this document must 48 include Simplified BSD License text as described in Section 4.e of 49 the Trust Legal Provisions and are provided without warranty as 50 described in the Simplified BSD License. 52 Table of Contents 54 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 55 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 56 3. Overview of Operation . . . . . . . . . . . . . . . . . . . . 7 57 4. Protocol Description . . . . . . . . . . . . . . . . . . . . 9 58 4.1. Relay Registration . . . . . . . . . . . . . . . . . . . 9 59 4.2. Transport Address Candidate Gathering at the Relay Client 13 60 4.3. NAT Traversal Mode Negotiation . . . . . . . . . . . . . 15 61 4.4. Connectivity Check Pacing Negotiation . . . . . . . . . . 17 62 4.5. Base Exchange via Control Relay Server . . . . . . . . . 17 63 4.6. Connectivity Checks . . . . . . . . . . . . . . . . . . . 20 64 4.6.1. Connectivity Check Procedure . . . . . . . . . . . . 21 65 4.6.2. Rules for Connectivity Checks . . . . . . . . . . . . 24 66 4.6.3. Rules for Concluding Connectivity Checks . . . . . . 26 67 4.7. NAT Traversal Optimizations . . . . . . . . . . . . . . . 27 68 4.7.1. Minimal NAT Traversal Support . . . . . . . . . . . . 27 69 4.7.2. Base Exchange without Connectivity Checks . . . . . . 27 70 4.7.3. Initiating a Base Exchange both with and without UDP 71 Encapsulation . . . . . . . . . . . . . . . . . . . . 29 72 4.8. Sending Control Packets after the Base Exchange . . . . . 29 73 4.9. Mobility Handover Procedure . . . . . . . . . . . . . . . 30 74 4.10. NAT Keepalives . . . . . . . . . . . . . . . . . . . . . 34 75 4.11. Closing Procedure . . . . . . . . . . . . . . . . . . . . 34 76 4.12. Relaying Considerations . . . . . . . . . . . . . . . . . 35 77 4.12.1. Forwarding Rules and Permissions . . . . . . . . . . 35 78 4.12.2. HIP Data Relay and Relaying of Control Packets . . . 36 79 4.12.3. Handling Conflicting SPI Values . . . . . . . . . . 37 80 5. Packet Formats . . . . . . . . . . . . . . . . . . . . . . . 38 81 5.1. HIP Control Packets . . . . . . . . . . . . . . . . . . . 38 82 5.2. Connectivity Checks . . . . . . . . . . . . . . . . . . . 39 83 5.3. Keepalives . . . . . . . . . . . . . . . . . . . . . . . 39 84 5.4. NAT Traversal Mode Parameter . . . . . . . . . . . . . . 39 85 5.5. Connectivity Check Transaction Pacing Parameter . . . . . 40 86 5.6. Relay and Registration Parameters . . . . . . . . . . . . 41 87 5.7. LOCATOR_SET Parameter . . . . . . . . . . . . . . . . . . 42 88 5.8. RELAY_HMAC Parameter . . . . . . . . . . . . . . . . . . 44 89 5.9. Registration Types . . . . . . . . . . . . . . . . . . . 44 90 5.10. Notify Packet Types . . . . . . . . . . . . . . . . . . . 44 91 5.11. ESP Data Packets . . . . . . . . . . . . . . . . . . . . 45 92 5.12. RELAYED_ADDRESS and MAPPED_ADDRESS Parameters . . . . . . 45 93 5.13. PEER_PERMISSION Parameter . . . . . . . . . . . . . . . . 46 94 5.14. HIP Connectivity Check Packets . . . . . . . . . . . . . 47 95 5.15. NOMINATE parameter . . . . . . . . . . . . . . . . . . . 48 96 6. Security Considerations . . . . . . . . . . . . . . . . . . . 48 97 6.1. Privacy Considerations . . . . . . . . . . . . . . . . . 48 98 6.2. Opportunistic Mode . . . . . . . . . . . . . . . . . . . 49 99 6.3. Base Exchange Replay Protection for Control Relay Server 49 100 6.4. Demultiplexing Different HIP Associations . . . . . . . . 50 101 6.5. Reuse of Ports at the Data Relay Server . . . . . . . . . 50 102 6.6. Amplification attacks . . . . . . . . . . . . . . . . . . 50 103 6.7. Attacks against Connectivity Checks and Candidate 104 Gathering . . . . . . . . . . . . . . . . . . . . . . . . 50 105 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 51 106 8. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 52 107 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 52 108 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 52 109 10.1. Normative References . . . . . . . . . . . . . . . . . . 52 110 10.2. Informative References . . . . . . . . . . . . . . . . . 54 111 Appendix A. Selecting a Value for Check Pacing . . . . . . . . . 54 112 Appendix B. Differences with respect to ICE . . . . . . . . . . 55 113 Appendix C. Differences to Base Exchange and UPDATE procedures . 57 114 Appendix D. Multihoming Considerations . . . . . . . . . . . . . 59 115 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 60 117 1. Introduction 119 The Host Identity Protocol (HIP) [RFC7401] is specified to run 120 directly on top of IPv4 or IPv6. However, many middleboxes found in 121 the Internet, such as NATs and firewalls, often allow only UDP or TCP 122 traffic to pass [RFC5207]. Also, especially NATs usually require the 123 host behind a NAT to create a forwarding state in the NAT before 124 other hosts outside of the NAT can contact the host behind the NAT. 125 To overcome this problem, different methods, commonly referred to as 126 NAT traversal techniques, have been developed. 128 As one solution, the HIP experiment report [RFC6538] mentions that 129 Teredo based NAT traversal for HIP and related ESP traffic (with 130 double tunneling overhead). Another solution is specified in 131 [RFC5770], which will be referred as "Legacy ICE-HIP" in this 132 document. The experimental Legacy ICE-HIP specification combines 133 Interactive Connectivity Establishment (ICE) protocol 134 [I-D.ietf-ice-rfc5245bis] with HIP, so that basically ICE is 135 responsible of NAT traversal and connectivity testing, while HIP is 136 responsible of end-host authentication and IPsec key management. The 137 resulting protocol uses HIP, STUN and ESP messages tunneled over a 138 single UDP flow. The benefit of using ICE and its STUN/TURN 139 messaging formats is that one can re-use the NAT traversal 140 infrastructure already available in the Internet, such as STUN and 141 TURN servers. Also, some middleboxes may be STUN-aware and may be 142 able to do something "smart" when they see STUN being used for NAT 143 traversal. 145 Implementing a full ICE/STUN/TURN protocol stack as specified in 146 Legacy ICE-HIP results in a considerable amount of effort and code 147 which could be avoided by re-using and extending HIP messages and 148 state machines for the same purpose. Thus, this document specifies 149 an alternative NAT traversal mode referred as "Native ICE-HIP" that 150 employs HIP messaging format instead of STUN or TURN for the 151 connectivity checks, keepalives and data relaying. Native ICE-HIP 152 also specifies how mobility management works in the context of NAT 153 traversal, which is missing from the Legacy ICE-HIP specification. 154 The native specification is also based on HIPv2, whereas legacy 155 specification is based on HIPv1. 157 Similarly as Legacy ICE-HIP, also this specification builds on the 158 HIP registration extensions [RFC8003] and the base exchange procedure 159 [RFC7401] and its closing procedures, so the reader is recommended to 160 get familiar with the relevant specifications. In a nutshell, the 161 registration extensions allow a HIP Initiator (usually a "client" 162 host) to ask for specific services from a HIP Responder (usually a 163 "server" host). The registration parameters are included in a base 164 exchange, which is essentially a four-way Diffie-Hellman key exchange 165 authenticated using the public keys of the end-hosts. When the hosts 166 negotiate support for ESP [RFC7402] during the base exchange, they 167 can deliver ESP protected application payload to each other. When 168 either of the hosts moves and changes its IP address, the two hosts 169 re-establish connectivity using the mobility extensions [RFC8046]. 170 The reader is also recommended to get familiar with the mobility 171 extensions, but basically it is a three-way procedure, where the 172 mobile host first announces its new location to the peer, and then 173 the peer tests for connectivity (so called return routability check), 174 for which the mobile hosts must respond in order to activate its new 175 location. This specification builds on the mobility procedures, but 176 modifies it to be compatible with ICE. The differences to the 177 mobility extensions specified in Appendix C. It is worth noting that 178 multihoming support as specified in [RFC8047] is left for further 179 study. 181 This specification builds heavily on the ICE methodology, so it is 182 recommended that the reader is familiar with the ICE specification 183 [I-D.ietf-ice-rfc5245bis] (especially the overview). However, native 184 ICE-HIP does not implement all the features in ICE, and, hence, the 185 different features of ICE are cross referenced using [RFC2119] 186 terminology for clarity. Appendix B explains the differences to ICE. 188 2. Terminology 190 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 191 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 192 document are to be interpreted as described in [RFC2119]. 194 This document borrows terminology from [RFC5770], [RFC7401], 195 [RFC8046], [RFC4423], [I-D.ietf-ice-rfc5245bis], and [RFC5389]. The 196 following terms recur in the text: 198 ICE: 199 Interactive Connectivity Establishment (ICE) protocol as specified 200 in [I-D.ietf-ice-rfc5245bis] 202 Legacy ICE-HIP: 203 Refers to the "Basic Host Identity Protocol (HIP) Extensions for 204 Traversal of Network Address Translators" as specified in 205 [RFC5770]. The protocol specified in this document offers an 206 alternative to Legacy ICE-HIP. 208 Native ICE-HIP: 209 The protocol specified in this document (Native NAT Traversal Mode 210 for HIP). 212 Initiator: 213 The Initiator is the host that initiates the base exchange using 214 I1 message. 216 Responder: 217 The Responder is the host that receives the I1 packet from the 218 Initiator. 220 Control Relay Server 221 A registrar host that forwards any kind of HIP control plane 222 packets between the Initiator and the Responder. This host is 223 critical because it relays the locators between the Initiator and 224 the Responder, so that they can try to establish a direct 225 communication path with each other. This host is used to replace 226 HIP rendezvous servers [RFC8004] for hosts operating in private 227 address realms. In the Legacy ICE-HIP specification, this host is 228 denoted as "HIP Relay Server". 229 . 231 Control Relay Client: 232 A requester host that registers to a Control Relay Server 233 requesting it to forward control-plane traffic (i.e. HIP control 234 messages). In the Legacy ICE-HIP specification, this is denoted 235 as "HIP Relay Client". 237 Data Relay Server: 238 A registrar host that forwards HIP related data plane packets, 239 such as Encapsulating Security Payload (ESP) [RFC7402], between 240 two hosts. This host implements similar functionality as TURN 241 servers. 243 Data Relay Client: 244 A requester host that registers to a Data Relay Server requesting 245 it to forward data-plane traffic (e.g. ESP traffic). 247 Locator: 248 As defined in [RFC8046]: "A name that controls how the packet is 249 routed through the network and demultiplexed by the end-host. It 250 may include a concatenation of traditional network addresses such 251 as an IPv6 address and end-to-end identifiers such as an ESP SPI. 252 It may also include transport port numbers or IPv6 Flow Labels as 253 demultiplexing context, or it may simply be a network address." 255 LOCATOR_SET (written in capital letters): 256 Denotes a HIP control packet parameter that bundles multiple 257 locators together. 259 ICE offer: 260 The Initiator's LOCATOR_SET parameter in a HIP I2 control packet. 261 Corresponds to the ICE offer parameter, but is HIP specific. 263 ICE answer: 264 The Responder's LOCATOR_SET parameter in a HIP R2 control packet. 265 Corresponds to the ICE answer parameter, but is HIP specific. 267 HIP connectivity checks: 268 In order to obtain a direct end-to-end communication path (without 269 employing a Data Relay Server), two communicating HIP hosts try to 270 "punch holes" through their NAT boxes using this mechanism. It is 271 similar to the ICE connectivity checks, but implemented using HIP 272 return routability checks. 274 Controlling host: 275 The controlling host is the Initiator. It nominates the candidate 276 pair to be used with the controlled host. 278 Controlled host: 279 The controlled host is the Responder. It waits for the 280 controlling to nominate an address candidate pair. 282 Checklist: 283 A list of address candidate pairs that need to be tested for 284 connectivity. 286 Transport address: 288 Transport layer port and the corresponding IPv4/v6 address. 290 Candidate: 291 A transport address that is a potential point of contact for 292 receiving data. 294 Host candidate: 295 A candidate obtained by binding to a specific port from an IP 296 address on the host. 298 Server reflexive candidate: 299 A translated transport address of a host as observed by a Control 300 or Data Relay Server. 302 Peer reflexive candidate: 303 A translated transport address of a host as observed by its peer. 305 Relayed candidate: 306 A transport address that exists on a Data Relay Server. Packets 307 that arrive at this address are relayed towards the Data Relay 308 Client. 310 Permission: 311 In the context of Data Relay Server, permission refers to a 312 concept similar to TURN's channels. Before a host can use a 313 relayed candidate to forward traffic through a Data Relay Server, 314 the host must activate the relayed candidate with a specific peer 315 host. 317 Base: 318 The base of an candidate is the local source address a host uses 319 to send packets for the associated candidate. For example, the 320 base of a server reflexive address is the local address the host 321 used for registering itself to the associated Control or Data 322 Relay Server. The base of a host candidate is equal to the host 323 candidate itself. 325 3. Overview of Operation 326 +--------------+ 327 | Control | 328 +--------+ | Relay Server | +--------+ 329 | Data | +----+-----+---+ | Data | 330 | Relay | / \ | Relay | 331 | Server | / \ | Server | 332 +--------+ / \ +--------+ 333 / \ 334 / \ 335 / \ 336 / <- Signaling -> \ 337 / \ 338 +-------+ +-------+ 339 | NAT | | NAT | 340 +-------+ +-------+ 341 / \ 342 / \ 343 +-------+ +-------+ 344 | Init- | | Resp- | 345 | iator | | onder | 346 +-------+ +-------+ 348 Figure 1: Example Network Configuration 350 In the example configuration depicted in Figure 1, both Initiator and 351 Responder are behind one or more NATs, and both private networks are 352 connected to the public Internet. To be contacted from behind a NAT, 353 at least the Responder must be registered with a Control Relay Server 354 reachable on the public Internet. The Responder may have also 355 registered to a Data Relay Server that can forward the data plane in 356 case NAT traversal fails. While, strictly speaking, the Initiator 357 does not need any Relay Servers, it may act in the other role for 358 other hosts and connectivity with the Data Relay Server of the 359 Responder may fail, so it is the Initiator may also have registered 360 to a Control and/or Data Relay Server. It is worth noting that a 361 Control and Data Relay does not forge the source address of a passing 362 packet, but always translates the source address and source port of a 363 packet to be forwarded (to its own). 365 We assume, as a starting point, that the Initiator knows both the 366 Responder's Host Identity Tag (HIT) and the address(es) of the 367 Responder's Control Relay Server(s) (how the Initiator learns of the 368 Responder's Control Relay Server is outside of the scope of this 369 document, but may be through DNS or another name service). The first 370 steps are for both the Initiator and Responder to register with a 371 Control Relay Server (need not be the same one) and gather a set of 372 address candidates. The hosts use either Control Relay Servers or 373 Data Relay Servers (or other infrastructure including STUN or TURN 374 servers) for gathering the candidates. Next, the HIP base exchange 375 is carried out by encapsulating the HIP control packets in UDP 376 datagrams and sending them through the Responder's Control Relay 377 Server. As part of the base exchange, each HIP host learns of the 378 peer's candidate addresses through the HIP offer/answer procedure 379 embedded in the base exchange. 381 Once the base exchange is completed, two HIP hosts have established a 382 working communication session (for signaling) via a Control Relay 383 Server, but the hosts still have to find a better path, preferably 384 without a Data Relay Server, for the ESP data flow. For this, 385 connectivity checks are carried out until a working pair of addresses 386 is discovered. At the end of the procedure, if successful, the hosts 387 will have established a UDP-based tunnel that traverses both NATs, 388 with the data flowing directly from NAT to NAT or via a Data Relay 389 Server. At this point, also the HIP signaling can be sent over the 390 same address/port pair, and is demultiplexed from IPsec as described 391 in the UDP encapsulation standard for IPsec [RFC3948]. Finally, the 392 two hosts send NAT keepalives as needed in order keep their UDP- 393 tunnel state active in the associated NAT boxes. 395 If either one of the hosts knows that it is not behind a NAT, hosts 396 can negotiate during the base exchange a different mode of NAT 397 traversal that does not use HIP connectivity checks, but only UDP 398 encapsulation of HIP and ESP. Also, it is possible for the Initiator 399 to simultaneously try a base exchange with and without UDP 400 encapsulation. If a base exchange without UDP encapsulation 401 succeeds, no HIP connectivity checks or UDP encapsulation of ESP are 402 needed. 404 4. Protocol Description 406 This section describes the normative behavior of the "Native ICE-HIP" 407 protocol extension. Most of the procedures are similar to what is 408 defined in [RFC5770] but with different, or additional, parameter 409 types and values. In addition, a new type of relaying server, Data 410 Relay Server, is specified. Also, it should be noted that HIP 411 version 2 [RFC7401] (instead of [RFC5201] used in [RFC5770]) is 412 expected to be used with this NAT traversal mode. 414 4.1. Relay Registration 416 In order for two hosts to communicate over NATted environments, they 417 need a reliable way to exchange information. To achieve this, "HIP 418 Relay Server" is defined in [RFC5770]. It supports relaying of HIP 419 control plane traffic over UDP in NATted environments, and forwards 420 HIP control packets between the Initiator and the Responder. In this 421 document, the HIP Relay Server is denoted as "Control Relay Server" 422 for better alignment with the rest of the terminology. The 423 registration to the Control Relay Server can be achieved using 424 RELAY_UDP_ESP parameter as explained later in this section. 426 To guarantee also data plane delivery over varying types of NAT 427 devices, a host MAY also register for UDP encapsulated ESP relaying 428 using Registration Type RELAY_UDP_ESP (value [TBD by IANA: 3]). This 429 service may be coupled with the Control Relay Server server or 430 offered separately on another server. If the server supports 431 relaying of UDP encapsulated ESP, the host is allowed to register for 432 a data relaying service using the registration extensions in 433 Section 3.3 of [RFC8003]). If the server has sufficient relaying 434 resources (free port numbers, bandwidth, etc.) available, it opens a 435 UDP port on one of its addresses and signals the address and port to 436 the registering host using the RELAYED_ADDRESS parameter (as defined 437 in Section 5.12 in this document). If the Data Relay Server would 438 accept the data relaying request but does not currently have enough 439 resources to provide data relaying service, it MUST reject the 440 request with Failure Type "Insufficient resources" [RFC8003]. 442 A Control Relay Server MUST silently drop packets to a Control Relay 443 Client that has not previously registered with the HIP relay. The 444 registration process follows the generic registration extensions 445 defined in [RFC8003]. The HIP control plane relaying registration 446 follows [RFC5770], but the data plane registration is different. It 447 is worth noting that if the HIP control and data plane relay services 448 reside on different hosts, the client has to register separately to 449 each of them. In the example shown in Figure 2, the two services are 450 coupled on a single host. The text uses "Relay Client" and "Relay 451 Server" as a shorthand when the procedures apply both to control and 452 data cases. 454 Control/Data Control/Data 455 Relay Client (Initiator) Relay Server (Responder) 456 | 1. UDP(I1) | 457 +---------------------------------------------------------------->| 458 | | 459 | 2. UDP(R1(REG_INFO(RELAY_UDP_HIP,[RELAY_UDP_ESP]))) | 460 |<----------------------------------------------------------------+ 461 | | 462 | 3. UDP(I2(REG_REQ(RELAY_UDP_HIP),[RELAY_UDP_ESP])) | 463 +---------------------------------------------------------------->| 464 | | 465 | 4. UDP(R2(REG_RES(RELAY_UDP_HIP,[RELAY_UDP_ESP]), REG_FROM, | 466 | [RELAYED_ADDRESS])) | 467 |<----------------------------------------------------------------+ 468 | | 470 Figure 2: Example Registration with a HIP Relay 472 In step 1, the Relay Client (Initiator) starts the registration 473 procedure by sending an I1 packet over UDP to the Relay Server. It 474 is RECOMMENDED that the Relay Client select a random port number from 475 the ephemeral port range 49152-65535 for initiating a base exchange. 476 Alternatively, a host MAY also use a single fixed port for initiating 477 all outgoing connections. However, the allocated port MUST be 478 maintained until all of the corresponding HIP Associations are 479 closed. It is RECOMMENDED that the Relay Server listen to incoming 480 connections at UDP port 10500. If some other port number is used, it 481 needs to be known by potential Relay Clients. 483 In step 2, the Relay Server (Responder) lists the services that it 484 supports in the R1 packet. The support for HIP control plane over 485 UDP relaying is denoted by the Registration Type value RELAY_UDP_HIP 486 (see Section 5.9). If the server supports also relaying of ESP 487 traffic over UDP, it includes also Registration type value 488 RELAY_UDP_ESP. 490 In step 3, the Relay Client selects the services for which it 491 registers and lists them in the REG_REQ parameter. The Relay Client 492 registers for the Control Data Relay service by listing the 493 RELAY_UDP_HIP value in the request parameter. If the Relay Client 494 requires also ESP relaying over UDP, it lists also RELAY_UDP_ESP. 496 In step 4, the Relay Server concludes the registration procedure with 497 an R2 packet and acknowledges the registered services in the REG_RES 498 parameter. The Relay Server denotes unsuccessful registrations (if 499 any) in the REG_FAILED parameter of R2. The Relay Server also 500 includes a REG_FROM parameter that contains the transport address of 501 the Relay Client as observed by the Relay Server (Server Reflexive 502 candidate). If the Relay Client registered to ESP relaying service, 503 the Relay Server includes RELAYED_ADDRESS parameter that describes 504 the UDP port allocated to the Relay Client for ESP relaying. It is 505 worth noting that the Data Relay Client must first activate this UDP 506 port by sending an UPDATE message to the Data Relay Server that 507 includes a PEER_PERMISSION parameter as described in Section 4.12.1 508 both after base exchange and handover procedures. Also, the Data 509 Relay Server should follow the port allocation recommendations in 510 Section 6.5. 512 After the registration, the Relay Client sends periodically NAT 513 keepalives to the Relay Server in order to keep the NAT bindings 514 between the Relay Client and the relay alive. The keepalive 515 extensions are described in Section 4.10. 517 The Data Relay Client MUST maintain an active HIP association with 518 the Data Relay Server as long as it requires the data relaying 519 service. When the HIP association is closed (or times out), or the 520 registration lifetime passes without the Data Relay Client refreshing 521 the registration, the Data Relay Server MUST stop relaying packets 522 for that host and close the corresponding UDP port (unless other Data 523 Relay Clients are still using it). 525 The Data Relay Server MAY use the same relayed address and port for 526 multiple Data Relay Clients, but since this can cause problems with 527 stateful firewalls (see Section 6.5) it is NOT RECOMMENDED. 529 When a Control Relay Client sends an UPDATE (e.g., due to host 530 movement or to renew service registration), the Control Relay Server 531 MUST follow the general guidelines defined in [RFC8003], with the 532 difference that all UPDATE messages are delivered on top of UDP. In 533 addition to this, the Control Relay Server MUST include the REG_FROM 534 parameter in all UPDATE responses sent to the Control Relay Client. 535 This applies both renewals of service registration but also to host 536 movement, where especially the latter requires the Control Relay 537 Client to learn its new server reflexive address candidate. 539 A Data Relay Client can request multiple relayed candidates from the 540 Data Relay Server (e.g., for the reasons described in 541 Section 4.12.3). After the base exchange with registration, the Data 542 Relay Client can request additional relayed candidates similarly as 543 during the base exchange. The Data Relay Client sends an UPDATE 544 message REG_REQ parameter requesting for the RELAY_UDP_ESP service. 545 The UPDATE message MUST also include a SEQ and a ECHO_REQUEST_SIGNED 546 parameter. The Data Relay Server MUST respond with an UPDATE message 547 that includes the corresponding response parameters: REG_RES, ACK and 548 ECHO_REQUEST_SIGNED . In case the Data Relay Server admitted a new 549 relayed UDP port for the Data Relay Client, the REG_RES parameter 550 MUST list RELAY_UDP_ESP as a service and the UPDATE message MUST also 551 include a RELAYED_ADDRESS parameter describing the relayed UDP port. 552 The Data Relay Server MUST also include the Server Reflexive 553 candidate in a REG_FROM parameter. It is worth mentioning that Data 554 Relay Client MUST activate the UDP port as described in 555 Section 4.12.1 before it can be used for any ESP relaying. 557 A Data Relay Client may unregister a relayed candidate in two ways. 558 It can wait for its lifetime to expire or it can explicitly request 559 it with zero lifetime using the UPDATE mechanism. The Data Relay 560 Client can send an REG_REQ parameter with zero lifetime to the Data 561 Relay Server in order to expire all relayed candidates. To expire a 562 specific relayed candidate, the Data Relay Client MUST also include 563 RELAYED_ADDRESS parameter as sent by the server in the UPDATE 564 message. Upon closing the HIP association (CLOSE-CLOSE-ACK procedure 565 initiated by either party), the Data Relay Server MUST also expire 566 all relayed candidates. 568 4.2. Transport Address Candidate Gathering at the Relay Client 570 An Initiator needs to gather a set of address candidates before 571 contacting a (non-relay) Responder. The candidates are needed for 572 connectivity checks that allow two hosts to discover a direct, non- 573 relayed path for communicating with each other. One server reflexive 574 candidate can be discovered during the registration with the Control 575 Relay Server from the REG_FROM parameter (and another from Data Relay 576 Server if one is employed). 578 The candidate gathering can be done at any time, but it needs to be 579 done before sending an I2 or R2 in the base exchange if ICE-HIP-UDP 580 mode is to be used for the connectivity checks. It is RECOMMENDED 581 that all three types of candidates (host, server reflexive, and 582 relayed) are gathered to maximize the probability of successful NAT 583 traversal. However, if no Data Relay Server is used, and the host 584 has only a single local IP address to use, the host MAY use the local 585 address as the only host candidate and the address from the REG_FROM 586 parameter discovered during the Control Relay Server registration as 587 a server reflexive candidate. In this case, no further candidate 588 gathering is needed. 590 A Data Relay Client MAY register only a single relayed candidate to 591 be used with multiple other peers. However, it is RECOMMENDED that a 592 Data Relay Client registers a new server reflexive candidate for each 593 its peer for the reasons described in Section 4.12.3. The procedures 594 for registering multiple relayed candidates are described in 595 Section 4.1. 597 If a Relay Client has more than one network interface, it can 598 discover additional server reflexive candidates by sending UPDATE 599 messages from each of its interfaces to the Relay Server. Each such 600 UPDATE message MUST include the following parameters: registration 601 request (REG_REQ) parameter with Registration Type 602 CANDIDATE_DISCOVERY (value [TBD by IANA: 4]) and ECHO_REQUEST_SIGNED 603 parameter. When a Control Relay Server receives an UPDATE message 604 with registration request containing a CANDIDATE_DISCOVERY type, it 605 MUST include a REG_FROM parameter, containing the same information as 606 if this were a Control Relay Server registration, to the response (in 607 addition to the mandatory ECHO_RESPONSE_SIGNED paramater). This 608 request type SHOULD NOT create any state at the Control Relay Server. 610 ICE guidelines [I-D.ietf-ice-rfc5245bis] for candidate gathering are 611 followed here. A number of host candidates (loopback, anycast and 612 others) should be excluded as described in the ICE specification 613 [I-D.ietf-ice-rfc5245bis]. Relayed candidates SHOULD be gathered in 614 order to guarantee successful NAT traversal, and implementations 615 SHOULD support this functionality even if it will not be used in 616 deployments in order to enable it by software configuration update if 617 needed at some point. A host SHOULD employ only a single server for 618 gathering the candidates for a single HIP association; either one 619 server providing both Control and Data Relay Server functionality, or 620 one Control Relay Server and also Data Relay Server if the 621 functionality is offered by another server. When the relay service 622 is split between two hosts, the server reflexive candidate from the 623 Control Relay Server SHOULD be used instead of the one provided by 624 the Data Relay Server. If a relayed candidate is identical to a host 625 candidate, the relayed candidate must be discarded. NAT64 626 considerations in [I-D.ietf-ice-rfc5245bis] apply as well. 628 HIP based connectivity can be utilized by IPv4 applications using 629 LSIs and by IPv6 based applications using HITs. The LSIs and HITs of 630 the local virtual interfaces MUST be excluded in the candidate 631 gathering phase as well to avoid creating unnecessary loopback 632 connectivity tests. 634 Gathering of candidates MAY also be performed by other means than 635 described in this section. For example, the candidates could be 636 gathered as specified in Section 4.2 of [RFC5770] if STUN servers are 637 available, or if the host has just a single interface and no STUN or 638 Data Relay Server are available. 640 Each local address candidate MUST be assigned a priority. The 641 following recommended formula (as described in 642 [I-D.ietf-ice-rfc5245bis]) SHOULD be used: 644 priority = (2^24)*(type preference) + (2^8)*(local preference) + 645 (2^0)*(256 - component ID) 647 In the formula, type preference follows the ICE specification section 648 4.1.2.2 guidelines: the RECOMMENDED values are 126 for host 649 candidates, 100 for server reflexive candidates, 110 for peer 650 reflexive candidates, and 0 for relayed candidates. The highest 651 value is 126 (the most preferred) and lowest is 0 (last resort). For 652 all candidates of the same type, the preference type value MUST be 653 identical, and, correspondingly, the value MUST be different for 654 different types. For peer reflexive values, the type preference 655 value MUST be higher than for server reflexive types. It should be 656 noted that peer reflexive values are learned later during 657 connectivity checks, so a host cannot employ it during candidate 658 gathering stage yet. 660 Following the ICE specification, the local preference MUST be an 661 integer from 0 (lowest preference) to 65535 (highest preference) 662 inclusive. In the case the host has only a single address candidate, 663 the value SHOULD be 65535. In the case of multiple candidates, each 664 local preference value MUST be unique. Dual-stack considerations for 665 IPv6 in ICE apply also here. 667 Unlike ICE, this protocol only creates a single UDP flow between the 668 two communicating hosts, so only a single component exists. Hence, 669 the component ID value MUST always be set to 1. 671 As defined in ICE , the retransmission timeout (RTO) for address 672 gathering from a Control/Data Relay Server SHOULD be calculated as 673 follows: 675 RTO = MAX (500ms, Ta * (Num-Of-Pairs)) 677 where Ta is the value used for Ta is the value used for the 678 connectivity check pacing and Num-Of-Pairs is number of pairs of 679 candidates with Control and Data Relay Servers (e.g. in the case of a 680 single server, it would be 1). A smaller value than 500 ms for the 681 RTO MUST NOT be used. 683 4.3. NAT Traversal Mode Negotiation 685 This section describes the usage of a new non-critical parameter 686 type. The presence of the parameter in a HIP base exchange means 687 that the end-host supports NAT traversal extensions described in this 688 document. As the parameter is non-critical (as defined in 689 Section 5.2.1 of [RFC7401]), it can be ignored by a end-host, which 690 means that the host is not required to support it or may decline to 691 use it. 693 With registration with a Control/Data Relay Server, it is usually 694 sufficient to use the UDP-ENCAPSULATION mode of NAT traversal since 695 the Relay Server is assumed to be in public address space. Thus, the 696 Relay Server SHOULD propose the UDP-ENCAPSULATION mode as the 697 preferred or only mode. The NAT traversal mode negotiation in a HIP 698 base exchange is illustrated in Figure 3. It is worth noting that 699 the Relay Server could be located between the hosts, but is omitted 700 here for simplicity. 702 Initiator Responder 703 | 1. UDP(I1) | 704 +--------------------------------------------------------------->| 705 | | 706 | 2. UDP(R1(.., NAT_TRAVERSAL_MODE(ICE-HIP-UDP), ..)) | 707 |<---------------------------------------------------------------+ 708 | | 709 | 3. UDP(I2(.., NAT_TRAVERSAL_MODE(ICE-HIP-UDP), LOC_SET, ..)) | 710 +--------------------------------------------------------------->| 711 | | 712 | 4. UDP(R2(.., LOC_SET, ..)) | 713 |<---------------------------------------------------------------+ 714 | | 716 Figure 3: Negotiation of NAT Traversal Mode 718 In step 1, the Initiator sends an I1 to the Responder. In step 2, 719 the Responder responds with an R1. As specified in [RFC5770], the 720 NAT_TRAVERSAL_MODE parameter in R1 contains a list of NAT traversal 721 modes the Responder supports. The mode specified in this document is 722 ICE-HIP-UDP (value [TBD by IANA: 3]). 724 In step 3, the Initiator sends an I2 that includes a 725 NAT_TRAVERSAL_MODE parameter. It contains the mode selected by the 726 Initiator from the list of modes offered by the Responder. If ICE- 727 HIP-UDP mode was selected, the I2 also includes the "Transport 728 address" locators (as defined in Section 5.7) of the Initiator in a 729 LOCATOR_SET parameter (denoted here LOC_SET). The locators in I2 are 730 the "ICE offer". 732 In step 4, the Responder concludes the base exchange with an R2 733 packet. If the Initiator chose ICE NAT traversal mode, the Responder 734 includes a LOCATOR_SET parameter in the R2 packet. The locators in 735 R2, encoded like the locators in I2, are the "ICE answer". If the 736 NAT traversal mode selected by the Initiator is not supported by the 737 Responder, the Responder SHOULD reply with a NOTIFY packet with type 738 NO_VALID_NAT_TRAVERSAL_MODE_PARAMETER and abort the base exchange. 740 4.4. Connectivity Check Pacing Negotiation 742 As explained in Legacy ICE-HIP [RFC5770], when a NAT traversal mode 743 with connectivity checks is used, new transactions should not be 744 started too fast to avoid congestion and overwhelming the NATs. For 745 this purpose, during the base exchange, hosts can negotiate a 746 transaction pacing value, Ta, using a TRANSACTION_PACING parameter in 747 R1 and I2 packets. The parameter contains the minimum time 748 (expressed in milliseconds) the host would wait between two NAT 749 traversal transactions, such as starting a new connectivity check or 750 retrying a previous check. The value that is used by both of the 751 hosts is the higher of the two offered values. 753 The minimum Ta value SHOULD be configurable, and if no value is 754 configured, a value of 50 ms MUST be used. Guidelines for selecting 755 a Ta value are given in Appendix A. Hosts SHOULD NOT use values 756 smaller than 5 ms for the minimum Ta, since such values may not work 757 well with some NATs (as explained in [I-D.ietf-ice-rfc5245bis]). The 758 Initiator MUST NOT propose a smaller value than what the Responder 759 offered. If a host does not include the TRANSACTION_PACING parameter 760 in the base exchange, a Ta value of 50 ms MUST be used as that host's 761 minimum value. 763 4.5. Base Exchange via Control Relay Server 765 This section describes how the Initiator and Responder perform a base 766 exchange through a Control Relay Server. Connectivity pacing 767 (denoted as TA_P here) was described in Section 4.4 and is neither 768 repeated here. Similarly, the NAT traversal mode negotiation process 769 (denoted as NAT_TM in the example) was described in Section 4.3 and 770 is neither repeated here. If a Control Relay Server receives an R1 771 or I2 packet without the NAT traversal mode parameter, it MUST drop 772 it and SHOULD send a NOTIFY error packet with type 773 NO_VALID_NAT_TRAVERSAL_MODE_PARAMETER to the sender of the R1 or I2. 775 It is RECOMMENDED that the Initiator send an I1 packet encapsulated 776 in UDP when it is destined to an IPv4 address of the Responder. 777 Respectively, the Responder MUST respond to such an I1 packet with a 778 UDP-encapsulated R1 packet, and also the rest of the communication 779 related to the HIP association MUST also use UDP encapsulation. 781 Figure 4 illustrates a base exchange via a Control Relay Server. We 782 assume that the Responder (i.e. a Control Relay Client) has already 783 registered to the Control Relay Server. The Initiator may have also 784 registered to another (or the same Control Relay Server), but the 785 base exchange will traverse always through the Control Relay Server 786 of the Responder. 788 Initiator Control Relay Server Responder 789 | 1. UDP(I1) | | 790 +--------------------------------->| 2. UDP(I1(RELAY_FROM)) | 791 | +------------------------------->| 792 | | | 793 | | 3. UDP(R1(RELAY_TO, NAT_TM, | 794 | | TA_P)) | 795 | 4. UDP(R1(RELAY_TO, NAT_TM, |<-------------------------------+ 796 | TA_P)) | | 797 |<---------------------------------+ | 798 | | | 799 | 5. UDP(I2(LOC_SET, NAT_TM, | | 800 | TA_P)) | | 801 +--------------------------------->| 6. UDP(I2(LOC_SET, RELAY_FROM, | 802 | | NAT_TM, TA_P)) | 803 | +------------------------------->| 804 | | | 805 | | 7. UDP(R2(LOC_SET, RELAY_TO)) | 806 | 8. UDP(R2(LOC_SET, RELAY_TO)) |<-------------------------------+ 807 |<---------------------------------+ | 808 | | | 810 Figure 4: Base Exchange via a HIP Relay Server 812 In step 1 of Figure 4, the Initiator sends an I1 packet over UDP via 813 the Control Relay Server to the Responder. In the HIP header, the 814 source HIT belongs to the Initiator and the destination HIT to the 815 Responder. The initiator sends the I1 packet from its IP address to 816 the IP address of the Control Relay Server over UDP. 818 In step 2, the Control Relay Server receives the I1 packet. If the 819 destination HIT belongs to a registered Responder, the Control Relay 820 Server processes the packet. Otherwise, the Control Relay Server 821 MUST drop the packet silently. The Control Relay Server appends a 822 RELAY_FROM parameter to the I1 packet, which contains the transport 823 source address and port of the I1 as observed by the Control Relay 824 Server. The Control Relay Server protects the I1 packet with 825 RELAY_HMAC as described in [RFC8004], except that the parameter type 826 is different (see Section 5.8). The Control Relay Server changes the 827 source and destination ports and IP addresses of the packet to match 828 the values the Responder used when registering to the Control Relay 829 Server, i.e., the reverse of the R2 used in the registration. The 830 Control Relay Server MUST recalculate the transport checksum and 831 forward the packet to the Responder. 833 In step 3, the Responder receives the I1 packet. The Responder 834 processes it according to the rules in [RFC7401]. In addition, the 835 Responder validates the RELAY_HMAC according to [RFC8004] and 836 silently drops the packet if the validation fails. The Responder 837 replies with an R1 packet to which it includes RELAY_TO and NAT 838 traversal mode parameters. The responder MUST include ICE-HIP-UDP in 839 the NAT traversal modes. The RELAY_TO parameter MUST contain the 840 same information as the RELAY_FROM parameter, i.e., the Initiator's 841 transport address, but the type of the parameter is different. The 842 RELAY_TO parameter is not integrity protected by the signature of the 843 R1 to allow pre-created R1 packets at the Responder. 845 In step 4, the Control Relay Server receives the R1 packet. The 846 Control Relay Server drops the packet silently if the source HIT 847 belongs to a Control Relay Client that has not successfully 848 registered. The Control Relay Server MAY verify the signature of the 849 R1 packet and drop it if the signature is invalid. Otherwise, the 850 Control Relay Server rewrites the source address and port, and 851 changes the destination address and port to match RELAY_TO 852 information. Finally, the Control Relay Server recalculates 853 transport checksum and forwards the packet. 855 In step 5, the Initiator receives the R1 packet and processes it 856 according to [RFC7401]. The Initiator MAY use the address in the 857 RELAY_TO parameter as a local peer-reflexive candidate for this HIP 858 association if it is different from all known local candidates. The 859 Initiator replies with an I2 packet that uses the destination 860 transport address of R1 as the source address and port. The I2 861 packet contains a LOCATOR_SET parameter that lists all the HIP 862 candidates (ICE offer) of the Initiator. The candidates are encoded 863 using the format defined in Section 5.7. The I2 packet MUST also 864 contain a NAT traversal mode parameter that includes ICE-HIP-UDP 865 mode. 867 In step 6, the Control Relay Server receives the I2 packet. The 868 Control Relay Server appends a RELAY_FROM and a RELAY_HMAC to the I2 869 packet similarly as explained in step 2, and forwards the packet to 870 the Responder. 872 In step 7, the Responder receives the I2 packet and processes it 873 according to [RFC7401]. It replies with an R2 packet and includes a 874 RELAY_TO parameter as explained in step 3. The R2 packet includes a 875 LOCATOR_SET parameter that lists all the HIP candidates (ICE answer) 876 of the Responder. The RELAY_TO parameter is protected by the HMAC. 878 In step 8, the Control Relay Server processes the R2 as described in 879 step 4. The Control Relay Server forwards the packet to the 880 Initiator. After the Initiator has received the R2 and processed it 881 successfully, the base exchange is completed. 883 Hosts MUST include the address of one or more Control Relay Servers 884 (including the one that is being used for the initial signaling) in 885 the LOCATOR_SET parameter in I2 and R2 if they intend to use such 886 servers for relaying HIP signaling immediately after the base 887 exchange completes. The traffic type of these addresses MUST be "HIP 888 signaling" and they MUST NOT be used as HIP candidates. If the 889 Control Relay Server locator used for relaying the base exchange is 890 not included in I2 or R2 LOCATOR_SET parameters, it SHOULD NOT be 891 used after the base exchange. Instead, further HIP signaling SHOULD 892 use the same path as the data traffic. It is RECOMMENDED to use the 893 same Control Relay Server throughout the lifetime of the host 894 association that was used for forwarding the base exchange if the 895 Responder includes it in the locator parameter of the R2 message. 897 4.6. Connectivity Checks 899 When the Initiator and Responder complete the base exchange through 900 the Control Relay Server, both of them employ the IP address of the 901 Control Relay Server as the destination address for the packets. 902 This address MUST NOT be used as a destination for ESP traffic (i.e., 903 the corresponding Control Relay Client cannot advertise it to its 904 peer) unless the server supports also Data Relay Server 905 functionality, for which the client has successfully registered to. 906 When NAT traversal mode with ICE-HIP-UDP was successfully negotiated 907 and selected, the Initiator and Responder MUST start the connectivity 908 checks in order to attempt to obtain direct end-to-end connectivity 909 through NAT devices. It is worth noting that the connectivity checks 910 MUST be completed even though no ESP_TRANSFORM would be negotiated 911 and selected. 913 The connectivity checks follow the ICE methodology [MMUSIC-ICE], but 914 UDP encapsulated HIP control messages are used instead of ICE 915 messages. Only normal nomination MUST be used for the connectivity 916 checks, i.e., aggressive nomination MUST NOT be employed. As stated 917 in the ICE specification, the basic procedure for connectivity checks 918 has three phases: sorting the candidate pairs according their 919 priority, sending checks in the prioritized order and acknowledging 920 the checks from the peer host. 922 The Initiator MUST take the role of controlling host and the 923 Responder acts as the controlled host. The roles MUST persist 924 throughout the HIP associate lifetime (to be reused in the possibly 925 mobility UPDATE procedures). In the case both communicating nodes 926 are initiating the communications to each other using an I1 packet, 927 the conflict is resolved as defined in section in 6.7 in [RFC7401]: 928 the host with the "larger" HIT changes to its Role to Responder. In 929 such a case, the host changing its role to Responder MUST also switch 930 to controlling role. 932 The protocol follows standard HIP UPDATE sending and processing rules 933 as defined in section 6.11 and 6.12 in [RFC7401], but some new 934 parameters are introduced (CANDIDATE_PRIORITY, MAPPED_ADDRESS and 935 NOMINATE). 937 4.6.1. Connectivity Check Procedure 939 Figure 5 illustrates connectivity checks in a simplified scenario, 940 where the Initiator and Responder have only a single candidate pair 941 to check. Typically, NATs drop messages until both sides have sent 942 messages using the same port pair. In this scenario, the Responder 943 sends a connectivity check first but the NAT of the Initiator drops 944 it. However, the connectivity check from the Initiator reaches the 945 Responder because it uses the same port pair as the first message. 946 It is worth noting that the message flow in this section is 947 idealistic, and, in practice, more messages would be dropped, 948 especially in the beginning. For instance, connectivity tests always 949 start with the candidates with the highest priority, which would be 950 host candidates (which would not reach the recipient in this 951 scenario). 953 Initiator NAT1 NAT2 Responder 954 | | 1. UDP(UPDATE(SEQ, CAND_PRIO, | | 955 | | ECHO_REQ_SIGN)) | | 956 | X<-----------------------------------+----------------+ 957 | | | | 958 | 2. UDP(UPDATE(SEQ, ECHO_REQ_SIGN, CAND_PRIO)) | | 959 +-------------+------------------------------------+--------------->| 960 | | | | 961 | 3. UDP(UPDATE(ACK, ECHO_RESP_SIGN, MAPPED_ADDR)) | | 962 |<------------+------------------------------------+----------------+ 963 | | | | 964 | 4. UDP(UPDATE(SEQ, ECHO_REQ_SIGN, CAND_PRIO)) | | 965 |<------------+------------------------------------+----------------+ 966 | | | | 967 | 5. UDP(UPDATE(ACK, ECHO_RESP_SIGN, MAPPED_ADDR)) | | 968 +-------------+------------------------------------+--------------->| 969 | | | | 970 | 6. Other connectivity checks using UPDATE over UDP | 971 |<------------+------------------------------------+----------------> 972 | | | | 973 | 7. UDP(UPDATE(SEQ, ECHO_REQ_SIGN, CAND_PRIO, NOMINATE)) | 974 +-------------+------------------------------------+--------------->| 975 | | | | 976 | 8. UDP(UPDATE(SEQ, ACK, ECHO_REQ_SIGN, ECHO_RESP_SIGN, | 977 | NOMINATE)) | | 978 |<------------+------------------------------------+----------------+ 979 | | | | 980 | 9. UDP(UPDATE(ACK, ECHO_RESP_SIGN)) | | 981 +-------------+------------------------------------+--------------->+ 982 | | | | 983 | 10. ESP data traffic over UDP | | 984 +<------------+------------------------------------+--------------->+ 985 | | | | 987 Figure 5: Connectivity Checks 989 In step 1, the Responder sends a connectivity check to the Initiator 990 that the NAT of the Initiator drops. The message includes a number 991 of parameters. As specified in [RFC7401]), the SEQ parameter 992 includes a running sequence identifier for the connectivity check. 993 The candidate priority (denoted "CAND_PRIO" in the figure) describes 994 the priority of the address candidate being tested. The 995 ECHO_REQUEST_SIGNED (denoted ECHO_REQ_SIGN in the figure) includes a 996 nonce that the recipient must sign and echo back as it is. 998 In step 2, the Initiator sends a connectivity check, using the same 999 address pair candidate as in the previous step, and the message 1000 traverses successfully the NAT boxes. The message includes the same 1001 parameters as in the previous step. It should be noted that the 1002 sequence identifier is locally assigned by the Responder, so it can 1003 be different than in the previous step. 1005 In step 3, the Responder has successfully received the previous 1006 connectivity check from the Initiator and starts to build a response 1007 message. Since the message from the Initiator included a SEQ, the 1008 Responder must acknowledge it using an ACK parameter. Also, the 1009 nonce contained in the echo request must be echoed back in an 1010 ECHO_RESPONSE_SIGNED (denoted ECHO_RESP_SIGN) parameter. The 1011 Responder includes also a MAPPED_ADDRESS parameter (denoted 1012 MAPPED_ADDR in the figure) that contains the transport address of the 1013 Initiator as observed by the Responder (i.e. peer reflexive 1014 candidate). This message is successfully delivered to the Initiator, 1015 and upon reception the Initiator marks the candidate pair as valid. 1017 In step 4, the Responder retransmits the connectivity check sent in 1018 the first step, since it was not acknowledged yet. 1020 In step 5, the Initiator responds to the previous connectivity check 1021 message from the Responder. The Initiator acknowledges the SEQ 1022 parameter from the previous message using ACK parameter and the 1023 ECHO_REQUEST_SIGNED parameter with ECHO_RESPONSE_SIGNED. In 1024 addition, it includes MAPPED_ADDR parameter that includes the peer 1025 reflexive candidate. This response message is successfully delivered 1026 to the Responder, and upon reception the Initiator marks the 1027 candidate pair as valid. 1029 In step 6, despite the two hosts now having valid address candidates, 1030 the hosts still test the remaining address candidates in a similar 1031 way as in the previous steps (due to the use of normal nomination). 1032 It should be noted that each connectivity check has a unique sequence 1033 number in the SEQ parameter. 1035 In step 7, the Initiator has completed testing all address candidates 1036 and nominates one address candidate to be used. It sends an UPDATE 1037 message using the selected address candidates that includes a number 1038 of parameters: SEQ, ECHO_REQUEST_SIGNED, CANDIDATE_PRIORITY and the 1039 NOMINATE parameter. 1041 In step 8, the Responder receives the message with NOMINATE parameter 1042 from the Initiator. It sends a response that includes the NOMINATE 1043 parameter in addition to a number of other parameters. The ACK and 1044 ECHO_RESPONSE_SIGNED parameters acknowledge the SEQ and 1045 ECHO_REQUEST_SIGNED parameters from previous message from the 1046 Initiator. The Responder includes SEQ and ECHO_REQUEST_SIGNED 1047 parameters in order to receive an acknowledgment from the Responder. 1049 In step 9, the Initiator completes the candidate nomination process 1050 by confirming the message reception to the Responder. In the 1051 confirmation message, the ACK and ECHO_RESPONSE_SIGNED parameters 1052 correspond to the SEQ and ECHO_REQUEST_SIGNED parameters in the 1053 message sent by the Responder in the previous step. 1055 In step 10, the Initiator and Responder can start sending application 1056 payload over the successfully nominated address candidates. 1058 It is worth noting that if either host has registered a relayed 1059 address candidate from a Data Relay Server, the host MUST activate 1060 the address before connectivity checks by sending an UPDATE message 1061 containing PEER_PERMISSION parameter as described in Section 4.12.1. 1062 Otherwise, the Data Relay Server drops ESP packets using the relayed 1063 address. 1065 It should be noted that in the case both Initiator and Responder both 1066 advertising their own relayed address candidates, it is possible that 1067 the two hosts choose the two relayed addresses as a result of the ICE 1068 nomination algorithm. While this is possible (and even could be 1069 desirable for privacy reasons), it can be unlikely due to low 1070 priority assigned for the relayed address candidates. In such a 1071 event, the nominated address pair is always symmetric; the nomination 1072 algorithm prevents asymmetric address pairs (i.e. each side choosing 1073 different pair), such as a Data Relay Client using its own Data Relay 1074 Server to send data directly to its peer while receiving data from 1075 the Data Relay Server of its peer. 1077 4.6.2. Rules for Connectivity Checks 1079 The HITs of the two communicating hosts MUST be used as credentials 1080 in this protocol (in contrast to ICE which employs username-password 1081 fragments). A HIT pair uniquely identifies the corresponding HIT 1082 association, and a SEQ number in an UPDATE message identifies a 1083 particular connectivity check. 1085 All of the connectivity check packets MUST be protected with HMACs 1086 and signatures (even though the illustrations in this specification 1087 omit them for simplicity). Each connectivity check sent by a host 1088 MUST include a SEQ parameter and ECHO_REQUEST_SIGNED parameter, and 1089 correspondingly the peer MUST respond to these using ACK and 1090 ECHO_RESPONSE_SIGNED according to the rules specified in [RFC7401]. 1092 The host sending a connectivity check MUST validate that the response 1093 uses the same pair of UDP ports, and drop the packet if this is not 1094 the case. 1096 A host may receive a connectivity check before it has received the 1097 candidates from its peer. In such a case, the host MUST immediately 1098 generate a response, and then continue waiting for the candidates. A 1099 host MUST NOT select a candidate pair until it has verified the pair 1100 using a connectivity check as defined in Section 4.6.1. 1102 [RFC7401] states that UPDATE packets have to include either a SEQ or 1103 ACK parameter (or both). According to the RFC, each SEQ parameter 1104 should be acknowledged separately. In the context of NATs, this 1105 means that some of the SEQ parameters sent in connectivity checks 1106 will be lost or arrive out of order. From the viewpoint of the 1107 recipient, this is not a problem since the recipient will just 1108 "blindly" acknowledge the SEQ. However, the sender needs to be 1109 prepared for lost sequence identifiers and ACKs parameters that 1110 arrive out of order. 1112 As specified in [RFC7401], an ACK parameter may acknowledge multiple 1113 sequence identifiers. While the examples in the previous sections do 1114 not illustrate such functionality, it is also permitted when 1115 employing ICE-HIP-UDP mode. 1117 In ICE-HIP-UDP mode, a retransmission of a connectivity check SHOULD 1118 be sent with the same sequence identifier in the SEQ parameter. Some 1119 tested address candidates will never produce a working address pair, 1120 and thus may cause retransmissions. Upon successful nomination an 1121 address pair, a host MAY immediately stop sending such 1122 retransmissions. 1124 ICE procedures for prioritizing candidates, eliminating redundant 1125 candidates and forming check lists (including pruning) must be 1126 followed (as specified in [I-D.ietf-ice-rfc5245bis]), with the 1127 exception that the foundation, frozen candidates and default 1128 candidates are not used. From viewpoint of the ICE specification 1129 [I-D.ietf-ice-rfc5245bis], the protocol specified in this document 1130 operates using Component ID of 1 on all candidates, and the 1131 foundation of all candidates is unique. This specification defines 1132 only "full ICE" mode, and the "lite ICE" is not supported. The 1133 reasoning behind the missing features is described in Appendix B. 1135 The connectivity check messages MUST be paced by the Ta value 1136 negotiated during the base exchange as described in Section 4.4. If 1137 neither one of the hosts announced a minimum pacing value, a value of 1138 20 ms SHOULD be used. 1140 Both hosts MUST form a priority ordered checklist and begin to check 1141 transactions every Ta milliseconds as long as the checks are running 1142 and there are candidate pairs whose tests have not started. The 1143 retransmission timeout (RTO) for the connectivity check UPDATE 1144 packets SHOULD be calculated as follows: 1146 RTO = MAX (500ms, Ta * (Num-Waiting + Num-In-Progress)) 1148 In the RTO formula, Ta is the value used for the connectivity check 1149 pacing, Num-Waiting is the number of pairs in the checklist in the 1150 "Waiting" state, and Num-In-Progress is the number of pairs in the 1151 "In-Progress" state. This is identical to the formula in 1152 [I-D.ietf-ice-rfc5245bis] when there is only one checklist. A 1153 smaller value than 500 ms for the RTO MUST NOT be used. 1155 Each connectivity check request packet MUST contain a 1156 CANDIDATE_PRIORITY parameter (see Section 5.14) with the priority 1157 value that would be assigned to a peer reflexive candidate if one was 1158 learned from the corresponding check. An UPDATE packet that 1159 acknowledges a connectivity check request MUST be sent from the same 1160 address that received the check and delivered to the same address 1161 where the check was received from. Each acknowledgment UPDATE packet 1162 MUST contain a MAPPED_ADDRESS parameter with the port, protocol, and 1163 IP address of the address where the connectivity check request was 1164 received from. 1166 Following the ICE guidelines [I-D.ietf-ice-rfc5245bis], it is 1167 RECOMMENDED to restrict the total number of connectivity checks to 1168 100 for each host association. This can be achieved by limiting the 1169 connectivity checks to the 100 candidate pairs with the highest 1170 priority. 1172 4.6.3. Rules for Concluding Connectivity Checks 1174 The controlling agent may find multiple working candidate pairs. To 1175 conclude the connectivity checks, it SHOULD nominate the pair with 1176 the highest priority. The controlling agent MUST nominate a 1177 candidate pair essentially by repeating a connectivity check using an 1178 UPDATE message that contains a SEQ parameter (with new sequence 1179 number), a ECHO_REQUEST_SIGNED parameter, the priority of the 1180 candidate in a CANDIDATE_PRIORITY parameter and NOMINATE parameter to 1181 signify conclusion of the connectivity checks. Since the nominated 1182 address pair has already been tested for reachability, the controlled 1183 host should be able to receive the message. Upon reception, the 1184 controlled host SHOULD select the nominated address pair. The 1185 response message MUST include a SEQ parameter with a new sequence id, 1186 acknowledgment of the sequence from the controlling host in an ACK 1187 parameter, a new ECHO_REQUEST_SIGNED parameter, ECHO_RESPONSE_SIGNED 1188 parameter corresponding to the ECHO_REQUEST_SIGNED parameter from the 1189 controlling host and the NOMINATE parameter. After sending this 1190 packet, the controlled host can create IPsec security associations 1191 using the nominated address candidate for delivering application 1192 payload to the controlling host. Since the message from the 1193 controlled host included a new sequence id and echo request for 1194 signature, the controlling host MUST acknowledge this with a new 1195 UPDATE message that includes an ACK and ECHO_RESPONSE_SIGNED 1196 parameters. After this final concluding message, the controlling 1197 host also can create IPsec security associations for delivering 1198 application payload to the controlled host. 1200 It is possible that packets are delayed by the network. Both hosts 1201 MUST continue to respond to any connectivity checks despite an 1202 address pair having been nominated. 1204 If all the connectivity checks have failed, the hosts MUST NOT send 1205 ESP traffic to each other but MAY continue communicating using HIP 1206 packets and the locators used for the base exchange. Also, the hosts 1207 SHOULD notify each other about the failure with a 1208 CONNECTIVITY_CHECKS_FAILED NOTIFY packet (see Section 5.10). 1210 4.7. NAT Traversal Optimizations 1212 4.7.1. Minimal NAT Traversal Support 1214 If the Responder has a fixed and publicly reachable IPv4 address and 1215 does not employ a Control Relay Server, the explicit NAT traversal 1216 mode negotiation MAY be omitted, and thus even the UDP-ENCAPSULATION 1217 mode does not have to be negotiated. In such a scenario, the 1218 Initiator sends an I1 message over UDP and the Responder responds 1219 with an R1 message over UDP without including any NAT traversal mode 1220 parameter. The rest of the base exchange follows the procedures 1221 defined in [RFC7401], except that the control and data plane use UDP 1222 encapsulation. Here, the use of UDP for NAT traversal is agreed 1223 implicitly. This way of operation is still subject to NAT timeouts, 1224 and the hosts MUST employ NAT keepalives as defined in Section 4.10. 1226 When UDP-ENCAPSULATION mode is chosen either explicitly or 1227 implicitly, the connectivity checks as defined in this document MUST 1228 not be used. When hosts lose connectivity, they MUST instead utilize 1229 [RFC8046] or [RFC8047] procedures, but with the difference being that 1230 UDP-based tunneling MUST be employed for the entire lifetime of the 1231 corresponding Host Association. 1233 4.7.2. Base Exchange without Connectivity Checks 1235 It is possible to run a base exchange without any connectivity checks 1236 as defined in Legacy ICE-HIP section 4.8 [RFC5770]. The procedure is 1237 applicable also in the context of this specification, so it is 1238 repeated here for completeness. 1240 In certain network environments, the connectivity checks can be 1241 omitted to reduce initial connection set-up latency because a base 1242 exchange acts as an implicit connectivity test itself. For this to 1243 work, the Initiator MUST be able to reach the Responder by simply UDP 1244 encapsulating HIP and ESP packets sent to the Responder's address. 1245 Detecting and configuring this particular scenario is prone to 1246 failure unless carefully planned. 1248 In such a scenario, the Responder MAY include UDP-ENCAPSULATION NAT 1249 traversal mode as one of the supported modes in the R1 packet. If 1250 the Responder has registered to a Control Relay Server, it MUST also 1251 include a LOCATOR_SET parameter in R1 that contains a preferred 1252 address where the Responder is able to receive UDP-encapsulated ESP 1253 and HIP packets. This locator MUST be of type "Transport address", 1254 its Traffic type MUST be "both", and it MUST have the "Preferred bit" 1255 set (see Table 1). If there is no such locator in R1, the source 1256 address of R1 is used as the Responder's preferred address. 1258 The Initiator MAY choose the UDP-ENCAPSULATION mode if the Responder 1259 listed it in the supported modes and the Initiator does not wish to 1260 use the connectivity checks defined in this document for searching 1261 for a more optimal path. In this case, the Initiator sends the I2 1262 with UDP-ENCAPSULATION mode in the NAT traversal mode parameter 1263 directly to the Responder's preferred address (i.e., to the preferred 1264 locator in R1 or to the address where R1 was received from if there 1265 was no preferred locator in R1). The Initiator MAY include locators 1266 in I2 but they MUST NOT be taken as address candidates, since 1267 connectivity checks defined in this document will not be used for 1268 connections with UDP-ENCAPSULATION NAT traversal mode. Instead, if 1269 R2 and I2 are received and processed successfully, a security 1270 association can be created and UDP-encapsulated ESP can be exchanged 1271 between the hosts after the base exchange completes. However, the 1272 Responder SHOULD NOT send any ESP to the Initiator's address before 1273 it has received data from the Initiator, as specified in Sections 1274 4.4.3. and 6.9 of [RFC7401] and in Sections 3.2.9 and 5.4 of 1275 [RFC8046]. 1277 Since an I2 packet with UDP-ENCAPSULATION NAT traversal mode selected 1278 MUST NOT be sent via a Control Relay Server, the Responder SHOULD 1279 reject such I2 packets and reply with a 1280 NO_VALID_NAT_TRAVERSAL_MODE_PARAMETER NOTIFY packet (see 1281 Section 5.10). 1283 If there is no answer for the I2 packet sent directly to the 1284 Responder's preferred address, the Initiator MAY send another I2 via 1285 the Control Relay Server, but it MUST NOT choose UDP-ENCAPSULATION 1286 NAT traversal mode for that I2. 1288 4.7.3. Initiating a Base Exchange both with and without UDP 1289 Encapsulation 1291 It is possible to run a base exchange in parallel both with and 1292 without UDP encapsulation as defined in Legacy ICE-HIP section 4.9 in 1293 [RFC5770]. The procedure is applicable also in the context of this 1294 specification, so it is repeated here for completeness. 1296 The Initiator MAY also try to simultaneously perform a base exchange 1297 with the Responder without UDP encapsulation. In such a case, the 1298 Initiator sends two I1 packets, one without and one with UDP 1299 encapsulation, to the Responder. The Initiator MAY wait for a while 1300 before sending the other I1. How long to wait and in which order to 1301 send the I1 packets can be decided based on local policy. For 1302 retransmissions, the procedure is repeated. 1304 The I1 packet without UDP encapsulation may arrive directly, without 1305 passing any Control Data Relays, at the Responder. When this 1306 happens, the procedures in [RFC7401] are followed for the rest of the 1307 base exchange. The Initiator may receive multiple R1 packets, with 1308 and without UDP encapsulation, from the Responder. However, after 1309 receiving a valid R1 and answering it with an I2, further R1 packets 1310 that are not retransmissions of the original R1 message MUST be 1311 ignored. 1313 The I1 packet without UDP encapsulation may also arrive at a HIP- 1314 capable middlebox. When the middlebox is a HIP rendezvous server and 1315 the Responder has successfully registered with the rendezvous 1316 service, the middlebox follows rendezvous procedures in [RFC8004]. 1318 If the Initiator receives a NAT traversal mode parameter in R1 1319 without UDP encapsulation, the Initiator MAY ignore this parameter 1320 and send an I2 without UDP encapsulation and without any selected NAT 1321 traversal mode. When the Responder receives the I2 without UDP 1322 encapsulation and without NAT traversal mode, it will assume that no 1323 NAT traversal mechanism is needed. The packet processing will be 1324 done as described in [RFC7401]. The Initiator MAY store the NAT 1325 traversal modes for future use, e.g., in case of a mobility or 1326 multihoming event that causes NAT traversal to be used during the 1327 lifetime of the HIP association. 1329 4.8. Sending Control Packets after the Base Exchange 1331 The same considerations of sending control packets after the base 1332 exchange described in legacy ICE-HIP section 5.10 in [RFC5770] apply 1333 also here, so they are repeated here for completeness. 1335 After the base exchange, the two end-hosts MAY send HIP control 1336 packets directly to each other using the transport address pair 1337 established for a data channel without sending the control packets 1338 through any Control Relay Servers . When a host does not receive 1339 acknowledgments, e.g., to an UPDATE or CLOSE packet after a timeout 1340 based on local policies, a host SHOULD resend the packet through the 1341 associated Data Relay Server of the peer (if the peer listed it in 1342 its LOCATOR_SET parameter in the base exchange. 1344 If Control Relay Client sends a packet through a Control Relay 1345 Server, the Control Relay Client MUST always utilize the RELAY_TO 1346 parameter. The Control Relay Server SHOULD forward HIP control 1347 packets originating from a Control Relay Client to the address 1348 denoted in the RELAY_TO parameter. In the other direction, the 1349 Control Relay Server SHOULD forward HIP control packets to the 1350 Control Relay Clients, and MUST add a RELAY_FROM parameter to the 1351 control packets it relays to the Control Relay Clients. 1353 If the Control Relay Server is not willing or able to relay a HIP 1354 packet, it MAY notify the sender of the packet with 1355 MESSAGE_NOT_RELAYED error notification (see Section 5.10). 1357 4.9. Mobility Handover Procedure 1359 A host may move after base exchange and connectivity checks. 1360 Mobility extensions for HIP [RFC8046] define handover procedures 1361 without NATs. In this section, we define how two hosts interact with 1362 handover procedures in scenarios involving NATs. The specified 1363 extensions define only simple mobility using a pair of security 1364 associations, and multihoming extensions are left to be defined in 1365 later specifications. The procedures in this section offer the same 1366 functionality as "ICE restart" specified in 1367 [I-D.ietf-ice-rfc5245bis]. The example described in this section 1368 shows only a Control Relay Server for the peer host for the sake of 1369 simplicity, but the mobile host may also have a Control Relay Server. 1371 The assumption here is that the two hosts have successfully 1372 negotiated and chosen the ICE-HIP-UDP mode during the base exchange 1373 as defined in Section 4.3. The Initiator of the base exchange MUST 1374 store information that it was the controlling host during the base 1375 exchange. Similarly, the Responder MUST store information that it 1376 was the controlled host during the base exchange. 1378 Prior to starting the handover procedures with all peer hosts, the 1379 mobile host SHOULD first send its locators in UPDATE messages to its 1380 Control and Data Relay Servers if it has registered to such. It 1381 SHOULD wait for all of them to respond for a configurable time, by 1382 default two minutes, and then continue with the handover procedure 1383 without information from the Relay Server that did not respond. As 1384 defined in Section 4.1, a response message from a Control Relay 1385 Server includes a REG_FROM parameter that describes the server 1386 reflexive candidate of the mobile host to be used in the candidate 1387 exchange during the handover. Similarly, an UPDATE to a Data Relay 1388 Server is necessary to make sure the Data Relay Server can forward 1389 data to the correct IP address after a handoff. 1391 The mobility extensions for NAT traversal are illustrated in 1392 Figure 6. The mobile host is the host that has changed its locators, 1393 and the peer host is the host it has a host association with. The 1394 mobile host may have multiple peers and it repeats the process with 1395 all of its peers. In the figure, the Control Relay Server belongs to 1396 the peer host, i.e., the peer host is a Control Relay Client for the 1397 Control Relay Server. worth noting that the figure corresponds to 1398 figure 3 in [RFC8046], but the difference is that the main UPDATE 1399 procedure is carried over the relay and the connectivity is tested 1400 separately. Next, we describe the procedure in the figure in detail. 1402 Mobile Host Control Relay Server Peer Host 1403 | 1. UDP(UPDATE(ESP_INFO, | | 1404 | LOC_SET, SEQ)) | | 1405 +--------------------------------->| 2. UDP(UPDATE(ESP_INFO, | 1406 | | LOC_SET, SEQ, | 1407 | | RELAY_FROM)) | 1408 | +------------------------------->| 1409 | | | 1410 | | 3. UDP(UPDATE(ESP_INFO, SEQ, | 1411 | | ACK, ECHO_REQ_SIGN, | 1412 | | RELAY_TO)) | 1413 | 4. UDP(UPDATE(ESP_INFO, SEQ, |<-------------------------------+ 1414 | ACK, ECHO_REQ_SIGN, | | 1415 | RELAY_TO)) | | 1416 |<---------------------------------+ | 1417 | | | 1418 | 5. UDP(UPDATE(ACK, | | 1419 | ECHO_RESP_SIGNED)) | | 1420 +--------------------------------->| 6. UDP(UPDATE(ACK, | 1421 | | ECHO_RESP_SIGNED, | 1422 | | RELAY_FROM)) | 1423 | +------------------------------->| 1424 | | | 1425 | 7. connectivity checks over UDP | 1426 +<----------------------------------------------------------------->+ 1427 | | | 1428 | 8. ESP data over UDP | 1429 +<----------------------------------------------------------------->+ 1430 | | | 1432 Figure 6: HIP UPDATE procedure 1434 In step 1, the mobile host has changed location and sends a location 1435 update to its peer through the Control Relay Server of the peer. It 1436 sends an UPDATE packet with source HIT belonging to itself and 1437 destination HIT belonging to the peer host. In the packet, the 1438 source IP address belongs to the mobile host and the destination to 1439 the Control Relay Server. The packet contains an ESP_INFO parameter, 1440 where, in this case, the OLD SPI and NEW SPI parameters both contain 1441 the pre-existing incoming SPI. The packet also contains the locators 1442 of the mobile host in a LOCATOR_SET parameter. The packet contains 1443 also a SEQ number to be acknowledged by the peer. As specified in 1444 [RFC8046], the packet may also include a HOST_ID (for middlebox 1445 inspection) and DIFFIE_HELLMAN parameter for rekeying. 1447 In step 2, the Control Relay Server receives the UPDATE packet and 1448 forwards it to the peer host (i.e. Control Relay Client). The 1449 Control Relay Server rewrites the destination IP address and appends 1450 a RELAY_FROM parameter to the message. 1452 In step 3, the peer host receives the UPDATE packet, processes it and 1453 responds with another UPDATE message. The message is destined to the 1454 HIT of mobile host and to the IP address of the Control Relay Server. 1455 The message includes an ESP_INFO parameter where, in this case, the 1456 OLD SPI and NEW SPI parameters both contain the pre-existing incoming 1457 SPI. The peer includes a new SEQ and ECHO_REQUEST_SIGNED parameters 1458 to be acknowledged by the mobile host. The message acknowledges the 1459 SEQ parameter of the earlier message with an ACK parameter. The 1460 RELAY_TO parameter specifies the address of the mobile host where the 1461 Control Relay Server should forward the message. 1463 In step 4, the Control Relay Server receives the message, rewrites 1464 the destination IP address and UDP port according to the RELAY_TO 1465 parameter, and then forwards the modified message to the mobile host. 1467 In step 5, the mobile host receives the UPDATE packet and processes 1468 it. The mobile host concludes the handover procedure by 1469 acknowledging the received SEQ parameter with an ACK parameter and 1470 the ECHO_REQUEST_SIGNED parameter with ECHO_RESPONSE_SIGNED 1471 parameter. The mobile host delivers the packet to the HIT of the 1472 peer and to the address of the HIP relay. The mobile host can start 1473 connectivity checks after this packet. 1475 In step 6, HIP relay receives the UPDATE packet and forwards it to 1476 the peer host (i.e. Relay Client). The HIP relay rewrites the 1477 destination IP address and port, and then appends a RELAY_FROM 1478 parameter to the message. When the peer host receives this 1479 concluding UPDATE packet, it can initiate the connectivity checks. 1481 In step 7, the two hosts test for connectivity across NATs according 1482 to procedures described in Section 4.6. The original Initiator of 1483 the communications is the controlling and the original Responder is 1484 the controlled host. 1486 In step 8, the connectivity checks are successfully completed and the 1487 controlling host has nominated one address pair to be used. The 1488 hosts set up security associations to deliver the application 1489 payload. 1491 It is worth noting that the Control and Data Relay Client do not have 1492 to re-register for the related services after a handoff. However, if 1493 a Data Relay Client has registered a relayed address candidate from a 1494 Data Relay Server, the Data Relay Client MUST reactivate the address 1495 before the connectivity checks by sending an UPDATE message 1496 containing PEER_PERMISSION parameter as described in Section 4.12.1. 1498 Otherwise, the Data Relay Server drops ESP packets sent to the 1499 relayed address. 1501 In so called "double jump" or simultaneous mobility scenario both 1502 peers change their location simultaneously. In such a case, both 1503 peers trigger the procedure described earlier in this section at the 1504 same time. In other words, both of the communicating hosts send an 1505 UPDATE packet carrying locators at the same time or with some delay. 1506 When the locators are exchanged almost simultaneously (reliably via 1507 Control Relay Servers), the two hosts can continue with connectivity 1508 checks after both have completed separately the steps in Figure 6. 1509 The problematic case occurs when the one of the hosts (referred here 1510 as host "M") moves later during the connectivity checks. In such a 1511 case, host M sends a locator to the peer which is in the middle of 1512 connectivity checks. Upon receiving the UPDATE message, the peer 1513 responds with an UPDATE with ECHO_REQ_SIGN as described in step 3 in 1514 Figure 6. Upon receiving the valid response from host M as described 1515 in step 6, the peer host MUST restart the connectivity checks with 1516 host M. This way, both hosts start the connectivity checks roughly 1517 in a synchronized way. It is also important that peer host does not 1518 restart the connectivity checks until it has received a valid "fresh" 1519 confirmation from host M because the UPDATE message carrying locators 1520 could be replayed by an attacker. 1522 4.10. NAT Keepalives 1524 To prevent NAT states from expiring, communicating hosts MUST send 1525 periodic keepalives to other hosts with which they have established a 1526 Host Association every 15 seconds (the so called Tr value in ICE). 1527 Other values MAY be used, but a Tr value smaller than 15 seconds MUST 1528 NOT be used. Both a Control/Data Relay Client and Control/Data Relay 1529 Server, as well as two peers employing UDP-ENCAPSULATION or ICE-HIP- 1530 UDP mode, SHOULD send HIP NOTIFY packets unless they have exchanged 1531 some other traffic over the used UDP ports. However, the Data Relay 1532 Client and Data Relay Server MUST employ only HIP NOTIFY packets in 1533 order to keep the server reflexive candidates alive. The keepalive 1534 message encoding format is defined in Section 5.3. If the base 1535 exchange or mobility handover procedure occurs during an extremely 1536 slow path, a host (with a Host Association with the peer) MAY also 1537 send HIP NOTIFY packets every 15 seconds to keep the path active with 1538 the recipient. 1540 4.11. Closing Procedure 1542 The two-way procedure for closing a HIP association and the related 1543 security associations is defined in [RFC7401]. One host initiates 1544 the procedure by sending a CLOSE message and the recipient confirms 1545 it with CLOSE_ACK. All packets are protected using HMACs and 1546 signatures, and the CLOSE messages includes a ECHO_REQUEST_SIGNED 1547 parameter to protect against replay attacks. 1549 The same procedure for closing HIP associations applies also here, 1550 but the messaging occurs using the UDP encapsulated tunnel that the 1551 two hosts employ. A host sending the CLOSE message SHOULD first send 1552 the message over a direct link. After a number of retransmissions, 1553 it MUST send over a Control Relay Server of the recipient if one 1554 exists. The host receiving the CLOSE message directly without a 1555 Control Data Relay SHOULD respond directly. If CLOSE message came 1556 via a Control Data Relay, the host SHOULD respond using the same 1557 Control Data Relay. 1559 4.12. Relaying Considerations 1561 4.12.1. Forwarding Rules and Permissions 1563 The Data Relay Server uses a similar permission model as a TURN 1564 server: before the Data Relay Server forwards any ESP data packets 1565 from a peer to a Data Relay Client (or the other direction), the 1566 client MUST set a permission for the peer's address. The permissions 1567 also install a forwarding rule for each direction, similar to TURN's 1568 channels, based on the Security Parameter Index (SPI) values in the 1569 ESP packets. 1571 Permissions are not required for HIP control packets. However, if a 1572 relayed address (as conveyed in the RELAYED_ADDRESS parameter from 1573 the Data Relay Server) is selected to be used for data, the Control 1574 Relay Client MUST send an UPDATE message to the Data Relay Server 1575 containing a PEER_PERMISSION parameter (see Section 5.13) with the 1576 following information: the UDP port and address for the server 1577 reflexive address, the UDP port and address of the peer, and the 1578 inbound and outbound SPIs used for ESP. The packet MUST be sent to 1579 the same UDP tunnel the Client employed in the base exchange to 1580 contact the Server (i.e., not to the port occupied by the server 1581 reflexive candidate). To avoid packet dropping of ESP packets, the 1582 Control Relay Client SHOULD send the PEER_PERMISSION parameter before 1583 connectivity checks both in the case of base exchange and a mobility 1584 handover. It is worth noting that the UPDATE message includes a SEQ 1585 parameter (as specified in [RFC7401]) that the Data Relay Server must 1586 acknowledge, so that the Control Relay Client can resend the message 1587 with PEER_PERMISSION parameter if it gets lost. 1589 When a Data Relay Server receives an UPDATE with a PEER_PERMISSION 1590 parameter, it MUST check if the sender of the UPDATE is registered 1591 for data relaying service, and drop the UPDATE if the host was not 1592 registered. If the host was registered, the Data Relay Server checks 1593 if there is a permission with matching information (protocol, 1594 addresses, ports and SPI values). If there is no such permission, a 1595 new permission MUST be created and its lifetime MUST be set to 5 1596 minutes. If an identical permission already existed, it MUST be 1597 refreshed by setting the lifetime to 5 minutes. A Data Relay Client 1598 SHOULD refresh permissions 1 minute before the expiration when the 1599 permission is still needed. 1601 When a Data Relay Server receives an UPDATE from a registered client 1602 but without a PEER_PERMISSION parameter and with a new locator set, 1603 the Data Relay Server can assume that the mobile host has changed its 1604 location and, thus, is not reachable in its previous location. In 1605 such an event, the Data Relay Server SHOULD deactivate the permission 1606 and stop relaying data plane traffic to the client. 1608 The relayed address MUST be activated with the PEER_PERMISSION 1609 parameter both after a base exchange and after a handover procedure 1610 with another ICE-HIP-UDP capable host. Unless activated, the Data 1611 Relay Server MUST drop all ESP packets. It is worth noting that a 1612 Data Relay Client does not have to renew its registration upon a 1613 change of location UPDATE, but only when the lifetime of the 1614 registration is close to end. 1616 4.12.2. HIP Data Relay and Relaying of Control Packets 1618 When a Data Relay Server accepts to relay UDP encapsulated ESP 1619 between a Data Relay Client and its peer, the Data Relay Server opens 1620 a UDP port (relayed address) for this purpose as described in 1621 Section 4.1. This port can be used for delivering also control 1622 packets because connectivity checks also cover the path through the 1623 Data Relay Server. If the Data Relay Server receives a UDP 1624 encapsulated HIP control packet on that port, it MUST forward the 1625 packet to the Data Relay Client and add a RELAY_FROM parameter to the 1626 packet as if the Data Relay Server were acting as a Control Relay 1627 Server. When the Data Relay Client replies to a control packet with 1628 a RELAY_FROM parameter via its Data Relay Server, the Data Relay 1629 Client MUST add a RELAY_TO parameter containing the peer's address 1630 and use the address of its Data Relay Server as the destination 1631 address. Further, the Data Relay Server MUST send this packet to the 1632 peer's address from the relayed address. 1634 If the Data Relay Server receives a UDP packet that is not a HIP 1635 control packet to the relayed address, it MUST check if it has a 1636 permission set for the peer the packet is arriving from (i.e., the 1637 sender's address and SPI value matches to an installed permission). 1638 If permissions are set, the Data Relay Server MUST forward the packet 1639 to the Data Relay Client that created the permission. The Data Relay 1640 Server MUST also implement the similar checks for the reverse 1641 direction (i.e. ESP packets from the Data Relay Client to the peer). 1642 Packets without a permission MUST be dropped silently. 1644 4.12.3. Handling Conflicting SPI Values 1646 From the viewpoint of a host, its remote peers can have overlapping 1647 inbound SPI numbers because the IPsec uses also the destination IP 1648 address to index the remote peer host. However, a Data Relay Server 1649 can represent multiple remote peers, thus masquerading the actual 1650 destination. Since a Data Relay Server may have to deal with a 1651 multitude of Relay Clients and their peers, a Data Relay Server may 1652 experience collisions in the SPI namespace, thus being unable forward 1653 datagrams to the correct destination. Since the SPI space is 32 bits 1654 and the SPI values should be random, the probability for a 1655 conflicting SPI value is fairly small, but could occur on a busy Data 1656 Relay Server. The two problematic cases are described in this 1657 section. 1659 In the first scenario, the SPI collision problems occurs if two hosts 1660 have registered to the same Data Relay Server and a third host 1661 initiates base exchange with both of them. Here, the two Responders 1662 (i.e. Data Relay Clients) claim the same inbound SPI number with the 1663 same Initiator (peer). However, in this case, the Data Relay Server 1664 has allocated separate UDP ports for the two Data Relay Clients 1665 acting now as Responders (as recommended in Section 6.5). When the 1666 third host sends an ESP packet, the Data Relay Server is able to 1667 forward the packet to the correct Data Relay Client because the 1668 destination UDP port is different for each of the clients. 1670 In the second scenario, an SPI collision may occur when two 1671 Initiators run a base exchange to the same Responder (i.e. Data 1672 Relay Client), and both of the Initiators claim the same inbound SPI 1673 at the Data Relay Server using PEER_PERMISSION Parameter. In this 1674 case, the Data Relay Server cannot disambiguate the correct 1675 destination of an ESP packet originating from the Data Relay Client 1676 because the SPI could belong to either of the peers (and destination 1677 IP and UDP port belonging to the Data Relay Server are not unique 1678 either). The recommended way and a contingency plan to solve this 1679 issue are described below. 1681 The recommend way to mitigate the problem is as follows. For each 1682 new Host Association, A Data Relay Client acting as a Responder 1683 SHOULD register a new server reflexive candidate as described in 1684 Section 4.2. Similarly, the Data Relay Server SHOULD NOT re-use the 1685 port numbers as described in Section 6.5. This way, each server 1686 reflexive candidate for the Data Relay Client has a separate UDP port 1687 that the Data Relay Server can use to disambiguate packet 1688 destinations in case of SPI collisions. 1690 When the Data Relay Client is not registering or failed to register a 1691 new relay candidate for a new peer, the Data Relay Client MUST follow 1692 a contingency plan as follows. Upon receiving an I2 with a colliding 1693 SPI, the Data Relay client acting as the Responder MUST NOT include 1694 the relayed address candidate in the R2 message because the Data 1695 Relay Server would not be able demultiplex the related ESP packet to 1696 the correct Initiator. The same applies also the handover 1697 procedures; the Data Relay Client MUST NOT include the relayed 1698 address candidate when sending its new locator set in an UPDATE to 1699 its peer if it would cause a SPI conflict with another peer. 1701 5. Packet Formats 1703 The following subsections define the parameter and packet encodings 1704 for the HIP and ESP packets. All values MUST be in network byte 1705 order. 1707 It is worth noting that most of the parameters are shown for the sake 1708 of completeness even though they are specified already in Legacy ICE- 1709 HIP [RFC5770]. New parameters are explicitly described as new. 1711 5.1. HIP Control Packets 1713 Figure 7 illustrates the packet format for UDP-encapsulated HIP. The 1714 format is identical to Legacy ICE-HIP [RFC5770]. 1716 0 1 2 3 1717 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 1718 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1719 | Source Port | Destination Port | 1720 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1721 | Length | Checksum | 1722 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1723 | 32 bits of zeroes | 1724 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1725 | | 1726 ~ HIP Header and Parameters ~ 1727 | | 1728 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1730 Figure 7: Format of UDP-Encapsulated HIP Control Packets 1732 HIP control packets are encapsulated in UDP packets as defined in 1733 Section 2.2 of [RFC3948], "IKE Header Format for Port 4500", except 1734 that a different port number is used. Figure 7 illustrates the 1735 encapsulation. The UDP header is followed by 32 zero bits that can 1736 be used to differentiate HIP control packets from ESP packets. The 1737 HIP header and parameters follow the conventions of [RFC7401] with 1738 the exception that the HIP header checksum MUST be zero. The HIP 1739 header checksum is zero for two reasons. First, the UDP header 1740 already contains a checksum. Second, the checksum definition in 1741 [RFC7401] includes the IP addresses in the checksum calculation. The 1742 NATs that are unaware of HIP cannot recompute the HIP checksum after 1743 changing IP addresses. 1745 A Control/Data Relay Server or a non-relay Responder SHOULD listen at 1746 UDP port 10500 for incoming UDP-encapsulated HIP control packets. If 1747 some other port number is used, it needs to be known by potential 1748 Initiators. 1750 5.2. Connectivity Checks 1752 HIP connectivity checks are HIP UPDATE packets. The format is 1753 specified in [RFC7401]. 1755 5.3. Keepalives 1757 The RECOMMENDED encoding format for keepalives is HIP NOTIFY packets 1758 as specified in [RFC7401] with Notify message type field set to 1759 NAT_KEEPALIVE [TBD by IANA: 16385] and with an empty Notification 1760 data field. It is worth noting that sending of such a HIP NOTIFY 1761 message MAY be omitted if the host is actively (or passively) sending 1762 some other traffic (HIP or ESP) to the peer host over the related UDP 1763 tunnel during the Tr period. For instance, the host MAY actively 1764 send ICMPv6 requests (or respond with an ICMPv6 response) inside the 1765 ESP tunnel to test the health of the associated IPsec security 1766 association. Alternatively, the host MAY use UPDATE packets as a 1767 substitute. A minimal UPDATE packet would consist of a SEQ and 1768 ECHO_REQ_SIGN parameters, and a more complex would involve rekeying 1769 procedures as specified in section 6.8 in [RFC7402]. It is worth 1770 noting that a host actively sending periodic UPDATE packets to a busy 1771 server may increase the computational load of the server since it has 1772 to verify HMACs and signatures in UPDATE messages. 1774 5.4. NAT Traversal Mode Parameter 1776 The format of NAT traversal mode parameter is borrowed from Legacy 1777 ICE-HIP [RFC5770]. The format of the NAT_TRAVERSAL_MODE parameter is 1778 similar to the format of the ESP_TRANSFORM parameter in [RFC7402] and 1779 is shown in Figure 8. The Native ICE-HIP extension specified in this 1780 document defines the new NAT traversal mode identifier for ICE-HIP- 1781 UDP and reuses the UDP-ENCAPSULATION mode from Legacy ICE-HIP 1782 [RFC5770]. The identifier named RESERVED is reserved for future use. 1783 Future specifications may define more traversal modes. 1785 0 1 2 3 1786 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 1787 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1788 | Type | Length | 1789 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1790 | Reserved | Mode ID #1 | 1791 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1792 | Mode ID #2 | Mode ID #3 | 1793 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1794 | Mode ID #n | Padding | 1795 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1797 Type 608 1798 Length length in octets, excluding Type, Length, and padding 1799 Reserved zero when sent, ignored when received 1800 Mode ID defines the proposed or selected NAT traversal mode(s) 1802 The following NAT traversal mode IDs are defined: 1804 ID name Value 1805 RESERVED 0 1806 UDP-ENCAPSULATION 1 1807 ICE-HIP-UDP 3 1809 Figure 8: Format of the NAT_TRAVERSAL_MODE Parameter 1811 The sender of a NAT_TRAVERSAL_MODE parameter MUST make sure that 1812 there are no more than six (6) Mode IDs in one NAT_TRAVERSAL_MODE 1813 parameter. Conversely, a recipient MUST be prepared to handle 1814 received NAT traversal mode parameters that contain more than six 1815 Mode IDs by accepting the first six Mode IDs and dropping the rest. 1816 The limited number of Mode IDs sets the maximum size of the 1817 NAT_TRAVERSAL_MODE parameter. The modes MUST be in preference order, 1818 most preferred mode(s) first. 1820 Implementations conforming to this specification MUST implement UDP- 1821 ENCAPSULATION and SHOULD implement ICE-HIP-UDP modes. 1823 5.5. Connectivity Check Transaction Pacing Parameter 1825 The TRANSACTION_PACING is a new parameter, and it shown in Figure 9 1826 contains only the connectivity check pacing value, expressed in 1827 milliseconds, as a 32-bit unsigned integer. 1829 0 1 2 3 1830 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 1831 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1832 | Type | Length | 1833 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1834 | Min Ta | 1835 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1837 Type 610 1838 Length 4 1839 Min Ta the minimum connectivity check transaction pacing 1840 value the host would use (in milliseconds) 1842 Figure 9: Format of the TRANSACTION_PACING Parameter 1844 5.6. Relay and Registration Parameters 1846 The format of the REG_FROM, RELAY_FROM, and RELAY_TO parameters is 1847 shown in Figure 10. All parameters are identical except for the 1848 type. REG_FROM is the only parameter covered with the signature. 1850 0 1 2 3 1851 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 1852 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1853 | Type | Length | 1854 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1855 | Port | Protocol | Reserved | 1856 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1857 | | 1858 | Address | 1859 | | 1860 | | 1861 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1863 Type REG_FROM: 950 1864 RELAY_FROM: 63998 1865 RELAY_TO: 64002 1866 Length 20 1867 Port transport port number; zero when plain IP is used 1868 Protocol IANA assigned, Internet Protocol number. 1869 17 for UDP, 0 for plain IP 1870 Reserved reserved for future use; zero when sent, ignored 1871 when received 1872 Address an IPv6 address or an IPv4 address in "IPv4-Mapped 1873 IPv6 address" format 1875 Figure 10: Format of the REG_FROM, RELAY_FROM, and RELAY_TO 1876 Parameters 1878 REG_FROM contains the transport address and protocol from which the 1879 Control Relay Server sees the registration coming. RELAY_FROM 1880 contains the address from which the relayed packet was received by 1881 the Control Relay Server and the protocol that was used. RELAY_TO 1882 contains the same information about the address to which a packet 1883 should be forwarded. 1885 5.7. LOCATOR_SET Parameter 1887 This specification reuses the format for UDP-based locators as 1888 specified in Legacy ICE-HIP [RFC5770] to be used for communicating 1889 the address candidates between two hosts. The generic and NAT- 1890 traversal-specific locator parameters are illustrated in Figure 11. 1892 0 1 2 3 1893 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 1894 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1895 | Type | Length | 1896 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1897 | Traffic Type | Locator Type | Locator Length| Reserved |P| 1898 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1899 | Locator Lifetime | 1900 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1901 | Locator | 1902 | | 1903 | | 1904 | | 1905 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1906 . . 1907 . . 1908 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1909 | Traffic Type | Loc Type = 2 | Locator Length| Reserved |P| 1910 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1911 | Locator Lifetime | 1912 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1913 | Transport Port | Transp. Proto| Kind | 1914 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1915 | Priority | 1916 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1917 | SPI | 1918 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1919 | Address | 1920 | | 1921 | | 1922 | | 1923 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 1925 Figure 11: LOCATOR_SET Parameter 1927 The individual fields in the LOCATOR_SET parameter are described in 1928 Table 1. 1930 +-----------+----------+--------------------------------------------+ 1931 | Field | Value(s) | Purpose | 1932 +-----------+----------+--------------------------------------------+ 1933 | Type | 193 | Parameter type | 1934 | Length | Variable | Length in octets, excluding Type and | 1935 | | | Length fields and padding | 1936 | Traffic | 0-2 | Is the locator for HIP signaling (1), for | 1937 | Type | | ESP (2), or for both (0) | 1938 | Locator | 2 | "Transport address" locator type | 1939 | Type | | | 1940 | Locator | 7 | Length of the fields after Locator | 1941 | Length | | Lifetime in 4-octet units | 1942 | Reserved | 0 | Reserved for future extensions | 1943 | Preferred | 0 or 1 | Set to 1 for a Locator in R1 if the | 1944 | (P) bit | | Responder can use it for the rest of the | 1945 | | | base exchange, otherwise set to zero | 1946 | Locator | Variable | Locator lifetime in seconds | 1947 | Lifetime | | | 1948 | Transport | Variable | Transport layer port number | 1949 | Port | | | 1950 | Transport | Variable | IANA assigned, transport layer Internet | 1951 | Protocol | | Protocol number. Currently only UDP (17) | 1952 | | | is supported. | 1953 | Kind | Variable | 0 for host, 1 for server reflexive, 2 for | 1954 | | | peer reflexive or 3 for relayed address | 1955 | Priority | Variable | Locator's priority as described in | 1956 | | | [I-D.ietf-ice-rfc5245bis]. It is worth | 1957 | | | noting that while the priority of a single | 1958 | | | locator candidate is 32-bits, but an | 1959 | | | implementation should use a 64-bit integer | 1960 | | | to calculate the priority of a candidate | 1961 | | | pair for the ICE priority algorithm. | 1962 | SPI | Variable | Security Parameter Index (SPI) value that | 1963 | | | the host expects to see in incoming ESP | 1964 | | | packets that use this locator | 1965 | Address | Variable | IPv6 address or an "IPv4-Mapped IPv6 | 1966 | | | address" format IPv4 address [RFC4291] | 1967 +-----------+----------+--------------------------------------------+ 1969 Table 1: Fields of the LOCATOR_SET Parameter 1971 5.8. RELAY_HMAC Parameter 1973 As specified in Legacy ICE-HIP [RFC5770], the RELAY_HMAC parameter 1974 value has the TLV type 65520. It has the same semantics as RVS_HMAC 1975 [RFC8004]. 1977 5.9. Registration Types 1979 The REG_INFO, REG_REQ, REG_RESP, and REG_FAILED parameters contain 1980 Registration Type [RFC8003] values for Control Relay Server 1981 registration. The value for RELAY_UDP_HIP is 2 as specified in 1982 Legacy ICE-HIP [RFC5770]. 1984 5.10. Notify Packet Types 1986 A Control/Data Relay Server and end-hosts can use NOTIFY packets to 1987 signal different error conditions. The NOTIFY packet types are the 1988 same as in Legacy ICE-HIP [RFC5770]. 1990 The Notify Packet Types [RFC7401] are shown below. The Notification 1991 Data field for the error notifications SHOULD contain the HIP header 1992 of the rejected packet and SHOULD be empty for the 1993 CONNECTIVITY_CHECKS_FAILED type. 1995 NOTIFICATION PARAMETER - ERROR TYPES Value 1996 ------------------------------------ ----- 1998 NO_VALID_NAT_TRAVERSAL_MODE_PARAMETER 60 2000 If a Control Relay Server does not forward a base exchange packet 2001 due to missing NAT traversal mode parameter, or the Initiator 2002 selects a NAT traversal mode that the (non-relay) Responder did 2003 not expect, the Control Relay Server or the Responder may send 2004 back a NOTIFY error packet with this type. 2006 CONNECTIVITY_CHECKS_FAILED 61 2008 Used by the end-hosts to signal that NAT traversal connectivity 2009 checks failed and did not produce a working path. 2011 MESSAGE_NOT_RELAYED 62 2013 Used by a Control Relay Server to signal that is was not able or 2014 willing to relay a HIP packet. 2016 SERVER_REFLEXIVE_CANDIDATE_ALLOCATION_FAILED 63 2017 Used by a Data Relay Server to signal that is was not able or 2018 willing to allocate a new server reflexive candidate for the Data 2019 Relay Client 2021 5.11. ESP Data Packets 2023 The format for ESP data packets is identical to Legacy ICE-HIP 2024 [RFC5770]. 2026 [RFC3948] describes the UDP encapsulation of the IPsec ESP transport 2027 and tunnel mode. On the wire, the HIP ESP packets do not differ from 2028 the transport mode ESP, and thus the encapsulation of the HIP ESP 2029 packets is same as the UDP encapsulation transport mode ESP. 2030 However, the (semantic) difference to Bound End-to-End Tunnel (BEET) 2031 mode ESP packets used by HIP is that IP header is not used in BEET 2032 integrity protection calculation. 2034 During the HIP base exchange, the two peers exchange parameters that 2035 enable them to define a pair of IPsec ESP security associations (SAs) 2036 as described in [RFC7402]. When two peers perform a UDP-encapsulated 2037 base exchange, they MUST define a pair of IPsec SAs that produces 2038 UDP-encapsulated ESP data traffic. 2040 The management of encryption/authentication protocols and SPIs is 2041 defined in [RFC7402]. The UDP encapsulation format and processing of 2042 HIP ESP traffic is described in Section 6.1 of [RFC7402]. 2044 5.12. RELAYED_ADDRESS and MAPPED_ADDRESS Parameters 2046 While the type values are new, the format of the RELAYED_ADDRESS and 2047 MAPPED_ADDRESS parameters (Figure 12) is identical to REG_FROM, 2048 RELAY_FROM and RELAY_TO parameters. This document specifies only the 2049 use of UDP relaying, and, thus, only protocol 17 is allowed. 2050 However, future documents may specify support for other protocols. 2052 0 1 2 3 2053 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 2054 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2055 | Type | Length | 2056 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2057 | Port | Protocol | Reserved | 2058 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2059 | | 2060 | Address | 2061 | | 2062 | | 2063 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2065 Type [TBD by IANA; 2066 RELAYED_ADDRESS: 4650 2067 MAPPED_ADDRESS: 4660] 2068 Length 20 2069 Port the UDP port number 2070 Protocol IANA assigned, Internet Protocol number (17 for UDP) 2071 Reserved reserved for future use; zero when sent, ignored 2072 when received 2073 Address an IPv6 address or an IPv4 address in "IPv4-Mapped 2074 IPv6 address" format 2076 Figure 12: Format of the RELAYED_ADDRESS and MAPPED_ADDRESS 2077 Parameters 2079 5.13. PEER_PERMISSION Parameter 2081 The format of the new PEER_PERMISSION parameter is shown in 2082 Figure 13. The parameter is used for setting up and refreshing 2083 forwarding rules and the permissions for data packets at the Data 2084 Relay Server. The parameter contains one or more sets of Port, 2085 Protocol, Address, Outbound SPI (OSPI), and Inbound SPI (ISPI) 2086 values. One set defines a rule for one peer address. 2088 0 1 2 3 2089 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 2090 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2091 | Type | Length | 2092 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2093 | RPort | PPort | 2094 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2095 | Protocol | Reserved | 2096 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2097 | | 2098 | RAddress | 2099 | | 2100 | | 2101 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2102 | | 2103 | PAddress | 2104 | | 2105 | | 2106 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2107 | OSPI | 2108 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2109 | ISPI | 2110 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2112 Type [TBD by IANA; 4680] 2113 Length length in octets, excluding Type and Length 2114 RPort the transport layer (UDP) port at the Data Relay Server 2115 (i.e. the port of the server reflexive candidate) 2116 PPort the transport layer (UDP) port number of the peer 2117 Protocol IANA assigned, Internet Protocol number (17 for UDP) 2118 Reserved reserved for future use; zero when sent, ignored 2119 when received 2120 RAddress an IPv6 address, or an IPv4 address in "IPv4-Mapped 2121 IPv6 address" format, of the server reflexive candidate 2122 PAddress an IPv6 address, or an IPv4 address in "IPv4-Mapped 2123 IPv6 address" format, of the peer 2124 OSPI the outbound SPI value the Data Relay Client is using for 2125 the peer 2126 ISPI the inbound SPI value the Data Relay Client is using for 2127 the peer 2129 Figure 13: Format of the PEER_PERMISSION Parameter 2131 5.14. HIP Connectivity Check Packets 2133 The connectivity request messages are HIP UPDATE packets containing a 2134 new CANDIDATE_PRIORITY parameter (Figure 14). Response UPDATE 2135 packets contain a MAPPED_ADDRESS parameter (Figure 12). 2137 0 1 2 3 2138 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 2139 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2140 | Type | Length | 2141 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2142 | Priority | 2143 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2145 Type [TBD by IANA; 4700] 2146 Length 4 2147 Priority the priority of a (potential) peer reflexive candidate 2149 Figure 14: Format of the CANDIDATE_PRIORITY Parameter 2151 5.15. NOMINATE parameter 2153 Figure 15 shows the NOMINATE parameter that is used to conclude the 2154 candidate nomination process. 2156 0 1 2 3 2157 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 2158 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2159 | Type | Length | 2160 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2161 | Reserved | 2162 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 2164 Type [TBD by IANA; 4710] 2165 Length 4 2166 Reserved Reserved for future extension purposes 2168 Figure 15: Format of the NOMINATE Parameter 2170 6. Security Considerations 2172 The security considerations are the same as in Legacy ICE-HIP 2173 [RFC5770], but are repeated here for the sake of completeness. 2175 6.1. Privacy Considerations 2177 The locators are in plain text format in favor of inspection at HIP- 2178 aware middleboxes in the future. The current document does not 2179 specify encrypted versions of LOCATOR_SETs, even though it could be 2180 beneficial for privacy reasons to avoid disclosing them to 2181 middleboxes. 2183 It is also possible that end-users may not want to reveal all 2184 locators to each other. For example, tracking the physical location 2185 of a multihoming end-host may become easier if it reveals all 2186 locators to its peer during a base exchange. Also, revealing host 2187 addresses exposes information about the local topology that may not 2188 be allowed in all corporate environments. For these two reasons, an 2189 end-host may exclude certain host addresses from its LOCATOR_SET 2190 parameter. However, such behavior creates non-optimal paths when the 2191 hosts are located behind the same NAT. Especially, this could be 2192 problematic with a legacy NAT that does not support routing from the 2193 private address realm back to itself through the outer address of the 2194 NAT. This scenario is referred to as the hairpin problem [RFC5128]. 2195 With such a legacy NAT, the only option left would be to use a 2196 relayed transport address from a TURN server. 2198 The use of Control and Data Relay Servers can be also useful for 2199 privacy purposes. For example, a privacy concerned Responder may 2200 reveal only its Control Relay Server and Relayed candidates to 2201 Initiators. This same mechanism also protects the Responder against 2202 Denial-of-Service (DoS) attacks by allowing the Responder to initiate 2203 new connections even if its relays would be unavailable due to a DoS 2204 attack. 2206 6.2. Opportunistic Mode 2208 In opportunistic HIP mode, an Initiator sends an I1 with without 2209 setting the destination HIT of the Responder (i.e. the Control Relay 2210 Client). A Control Relay Server SHOULD have a unique IP address per 2211 Control Relay Client when the Control Relay Server is serving more 2212 than one Control Relay Client and supports opportunistic mode. 2213 Otherwise, the Control Relay Server cannot guarantee to deliver the 2214 I1 packet to the intended recipient. Future extensions of this 2215 document may allow opportunistic mode to be used with non-unique IP 2216 addresses to be utilized either as a HIP-level anycast or multicast 2217 mechanism. Both of the mentioned cases would require a separate 2218 registration parameters that the Control Relay Server proposes and 2219 the Control Client Server accepts during registration. 2221 6.3. Base Exchange Replay Protection for Control Relay Server 2223 In certain scenarios, it is possible that an attacker, or two 2224 attackers, can replay an earlier base exchange through a Control 2225 Relay Server by masquerading as the original Initiator and Responder. 2226 The attack does not require the attacker(s) to compromise the private 2227 key(s) of the attacked host(s). However, for this attack to succeed, 2228 the legimitate Responder has to be disconnected from the Control 2229 Relay Server. 2231 The Control Relay Server can protect itself against replay attacks by 2232 becoming involved in the base exchange by introducing nonces that the 2233 end-hosts (Initiator and Responder) are required to sign. One way to 2234 do this is to add ECHO_REQUEST_M parameters to the R1 and I2 packets 2235 as described in [HIP-MIDDLE] and drop the I2 or R2 packets if the 2236 corresponding ECHO_RESPONSE_M parameters are not present. 2238 6.4. Demultiplexing Different HIP Associations 2240 Section 5.1 of [RFC3948] describes a security issue for the UDP 2241 encapsulation in the standard IP tunnel mode when two hosts behind 2242 different NATs have the same private IP address and initiate 2243 communication to the same Responder in the public Internet. The 2244 Responder cannot distinguish between two hosts, because security 2245 associations are based on the same inner IP addresses. 2247 This issue does not exist with the UDP encapsulation of HIP ESP 2248 transport format because the Responder uses HITs to distinguish 2249 between different Initiators. 2251 6.5. Reuse of Ports at the Data Relay Server 2253 If the Data Relay Server uses the same relayed address and port (as 2254 conveyed in the RELAYED_ADDRESS parameter) for multiple Data Relay 2255 Clients, it appears to all the peers, and their firewalls, that all 2256 the Data Relay Clients are at the same address. Thus, a stateful 2257 firewall may allow packets pass from hosts that would not normally be 2258 able to send packets to a peer behind the firewall. Therefore, a 2259 Data Relay Server SHOULD NOT re-use the port numbers. If port 2260 numbers need to be re-used, the Data Relay Server SHOULD have a 2261 sufficiently large pool of port numbers and select ports from the 2262 pool randomly to decrease the chances of a Data Relay Client 2263 obtaining the same address that a another host behind the same 2264 firewall is using. 2266 6.6. Amplification attacks 2268 A malicious host may send an invalid list of candidates for its peer 2269 that are used for targeting a victim host by flooding it with 2270 connectivity checks. To mitigate the attack, this protocol adopts 2271 the ICE mechanism to cap the total amount of connectivity checks as 2272 defined in Section 4.7. 2274 6.7. Attacks against Connectivity Checks and Candidate Gathering 2276 [I-D.ietf-ice-rfc5245bis] describes attacks against ICE connectivity 2277 checks. HIP bases its control plane security on Diffie-Hellman key 2278 exchange, public keys and Hashed Message Authentication codes, 2279 meaning that the mentioned security concerns do not apply to HIP 2280 either. The mentioned section discusses also of man-in-the-middle 2281 replay attacks that are difficult to prevent. The connectivity 2282 checks in this protocol are immune against replay attacks because a 2283 connectivity request includes a random nonce that the recipient must 2284 sign and send back as a response. 2286 [I-D.ietf-ice-rfc5245bis] describes attacks on server reflexive 2287 address gathering. Similarly here, if the DNS, a Control Relay 2288 Server or a Data Relay Server has been compromised, not much can be 2289 done. However, the case where attacker can inject fake messages 2290 (located on a shared network segment like Wifi) does not apply here. 2291 HIP messages are integrity and replay protected, so it is not 2292 possible inject fake server reflexive address candidates. 2294 [I-D.ietf-ice-rfc5245bis] describes attacks on relayed candidate 2295 gathering. Similarly to ICE TURN servers, Data Relay Server require 2296 an authenticated base exchange that protects relayed address 2297 gathering against fake requests and responses. Further, replay 2298 attacks are not possible because the HIP base exchange (and also 2299 UPDATE procedure) is protected against replay attacks. 2301 7. IANA Considerations 2303 This section is to be interpreted according to [RFC5226]. 2305 This document updates the IANA Registry for HIP Parameter Types 2306 [RFC7401] by assigning new HIP Parameter Type values for the new HIP 2307 Parameters: RELAYED_ADDRESS, MAPPED_ADDRESS (defined in 2308 Section 5.12), and PEER_PERMISSION (defined in Section 5.13). 2310 This document updates the IANA Registry for HIP NAT traversal modes 2311 specified in Legacy ICE-HIP [RFC5770] by assigning value for the NAT 2312 traversal mode ICE-HIP-UDP (defined in Section 5.4) This 2313 specification introduces a new keepalive Notify message type field 2314 NAT_KEEPALIVE. 2316 This document defines additional registration types for the HIP 2317 Registration Extension [RFC8003] that allow registering with a Data 2318 Relay Server for ESP relaying service: RELAY_UDP_ESP (defined in 2319 Section 4.1, and performing server reflexive candidate discovery: 2320 CANDIDATE_DISCOVERY (defined in Section 4.2). 2322 This document specifies new error values to be used in HIP NOTIFY 2323 messages as described in Section 5.10: 2324 NO_VALID_NAT_TRAVERSAL_MODE_PARAMETER, CONNECTIVITY_CHECKS_FAILED, 2325 MESSAGE_NOT_RELAYED and SERVER_REFLEXIVE_CANDIDATE_ALLOCATION_FAILED. 2327 ICE specification [I-D.ietf-ice-rfc5245bis] discusses "Unilateral 2328 Self-Address Fixing" . This protocol is based on ICE, and thus the 2329 same considerations apply also here with one exception: this protocol 2330 does not hide binary IP addresses from application-level gateways. 2332 8. Contributors 2334 Marcelo Bagnulo, Philip Matthews and Hannes Tschofenig have 2335 contributed to [RFC5770]. This document leans heavily on the work in 2336 the RFC. 2338 9. Acknowledgments 2340 Thanks to Jonathan Rosenberg and the rest of the MMUSIC WG folks for 2341 the excellent work on ICE. In addition, the authors would like to 2342 thank Andrei Gurtov, Simon Schuetz, Martin Stiemerling, Lars Eggert, 2343 Vivien Schmitt, and Abhinav Pathak for their contributions and Tobias 2344 Heer, Teemu Koponen, Juhana Mattila, Jeffrey M. Ahrenholz, Kristian 2345 Slavov, Janne Lindqvist, Pekka Nikander, Lauri Silvennoinen, Jukka 2346 Ylitalo, Juha Heinanen, Joakim Koskela, Samu Varjonen, Dan Wing, Tom 2347 Henderson, Alex Elsayed and Jani Hautakorpi for their comments to 2348 [RFC5770], which is the basis for this document. 2350 This work has been partially funded by CyberTrust programme by 2351 Digile/Tekes in Finland. 2353 10. References 2355 10.1. Normative References 2357 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 2358 Requirement Levels", BCP 14, RFC 2119, 2359 DOI 10.17487/RFC2119, March 1997, 2360 . 2362 [RFC7401] Moskowitz, R., Ed., Heer, T., Jokela, P., and T. 2363 Henderson, "Host Identity Protocol Version 2 (HIPv2)", 2364 RFC 7401, DOI 10.17487/RFC7401, April 2015, 2365 . 2367 [RFC8003] Laganier, J. and L. Eggert, "Host Identity Protocol (HIP) 2368 Registration Extension", RFC 8003, DOI 10.17487/RFC8003, 2369 October 2016, . 2371 [RFC8004] Laganier, J. and L. Eggert, "Host Identity Protocol (HIP) 2372 Rendezvous Extension", RFC 8004, DOI 10.17487/RFC8004, 2373 October 2016, . 2375 [RFC8046] Henderson, T., Ed., Vogt, C., and J. Arkko, "Host Mobility 2376 with the Host Identity Protocol", RFC 8046, 2377 DOI 10.17487/RFC8046, February 2017, . 2380 [RFC8047] Henderson, T., Ed., Vogt, C., and J. Arkko, "Host 2381 Multihoming with the Host Identity Protocol", RFC 8047, 2382 DOI 10.17487/RFC8047, February 2017, . 2385 [RFC5770] Komu, M., Henderson, T., Tschofenig, H., Melen, J., and A. 2386 Keranen, Ed., "Basic Host Identity Protocol (HIP) 2387 Extensions for Traversal of Network Address Translators", 2388 RFC 5770, DOI 10.17487/RFC5770, April 2010, 2389 . 2391 [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, 2392 "Session Traversal Utilities for NAT (STUN)", RFC 5389, 2393 DOI 10.17487/RFC5389, October 2008, 2394 . 2396 [RFC7402] Jokela, P., Moskowitz, R., and J. Melen, "Using the 2397 Encapsulating Security Payload (ESP) Transport Format with 2398 the Host Identity Protocol (HIP)", RFC 7402, 2399 DOI 10.17487/RFC7402, April 2015, 2400 . 2402 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 2403 Architecture", RFC 4291, DOI 10.17487/RFC4291, February 2404 2006, . 2406 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 2407 IANA Considerations Section in RFCs", BCP 26, RFC 5226, 2408 DOI 10.17487/RFC5226, May 2008, 2409 . 2411 [I-D.ietf-ice-rfc5245bis] 2412 Keranen, A., Holmberg, C., and J. Rosenberg, "Interactive 2413 Connectivity Establishment (ICE): A Protocol for Network 2414 Address Translator (NAT) Traversal", draft-ietf-ice- 2415 rfc5245bis-08 (work in progress), December 2016. 2417 [RFC2475] Blake, S., Black, D., Carlson, M., Davies, E., Wang, Z., 2418 and W. Weiss, "An Architecture for Differentiated 2419 Services", RFC 2475, DOI 10.17487/RFC2475, December 1998, 2420 . 2422 10.2. Informative References 2424 [RFC4423] Moskowitz, R. and P. Nikander, "Host Identity Protocol 2425 (HIP) Architecture", RFC 4423, DOI 10.17487/RFC4423, May 2426 2006, . 2428 [RFC5201] Moskowitz, R., Nikander, P., Jokela, P., Ed., and T. 2429 Henderson, "Host Identity Protocol", RFC 5201, 2430 DOI 10.17487/RFC5201, April 2008, 2431 . 2433 [RFC5207] Stiemerling, M., Quittek, J., and L. Eggert, "NAT and 2434 Firewall Traversal Issues of Host Identity Protocol (HIP) 2435 Communication", RFC 5207, DOI 10.17487/RFC5207, April 2436 2008, . 2438 [RFC6538] Henderson, T. and A. Gurtov, "The Host Identity Protocol 2439 (HIP) Experiment Report", RFC 6538, DOI 10.17487/RFC6538, 2440 March 2012, . 2442 [MMUSIC-ICE] 2443 Rosenberg, J., "Guidelines for Usage of Interactive 2444 Connectivity Establishment (ICE) by non Session Initiation 2445 Protocol (SIP) Protocols", Work in Progress, July 2008. 2447 [RFC5128] Srisuresh, P., Ford, B., and D. Kegel, "State of Peer-to- 2448 Peer (P2P) Communication across Network Address 2449 Translators (NATs)", RFC 5128, DOI 10.17487/RFC5128, March 2450 2008, . 2452 [HIP-MIDDLE] 2453 Heer, T., Wehrle, K., and M. Komu, "End-Host 2454 Authentication for HIP Middleboxes", Work in Progress, 2455 February 2009. 2457 [RFC3948] Huttunen, A., Swander, B., Volpe, V., DiBurro, L., and M. 2458 Stenberg, "UDP Encapsulation of IPsec ESP Packets", 2459 RFC 3948, DOI 10.17487/RFC3948, January 2005, 2460 . 2462 Appendix A. Selecting a Value for Check Pacing 2464 Selecting a suitable value for the connectivity check transaction 2465 pacing is essential for the performance of connectivity check-based 2466 NAT traversal. The value should not be so small that the checks 2467 cause network congestion or overwhelm the NATs. On the other hand, a 2468 pacing value that is too high makes the checks last for a long time, 2469 thus increasing the connection setup delay. 2471 The Ta value may be configured by the user in environments where the 2472 network characteristics are known beforehand. However, if the 2473 characteristics are not known, it is recommended that the value is 2474 adjusted dynamically. In this case, it is recommended that the hosts 2475 estimate the round-trip time (RTT) between them and set the minimum 2476 Ta value so that only two connectivity check messages are sent on 2477 every RTT. 2479 One way to estimate the RTT is to use the time that it takes for the 2480 Control Relay Server registration exchange to complete; this would 2481 give an estimate on the registering host's access link's RTT. Also, 2482 the I1/R1 exchange could be used for estimating the RTT, but since 2483 the R1 can be cached in the network, or the relaying service can 2484 increase the delay notably, this is not recommended. 2486 Appendix B. Differences with respect to ICE 2488 The Native ICE-HIP protocol specified in this document follows the 2489 semantics of ICE as close as possible, and most of the differences 2490 are syntactical due to the use of a different protocol. In this 2491 section, we describe the differences to the ICE protocol. 2493 o ICE operates at the application layer, whereas this protocol 2494 operates between transport and network layers, thus hiding the 2495 protocol details from the application. 2497 o The STUN protocol is not employed. Instead, native ICE-HIP reuses 2498 the HIP control plane format in order simplify demultiplexing of 2499 different protocols. For example, the STUN binding response is 2500 replaced with a HIP UPDATE message containing an 2501 ECHO_REQUEST_SIGNED parameter and the STUN binding response with a 2502 HIP UPDATE message containing an ECHO_RESPONSE_SIGNED parameter as 2503 defined in Section 4.6. 2505 o The TURN protocol is not utilized. Instead, native ICE-HIP reuses 2506 Control Relay Servers for the same purpose. 2508 o ICMP errors may be used in ICE to signal failure. In Native ICE- 2509 HIP protocol, HIP NOTIFY messages are used instead. 2511 o Instead of the ICE username fragment and password mechanism for 2512 credentials, native ICE-HIP uses the HIT, derived from a public 2513 key, for the same purpose. The username fragments are "transient 2514 host identifiers, bound to a particular session established as 2515 part of the candidate exchange" [I-D.ietf-ice-rfc5245bis]. 2516 Generally in HIP, a local public key and the derived HIT are 2517 considered long-term identifiers, and invariant across different 2518 host associations and different transport-layer flows. 2520 o In ICE, the conflict when two communicating end-points take the 2521 same controlling role is solved using random values (so called 2522 tie-breaker value). In Native ICE-HIP protocol, the conflict is 2523 solved by the standard HIP base exchange procedure, where the host 2524 with the "larger" HIT switches to Responder role, thus changing 2525 also to controlled role. 2527 o The ICE-CONTROLLED and ICE-CONTROLLING attributes are not included 2528 in the connectivity checks. 2530 o The foundation concept is unnecessary in native ICE-HIP because 2531 only a single UDP flow for the IPsec tunnel will be negotiated. 2533 o Frozen candidates are omitted for the same reason as foundation 2534 concept is excluded. 2536 o Components are omitted for the same reason as foundation concept 2537 is excluded. 2539 o Native ICE-HIP supports only "full ICE" where the two 2540 communicating hosts participate actively to the connectivity 2541 checks, and the "lite" mode is not supported. This design 2542 decision follows the guidelines of ICE which recommends full ICE 2543 implementations. However, it should be noted that a publicly 2544 reachable Responder may refuse to negotiate the ICE mode as 2545 described in Section 4.7.2. This would result in a [RFC7401] 2546 based HIP base exchange tunneled over UDP followed ESP traffic 2547 over the same tunnel, without the connectivity check procedures 2548 defined in this document (in some sense, this mode corresponds to 2549 the case where two ICE lite implementations connect since no 2550 connectivity checks are sent). 2552 o As the "ICE lite" is not adopted here and both sides are capable 2553 of ICE-HIP-UDP mode (negotiated during the base exchange), default 2554 candidates are not employed in Native ICE-HIP. 2556 o If the agent is using Diffserv Codepoint markings [RFC2475] in its 2557 media packets, it SHOULD apply those same markings to its 2558 connectivity checks. 2560 o Unlike in ICE, the addresses are not XOR-ed in Native ICE-HIP 2561 protocol in order to avoid middlebox tampering. 2563 o Native ICE-HIP protocol does not employ the ICE related address 2564 and related port attributes (that are used for diagnostic or SIP 2565 purposes). 2567 Appendix C. Differences to Base Exchange and UPDATE procedures 2569 This section gives some design guidance for implementers how the 2570 extensions in this protocol extends and differs from [RFC7401] and 2571 [RFC8046]. 2573 o Both control and data plane are operated on top of UDP, not 2574 directly on IP. 2576 o A minimal implementation would conform only to Section 4.7.1 or 2577 Section 4.7.2, thus merely tunneling HIP control and data traffic 2578 over UDP. The drawback here is that it works only in the limited 2579 cases where the Responder has a public address. 2581 o It is worth noting that while a rendezvous server [RFC8004] has 2582 not been designed to be used in NATted scenarios because it just 2583 relays the first I1 packet and does not employ UDP encapsulation, 2584 the Control Relay Server forwards all control traffic and, hence, 2585 is more suitable in NATted environments. Further, the Data Relay 2586 Server guarantees forwarding of data plane traffic also in the 2587 cases when the NAT traversal procedures fail. 2589 o Registration procedures with a Control/Data Relay Server are 2590 similar as with rendezvous server. However, a Control/Data Relay 2591 Server has different registration parameters than rendezvous 2592 because it offers a different service. Also, the Control/Data 2593 Relay Server includes also a REG_FROM parameter that informs the 2594 Control/Data Relay Client about its server reflexive address. A 2595 Data Relay Server includes also a RELAYED_ADDRESS containing the 2596 relayed address for the Data Relay Client. 2598 o In [RFC7401], the Initiator and Responder can start to exchange 2599 application payload immediately after the base exchange. While 2600 exchanging data immediately after a base exchange via a Data 2601 Control Relay would be possible also here, we follow the ICE 2602 methodology to establish a direct path between two hosts using 2603 connectivity checks. This means that there will be some 2604 additional delay after the base exchange before application 2605 payload can be transmitted. The same applies for the UPDATE 2606 procedure as the connectivity checks introduce some additional 2607 delay. 2609 o In HIP without any NAT traversal support, the base exchange acts 2610 as an implicit connectivity check, and the mobility and 2611 multihoming extensions support explicit connectivity checks. 2612 After a base exchange or UPDATE based connectivity checks, a host 2613 can use the associated address pair for transmitting application 2614 payload. In this Native ICE-HIP extension, we follow the ICE 2615 methodology, where one end-point acting in the controlled role 2616 chooses the used address pair also on behalf of the other end- 2617 point acting in controlled role, which is different from HIP 2618 without NAT traversal support. Another difference is that the 2619 process of choosing an address pair is explicitly signaled using 2620 the nomination packets. The nomination process in this protocol 2621 supports only single address pair, and multihoming extensions are 2622 left for further study. 2624 o The UPDATE procedure resembles the mobility extensions defined in 2625 [RFC8046]. The first UPDATE message from the mobile host is 2626 exactly the same as in the mobility extensions. The second UPDATE 2627 message from the peer host and third from the mobile host are 2628 different in the sense that they merely acknowledge and conclude 2629 the reception of the candidates through the Control Relay Server. 2630 In other words, they do not yet test for connectivity (besides 2631 reachability through the Control Relay Server) unlike in the 2632 mobility extensions. The idea is that connectivity check 2633 procedure follows the ICE specification, which is somewhat 2634 different from the HIP mobility extensions. 2636 o The connectivity checks as defined in the mobility extensions 2637 [RFC8046] are triggered only by the peer of the mobile host. 2638 Since successful NAT traversal requires that both end-points test 2639 connectivity, both the mobile host and its peer host have to test 2640 for connectivity. In addition, this protocol validates also the 2641 UDP ports; the ports in the connectivity check must match with the 2642 response, as required by ICE. 2644 o In HIP mobility extensions [RFC8046], an outbound locator has some 2645 associated state: UNVERIFIED mean that the locator has not been 2646 tested for reachability, ACTIVE means that the address has been 2647 verified for reachability and is being used actively, and 2648 DEPRECATED means that the locator lifetime has expired. In the 2649 subset of ICE specifications used by this protocol, an individual 2650 address candidate has only two properties: type and priority. 2651 Instead, the actual state in ICE is associated with candidate 2652 pairs rather than individual addresses. The subset of ICE 2653 specifications utilized by this protocol require the following 2654 attributes for a candidate pair: valid bit, nominated bit, base 2655 and the state of connectivity check. The connectivity checks have 2656 the following states: Waiting, In-progress, Succeeded and Failed. 2657 Handling of this state attribute requires some additional logic 2658 when compared to the mobility extensions since the state is 2659 associated with a local-remote address pair rather just a remote 2660 address, and, thus, the mobility and ICE states do not have an 2661 unambiguous one-to-one mapping. 2663 o Credit-based authorization as defined in [RFC8046] could be used 2664 before candidate nomination has been concluded upon discovering 2665 working candidate pairs. However, this may result in the use of 2666 asymmetric paths for a short time period in the beginning of 2667 communications (similarly as in aggressive ICE nomination). Thus, 2668 support of credit-based authorization is left for further study. 2670 Appendix D. Multihoming Considerations 2672 This document allows a host to collect address candidates from 2673 multiple interfaces, but does not support activation and the 2674 simultaneous use of multiple address candidates. While multihoming 2675 extensions to support [RFC8047] like functionality are left for 2676 further study and experimentation, we envision here some potential 2677 compatibility improvements to support multihoming: 2679 o Data Relay Registration: a Data Relay Client acting as an 2680 Initiator with another peer host should register a new server 2681 reflexive candidate for each local transport address candidate. A 2682 Data Relay Client acting as an Responder should register a new 2683 server reflexive candidate for each { local transport address 2684 candidate, new peer host} pair for the reasons described in 2685 Section 4.12.3. In both cases, the Data Relay Client should 2686 request the additional server reflexive candidates by sending 2687 UPDATE messages originating from each of the local address 2688 candidates as described in Section 4.1. As the UPDATE messages 2689 are originating from an unknown location from the viewpoint of the 2690 Data Relay Server, it must include also a ECHO_REQUEST_SIGNED in 2691 the response in order to test for return routability. 2693 o Data Relay unregistration: this follows the procedure in Section 4 2694 but the Data Relay Client should unregister using the particular 2695 transport address to be unregistered. All transport address pair 2696 registrations can be unregistered when no RELAYED_ADDRESS 2697 parameter is included. 2699 o PEER_PERMISSION parameter: this needs to be extended or an 2700 additional parameter is needed to declare the specific local 2701 candidate of the Data Relay Client. Alternatively, the use of the 2702 PEER_PERMISSION could be used as a wild card to open permissions 2703 for a specific peer to all of the candidates of the Data Relay 2704 Client. 2706 o Connectivity checks: the controlling host should be able to 2707 nominate multiple candidates (by repeating step 7 in Figure 5 in 2708 Section 4.6 using the additional candidate pairs). 2710 o Keepalives should be sent for all the nominated candidate pairs. 2711 Similarly, the Control/Data Relay Client should send keepalives 2712 from its local candidates to its Control/Data Relay Server 2713 transport addresses. 2715 Authors' Addresses 2717 Ari Keranen 2718 Ericsson 2719 Hirsalantie 11 2720 02420 Jorvas 2721 Finland 2723 Email: ari.keranen@ericsson.com 2725 Jan Melen 2726 Ericsson 2727 Hirsalantie 11 2728 02420 Jorvas 2729 Finland 2731 Email: jan.melen@ericsson.com 2733 Miika Komu (editor) 2734 Ericsson 2735 Hirsalantie 11 2736 02420 Jorvas 2737 Finland 2739 Email: miika.komu@ericsson.com