Linux gets DCCP
- Protocols involving brief exchanges which will be slowed unacceptably
by TCP's connection overhead. A classic example is the domain name
system, which can often achieve a name lookup with a single packet in
each direction.
- Protocols where timely delivery is more important than reliability. These include internet telephony, streaming media, and certain kinds of online games. If the network drops a packet, TCP will stall the data flow until the sending side gets a successful retransmission through. But a telephony application would rather keep the data flowing and just do without the missing packet.
The second type of application listed above is an increasingly problematic user of UDP. Streaming applications are a growing portion of the total traffic on the net, and they can be the cause of significant congestion. Unlike TCP, however, UDP has no concept of congestion control. In the absence of any sort of connection information, there is no way to control how any given application responds to network congestion. Early versions of TCP, lacking congestion control, brought about the virtual collapse of the early Internet; some fear that the growth of UDP-based traffic could lead to similar problems in the near future.
This concern has led to the creation of the datagram congestion control protocol (DCCP), which is described by this draft RFC. Like UDP, DCCP is a datagram protocol. It differs from UDP, however, in that it includes a congestion control mechanism. Eventually, it is hoped that users of high-bandwidth, datagram-oriented protocols will move over to DCCP as a way of getting better network utilization while being fair to the net as a whole. Further down the road, after DCCP has proved itself, it would not be surprising to see backbone network routers beginning to discriminate against high bandwidth UDP users.
DCCP is a connection-oriented protocol, requiring a three-packet handshake before data can be transferred. For this reason, it is unlikely to take over from UDP in some areas, such as for DNS lookups. (There is a provision in the protocol for sending data with the connection initiation packet, but implementations are not required to accept that data). The higher-bandwidth applications tend to use longer-lived connections, however, so they should not even notice the connection setup overhead.
Actually, DCCP uses a concept known as "half connections." A DCCP half connection is a one-way, unreliable data pipe; most applications will create two half connections to send data in both directions. The two half connections can be tied together to the point that, as with TCP, a data packet traveling in one direction can carry an acknowledgment for data received from the other. In other respects, however, the two half connections are distinctly separate from each other.
One way in which this separation can be seen is with congestion control. TCP hides congestion control from user space entirely; it is handled by the protocol, with the system administrator having some say over which algorithms are used. DCCP, on the other hand, recognizes that different protocols will have different needs, and allows each half connection to negotiate its own congestion control regime. There are currently two "congestion control ID profiles" (CCIDs) defined:
- CCID
2 uses an algorithm much like that used with TCP. A congestion
window is used which can vary rapidly depending on net conditions;
this algorithm will be quick to take advantage of available bandwidth,
and equally quick to slow things down when congestion is detected.
(See this LWN article
for more information on how TCP congestion control works).
- CCID 3, called "TCP-friendly rate control" or TFRC, aims to avoid quick changes in bandwidth use while remaining fair to other network users. To this end, TFRC will respond more slowly to network events (such as dropped packets) but will, over time, converge to a bandwidth utilization similar to what TCP would choose.
It is anticipated that applications which send steady streams of packets (telephony and streaming media, for example) would elect to use TFRC congestion control. For this sort of application, keeping the data flowing is more important than using every bit of bandwidth which is available at the moment. A control connection for an online game, instead, may be best served by getting packets through as quickly as possible; applications using this sort of connection may opt for the traditional TCP congestion control mechanism.
DCCP has a number of other features aimed at minimization of overhead, resistance to denial of service attacks, and more. For the most part, however, it can be seen as a form of UDP with explicit connections and congestion control. Porting UDP applications to DCCP should not be particularly challenging - once platforms with DCCP support have been deployed on the net.
To that end, one of the first things which was merged for 2.6.14 was a DCCP implementation for Linux. This work was done by Arnaldo Carvalho de Melo, Ian McDonald, and others. It is a significant bunch of code; beyond the DCCP implementation itself, Arnaldo has done a lot of work to generalize parts of the Linux network stack. Much of the code which was once useful only for TCP or UDP can now also be shared with DCCP.
For now, only CCID 3 (TFRC) has been implemented. A CCID 2
implementation, taking advantage of the TCP congestion control code, will
follow. Even before that, however, the 2.6.14 kernel will be the first
widely deployed DCCP implementation on the net. As such, it will likely
help to find some of the remaining glitches in the protocol and shape its
future evolution. When DCCP hits the mainstream, one can be reasonably
well sure that the Linux implementation will be second to none.
Index entries for this article | |
---|---|
Kernel | DCCP |
Kernel | Networking/Protocols |
Posted Sep 1, 2005 2:14 UTC (Thu)
by imcdnzl (guest, #28899)
[Link] (4 responses)
For those that would like to learn more about DCCP see http://wlug.org.nz/DCCP or see my research proposal at http://wand.net.nz/~iam4
Ian McDonald (not Ian MacDonald as the article says)
Posted Sep 1, 2005 3:33 UTC (Thu)
by corbet (editor, #1)
[Link]
Posted Sep 1, 2005 16:19 UTC (Thu)
by Duncan (guest, #6647)
[Link] (2 responses)
Posted Sep 1, 2005 21:34 UTC (Thu)
by psiren (guest, #29126)
[Link]
Many firewalls support protocols other than the common TCP, UDP and ICMP, so theres no specific reason to think you won't be able to pass the data through. However, there may not be direct support for checking anything inside the packets headers, as the software would need to understand the protocol to extract this information.
Posted Sep 4, 2005 22:53 UTC (Sun)
by imcdnzl (guest, #28899)
[Link]
Of course you have to allow protocol 33 through as another poster says which on some equipment may cause problems.
Posted Sep 1, 2005 3:52 UTC (Thu)
by showell (guest, #2929)
[Link] (2 responses)
There has already been unsuccessful attempts to get the IETF to vary TCPs slow start, maybe this time us wireless network operators will be able to implement something that performs much better for our customers.
SH
Posted Sep 1, 2005 4:32 UTC (Thu)
by gmaxwell (guest, #30048)
[Link]
Posted Sep 4, 2005 22:51 UTC (Sun)
by imcdnzl (guest, #28899)
[Link]
Posted Oct 28, 2005 16:32 UTC (Fri)
by AnswerGuy (guest, #1256)
[Link]
How would someone designing or implementing upper level protocols choose among these lower level ones? Which existing applications and protocols might benefit by being fitted with options to use these lower level protocols when they are available? Is there any standard way to negotiate (something along the lines of, try DCCP first then fall back to UDP)?
This is an interesting article, but I want to see more :)
JimD
Posted Jan 21, 2006 12:27 UTC (Sat)
by shapr (subscriber, #9077)
[Link] (1 responses)
Posted Jul 17, 2008 14:09 UTC (Thu)
by mmikailov (guest, #52949)
[Link]
One other useful thing to note is that UDP doesn't work well behind firewalls often and DCCP is designed to do that.Linux gets DCCP
The spelling mistake is strange; I remember being extra sure that I had it right. Obviously not, my apologies. Fixed now.
Spelling screwup
What does DCCP look like to a legacy firewall. You mention that it's DCCP and legacy firewalls.
designed to work well with firewalls, but how would I implement "allow"
filters on a default-deny policy firewall, that only understands legacy
protocols? Would DCCP look to it like UDP? IOW, is it UDP with
additional protocol info in what would be the UDP payload, thus recognized
as UDP by legacy routers, or ??? If so, are there NAPT/masquerade
implications similar to those with FTP and various VoIP and security
protocols, or not?
I ask as I run one of those legacy things, one of the first-gen consumer
level NAPT based broadband routers. At some point, I'll likely replace it
with a Linux based appliance and therefore benefit from community firmware
projects, but my old Netgear rt314 has and continues to serve me well, so
why mess with a good thing until I need to?
OTOH, it'll probably be another year or more before there's enough out
there using DCCP in working deployments to be worrisome, particularly if
MSWormOS support lags, and by then I may well have upgraded routers, but
there'll still certainly be others who haven't.
Duncan
I'm far from an expert, but having had a quick glance through the RFC, section 19 refers to the protocol number for DCCP being 33 (probably). UDP uses 17, so it will be seen as distinct and different from UDP. Take a quick glance at /etc/protocols to see how many there are (more than you probably realise, not that you use many of them day to day).DCCP and legacy firewalls.
What I meant by friendly to firewalls is that it is easy to track sessions (much easier than UDP where there are no direct sessions). That is one of the main reasons why media applications fall back to TCP...DCCP and legacy firewalls.
This looks like a great improvement if we can use it to replace many of the TCP connections over wireless coms systems. One of the big hassles with TCP over wireless is TCPs slow start backoff mechanism. This leads to bandwidth oscillation and pretty horrible throughputs as TCP was never meant to handle the fast variations in the transmission path that radio introduces (ie lots of errors then really good all in a matter of seconds or milli seconds).CCID3 looks like the solution to this. Linux gets DCCP
DCCP isn't really meant to replace TCP.Linux gets DCCP
Take a look at TCP westwood, it's already in Linux and it makes a visable improvement overwireless links.
Yes you are correct here - the ITU is working with the IETF on DCCP at present.Linux gets DCCP
I never saw an article covering the reasoning and intended purpose ofWhat ever happened to SCTP?
the SCTP (stream control transport protocol) (RFC2960).
Seeing this one on DCCP brought it to mind (since it's transport oriented,
it sounds like it's role to TCP is analogous to DCCP's role compared to
UDP).
How does DCCP fit into the picture with SCTP?Compare contrast with SCTP?
Compare contrast with SCTP?
"How does DCCP fit into the picture with SCTP?"
- SCTP could be used for instance for relaible transmission of signaling messages; whereas
DCCP - for transmission of bearer traffic.