idnits 2.17.1 draft-ietf-dccp-udpencap-11.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 : ---------------------------------------------------------------------------- -- The document has examples using IPv4 documentation addresses according to RFC6890, but does not use any IPv6 documentation addresses. Maybe there should be IPv6 examples, too? Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (June 25, 2012) is 4316 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) -- Obsolete informational reference (is this intentional?): RFC 4566 (Obsoleted by RFC 8866) -- Obsolete informational reference (is this intentional?): RFC 5245 (Obsoleted by RFC 8445, RFC 8839) -- Obsolete informational reference (is this intentional?): RFC 5405 (Obsoleted by RFC 8085) Summary: 0 errors (**), 0 flaws (~~), 1 warning (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 DCCP Working Group T. Phelan 3 Internet-Draft Sonus 4 Intended status: Standards Track G. Fairhurst 5 Expires: December 27, 2012 University of Aberdeen 6 C. Perkins 7 University of Glasgow 8 June 25, 2012 10 Datagram Congestion Control Protocol (DCCP) Encapsulation for NAT 11 Traversal (DCCP-UDP) 12 draft-ietf-dccp-udpencap-11 14 Abstract 16 This document specifies an alternative encapsulation of the Datagram 17 Congestion Control Protocol (DCCP), referred to as DCCP-UDP. This 18 encapsulation allows DCCP to be carried through the current 19 generation of Network Address Translation (NAT) middleboxes without 20 modification of those middleboxes. This document also updates the 21 SDP information for DCCP defined in RFC 5762. 23 Status of this Memo 25 This Internet-Draft is submitted in full conformance with the 26 provisions of BCP 78 and BCP 79. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF). Note that other groups may also distribute 30 working documents as Internet-Drafts. The list of current Internet- 31 Drafts is at http://datatracker.ietf.org/drafts/current/. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 This Internet-Draft will expire on December 27, 2012. 40 Copyright Notice 42 Copyright (c) 2012 IETF Trust and the persons identified as the 43 document authors. All rights reserved. 45 This document is subject to BCP 78 and the IETF Trust's Legal 46 Provisions Relating to IETF Documents 47 (http://trustee.ietf.org/license-info) in effect on the date of 48 publication of this document. Please review these documents 49 carefully, as they describe your rights and restrictions with respect 50 to this document. Code Components extracted from this document must 51 include Simplified BSD License text as described in Section 4.e of 52 the Trust Legal Provisions and are provided without warranty as 53 described in the Simplified BSD License. 55 Table of Contents 57 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 59 3. DCCP-UDP . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 60 3.1. The UDP Header . . . . . . . . . . . . . . . . . . . . . . 5 61 3.2. The DCCP Generic Header . . . . . . . . . . . . . . . . . 5 62 3.3. DCCP-UDP Checksum Procedures . . . . . . . . . . . . . . . 6 63 3.3.1. Partial Checksums and the Minimum Checksum 64 Coverage Feature . . . . . . . . . . . . . . . . . . . 7 65 3.4. Network Layer Options . . . . . . . . . . . . . . . . . . 8 66 3.5. Explicit Congestion Notification . . . . . . . . . . . . . 8 67 3.6. ICMP handling for messages relating to DCCP-UDP . . . . . 8 68 3.7. Path Maximum Transmission Unit Discovery . . . . . . . . . 9 69 3.8. Usage of the UDP port by DCCP-UDP . . . . . . . . . . . . 9 70 3.9. Service Codes and the DCCP Port Registry . . . . . . . . . 11 71 4. DCCP-UDP and Higher-Layer Protocols . . . . . . . . . . . . . 11 72 5.1. Protocol Identification . . . . . . . . . . . . . . . . . 12 73 5.2. Signalling Encapsulated DCCP Ports . . . . . . . . . . . . 13 74 5.3. Connection Management . . . . . . . . . . . . . . . . . . 14 75 5.4. Negotiating the DCCP-UDP encapsulation versus native 76 DCCP . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 77 5.5. Example of SDP use . . . . . . . . . . . . . . . . . . . . 15 78 6. Security Considerations . . . . . . . . . . . . . . . . . . . 16 79 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 80 7.1. UDP Port Allocation . . . . . . . . . . . . . . . . . . . 17 81 7.2. DCCP Reset . . . . . . . . . . . . . . . . . . . . . . . . 17 82 7.3. SDP Attribute Allocation . . . . . . . . . . . . . . . . . 17 83 8. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 18 84 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 18 85 9.1. Normative References . . . . . . . . . . . . . . . . . . . 18 86 9.2. Informative References . . . . . . . . . . . . . . . . . . 18 87 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 20 89 1. Introduction 91 The Datagram Congestion Control Protocol (DCCP) [RFC4340] is a 92 transport-layer protocol that provides upper layers with the ability 93 to use non-reliable congestion-controlled flows. The current 94 specification for DCCP specifies a direct native encapsulation in 95 IPv4 or IPv6 packets. 97 DCCP support has been specified for devices that use Network Address 98 Translation (NAT) or Network Address and Port Translation (NAPT) 99 [RFC5597]. However, there is a significant installed base of NAT/ 100 NAPT devices that do not support RFC 5597. It is therefore useful to 101 have an encapsulation for DCCP that is compatible with this installed 102 base of NAT/NAPT devices that support [RFC4787], but do not support 103 RFC 5597. This document specifies that encapsulation, which is 104 referred to as DCCP-UDP. For convenience, the standard encapsulation 105 for DCCP [RFC4340] (including [RFC5596] as required) is referred to 106 as DCCP-STD. 108 The encapsulation described in this document may also be used as a 109 transition mechanism to enable support for DCCP in devices that 110 support UDP, but do not yet natively support DCCP. This also allows 111 the DCCP transport to be implemented within an application using 112 DCCP-UDP. 114 The document also updates the SDP specification for DCCP to convey 115 the encapsulation type. In this respect only, it updates the method 116 in [RFC5762]. 118 The DCCP-UDP encapsulation specified in this document supports all of 119 the features contained in DCCP-STD, but with limited functionality 120 for partial checksums. 122 Network optimisations for DCCP-STP and UDP may need to be updated to 123 allow these optimisations to take advantage of DCCP-UDP. 124 Encapsulation with an additional UDP protocol header can complicate 125 or prevent inspection of DCCP header fields by equipment along the 126 network path in the case where multiple DCCP connections share the 127 same UDP 4-tuple. For example, routers that wish to identify DCCP 128 ports to perform Equal-Cost Multi-Path routing, ECMP, network devices 129 that wish to inspect DCCP ports to inform algorithms for sharing the 130 network load across multiple links; firewalls that wish to inspect 131 DCCP ports and service codes to inform algorithms that implement 132 access rules; media gateways that inspect SDP information to derive 133 characteristics of the transport and session, etc. 135 2. Terminology 137 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 138 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 139 document are to be interpreted as described in [RFC2119]. 141 3. DCCP-UDP 143 The basic approach is to insert a UDP [RFC0768] header between the IP 144 header and the DCCP packet. Note that this is not a tunneling 145 approach. The IP addresses of the communicating end systems are 146 carried in the IP header. The method does not embed additional IP 147 addresses. 149 The method is designed to support use when these addresses are 150 modified by a device that implements NAT/NAPT. A NAT translates the 151 IP addresses, which impacts the transport-layer checksum. A NAPT 152 device may also translate the port values (usually the source port). 153 In both cases, the outer transport header that includes these values 154 would need to be updated by the NAT/NAPT. 156 A device offering or using DCCP services via DCCP-UDP encapsulation 157 listens on a UDP port (default port, XXX IANA PORT XXX), or may bind 158 to a specified port utilising out-of-band signalling, such as the 159 Session Description Protocol (SDP). The DCCP-UDP server accepts 160 incoming packets over the UDP transport and passes the received 161 packets to the DCCP protocol module, after removing the UDP 162 encapsulation. 164 A DCCP implementation endpoint may simultaneously provide services 165 over any or all combinations of DCCP-STD and/or DCCP-UDP 166 encapsulations with IPv4 and/or IPv6. 168 The basic format of a DCCP-UDP packet is: 170 +-----------------------------------+ 171 | IP Header (IPv4 or IPv6) | Variable length 172 +-----------------------------------+ 173 | UDP Header | 8 bytes 174 +-----------------------------------+ 175 | DCCP Generic Header | 12 or 16 bytes 176 +-----------------------------------+ 177 | Additional (type-specific) Fields | Variable length (could be 0) 178 +-----------------------------------+ 179 | DCCP Options | Variable length (could be 0) 180 +-----------------------------------+ 181 | Application Data Area | Variable length (could be 0) 182 +-----------------------------------+ 184 Section 3.8 describes usage of UDP ports. This includes 185 implementation of a DCCP-UDP encapsulation service as a daemon that 186 listens on a well-known port, allowing multiplexing of different DCCP 187 applications over the same port. 189 3.1. The UDP Header 191 The format of the UDP header is specified in [RFC0768]: 193 0 1 2 3 194 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 195 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 196 | Source Port | Dest Port | 197 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 198 | Length | Checksum | 199 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 201 For DCCP-UDP, the fields are interpreted as follows: 203 Source and Dest(ination) Ports: 16 bits each 205 These fields identify the UDP ports on which the source and 206 destination (respectively) of the packet are listening for 207 incoming DCCP-UDP packets. The UDP port values do not identify 208 the DCCP source and destination ports. 210 Length: 16 bits 212 This field is the length of the UDP datagram, including the UDP 213 header and the payload (for DCCP-UDP, the payload is a DCCP-UDP 214 datagram). 216 Checksum: 16 bits 218 This field is the Internet checksum of a network-layer 219 pseudoheader and Length bytes of the UDP packet [RFC0768]. The 220 UDP checksum MUST NOT be zero for a UDP packet that carries DCCP- 221 UDP. 223 3.2. The DCCP Generic Header 225 The DCCP Generic Header [RFC4340] takes two forms, one with long 226 sequence numbers (48 bits) and the other with short sequence numbers 227 (24 bits). 229 0 1 2 3 230 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 231 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 232 | Source Port | Dest Port | 233 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 234 | Data Offset | CCVal | CsCov | Checksum | 235 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 236 | | |X| | . 237 | Res | Type |=| Reserved | Sequence Number (high bits) . 238 | | |1| | . 239 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 240 | Sequence Number (low bits) | 241 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 243 The Generic DCCP Header with long sequence numbers [RFC4340] 245 0 1 2 3 246 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 247 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 248 | Source Port | Dest Port | 249 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 250 | Data Offset | CCVal | CsCov | Checksum | 251 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 252 | | |X| | 253 | Res | Type |=| Sequence Number (low bits) | 254 | | |0| | 255 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 257 The Generic DCCP Header with short sequence numbers [RFC4340] 259 All generic header fields, except for the Checksum field, have the 260 meaning specified in [RFC4340] updated by [RFC5596]. 262 Section 3.8 describes how a DCCP-UDP implementation treats UDP and 263 DCCP ports. 265 3.3. DCCP-UDP Checksum Procedures 267 DCCP-UDP employs a checksum at the UDP level and eliminates the use 268 of the DCCP checksum. This approach was chosen to enable use of 269 current NAT/NATP traversal methods developed for UDP. Such methods 270 will generally be unaware whether DCCP is being encapsulated and 271 hence do not update the inner checksum in the DCCP header. Standard 272 DCCP requires protection of the DCCP header fields, this justifies 273 any processing overhead incurred from calculating the UDP checksum. 275 In addition, UDP NAT traversal does not support partial checksums. 276 Although this is still permitted end-to-end in the encapsulated DCCP 277 datagram, links along the path will treat these as UDP packets and 278 can not enable special partial checksum processing. 280 DCCP-UDP does not update or modify the operation of UDP. The UDP 281 transport protocol is used in the following way: 283 For DCCP-UDP, the function of the DCCP Checksum field is performed by 284 the UDP checksum field. On transmit, the DCCP Checksum field SHOULD 285 be set to zero. On receive, the DCCP Checksum field MUST be ignored. 287 The UDP checksum MUST NOT be zero for a UDP packet that is sent using 288 DCCP-UDP. If the received UDP Checksum field is zero, the packet 289 MUST be dropped [RFC5405]. 291 If the UDP Length field is less than 20 (the UDP Header length and 292 minimum DCCP-UDP header length), the packet MUST be dropped 293 [RFC5405].. 295 If the UDP Checksum field, computed using standard UDP methods, is 296 invalid, the packet MUST be dropped [RFC5405]. 298 If the UDP Length field in a received packet is less than the length 299 of the UDP header plus the entire DCCP-UDP header (including the 300 generic header and type-specific fields and options, if present), or 301 the UDP Length field is greater than the length of the packet from 302 the beginning of the UDP header to the end of the packet, the packet 303 MUST be dropped. 305 3.3.1. Partial Checksums and the Minimum Checksum Coverage Feature 307 This document describes an encapsulation for DCCP that uses the UDP 308 transport. It requires the UDP checksum to be enabled. This 309 checksum provides coverage of the entire encapsulated DCCP datagram. 311 DCCP-UDP supports the syntax of partial checksums. It also supports 312 negotiation of the Minimum Checksum Coverage feature and settings of 313 the CsCov field. However, the UDP checksum field in DCCP-UDP always 314 covers the entire DCCP datagram and the DCCP checksum is ignored on 315 receipt. An application that enables the partial checksums feature 316 in the DCCP Module will therefore experience a service that is 317 functionally identical to using full DCCP checksum coverage. This is 318 also the service that the application would have received if it had 319 used a network path that did not provide optimised processing for 320 DCCP partial checksums. 322 3.4. Network Layer Options 324 A DCCP-UDP implementation MAY transfer network-layer options intended 325 for DCCP to the network-layer header of the encapsulating UDP packet. 327 A DCCP-UDP endpoint that receives IP-options for the encapsulating 328 UDP packet MAY forward these to the DCCP protocol module. If the 329 endpoint forwards a specific network layer option to the DCCP module, 330 it MUST also forward all subsequent packets with this option. 331 Consistent forwarding is essential for correct operation of many end- 332 to-end options. 334 3.5. Explicit Congestion Notification 336 A DCCP-UDP endpoint SHOULD follow the procedures of DCCP-STD section 337 12 by setting the ECN fields in the IP Headers of outgoing packets 338 and examining the values received in the ECN fields of incoming IP 339 packets, relaying any packet markings to the DCCP module. 341 Implementations that do not support ECN MUST follow the procedures in 342 DCCP-STD section 12.1 with regard to implementations that are not ECN 343 capable. 345 3.6. ICMP handling for messages relating to DCCP-UDP 347 To allow ICMP messages to be demultiplexed by the receiving endpoint, 348 part of the original packet that resulted in the message is included 349 in the payload of the ICMP error message. The receiving endpoint can 350 therefore use this information to associate the ICMP error with the 351 transport protocol instance that resulted in the ICMP message. When 352 DCCP-UDP is used, the error message and the payload of the ICMP error 353 message relate to the UDP transport. 355 DCCP-UDP endpoints SHOULD forward ICMP messages relating to a UDP 356 packet that carries a DCCP-UDP to the DCCP module. This may imply 357 translation of the payload of the ICMP message into a form that is 358 recognised by the DCCP stack. [RFC5927] describes precautions that 359 are desirable before TCP acts on the receipt of an ICMP message. 360 Similar precautions are desirable prior to forwarding by DCCP-UDP to 361 the DCCP module. 363 The minimal length ICMP error message generated in response to 364 processing a UDP Datagram only identifies the Source UDP Port and 365 Destination UDP Port. This ICMP message does not carry sufficient 366 information to discover the encapsulated DCCP Port values. A DCCP- 367 UDP endpoint that supports multiple DCCP connections over the same 368 pair of UDP ports (see section Section 3.8) may not therefore be able 369 to associate an ICMP message with a unique DCCP-UDP connection. 371 3.7. Path Maximum Transmission Unit Discovery 373 DCCP-UDP implementations MUST follow DCCP-STD [RFC4340], section 14 374 with regard to determining the maximum packet size and the use of 375 Path Maximum Transmission Unit Discovery (PMTUD). This requires the 376 processing of ICMP Destination Unreachable messages with a Code that 377 indicates that an unfragmentable packet was too large to be forwarded 378 (a "Datagram Too Big" message), as defined in RFC 4340. 380 An effect of encapsulation is to incur additional datagram overhead. 381 This will reduce the Maximum Packet Size (MPS) at the DCCP level. 383 3.8. Usage of the UDP port by DCCP-UDP 385 A DCCP-UDP server (that is, an initially passive endpoint that wishes 386 to receive DCCP-Request packets [RFC4340] over DCCP-UDP) listens for 387 connections on one or more UDP ports. UDP port number XXX IANA PORT 388 XXX has been reserved as the default listening UDP port for a DCCP- 389 UDP server. Some NAT/NAPT topologies may require using a non-default 390 listening port. 392 The purpose of this IANA-assigned port is for the operating system or 393 a framework to receive and process DCCP-UDP datagrams for delivery to 394 the DCCP module (e.g. to support a system-wide DCCP-UDP daemon 395 serving multiple DCCP applications or a DCCP-UDP server placed behind 396 a firewall). 398 An application-specific implementation SHOULD use an ephemeral port 399 and advertise this port using outside means, e.g. SDP. This method 400 of implementation SHOULD NOT use the IANA-assigned port to listen for 401 incoming DCCP-UDP packets. 403 A DCCP-UDP client provides UDP source and destination ports as well 404 as DCCP source and destination ports at connection initiation time. 405 A client SHOULD ensure that each DCCP connection maps to a single 406 DCCP-UDP connection by setting the UDP source port. Choosing a 407 distinct source UDP port for each distinct DCCP connection ensures 408 that UDP-based flow identifiers differ whenever DCCP-based flow 409 identifiers differ. Specifically, two connections with different 410 DCCP 4-tuples will have different UDP 4-tuples. 415 A DCCP-UDP server SHOULD accept datagrams from any UDP source port. 416 There is a risk that the same DCCP source port number could be used 417 by two endpoints each behind a NAPT. A DCCP-UDP server MUST 418 therefore demultiplex a DCCP-UDP flow using both the UDP source and 419 destination port numbers and the encapsulated DCCP ports. This 420 ensures than an active DCCP connection is uniquely identified by the 421 6-tuple . 423 (The active state of a DCCP connection is defined in Section 3.8: A 424 DCCP connection becomes active following transmission of a DCCP- 425 Request, and become inactive after sending a DCCP-Close.) 427 This demultiplexing at a DCCP-UDP endpoint occurs in two stages: 429 1) In the first stage, DCCP-UDP packets are demultiplexed using the 430 UDP 4-tuple: . 433 2) In the second stage, a receiving endpoint MUST ensure that two 434 independent DCCP connections that were multiplexed to the same UDP 435 4-tuple are not associated with the same connection in the DCCP 436 module. The endpoint therefore needs to keep state for the set of 437 active DCCP-UDP endpoints using each combination of a UDP 4-tuple: 438 . Two DCCP endpoint methods are specified. A 440 DCCP-UDP implementation MUST implement exactly one of these: 442 o The DCCP server may accept only one active 6-tuple at any one time 443 for a given UDP 4-tuple. In this method, DCCP-UDP packets that do 444 not match an active 6-tuple MUST NOT be passed to the DCCP module 445 and the DCCP Server SHOULD send a DCCP-Reset with with Reset Code 446 XXX IANA Port Reuse XXX, "Encapsulated Port Reuse". An endpoint 447 that receives a DCCP-Reset with this reset code will clear its 448 connection state, but MAY immediately try again using a different 449 4-tuple. This provides protection should the same UDP 4-tuple be 450 re-used by multiple DCCP connections, ensuring that only one DCCP 451 connection is established at one time. 453 o The DCCP server may support multiple DCCP connections over the 454 same UDP 4-tuple. In this method, the endpoint MUST then 455 associate each 6-tuple with a single DCCP connection. If an 456 endpoint is unable to demultiplex the 6-tuple (e.g. due to 457 internal resource limits), it MUST discard DCCP-UDP packets that 458 do not match an active 6-tuple instead of forwarding them to the 459 DCCP module. The DCCP endpoint MAY send a DCCP-Reset with Reset 460 Code XXX IANA Port Reuse XXX, "Encapsulated Port Reuse", 461 indicating the connection has been closed, but may be retried 462 using a different UDP 4-tuple. 464 3.9. Service Codes and the DCCP Port Registry 466 This section clarifies the usage of DCCP Service Codes and the 467 registration of server ports by DCCP-UDP. The section is not 468 intended to update the procedures for allocating Service Codes or 469 server ports. 471 There is one Service Code registry and one DCCP port registration 472 that apply to all combinations of encapsulation and IP version. A 473 DCCP Service Code specifies an application using DCCP regardless of 474 the combination of DCCP encapsulation and IP version. An application 475 may choose not to support some combinations of encapsulation and IP 476 version, but its Service Code will remain registered for those 477 combinations and the Service Code must not be used by other 478 applications. An application should not register different Service 479 Codes for different combinations of encapsulation and IP version. 480 [RFC5595] provides additional information about DCCP Service Codes. 482 Similarly, a DCCP port registration is applicable to all combinations 483 of encapsulation and IP version. Again, an application may choose 484 not to support some combinations of encapsulation and IP version on 485 its registered DCCP port, although the port will remain registered 486 for those combinations. Applications should not register different 487 DCCP ports just for the purpose of using different combinations of 488 encapsulation. 490 4. DCCP-UDP and Higher-Layer Protocols 492 The encapsulation of a higher-layer protocol within DCCP MUST be the 493 same for both DCCP-STD and DCCP-UDP. Encapsulation of Datagram 494 Transport Layer Security (DTLS) over DCCP is defined in [RFC5238] and 495 RTP over DCCP is defined in [RFC5762]. This document therefore does 496 not update these encapsulations when using DCCP-UDP. 498 5. Signaling the Use of DCCP-UDP 500 Applications often signal transport connection parameters through 501 outside means, such as SDP. Applications that define such methods 502 for DCCP MUST define how the DCCP encapsulation is chosen, and MUST 503 allow either encapsulation to be signaled. Where DCCP-STD and DCCP- 504 UDP are both supported, DCCP-STD SHOULD be preferred. 506 The Session Description Protocol (SDP) [RFC4566] and the offer/answer 507 model [RFC3264] can be used to negotiate DCCP sessions, and [RFC5762] 508 defines SDP extensions for signalling the use of an RTP session 509 running over DCCP connections. However, since [RFC5762] predates 510 this document, it does not define a mechanism for signalling that the 511 DCCP-UDP encapsulation is to be used. This section updates [RFC5762] 512 to describe how SDP can be used to signal RTP sessions running over 513 the DCCP-UDP encapsulation. 515 The new SDP support specified in this section is expected to be 516 useful when the offering party is on the public Internet, or in the 517 same private addressing realm as the answering party. In this case, 518 the DCCP-UDP server has a public address. The client may either have 519 a public address or be behind a NAT/NAPT. This scenario has the 520 potential to be an important use-case. Some other NAT/NAPT 521 topologies may result in the advertised port being unreachable via 522 the NAT/NAPT. 524 5.1. Protocol Identification 526 SDP uses a media ("m=") line to convey details of the media format 527 and transport protocol used. The ABNF syntax [RFC5124] of a media 528 line for DCCP is as follows (from [RFC4566]): 529 media-field = %x6d "=" media SP port ["/" integer] SP proto 531 1*(SP fmt) CRLF 533 The proto field denotes the transport protocol used for the media, 534 while the port indicates the transport port to which the media is 535 sent, following [RFC5762]. This document defines the following five 536 values of the proto field to indicate media transported using DCCP- 537 UDP encapsulation: 539 UDP/DCCP 541 UDP/DCCP/RTP/AVP 543 UDP/DCCP/RTP/SAVP 545 UDP/DCCP/RTP/AVPF 547 UDP/DCCP/RTP/SAVPF 549 The "UDP/DCCP" protocol identifier is similar to the "DCCP" protocol 550 identifier defined in [RFC5762] and denotes the DCCP transport 551 protocol encapsulated in UDP, but not its upper-layer protocol. 553 The "UDP/DCCP/RTP/AVP" protocol identifier refers to RTP using the 554 RTP Profile for Audio and Video Conferences with Minimal Control 555 [RFC3551] running over the DCCP-UDP encapsulation. 557 The "UDP/DCCP/RTP/SAVP" protocol identifier refers to RTP using the 558 Secure Real-time Transport Protocol [RFC3711] running over the DCCP- 559 UDP encapsulation. 561 The "UDP/DCCP/RTP/AVPF" protocol identifier refers to RTP using the 562 Extended RTP Profile for RTCP-based Feedback [RFC4585] running over 563 the DCCP-UDP encapsulation. 565 The "UDP/DCCP/RTP/SAVPF" protocol identifier refers to RTP using the 566 Extended Secure RTP Profile for RTCP-based Feedback [RFC5124] running 567 over the DCCP-UDP encapsulation. 569 The fmt value in the "m=" line is used as described in [RFC5762]. 571 The port number specified in the "m=" line indicates the UDP port 572 that is used for the DCCP-UDP encapsulation service. The DCCP port 573 number MUST be sent using an associated "a=dccp-port:" attribute, as 574 described in Section 5.2. 576 The use of ports with DCCP-UDP encapsulation is described further in 577 Section 3.8. 579 5.2. Signalling Encapsulated DCCP Ports 581 When using DCCP-UDP, the UDP port used for the encapsulation is 582 signalled using the SDP "m=" line. The DCCP ports MUST NOT be 583 included in the "m=" line, but are instead signalled using a new SDP 584 attribute ("dccp-port") defined according to the following ABNF: 585 dccp-port-attr = %x61 "=dccp-port:" dccp-port 587 dccp-port = 1*DIGIT 589 where DIGIT is as defined in [RFC5234]. This is a media level 590 attribute, that is not subject to the charset attribute. The 591 "a=dccp-port:" attribute MUST be included when the protocol 592 identifiers described in Section 5.1 are used. 594 The use of ports with DCCP-UDP encapsulation is described further in 595 Section 3.8. 597 o If the "a=rtcp:" attribute [RFC3605] is used, then the signalled 598 port is the DCCP port used for RTCP. 600 o If the "a=rtcp-mux" attribute [RFC5761] is negotiated, then RTP 601 and RTCP are multiplexed onto a single DCCP port, otherwise 602 separate DCCP ports are used for RTP and RTCP [RFC5762]. 604 In each case, only a single UDP port is used for the DCCP-UDP 605 encapsulation. 607 o If the "a=rtcp-mux" attribute is not present, then the second of 608 the two demultiplexing methods described in Section 3.8 MUST be 609 implemented, otherwise the second DCCP connection for the RTCP 610 flow will be rejected. For this reason, using "a=rtcp-mux" is 611 RECOMMENDED when using RTP over DCCP-UDP. 613 5.3. Connection Management 615 The "a=setup:" attribute is used in a manner compatible with 616 [RFC5762] Section 5.3 to indicate which of the DCCP-UDP endpoints 617 should initiate the DCCP-UDP connection establishment. 619 5.4. Negotiating the DCCP-UDP encapsulation versus native DCCP 621 An endpoint that supports both native DCCP and the DCCP-UDP 622 encapsulation may wish to signal support for both options in an SDP 623 offer, allowing the answering party the option of using native DCCP 624 where possible, while falling back to the DCCP-UDP encapsulation 625 otherwise. 627 An approach to doing this might be to include candidates for the 628 DCCP-UDP encapsulation and native DCCP into an Interactive 629 Connectivity Establishment (ICE) [RFC5245] exchange. Since DCCP is 630 connection-oriented, these candidates would need to be encoded into 631 ICE in a manner analogous to TCP candidates defined in [RFC6544]. 632 Both active and passive candidates could be supported for native DCCP 633 and DCCP-UDP encapsulation, as may DCCP simultaneous open [RFC5596]. 634 In choosing local preference values, it may make sense to to prefer 635 DCCP-UDP over native DCCP in cases where low connection setup time is 636 important, and to prioritise native DCCP in cases where low overhead 637 is preferred (on the assumption that DCCP-UDP is more likely to work 638 through legacy NAT, but has higher overhead). The details of this 639 encoding into ICE are left for future study. 641 While ICE is appropriate for selecting basic use of DCCP-UDP versus 642 DCCP-STD, it may not be appropriate for negotiating different RTP 643 profiles with each transport encapsulation. The SDP Capability 644 Negotiation framework [RFC5939] may be be more suitable. Section 3.7 645 of RFC 5939 specifies how to provide attributes and transport 646 protocols as capabilities and negotiate them using the framework .The 647 details of the use of SDP Capability Negotiation with DCCP are left 648 for future study. 650 5.5. Example of SDP use 652 The example below shows an SDP offer, where an application signals 653 support for DCCP-UDP: 654 v=0 655 o=alice 1129377363 1 IN IP4 192.0.2.47 656 s=- 657 c=IN IP4 192.0.2.47 658 t=0 0 659 m=video 50234 UDP/DCCP/RTP/AVP 99 660 a=rtpmap:99 h261/90000 661 a=dccp-service-code:SC=x52545056 662 a=dccp-port:5004 663 a=rtcp:5005 664 a=setup:passive 665 a=connection:new 667 The answering party at 192.0.2.128 receives this offer and responds 668 with the following answer: 669 v=0 670 o=bob 1129377364 1 IN IP4 192.0.2.128 671 s=- 672 c=IN IP4 192.0.2.128 673 t=0 0 674 m=video 40123 UDP/DCCP/RTP/AVP 99 675 a=rtpmap:99 h261/90000 676 a=dccp-service-code:SC:RTPV 677 a=dccp-port:9 678 a=setup:active 679 a=connection:new 681 Note that the "m=" line in the answer includes the UDP port number of 682 the encapsulation service. The DCCP service code is set to "RTPV", 683 signalled using the "a=dccp-service-code" attribute [RFC5762]. The 684 "a=dccp-port:" attribute in the answer is set to 9 (the discard port) 685 in the usual manner for an active connection-oriented endpoint. 687 The answering party will then attempt to establish a DCCP-UDP 688 connection to the offering party. The connection request will use an 689 ephemeral DCCP source port and DCCP destination port 5004. The UDP 690 packet encapsulating that request will have UDP source port 40123 and 691 UDP destination port 50234. 693 6. Security Considerations 695 DCCP-UDP provides all of the security risk-mitigation measures 696 present in DCCP-STD, and also all of the security risks. It does not 697 maintain additional state at the encapsulation layer. 699 The tunnel encapsulation recommends processing of ICMP messages 700 received for packets sent using DCCP-UDP and translation to allow use 701 by DCCP. [RFC5927] describes precautions that are desirable before 702 TCP acts on receipt of ICMP messages. Similar precautions are 703 desirable for endpoints processing ICMP for DCCP-UDP.The purpose of 704 DCCP-UDP is to allow DCCP to pass through NAT/NAPT devices, and 705 therefore it exposes DCCP to the risks associated with passing 706 through NAT devices. It does not create any new risks with regard to 707 NAT/NAPT devices. 709 DCCP-UDP may also allow DCCP applications to pass through existing 710 firewall devices using rules for UDP, if the administrators of the 711 devices so choose. A simple use may either allow all DCCP 712 applications or allow none. 714 A firewall that interprets this specification could inspect the 715 encapsulated DCCP header to filter based on the inner DCCP header 716 information. Full control of DCCP connections by applications will 717 require enhancements to firewalls, as discussed in [RFC4340] and 718 related RFCs (e.g. [RFC5595]). 720 Datagram Transport Layer Security (DTLS) TLS provides mechanisms that 721 can be used to provide security protection for the encapsulated DCCP 722 packets. DTLS may be used in two ways: 724 o Individual DCCP connections may be protected in the same way that 725 DTLS is used with native DCCP [RFC5595]. This does not encrypt 726 the UDP transport header added by DCCP-UDP. 728 o This specification also permits the use of DTLS with the UDP 729 transport that encapsulates DCCP packets. When DTLS is used at 730 the encapsulation layer this protects the DCCP headers. This 731 prevents the headers from being inspected or updated by network 732 middleboxes (such as firewalls and NAPT). It also eliminates the 733 need for a spearate DTLS handshake for each DCCP connection. 735 7. IANA Considerations 737 This document requests IANA to make the allocations described in the 738 following sections. 740 7.1. UDP Port Allocation 742 IANA is requested to allocate a UDP port for the DCCP-UDP service. 743 This port is allocated for use by a transport service, rather than an 744 application. In this case, the name of the transport should 745 explicitly appear in the registry. Use of this port is defined in 746 section Section 3.8 748 XXX Note: IANA is requested to replace all occurrences of "XXX IANA 749 PORT XXX" by the allocated port value prior to publication. XXX 751 7.2. DCCP Reset 753 IANA is requested to assign a new DCCP Reset Code in the DCCP Reset 754 Codes Registry, with the short description "Encapsulated Port Reuse". 755 This code applies to all DCCP congestion control IDs and should be 756 allocated a value less than 120 decimal. Use of this reset code is 757 defined in section Section 3.8. Section 5.6 of RFC4340 defines three 758 "Data" bytes that are carried by a DCCP Reset. For this Reset Code 759 these are defined as below: 761 o Data byte 1: The DCCP Packet Type of the DCCP datagram that 762 resulted in the error message. 764 o Data byte 2 & 3: The encapsulated Source UDP Port from the DCCP- 765 UDP datagram that triggered the ICMP message, in network order. 767 XXX Note: IANA is requested to replace all occurrences of "XXX IANA 768 Port Reuse XXX" by the allocated DCCP reset code value prior to 769 publication. XXX 771 7.3. SDP Attribute Allocation 773 IANA is requested to allocate the following new SDP attribute ("att- 774 field"): 776 Contact name: DCCP Working Group 778 Attribute name: dccp-port 780 Long-form attribute name in English: Encapsulated DCCP Port 782 Type of attribute: Media level 784 Subject to charset attribute? No 786 Purpose of the attribute: See this document, section Section 5.1 787 Allowed attribute values: See this document, section Section 5.1 789 8. Acknowledgments 791 This document was produced by the DCCP WG. The following contributed 792 during the working group last call: 794 Andrew Lentvorski, Lloyd Wood, Pasi Sarolahti, Gerrit Renker, Eddie 795 Kohler, and Dan Wing. 797 9. References 799 9.1. Normative References 801 [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, 802 August 1980. 804 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 805 Requirement Levels", BCP 14, RFC 2119, March 1997. 807 [RFC3605] Huitema, C., "Real Time Control Protocol (RTCP) attribute 808 in Session Description Protocol (SDP)", RFC 3605, 809 October 2003. 811 [RFC4340] Kohler, E., Handley, M., and S. Floyd, "Datagram 812 Congestion Control Protocol (DCCP)", RFC 4340, March 2006. 814 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 815 Specifications: ABNF", STD 68, RFC 5234, January 2008. 817 [RFC5762] Perkins, C., "RTP and the Datagram Congestion Control 818 Protocol (DCCP)", RFC 5762, April 2010. 820 9.2. Informative References 822 [RFC3264] Rosenberg, J. and H. Schulzrinne, "An Offer/Answer Model 823 with Session Description Protocol (SDP)", RFC 3264, 824 June 2002. 826 [RFC3551] Schulzrinne, H. and S. Casner, "RTP Profile for Audio and 827 Video Conferences with Minimal Control", STD 65, RFC 3551, 828 July 2003. 830 [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. 831 Norrman, "The Secure Real-time Transport Protocol (SRTP)", 832 RFC 3711, March 2004. 834 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 835 Description Protocol", RFC 4566, July 2006. 837 [RFC4585] Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey, 838 "Extended RTP Profile for Real-time Transport Control 839 Protocol (RTCP)-Based Feedback (RTP/AVPF)", RFC 4585, 840 July 2006. 842 [RFC4787] Audet, F. and C. Jennings, "Network Address Translation 843 (NAT) Behavioral Requirements for Unicast UDP", BCP 127, 844 RFC 4787, January 2007. 846 [RFC5124] Ott, J. and E. Carrara, "Extended Secure RTP Profile for 847 Real-time Transport Control Protocol (RTCP)-Based Feedback 848 (RTP/SAVPF)", RFC 5124, February 2008. 850 [RFC5238] Phelan, T., "Datagram Transport Layer Security (DTLS) over 851 the Datagram Congestion Control Protocol (DCCP)", 852 RFC 5238, May 2008. 854 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 855 (ICE): A Protocol for Network Address Translator (NAT) 856 Traversal for Offer/Answer Protocols", RFC 5245, 857 April 2010. 859 [RFC5405] Eggert, L. and G. Fairhurst, "Unicast UDP Usage Guidelines 860 for Application Designers", BCP 145, RFC 5405, 861 November 2008. 863 [RFC5595] Fairhurst, G., "The Datagram Congestion Control Protocol 864 (DCCP) Service Codes", RFC 5595, September 2009. 866 [RFC5596] Fairhurst, G., "Datagram Congestion Control Protocol 867 (DCCP) Simultaneous-Open Technique to Facilitate NAT/ 868 Middlebox Traversal", RFC 5596, September 2009. 870 [RFC5597] Denis-Courmont, R., "Network Address Translation (NAT) 871 Behavioral Requirements for the Datagram Congestion 872 Control Protocol", BCP 150, RFC 5597, September 2009. 874 [RFC5761] Perkins, C. and M. Westerlund, "Multiplexing RTP Data and 875 Control Packets on a Single Port", RFC 5761, April 2010. 877 [RFC5927] Gont, F., "ICMP Attacks against TCP", RFC 5927, July 2010. 879 [RFC5939] Andreasen, F., "Session Description Protocol (SDP) 880 Capability Negotiation", RFC 5939, September 2010. 882 [RFC6544] Rosenberg, J., Keranen, A., Lowekamp, B., and A. Roach, 883 "TCP Candidates with Interactive Connectivity 884 Establishment (ICE)", RFC 6544, March 2012. 886 Authors' Addresses 888 Tom Phelan 889 Sonus Networks 890 7 Technology Dr. 891 Westford, MA 01886 892 US 894 Phone: +1 978 614 8456 895 Email: tphelan@sonusnet.com 897 Godred Fairhurst 898 University of Aberdeen 899 School of Engineering 900 Fraser Noble Building 901 Aberdeen, Scotland AB24 3UE 902 UK 904 Email: gorry@erg.abdn.ac.uk 905 URI: http://www.erg.abdn.ac.uk 907 Colin Perkins 908 University of Glasgow 909 School of Computing Science 910 Glasgow, Scotland G12 8QQ 911 UK 913 Email: csp@csperkins.org 914 URI: http:http://csperkins.org/