idnits 2.17.1 draft-ietf-tsvwg-gre-in-udp-encap-06.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 9, 2015) is 3329 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 728, but not defined ** Obsolete undefined reference: RFC 6347 (Obsoleted by RFC 9147) == Unused Reference: 'RFC6438' is defined on line 881, 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) Summary: 2 errors (**), 0 flaws (~~), 3 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 9, 2015 12 GRE-in-UDP Encapsulation 13 draft-ietf-tsvwg-gre-in-udp-encap-06 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 9, 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..................................21 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], 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 protected by other, possibly stronger mechanisms such as the 420 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]. Use of GRE checksum favors non- 577 use of the UDP checksum. 579 5.2.1. Middlebox Considerations 581 IPv6 datagrams with a zero UDP checksum will not be passed by any 582 middlebox that validates the checksum based on [RFC2460] or that 583 updates the UDP checksum field, such as NATs or firewalls. Changing 584 this behavior would require such middleboxes to be updated to 585 correctly handle datagrams with zero UDP checksums. The GRE-in-UDP 586 encapsulation does not provide a mechanism to safely fall back to 587 using a checksum when a path change occurs redirecting a tunnel over 588 a path that includes a middlebox that discards IPv6 datagrams with a 589 zero UDP checksum. In this case the GRE-in-UDP tunnel will be 590 black-holed by that middlebox. Recommended changes to allow 591 firewalls, NATs and other middleboxes to support use of an IPv6 zero 592 UDP checksum are described in Section 5 of [RFC6936]. 594 6. Congestion Considerations 596 Section 3.1.7 of [RFC5405bis] discussed the congestion implications 597 of UDP tunnels. As discussed in [RFC5405bis], because other flows 598 can share the path with one or more UDP tunnels, congestion control 599 [RFC2914] needs to be considered. 601 A major motivation for GRE-in-UDP encapsulation is to tunnel a 602 network protocol over IP network and improve the use of multipath 603 (such as ECMP) in cases where traffic is to traverse routers which 604 are able to hash on UDP Port and IP address. As such, in many cases 605 this may reduce the occurrence of congestion and improve usage of 606 available network capacity. However, it is also necessary to ensure 607 that the network, including applications that use the network, 608 responds appropriately in more difficult cases, such as when link or 609 equipment failures have reduced the available capacity. 611 The impact of congestion must be considered both in terms of the 612 effect on the rest of the network over which packets are sent in UDP 613 tunnels, and in terms of the effect on the flows that are sent by 614 UDP tunnels. The potential impact of congestion from a UDP tunnel 615 depends upon what sort of traffic is carried over the tunnel, as 616 well as the path of the tunnel. 618 GRE encapsulation is widely used to carry a wide range of network 619 protocols and traffic. In many cases GRE encapsulation is used to 620 carry IP traffic. IP traffic is generally assumed to be congestion 621 controlled, and thus a tunnel carrying general IP traffic (as might 622 be expected to be carried across the Internet) generally does not 623 need additional congestion control mechanisms. As specified in RFC 624 5405: 626 "IP-based traffic is generally assumed to be congestion-controlled, 627 i.e., it is assumed that the transport protocols generating IP-based 628 traffic at the sender already employ mechanisms that are sufficient 629 to address congestion on the path. Consequently, a tunnel carrying 630 IP-based traffic should already interact appropriately with other 631 traffic sharing the path, and specific congestion control mechanisms 632 for the tunnel are not necessary." 634 For this reason, where GRE-in-UDP tunneling is used to carry IP 635 traffic that is known to be congestion controlled, the UDP tunnels 636 MAY be used within a single network or across multiple networks, 637 with cooperating network operators. Internet IP traffic is 638 generally assumed to be congestion-controlled. 640 However, GRE-in-UDP tunneling can be also used to carry traffic that 641 is not necessarily congestion controlled. In such cases network 642 operators may avoid congestion by careful provisioning of their 643 networks, by rate limiting of user data traffic, and/or by using 644 Traffic Engineering tools to monitor the network segments and 645 dynamically steers traffic away from potentially congested links. 647 For this reason, where the GRE payload traffic is not congestion 648 controlled, GRE-in-UDP tunnels MUST only be used within a single 649 operator's network that utilizes careful provisioning (e.g., rate 650 limiting at the entries of the network while over-provisioning 651 network capacity) to ensure against congestion, or within a limited 652 number of networks whose operators closely cooperate in order to 653 jointly provide this same careful provisioning. 655 As such, GRE-in-UDP MUST NOT be used over the general Internet, or 656 over non-cooperating network operators, to carry traffic that is not 657 congestion-controlled. 659 Measures SHOULD be taken to prevent non-congestion-controlled GRE- 660 in-UDP traffic from "escaping" to the general Internet, e.g.: 662 o Physical or logical isolation of the links carrying GRE-in-UDP 663 from the general Internet. 665 o Deployment of packet filters that block the UDP ports assigned 666 for GRE-in-UDP. 668 o Imposition of restrictions on GRE-in-UDP traffic by software 669 tools used to set up GRE-in-UDP tunnels between specific end 670 systems (as might be used within a single data center). 672 o Use of a "Managed Circuit Breaker" for the tunneled traffic as 673 described in [CB]. 675 7. Backward Compatibility 677 It is assumed that tunnel ingress routers must be upgraded in order 678 to support the encapsulations described in this document. 680 No change is required at transit routers to support forwarding of 681 the encapsulation described in this document. 683 If a router that is intended for use as a decapsulator does not 684 support or enable GRE-in-UDP encapsulation described in this 685 document, it will not be listening on destination port (TBD). In 686 these cases, the router will conform to normal UDP processing and 687 respond to an encapsulator with an ICMP message indicating "port 688 unreachable" according to [RFC792]. Upon receiving this ICMP 689 message, the node MUST NOT continue to use GRE-in-UDP encapsulation 690 toward this peer without management intervention. 692 8. IANA Considerations 694 IANA is requested to make the following allocations: 696 One UDP destination port number for the indication of GRE 698 Service Name: GRE-in-UDP 699 Transport Protocol(s): UDP 700 Assignee: IESG 701 Contact: IETF Chair 702 Description: GRE-in-UDP Encapsulation 703 Reference: [This.I-D] 704 Port Number: TBD 705 Service Code: N/A 706 Known Unauthorized Uses: N/A 707 Assignment Notes: N/A 709 One UDP destination port number for the indication of GRE with DTLS 711 Service Name: GRE-UDP-DTLS 712 Transport Protocol(s): UDP 713 Assignee: IESG 714 Contact: IETF Chair 715 Description: GRE-in-UDP Encapsulation with DTLS 716 Reference: [This.I-D] 717 Port Number: TBD 718 Service Code: N/A 719 Known Unauthorized Uses: N/A 720 Assignment Notes: N/A 722 9. Security Considerations 724 UDP and GRE encapsulation does not effect security for the payload 725 protocol. When using GRE-in-UDP, Network Security in a network is 726 mostly equivalent to that of a network using GRE. 728 DTLS [RFC6347] can be used for application security and can preserve 729 network and transport layer protocol information. Specifically, if 730 DTLS is used to secure the GRE-in-UDP tunnel, the destination port 731 of the UDP header MUST be set to an IANA-assigned value (TBD2) 732 indicating GRE-in-UDP with DTLS, and that UDP port MUST NOT be used 733 for other traffic. The UDP source port field can still be used to 734 add entropy, e.g., for load-sharing purposes. DTLS usage is limited 735 to a single DTLS session for any specific tunnel encapsulator/ 736 decapsulator pair (identified by source and destination IP 737 addresses). Both IP addresses MUST be unicast addresses - multicast 738 traffic is not supported when DTLS is used. A GRE-in-UDP tunnel 739 decapsulator implementation that supports DTLS is expected to be 740 able to establish DTLS sessions with multiple tunnel encapsulators, 741 and likewise an GRE-in-UDP tunnel encapsulator implementation is 742 expected to be able to establish DTLS sessions with multiple 743 decapsulators (although different source and/or destination IP 744 addresses may be involved -see Section 5.2 for discussion of one 745 situation where use of different source IP addresses is important). 747 Use of ICMP for signaling of the GRE-in-UDP encapsulation capability 748 adds a security concern. Upon receiving an ICMP message and before 749 taking an action on it, the ingress MUST validate the IP address 750 originating against tunnel egress address and MUST evaluate the 751 packet header returned in the ICMP payload to ensure the source port 752 is the one used for this tunnel. The mechanism for performing this 753 validation is out of the scope of this document. 755 In an instance where the UDP source port is not set based on the 756 flow invariant fields from the payload header, a random port SHOULD 757 be selected in order to minimize the vulnerability to off-path 758 attacks. [RFC6056]. The random port may also be periodically changed 759 to mitigate certain denial of service attacks. How the source port 760 randomization occurs is outside scope of this document. 762 Using one standardized value in UDP destination port for an 763 encapsulation indication may increase the vulnerability of off-path 764 attack. To overcome this, an alternate port may be agreed upon to 765 use between an encapsulator and decapsulator [RFC6056]. How the 766 encapsulator end points communicate the value is outside scope of 767 this document. 769 This document does not require that decapsulator validates the IP 770 source address of the tunneled packets (with the exception that the 771 IPv6 source address MUST be validated when UDP zero-checksum mode is 772 used with IPv6), but it should be understood that failure to do so 773 presupposes that there is effective destination-based (or a 774 combination of source-based and destination-based) filtering at the 775 boundaries. 777 Corruption of GRE header can cause a privacy and security concern 778 for some applications that rely on the key field for traffic 779 segregation. When GRE key field is used for privacy and security, 780 ether UDP checksum or GRE checksum SHOULD be used for GRE-in-UDP 781 with both IPv4 and IPv6, and in particular, when UDP zero-checksum 782 mode is used, GRE checksum SHOULD be used. 784 10. Acknowledgements 786 Authors like to thank Vivek Kumar, Ron Bonica, Joe Touch, Ruediger 787 Geib, Lar Edds, Lloyd, and many others for their review and valuable 788 input on this draft. 790 Thank the design team led by David Black (members: Ross Callon, 791 Gorry Fairhurst, Xiaohu Xu, Lucy Yong) to efficiently work out the 792 descriptions for the congestion considerations and IPv6 UDP zero 793 checksum. 795 11. Contributors 797 The following people all contributed significantly to this document 798 and are listed below in alphabetical order: 800 David Black 801 EMC Corporation 802 176 South Street 803 Hopkinton, MA 01748 804 USA 806 Email: david.black@emc.com 808 Ross Callon 809 Juniper Networks 810 10 Technology Park Drive 811 Westford, MA 01886 812 USA 814 Email: rcallon@juniper.net 816 John E. Drake 817 Juniper Networks 819 Email: jdrake@juniper.net 821 Gorry Fairhurst 822 University of Aberdeen 824 Email: gorry@erg.abdn.ac.uk 826 Yongbing Fan 827 China Telecom 828 Guangzhou, China. 829 Phone: +86 20 38639121 831 Email: fanyb@gsta.com 833 Adrian Farrel 834 Juniper Networks 836 Email: adrian@olddog.co.uk 838 Vishwas Manral 839 Hewlett-Packard Corp. 840 3000 Hanover St, Palo Alto. 842 Email: vishwas.manral@hp.com 844 Carlos Pignataro 845 Cisco Systems 846 7200-12 Kit Creek Road 847 Research Triangle Park, NC 27709 USA 849 EMail: cpignata@cisco.com 851 12. References 853 12.1. Normative References 855 [RFC768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 856 August 1980. 858 [RFC1122] Braden, R., "Requirements for Internet Hosts -- 859 Communication Layers", RFC1122, October 1989. 861 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 862 Requirement Levels", BCP 14, RFC2119, March 1997. 864 [RFC2784] Farinacci, D., Li, T., Hanks, S., Meyer, D., and P. 865 Traina, "Generic Routing Encapsulation (GRE)", RFC 2784, 866 March 2000. 868 [RFC2890] Dommety, G., "Key and Sequence Number Extensions to GRE", 869 RFC2890, September 2000. 871 [RFC2983] Black, D., "Differentiated Services and Tunnels", RFC2983, 872 October 2000. 874 [RFC5405bis] Eggert, L., "Unicast UDP Usage Guideline for 875 Application Designers", draft-ietf-tsvwg-rfc5405bis, work 876 in progress. 878 [RFC6040] Briscoe, B., "Tunneling of Explicit Congestion 879 Notification", RFC6040, November 2010. 881 [RFC6438] Carpenter, B., Amante, S., "Using the IPv6 Flow Label for 882 Equal Cost Multipath Routing and Link Aggregation in 883 tunnels", RFC6438, November, 2011. 885 [RFC6935] Eubanks, M., Chimento, P., and M. Westerlund, "IPv6 and 886 UDP Checksums for Tunneled Packets", RFC 6935, April 2013. 888 [RFC6936] Fairhurst, G. and M. Westerlund, "Applicability Statement 889 for the Use of IPv6 UDP Datagrams with Zero Checksums", 890 RFC 6936, April 2013. 892 12.2. Informative References 894 [RFC792] Postel, J., "Internet Control Message Protocol", STD 5, RFC 895 792, September 1981. 897 [RFC793] DARPA, "Transmission Control Protocol", RFC793, September 898 1981. 900 [RFC2460] Deering, S. and R. Hinden, "Internet Protocol, Version 6 901 (IPv6) Specification", RFC 2460, December 1998. 903 [RFC2914] Floyd, S.,"Congestion Control Principles", RFC2914, 904 September 2000. 906 [RFC3931] Lau, J., Townsley, M., and I. Goyret, "Layer Two Tunneling 907 Protocol - Version 3 (L2TPv3)", RFC 3931, March 2005. 909 [RFC4023] Worster, T., Rekhter, Y., and E. Rosen, "Encapsulating 910 MPLS in IP or Generic Routing Encapsulation (GRE)", RFC 911 4023, March 2005. 913 [RFC6056] Larsen, M. and Gont, F., "Recommendations for Transport- 914 Protocol Port Randomization", RFC6056, January 2011. 916 [GREMTU] Bonica, R., "A Fragmentation Strategy for Generic Routing 917 Encapsulation (GRE)", draft-ietf-intarea-gre-mtu, work in 918 progress. 920 [CB] Fairhurst, G., "Network Transport Circuit Breakers", 921 draft-fairhurst-tsvwg-circuit-breaker-01, work in 922 progress. 924 13. Authors' Addresses 926 Edward Crabbe 928 Email: edward.crabbe@gmail.com 930 Lucy Yong 931 Huawei Technologies, USA 933 Email: lucy.yong@huawei.com 935 Xiaohu Xu 936 Huawei Technologies, 937 Beijing, China 938 Email: xuxiaohu@huawei.com 940 Tom Herbert 941 Google 942 1600 Amphitheatre Parkway 943 Mountain View, CA 944 Email : tom@herbertland.com