idnits 2.17.1 draft-ietf-tsvwg-gre-in-udp-encap-05.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 6, 2015) is 3338 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) == Missing Reference: 'RFC6347' is mentioned on line 727, but not defined ** Obsolete undefined reference: RFC 6347 (Obsoleted by RFC 9147) == Unused Reference: 'RFC6438' is defined on line 873, but no explicit reference was found in the text ** Downref: Normative reference to an Informational RFC: RFC 2983 -- Obsolete informational reference (is this intentional?): RFC 793 (Obsoleted by RFC 9293) -- Obsolete informational reference (is this intentional?): RFC 2460 (Obsoleted by RFC 8200) == Outdated reference: A later version (-14) exists of draft-ietf-intarea-gre-ipv6-02 Summary: 2 errors (**), 0 flaws (~~), 4 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 1 Network Working Group E. Crabbe 2 Internet-Draft 3 Intended status: Standard Track L. Yong 4 Huawei USA 5 X. Xu 6 Huawei Technologies 7 T. Herbert 8 Google 10 Expires: September 2015 March 6, 2015 12 GRE-in-UDP Encapsulation 13 draft-ietf-tsvwg-gre-in-udp-encap-05 15 Abstract 17 This document describes a method of encapsulating network protocol 18 packets within GRE and UDP headers. In this encapsulation, the 19 source UDP port can be used as an entropy field for purposes of load 20 balancing, while the protocol of the encapsulated packet in the GRE 21 payload is identified by the GRE Protocol Type. Usage restrictions 22 apply to GRE-in-UDP usage for traffic that is not congestion 23 controlled and to UDP zero checksum usage with IPv6. 25 Status of This Document 27 This Internet-Draft is submitted in full conformance with the 28 provisions of BCP 78 and BCP 79. 30 Internet-Drafts are working documents of the Internet Engineering 31 Task Force (IETF). Note that other groups may also distribute 32 working documents as Internet-Drafts. The list of current Internet- 33 Drafts is at http://datatracker.ietf.org/drafts/current/. 35 Internet-Drafts are draft documents valid for a maximum of six 36 months and may be updated, replaced, or obsoleted by other documents 37 at any time. It is inappropriate to use Internet-Drafts as reference 38 material or to cite them other than as "work in progress." 40 This Internet-Draft will expire on September 6, 2015. 42 Copyright Notice 44 Copyright (c) 2015 IETF Trust and the persons identified as the 45 document authors. All rights reserved. 47 This document is subject to BCP 78 and the IETF Trust's Legal 48 Provisions Relating to IETF Documents 49 (http://trustee.ietf.org/license-info) in effect on the date of 50 publication of this document. Please review these documents 51 carefully, as they describe your rights and restrictions with 52 respect to this document. Code Components extracted from this 53 document must include Simplified BSD License text as described in 54 Section 4.e of the Trust Legal Provisions and are provided without 55 warranty as described in the Simplified BSD License. 57 Table of Contents 59 1. Introduction...................................................3 60 1.1. Applicability Statement...................................3 61 2. Terminology....................................................4 62 2.1. Requirements Language.....................................4 63 3. Encapsulation in UDP...........................................4 64 3.1. IP Header.................................................7 65 3.2. UDP Header................................................7 66 3.2.1. Source Port..........................................7 67 3.2.2. Destination Port.....................................7 68 3.2.3. Checksum.............................................7 69 3.2.4. Length...............................................8 70 3.3. GRE Header................................................8 71 4. Encapsulation Process Procedures...............................8 72 4.1. MTU and Fragmentation.....................................9 73 4.2. Differentiated Services..................................10 74 5. UDP Checksum Handling.........................................10 75 5.1. UDP Checksum with IPv4...................................10 76 5.2. UDP Checksum with IPv6...................................10 77 5.2.1. Middlebox Considerations ...........................14 78 6. Congestion Considerations.....................................14 79 7. Backward Compatibility........................................16 80 8. IANA Considerations...........................................16 81 9. Security Considerations.......................................17 82 10. Acknowledgements.............................................18 83 11. Contributors.................................................18 84 12. References...................................................20 85 12.1. Normative References....................................20 86 12.2. Informative References..................................20 87 13. Authors' Addresses...........................................21 89 1. Introduction 91 Load balancing, or more specifically statistical multiplexing of 92 traffic using Equal Cost Multi-Path (ECMP) and/or Link Aggregation 93 Groups (LAGs) in IP networks is a widely used technique for creating 94 higher capacity networks out of lower capacity links. Most existing 95 routers in IP networks are already capable of distributing IP 96 traffic flows over ECMP paths and/or LAGs on the basis of a hash 97 function performed on flow invariant fields in IP packet headers and 98 their payload protocol headers. Specifically, when the IP payload is 99 a User Datagram Protocol (UDP)[RFC768] or Transmission Control 100 Protocol (TCP) [RFC793] packet, router hash functions frequently 101 operate on the five-tuple of source IP address, destination IP 102 address, source port, destination port, and protocol/next-header 104 Several encapsulation techniques are commonly used in IP networks, 105 such as Generic Routing Encapsulation (GRE) [RFC2784], MPLS 106 [RFC4023] and L2TPv3 [RFC3931]. GRE is an increasingly popular 107 encapsulation choice. Unfortunately, use of common GRE endpoints may 108 reduce the entropy available for use in load balancing, especially 109 in environments where the GRE Key field [RFC2890] is not readily 110 available for use as entropy in forwarding decisions. 112 This document defines a generic GRE-in-UDP encapsulation for 113 tunneling network protocol packets across an IP network. The GRE 114 header provides payload protocol type as an EtherType in the 115 protocol type field [RFC2784][GREIPV6], and the UDP header provides 116 additional entropy by way of its source port. 118 This encapsulation method requires no changes to the transit IP 119 network. Hash functions in most existing IP routers may utilize and 120 benefit from the use of a GRE-in-UDP tunnel without needing any 121 change or upgrade to their ECMP implementation. The encapsulation 122 mechanism is applicable to a variety of IP networks including Data 123 Center and wide area networks. 125 1.1. Applicability Statement 127 GRE encapsulation is widely used for many applications. For example, 128 to redirect IP traffic to traverse a different path instead of the 129 default path in an operator network, to tunnel private network 130 traffic over a public network by use of public IP network addresses, 131 to tunnel IPv6 traffic over an IPv4 network, and etc. 133 When using GRE-in-UDP encapsulation, encapsulated traffic will be 134 treated as a UDP application, not as a GRE application, in an IP 135 network. Thus GRE-in-UDP tunnel needs to meet UDP application 136 guidelines specified in [RFC5405bis], which can constrain GRE-in-UDP 137 tunnel usage to certain applications and/or environments. 139 Here is the list of the UDP application guidelines in [RFC5405bis] 140 and corresponding Sections to cover it in this document. 142 o Congestion Control: GRE-in-UDP does not have congestion control 143 mechanism. The usage restrictions for traffic that is not 144 congestion control is specified in Section 6. 146 o Message Size: Address in Section 4.1 148 o Reliability: not applicable to a GRE-in-UDP tunnel. GRE-in-UDP 149 tunnel does not provide any reliable transport. 151 o Checksum: Address in Section 5. 153 o Middlebox Traversal: Section 5.2.1. 155 GRE-in-UDP encapsulation may be used to encapsulate already tunneled 156 traffic, i.e. tunnel-in-tunnel. The tunneled traffic may use GRE-in- 157 UDP or other tunnel encapsulation. In this case, GRE-in-UDP tunnel 158 end points treat other tunnel endpoints as of the end hosts for the 159 traffic and do not differentiate such end hosts from other end hosts. 161 2. Terminology 163 The terms defined in [RFC768][RFC2784] are used in this document. 165 2.1. Requirements Language 167 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 168 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 169 document are to be interpreted as described in [RFC2119]. 171 3. Encapsulation in UDP 173 GRE-in-UDP encapsulation format is shown as follows: 175 0 1 2 3 176 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 178 IPv4 Header: 179 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 180 |Version| IHL |Type of Service| Total Length | 181 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 182 | Identification |Flags| Fragment Offset | 183 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 184 | Time to Live |Protcol=17(UDP)| Header Checksum | 185 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 186 | Source IPv4 Address | 187 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 188 | Destination IPv4 Address | 189 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 191 UDP Header: 192 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 193 | Source Port = XXXX | Dest Port = TBD | 194 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 195 | UDP Length | UDP Checksum | 196 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 198 GRE Header: 199 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 200 |C| |K|S| Reserved0 | Ver | Protocol Type | 201 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 202 | Checksum (optional) | Reserved1 (Optional) | 203 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 204 | Key (optional) | 205 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 206 | Sequence Number (optional) | 207 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 209 Figure 1 UDP+GRE Headers in IPv4 211 0 1 2 3 212 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 214 IPv6 Header: 215 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 216 |Version| Traffic Class | Flow Label | 217 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 218 | Payload Length | NxtHdr=17(UDP)| Hop Limit | 219 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 220 | | 221 + + 222 | | 223 + Outer Source IPv6 Address + 224 | | 225 + + 226 | | 227 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 228 | | 229 + + 230 | | 231 + Outer Destination IPv6 Address + 232 | | 233 + + 234 | | 235 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 237 UDP Header: 238 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 239 | Source Port = XXXX | Dest Port = TBD | 240 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 241 | UDP Length | UDP Checksum | 242 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 244 GRE Header: 245 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 246 |C| |K|S| Reserved0 | Ver | Protocol Type | 247 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 248 | Checksum (optional) | Reserved1 (Optional) | 249 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 250 | Key (optional) | 251 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 252 | Sequence Number (optional) | 253 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 255 Figure 2 UDP+GRE Headers in IPv6 257 The contents of the IP, UDP, and GRE headers that are relevant in 258 this encapsulation are described below. 260 3.1. IP Header 262 An encapsulator MUST encode its own IP address as the source IP 263 address and the decapsulator's IP address as the destination IP 264 address. The TTL field in the IP header must be set to a value 265 appropriate for delivery of the encapsulated packet to the peer of 266 the encapsulation. 268 3.2. UDP Header 270 3.2.1. Source Port 272 The UDP source port contains a 16-bit entropy value that is 273 generated by the encapsulator to identify a flow for the 274 encapsulated packet. The port value SHOULD be within the ephemeral 275 port range. IANA suggests this range to be 49152 to 65535, where the 276 high order two bits of the port are set to one. This provides 277 fourteen bits of entropy for the inner flow identifier. In the case 278 that an encapsulator is unable to derive flow entropy from the 279 payload header, it should set a randomly selected constant value for 280 UDP source port to avoid payload packet flow reordering. 282 The source port value for a flow set by an encapsulator MAY change 283 over the lifetime of the encapsulated flow. For instance, an 284 encapsulator may change the assignment for Denial of Service (DOS) 285 mitigation or as a means to effect routing through the ECMP network. 286 An encapsulator SHOULD NOT change the source port selected for a 287 flow more than once every thirty seconds. 289 How an encapsulator generates entropy from the payload is outside 290 the scope of this document. 292 3.2.2. Destination Port 294 The destination port of the UDP header is set the GRE/UDP port (TBD) 295 (see Section 8). 297 3.2.3. Checksum 299 The UDP checksum is set and processed per [RFC768] and [RFC1122] for 300 IPv4, and [RFC2460] for IPv6. Requirements for checksum handling and 301 use of zero UDP checksums are detailed in Section 5. 303 3.2.4. Length 305 The usage of this field is in accordance with the current UDP 306 specification in [RFC768]. This length will include the UDP header 307 (eight bytes), GRE header, and the GRE payload (encapsulated packet). 309 3.3. GRE Header 311 An encapsulator sets the protocol type (EtherType) of the packet 312 being encapsulated in the GRE Protocol Type field. 314 An encapsulator may set the GRE Key Present, Sequence Number Present, 315 and Checksum Present bits and associated fields in the GRE header as 316 defined by [RFC2784] and [RFC2890]. 318 The GRE checksum MAY be enabled to protect the GRE header and 319 payload. An encapsulator SHOULD NOT enable both the GRE checksum and 320 UDP checksum simultaneously as this would be mostly redundant. Since 321 the UDP checksum covers more of the packet including the GRE header 322 and payload, the UDP checksum SHOULD have preference to using GRE 323 checksum. 325 An implementation MAY use the GRE keyid to authenticate the 326 encapsulator. In this model, a shared value is either configured or 327 negotiated between an encapsulator and decapsulator. When a GRE-in- 328 UDP packet is received with the keyid present, it is checked to see 329 if it is valid for the source to have set for the tunnel packet was 330 sent on. An implementation MAY enforce that a keyid be used for 331 source authentication on selected tunnels. When a decapsulator 332 determines a presented keyid is not valid for the source to send or 333 the keyid is absent and is considered required for authenticating 334 the encapsulator for a tunnel, the packet MUST be dropped. 336 4. Encapsulation Process Procedures 338 The GRE-in-UDP encapsulation allows encapsulated packets to be 339 forwarded through "GRE-UDP tunnels". When performing GRE-in-UDP 340 encapsulation by the encapsulator, the entropy value would be 341 generated by the encapsulator and then be filled in the Source Port 342 field of the UDP header. The Destination Port field is set to a 343 value (TBD) allocated by IANA to indicate that the UDP tunnel 344 payload is a GRE packet. The Protocol Type header field in GRE 345 header is set to the EtherType value corresponding to the protocol 346 of the encapsulated packet. 348 Intermediate routers, upon receiving these UDP encapsulated packets, 349 could balance these packets based on the hash of the five-tuple of 350 UDP packets. 352 Upon receiving these UDP encapsulated packets, the decapsulator 353 would decapsulate them by removing the UDP and GRE headers and then 354 process them accordingly. 356 Note: Each UDP tunnel is unidirectional, as GRE-in-UDP traffic is 357 sent to the IANA-allocated UDP Destination Port, and in particular, 358 is never sent back to any port used as a UDP Source Port (which 359 serves solely as a source of entropy). This is at odds with a common 360 middlebox (e.g., firewall) assumption that bidirectional traffic 361 uses a common pair of UDP ports. As a result, arranging to pass 362 bidirectional GRE-in-UDP traffic through middleboxes may require 363 separate configuration for each direction of traffic. 365 GRE-in-UDP allows encapsulation of unicast, broadcast, or multicast 366 traffic. Entropy may be generated from the header of encapsulated 367 unicast or broadcast/multicast packets at an encapsulator. The 368 mapping mechanism between the encapsulated multicast traffic and the 369 multicast capability in the IP network is transparent and 370 independent to the encapsulation and is otherwise outside the scope 371 of this document. 373 To provide entropy for ECMP, GRE-in-UDP does not rely on GRE keep- 374 alive. It is RECOMMENED no use of GRE keep-alive in the GRE-in-UDP 375 tunnel. This aligns with middlebox traversal guidelines in Section 376 3.5 of [RFC5405bis]. 378 4.1. MTU and Fragmentation 380 Regarding fragmentation, an encapsulator SHOULD perform 381 fragmentation [GREMTU] on a packet before encapsulation and factor 382 in both GRE and UDP header bytes in the effective Maximum 383 Transmission Unit (MTU) size. Not performing the fragmentation will 384 cause the packets exceeding network MTU size to be dropped or 385 fragmented in the network. An encapsulator MUST use the same source 386 UDP port for all packet fragments to ensure that the transit routers 387 will forward the packet fragments on the same path. An operator 388 should factor in the additional bytes of overhead when considering 389 an MTU size for the payload to avoid the likelihood of fragmentation. 391 Fragmented packets MUST be reassembled at the decapsulator prior to 392 being sent to a (payload) application. Packet fragmentation and 393 reassembling process is outside the scope of the document. 395 4.2. Differentiated Services 397 To ensure that tunneled traffic gets the same treatment over the IP 398 network, prior to the encapsulation process, an encapsulator should 399 process the payload to get the proper parameters to fill into the IP 400 header such as DiffServ [RFC2983]. Encapsulation end points that 401 support ECN must use the method described in [RFC6040] for ECN 402 marking propagation. This process is outside of the scope of this 403 document. 405 5. UDP Checksum Handling 407 5.1. UDP Checksum with IPv4 409 For UDP in IPv4, the UDP checksum MUST be processed as specified in 410 [RFC768] and [RFC1122] for both transmit and receive. An 411 encapsulator MAY set the UDP checksum to zero for performance or 412 implementation considerations. The IPv4 header includes a checksum 413 which protects against mis-delivery of the packet due to corruption 414 of IP addresses. The UDP checksum potentially provides protection 415 against corruption of the UDP header, GRE header, and GRE payload. 416 Enabling or disabling the use of checksums is a deployment 417 consideration that should take into account the risk and effects of 418 packet corruption, and whether the packets in the network are 419 already adequately protected by other, possibly stronger mechanisms 420 such as the Ethernet CRC. 422 When a decapsulator receives a packet, the UDP checksum field MUST 423 be processed. If the UDP checksum is non-zero, the decapsulator MUST 424 verify the checksum before accepting the packet. By default a 425 decapsularor SHOULD accept UDP packets with a zero checksum. A node 426 MAY be configured to disallow zero checksums per [RFC1122]; this may 427 be done selectively, for instance disallowing zero checksums from 428 certain hosts that are known to be sending over paths subject to 429 packet corruption. If verification of a non-zero checksum fails, a 430 decapsulator lacks the capability to verify a non-zero checksum, or 431 a packet with a zero-checksum was received and the decapsulator is 432 configured to disallow, the packet MUST be dropped and an event MAY 433 be logged. 435 5.2. UDP Checksum with IPv6 437 For UDP in IPv6, the UDP checksum MUST be processed as specified in 438 [RFC768] and [RFC2460] for both transmit and receive. 440 When UDP is used over IPv6, the UDP checksum is relied upon to 441 protect both the IPv6 and UDP headers from corruption, and so MUST 442 used with the following exceptions: 444 a. Use of GRE-in-UDP in networks under single administrative 445 control (such as within a single operator's network) where it 446 is known (perhaps through knowledge of equipment types and 447 lower layer checks) that packet corruption is exceptionally 448 unlikely and where the operator is willing to take the risk of 449 undetected packet corruption. 451 b. Use of GRE-in-UDP in networks under single administrative 452 control (such as within a single operator's network) where it 453 is judged through observational measurements (perhaps of 454 historic or current traffic flows that use a non-zero checksum) 455 that the level of packet corruption is tolerably low and where 456 the operator is willing to take the risk of undetected packet 457 corruption. 459 c. Use of GRE-in-UDP for traffic delivery for applications that 460 are tolerant of mis-delivered or corrupted packets (perhaps 461 through higher layer checksum, validation, and retransmission 462 or transmission redundancy) where the operator is willing to 463 rely on the applications using the tunnel to survive any 464 corrupt packets. 466 For these exceptions, the UDP zero-checksum mode can be used. 467 However the use of the UDP zero-checksum mode must meet the 468 requirements specified in [RFC6935] and [RFC6936] as well at the 469 additional requirements stated below. 471 These exceptions may also be extended to the use of GRE-in-UDP 472 within a set of closely cooperating network administrations (such as 473 network operators who have agreed to work together in order to 474 jointly provide specific services). 476 As such, for IPv6, the UDP checksum for GRE-in-UDP MUST be used as 477 specified in [RFC768] and [RFC2460] for tunnels that span multiple 478 networks whose network administrations do not cooperate closely, 479 even if each non-cooperating network administration independently 480 satisfies one or more of the exceptions for UDP zero-checksum mode 481 usage with GRE-in-UDP over IPv6. 483 The following additional requirements apply to implementation and 484 use of UDP zero-checksum mode for GRE-in-UDP over IPv6: 486 a. Use of the UDP checksum with IPv6 MUST be the default 487 configuration of all GRE-in-UDP implementations. 489 b. The GRE-in-UDP implementation MUST comply with all requirements 490 specified in Section 4 of [RFC6936] and with requirement 1 491 specified in Section 5 of [RFC6936]. 493 c. By default a decapsulator MUST disallow receipt of GRE-in-UDP 494 packets with zero UDP checksums with IPv6. Zero checksums May 495 selectively be enabled for certain source address. A decapsulator 496 MUST check that the source and destination IPv6 addresses are 497 valid for the GRE-in-UDP tunnel on which the packet was received 498 if that tunnel uses UDP zero-checksum mode and discard any packet 499 for which this check fails. 501 d. An encapsulator SHOULD use different IPv6 addresses for each GRE- 502 in-UDP tunnel that uses UDP zero-checksum mode regardless of the 503 decapsulator in order to strengthen the decapsulator's check of 504 the IPv6 source address (i.e., the same IPv6 source address 505 SHOULD NOT be used with more than one IPv6 destination address, 506 independent of whether that destination address is a unicast or 507 multicast address). When this is not possible, it is RECOMMENDED 508 to use each source IPv6 address for as few UDP zero-checksum mode 509 GRE-in-UDP tunnels as is feasible. 511 e. Any middlebox support for GRE-in-UDP with UDP zero-checksum mode 512 for IPv6 MUST comply with requirements 1 and 8-10 in Section 5 of 513 [RFC6936].[RFC6936]. 515 f. Measures SHOULD be taken to prevent IPv6 traffic with zero UDP 516 checksums from "escaping" to the general Internet; see Section 6 517 for examples of such measures. 519 g. IPv6 traffic with zero UDP checksums MUST be actively monitored 520 for errors by the network operator. 522 h. If a packet with a non-zero checksum is received, the checksum 523 MUST be verified before accepting the packet. This is regardless 524 of whether a tunnel encapsulator and decapsulator have been 525 configured with UDP zero-checksum mode. 527 The above requirements do not change either the requirements 528 specified in [RFC2460] as modified by [RFC6935] or the requirements 529 specified in [RFC6936]. 531 The requirement to check the source IPv6 address in addition to the 532 destination IPv6 address, plus the strong recommendation against 533 reuse of source IPv6 addresses among GRE-in-UDP tunnels collectively 534 provide some mitigation for the absence of UDP checksum coverage of 535 the IPv6 header. Additional assurance is provided by the 536 restrictions in the above exceptions that limit usage of IPv6 UDP 537 zero-checksum mode to well-managed networks for which GRE 538 encapsulated packet corruption has not been a problem in practice. 540 Hence GRE-in-UDP is suitable for transmission over lower layers in 541 the well-managed networks that are allowed by the exceptions stated 542 above and the rate of corruption of the inner IP packet on such 543 networks is not expected to increase by comparison to GRE traffic 544 that is not encapsulated in UDP. For these reasons, GRE-in-UDP does 545 not provide an additional integrity check except when GRE checksum 546 is used when UDP zero-checksum mode is used with IPv6, and this 547 design is in accordance with requirements 2, 3 and 5 specified in 548 Section 5 of [RFC6936]. 550 GRE does not accumulate incorrect state as a consequence of GRE 551 header corruption. A corrupt GRE results in either packet discard or 552 forwarding of the packet without accumulation of GRE state. GRE 553 checksum MAY be used for protecting GRE header and payload. Active 554 monitoring of GRE-in-UDP traffic for errors is REQUIRED as 555 occurrence of errors will result in some accumulation of error 556 information outside the protocol for operational and management 557 purposes. This design is in accordance with requirement 4 specified 558 in Section 5 of [RFC6936]. 560 The remaining requirements specified in Section 5 of [RFC6936] are 561 inapplicable to GRE-in-UDP. Requirements 6 and 7 do not apply 562 because GRE does not have a GRE-generic control feedback mechanism. 563 Requirements 8-10 are middlebox requirements that do not apply to 564 GRE-in-UDP tunnel endpoints, but see Section 5.2.1 for further 565 middlebox discussion. 567 It is worth to mention that the use of a zero UDP checksum should 568 present the equivalent risk of undetected packet corruption when 569 sending similar packet using GRE-in-IPv6 without UDP and without GRE 570 checksums. 572 In summary, UDP zero-checksum mode for IPv6 is allowed to be used 573 with GRE-in-UDP when one of the three exceptions specified above 574 applies, provided that additional requirements stated above are 575 complied with. Otherwise the UDP checksum MUST be used for IPv6 as 576 specified in [RFC768] and [RFC2460]. 578 5.2.1. Middlebox Considerations 580 IPv6 datagrams with a zero UDP checksum will not be passed by any 581 middlebox that validates the checksum based on [RFC2460] or that 582 updates the UDP checksum field, such as NATs or firewalls. Changing 583 this behavior would require such middleboxes to be updated to 584 correctly handle datagrams with zero UDP checksums. The GRE-in-UDP 585 encapsulation does not provide a mechanism to safely fall back to 586 using a checksum when a path change occurs redirecting a tunnel over 587 a path that includes a middlebox that discards IPv6 datagrams with a 588 zero UDP checksum. In this case the GRE-in-UDP tunnel will be 589 black-holed by that middlebox. Recommended changes to allow 590 firewalls, NATs and other middleboxes to support use of an IPv6 zero 591 UDP checksum are described in Section 5 of [RFC6936]. 593 6. Congestion Considerations 595 Section 3.1.7 of [RFC5405bis] discussed the congestion implications 596 of UDP tunnels. As discussed in [RFC5405bis], because other flows 597 can share the path with one or more UDP tunnels, congestion control 598 [RFC2914] needs to be considered. 600 A major motivation for GRE-in-UDP encapsulation is to tunnel a 601 network protocol over IP network and improve the use of multipath 602 (such as ECMP) in cases where traffic is to traverse routers which 603 are able to hash on UDP Port and IP address. As such, in many cases 604 this may reduce the occurrence of congestion and improve usage of 605 available network capacity. However, it is also necessary to ensure 606 that the network, including applications that use the network, 607 responds appropriately in more difficult cases, such as when link or 608 equipment failures have reduced the available capacity. 610 The impact of congestion must be considered both in terms of the 611 effect on the rest of the network over which packets are sent in UDP 612 tunnels, and in terms of the effect on the flows that are sent by 613 UDP tunnels. The potential impact of congestion from a UDP tunnel 614 depends upon what sort of traffic is carried over the tunnel, as 615 well as the path of the tunnel. 617 GRE encapsulation is widely used to carry a wide range of network 618 protocols and traffic. In many cases GRE encapsulation is used to 619 carry IP traffic. IP traffic is generally assumed to be congestion 620 controlled, and thus a tunnel carrying general IP traffic (as might 621 be expected to be carried across the Internet) generally does not 622 need additional congestion control mechanisms. As specified in RFC 623 5405: 625 "IP-based traffic is generally assumed to be congestion-controlled, 626 i.e., it is assumed that the transport protocols generating IP-based 627 traffic at the sender already employ mechanisms that are sufficient 628 to address congestion on the path. Consequently, a tunnel carrying 629 IP-based traffic should already interact appropriately with other 630 traffic sharing the path, and specific congestion control mechanisms 631 for the tunnel are not necessary." 633 For this reason, where GRE-in-UDP tunneling is used to carry IP 634 traffic that is known to be congestion controlled, the UDP tunnels 635 MAY be used within a single network or across multiple networks, 636 with cooperating network operators. Internet IP traffic is 637 generally assumed to be congestion-controlled. 639 However, GRE-in-UDP tunneling can be also used to carry traffic that 640 is not necessarily congestion controlled. In such cases network 641 operators may avoid congestion by careful provisioning of their 642 networks, by rate limiting of user data traffic, and/or by using 643 Traffic Engineering tools to monitor the network segments and 644 dynamically steers traffic away from potentially congested links. 646 For this reason, where the GRE payload traffic is not congestion 647 controlled, GRE-in-UDP tunnels MUST only be used within a single 648 operator's network that utilizes careful provisioning (e.g., rate 649 limiting at the entries of the network while over-provisioning 650 network capacity) to ensure against congestion, or within a limited 651 number of networks whose operators closely cooperate in order to 652 jointly provide this same careful provisioning. 654 As such, GRE-in-UDP MUST NOT be used over the general Internet, or 655 over non-cooperating network operators, to carry traffic that is not 656 congestion-controlled. 658 Measures SHOULD be taken to prevent non-congestion-controlled GRE- 659 in-UDP traffic from "escaping" to the general Internet, e.g.: 661 o Physical or logical isolation of the links carrying GRE-in-UDP 662 from the general Internet. 664 o Deployment of packet filters that block the UDP ports assigned 665 for GRE-in-UDP. 667 o Imposition of restrictions on GRE-in-UDP traffic by software 668 tools used to set up GRE-in-UDP tunnels between specific end 669 systems (as might be used within a single data center). 671 o Use of a "Managed Circuit Breaker" for the tunneled traffic as 672 described in [CB]. 674 7. Backward Compatibility 676 It is assumed that tunnel ingress routers must be upgraded in order 677 to support the encapsulations described in this document. 679 No change is required at transit routers to support forwarding of 680 the encapsulation described in this document. 682 If a router that is intended for use as a decapsulator does not 683 support or enable GRE-in-UDP encapsulation described in this 684 document, it will not be listening on destination port (TBD). In 685 these cases, the router will conform to normal UDP processing and 686 respond to an encapsulator with an ICMP message indicating "port 687 unreachable" according to [RFC792]. Upon receiving this ICMP 688 message, the node MUST NOT continue to use GRE-in-UDP encapsulation 689 toward this peer without management intervention. 691 8. IANA Considerations 693 IANA is requested to make the following allocations: 695 One UDP destination port number for the indication of GRE 697 Service Name: GRE-in-UDP 698 Transport Protocol(s): UDP 699 Assignee: IESG 700 Contact: IETF Chair 701 Description: GRE-in-UDP Encapsulation 702 Reference: [This.I-D] 703 Port Number: TBD 704 Service Code: N/A 705 Known Unauthorized Uses: N/A 706 Assignment Notes: N/A 708 One UDP destination port number for the indication of GRE with DTLS 710 Service Name: GRE-UDP-DTLS 711 Transport Protocol(s): UDP 712 Assignee: IESG 713 Contact: IETF Chair 714 Description: GRE-in-UDP Encapsulation with DTLS 715 Reference: [This.I-D] 716 Port Number: TBD 717 Service Code: N/A 718 Known Unauthorized Uses: N/A 719 Assignment Notes: N/A 721 9. Security Considerations 723 UDP and GRE encapsulation does not effect security for the payload 724 protocol. When using GRE-in-UDP, Network Security in a network is 725 mostly equivalent to that of a network using GRE. 727 DTLS [RFC6347] can be used for application security and can preserve 728 network and transport layer protocol information. Specifically, if 729 DTLS is used to secure the GRE-in-UDP tunnel, the destination port 730 of the UDP header MUST be set to an IANA-assigned value (TBD2) 731 indicating GRE-in-UDP with DTLS, and that UDP port MUST NOT be used 732 for other traffic. The UDP source port field can still be used to 733 add entropy, e.g., for load-sharing purposes. DTLS usage is limited 734 to a single DTLS session for any specific tunnel encapsulator/ 735 decapsulator pair (identified by source and destination IP 736 addresses). Both IP addresses MUST be unicast addresses - multicast 737 traffic is not supported when DTLS is used. A GRE-in-UDP tunnel 738 decapsulator implementation that supports DTLS is expected to be 739 able to establish DTLS sessions with multiple tunnel encapsulators, 740 and likewise an GRE-in-UDP tunnel encapsulator implementation is 741 expected to be able to establish DTLS sessions with multiple 742 decapsulators (although different source and/or destination IP 743 addresses may be involved -see Section 4.2 for discussion of one 744 situation where use of different source IP addresses is important). 746 Use of ICMP for signaling of the GRE-in-UDP encapsulation capability 747 adds a security concern. Upon receiving an ICMP message and before 748 taking an action on it, the ingress MUST validate the IP address 749 originating against tunnel egress address and MUST evaluate the 750 packet header returned in the ICMP payload to ensure the source port 751 is the one used for this tunnel. The mechanism for performing this 752 validation is out of the scope of this document. 754 In an instance where the UDP source port is not set based on the 755 flow invariant fields from the payload header, a random port SHOULD 756 be selected in order to minimize the vulnerability to off-path 757 attacks. [RFC6056]. The random port may also be periodically changed 758 to mitigate certain denial of service attacks. How the source port 759 randomization occurs is outside scope of this document. 761 Using one standardized value in UDP destination port for an 762 encapsulation indication may increase the vulnerability of off-path 763 attack. To overcome this, an alternate port may be agreed upon to 764 use between an encapsulator and decapsulator [RFC6056]. How the 765 encapsulator end points communicate the value is outside scope of 766 this document. 768 This document does not require that decapsulator validates the IP 769 source address of the tunneled packets (with the exception that the 770 IPv6 source address MUST be validated when UDP zero-checksum mode is 771 used with IPv6), but it should be understood that failure to do so 772 presupposes that there is effective destination-based (or a 773 combination of source-based and destination-based) filtering at the 774 boundaries. 776 10. Acknowledgements 778 Authors like to thank Vivek Kumar, Ron Bonica, Joe Touch, Ruediger 779 Geib, Lar Edds, Lloyd, and many others for their review and valuable 780 input on this draft. 782 Thank the design team led by David Black (members: Ross Callon, 783 Gorry Fairhurst, Xiaohu Xu, Lucy Yong) to efficiently work out the 784 descriptions for the congestion considerations and IPv6 UDP zero 785 checksum. 787 11. Contributors 789 The following people all contributed significantly to this document 790 and are listed below in alphabetical order: 792 David Black 793 EMC Corporation 794 176 South Street 795 Hopkinton, MA 01748 796 USA 798 Email: david.black@emc.com 800 Ross Callon 801 Juniper Networks 802 10 Technology Park Drive 803 Westford, MA 01886 804 USA 806 Email: rcallon@juniper.net 808 John E. Drake 809 Juniper Networks 811 Email: jdrake@juniper.net 813 Gorry Fairhurst 814 University of Aberdeen 816 Email: gorry@erg.abdn.ac.uk 818 Yongbing Fan 819 China Telecom 820 Guangzhou, China. 821 Phone: +86 20 38639121 823 Email: fanyb@gsta.com 825 Adrian Farrel 826 Juniper Networks 828 Email: adrian@olddog.co.uk 830 Vishwas Manral 831 Hewlett-Packard Corp. 832 3000 Hanover St, Palo Alto. 834 Email: vishwas.manral@hp.com 836 Carlos Pignataro 837 Cisco Systems 838 7200-12 Kit Creek Road 839 Research Triangle Park, NC 27709 USA 841 EMail: cpignata@cisco.com 843 12. References 845 12.1. Normative References 847 [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 848 August 1980. 850 [RFC1122] Braden, R., "Requirements for Internet Hosts -- 851 Communication Layers", RFC1122, October 1989. 853 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 854 Requirement Levels", BCP 14, RFC2119, March 1997. 856 [RFC2784] Farinacci, D., Li, T., Hanks, S., Meyer, D., and P. 857 Traina, "Generic Routing Encapsulation (GRE)", RFC 2784, 858 March 2000. 860 [RFC2890] Dommety, G., "Key and Sequence Number Extensions to GRE", 861 RFC2890, September 2000. 863 [RFC2983] Black, D., "Differentiated Services and Tunnels", RFC2983, 864 October 2000. 866 [RFC5405bis] Eggert, L., "Unicast UDP Usage Guideline for 867 Application Designers", draft-ietf-tsvwg-rfc5405bis, work 868 in progress. 870 [RFC6040] Briscoe, B., "Tunneling of Explicit Congestion 871 Notification", RFC6040, November 2010. 873 [RFC6438] Carpenter, B., Amante, S., "Using the IPv6 Flow Label for 874 Equal Cost Multipath Routing and Link Aggregation in 875 tunnels", RFC6438, November, 2011. 877 [RFC6935] Eubanks, M., Chimento, P., and M. Westerlund, "IPv6 and 878 UDP Checksums for Tunneled Packets", RFC 6935, April 2013. 880 [RFC6936] Fairhurst, G. and M. Westerlund, "Applicability Statement 881 for the Use of IPv6 UDP Datagrams with Zero Checksums", 882 RFC 6936, April 2013. 884 12.2. Informative References 886 [RFC792] Postel, J., "Internet Control Message Protocol", STD 5, RFC 887 792, September 1981. 889 [RFC793] DARPA, "Transmission Control Protocol", RFC793, September 890 1981. 892 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 893 (IPv6) Specification", RFC 2460, December 1998. 895 [RFC2914] Floyd, S.,"Congestion Control Principles", RFC2914, 896 September 2000. 898 [RFC3931] Lau, J., Townsley, M., and I. Goyret, "Layer Two Tunneling 899 Protocol - Version 3 (L2TPv3)", RFC 3931, March 2005. 901 [RFC4023] Worster, T., Rekhter, Y., and E. Rosen, "Encapsulating 902 MPLS in IP or Generic Routing Encapsulation (GRE)", RFC 903 4023, March 2005. 905 [RFC6056] Larsen, M. and Gont, F., "Recommendations for Transport- 906 Protocol Port Randomization", RFC6056, January 2011. 908 [GREIPV6] Pignataro, C., el al, "IPv6 Support for Generic Routing 909 Encapsulation (GRE)", draft-ietf-intarea-gre-ipv6-02, work 910 in progress. 912 [GREMTU] Bonica, R., "A Fragmentation Strategy for Generic Routing 913 Encapsulation (GRE)", draft-ietf-intarea-gre-mtu, work in 914 progress. 916 [CB] Fairhurst, G., "Network Transport Circuit Breakers", 917 draft-fairhurst-tsvwg-circuit-breaker-01, work in 918 progress. 920 13. Authors' Addresses 922 Edward Crabbe 924 Email: edward.crabbe@gmail.com 926 Lucy Yong 927 Huawei Technologies, USA 929 Email: lucy.yong@huawei.com 931 Xiaohu Xu 932 Huawei Technologies, 933 Beijing, China 935 Email: xuxiaohu@huawei.com 936 Tom Herbert 937 Google 938 1600 Amphitheatre Parkway 939 Mountain View, CA 940 Email : therbert@google.com