Internet protocol suite |
---|
Application layer |
Transport layer |
Internet layer |
Link layer |
In computer networking, the Datagram Congestion Control Protocol (DCCP) is a message-oriented transport layer protocol. DCCP implements reliable connection setup, teardown, Explicit Congestion Notification (ECN), congestion control, and feature negotiation. The IETF published DCCP as RFC 4340, a proposed standard, in March 2006. RFC 4336 provides an introduction.
Operation
DCCP provides a way to gain access to congestion-control mechanisms without having to implement them at the application layer. It allows for flow-based semantics like in Transmission Control Protocol (TCP), but does not provide reliable in-order delivery. Sequenced delivery within multiple streams as in the Stream Control Transmission Protocol (SCTP) is not available in DCCP. A DCCP connection contains acknowledgment traffic as well as data traffic. Acknowledgments inform a sender whether its packets have arrived, and whether they were marked by Explicit Congestion Notification (ECN). Acknowledgements are transmitted as reliably as the congestion control mechanism in use requires, possibly completely reliably.
DCCP has the option for very long (48-bit) sequence numbers corresponding to a packet ID, rather than a byte ID as in TCP. The long length of the sequence numbers aims to guard against "some blind attacks, such as the injection of DCCP-Resets into the connection".[1]
Applications
DCCP is useful for applications with timing constraints on the delivery of data. Such applications include streaming media, multiplayer online games and Internet telephony. In such applications, old messages quickly become useless, so that getting new messages is preferred to resending lost messages. As of 2017 such applications have often either settled for TCP or used User Datagram Protocol (UDP) and implemented their own congestion-control mechanisms, or have no congestion control at all. While being useful for these applications, DCCP can also serve as a general congestion-control mechanism for UDP-based applications, by adding, as needed, mechanisms for reliable or in-order delivery on top of UDP/DCCP. In this context, DCCP allows the use of different, but generally TCP-friendly congestion-control mechanisms.
Implementations
The following operating systems implement DCCP:
- FreeBSD, version 5.1 [2] as patch
- Linux since version 2.6.14,[3] but marked deprecated since version 6.4 due to lack of maintenance and scheduled for removal in 2025.[4]
Userspace library:
- DCCP-TP Archived 2008-07-23 at the Wayback Machine implementation is optimized for portability, but has had no changes since June 2008.[5]
- GoDCCP purpose of this implementation is to provide a standardized, portable NAT-friendly framework for peer-to-peer communications with flexible congestion control, depending on application.
Packet Structure
The DCCP generic header takes different forms depending on the value of X, the Extended Sequence Numbers bit. If X is one, the Sequence Number field is 48 bits long, and the generic header takes 16 bytes, as follows.
Offsets | Octet | 0 | 1 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Octet | Bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
0 | 0 | Source port | |||||||||||||||
2 | 16 | Destination port | |||||||||||||||
4 | 32 | Data Offset | CCVal | CsCov | |||||||||||||
6 | 48 | Checksum | |||||||||||||||
8 | 64 | Res | Type | X=1 | Reserved | ||||||||||||
10 | 80 | Sequence Number (high bits) | |||||||||||||||
12 | 96 | Sequence Number | |||||||||||||||
14 | 112 | Sequence Number (low bits) |
If X is zero, only the low 24 bits of the Sequence Number are transmitted, and the generic header is 12 bytes long.
Offsets | Octet | 0 | 1 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Octet | Bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
0 | 0 | Source port | |||||||||||||||
2 | 16 | Destination port | |||||||||||||||
4 | 32 | Data Offset | CCVal | CsCov | |||||||||||||
6 | 48 | Checksum | |||||||||||||||
8 | 64 | Res | Type | X=0 | Sequence Number (high) | ||||||||||||
10 | 80 | Sequence Number (low bits) |
- Source port (16 bits)
- Identifies the sending port
- Destination port (16 bits)
- Identifies the receiving port
- Data Offset
- (8 bits): The offset from the start of the packet's DCCP header to the start of its application data area, in 32-bit words.
- CCVal (4 bits)
- Used by the HC-Sender CCID
- Checksum Coverage (CsCov) (4 bits)
- Checksum Coverage determines the parts of the packet that are covered by the Checksum field.
- Checksum (16 bits)
- The Internet checksum of the packet's DCCP header (including options), a network-layer pseudoheader, and, depending on Checksum Coverage, all, some, or none of the application data
- Reserved (Res) (3 bits)
- Senders MUST set this field to all zeroes on generated packets, and receivers MUST ignore its value
- Type (4 bits)
- The Type field specifies the type of the packet
- Extended Sequence Numbers (X) (1 bit)
- Set to one to indicate the use of an extended generic header with 48-bit Sequence and Acknowledgement Numbers
- Sequence Number (48 or 24 bits)
- Identifies the packet uniquely in the sequence of all packets the source sent on this connection
Current development
Similarly to the extension of TCP protocol by multipath capability (MPTCP) also for DCCP the multipath feature is under discussion at IETF [6] correspondingly denoted as MP-DCCP. First implementations have already been developed, tested, and presented in a collaborative approach between operators and academia [7] and are available as an open source solution.
See also
References
- ↑ RFC 4340 section 7.6
- ↑ "[dccp] FreeBSD implementation". www.ietf.org. Retrieved 18 April 2018.
- ↑ "Linux gets DCCP [LWN.net]". lwn.net. Retrieved 18 April 2018.
- ↑ "dccp: Print deprecation notice". kernel.org.
- ↑ "Change log for the dccp-tp wiki, retrieved June 13, 2011". Archived from the original on October 4, 2011. Retrieved June 13, 2011.
- ↑ Amend, Markus; Brunstrom, Anna; Kassler, Aneas; Rakocevic, Veselin; Johnson, Stephen (9 November 2021). "DCCP Extensions for Multipath Operation with Multiple Addresses".
- ↑ "Multipath extension for DCCP".
External links
Protocol Specifications
- RFC 4340 — Datagram Congestion Control Protocol
- RFC 5595 — The Datagram Congestion Control Protocol (DCCP) Service Codes
- RFC 5596 — DCCP Simultaneous-Open Technique to Facilitate NAT/Middlebox Traversal
- RFC 5762 — RTP and the DCCP
- RFC 5238 — Datagram Transport Layer Security (DTLS) over DCCP
- RFC 5634 — Quick-Start for DCCP
- RFC 6773 — A Datagram Congestion Control Protocol UDP Encapsulation for NAT Traversal
Congestion Control IDs
Other Information
- RFC 4336 — Problem Statement for the Datagram Congestion Control Protocol (DCCP)
- DCCP page from one of DCCP authors
- DCCP support in Linux
- Datagram Congestion Control Protocol (DCCP)