Datagram Congestion Control Protocol CISC 856 TCP/IP and Upper Layer Protocols Presentation by: Kireeti Valicherla 11/30/2004
DCCP: Which Layer? DCCP SCTP Figure 2-11 TCP/IP Protocol Suite, Behrouz A. Forouzan
Streaming Media What streaming media needs? Source: http://streaming.wisconsin.edu/Accessible_Tutorials/Tutorial1/p1-3.htm What streaming media needs? Timeliness of data. What streaming media doesn’t need? Retransmissions of lost packets.
Streaming media with TCP Arbitrary Delay D9-D12 A12 D12-D16 A16 D17-D19 D20-D22 Data is not useful A16 D17
Streaming Media with UDP No Congestion Control in UDP flows. Harmful to internet health
Problems with UDP From Network’s point of view: Congestion Unfairness From the application’s point of view: Firewalls and NAT’s do not always pass UDP traffic
Solution: UDP with congestion control Handshaking during connection setup and teardown
Questions?
DCCP : Overview Connection setup & teardown: Reliable handshaking Unreliable packet flow Bi-directional Unicast connections Reliable feedback from receiver to sender Choice of congestion control Minimal overhead
Similar to TCP connection setup DCCP connection setup Client Server DCCP A DCCP B Similar to TCP connection setup DCCP Request DCCP Response DCCP ACK
DCCP Data transfer phase Client Server DCCP DATA DCCP ACK DCCP DATA DCCP DATA ACK
DCCP connection termination Client Server DCCP A DCCP B DCCP CloseReq DCCP Close DCCP Reset
Connection dynamics echo those of TCP Server Client Connection dynamics echo those of TCP Initiation DCCP Request DCCP Response DCCP ACK Data Transfer DCCP Data DCCP ACK DCCP DATA ACK Termination DCCP CloseReq DCCP Close DCCP Reset
Additional Fields (depending on type) DCCP Packet Formats Generic Header Additional Fields (depending on type) Options (optional ) Application Data Area DCCP header can be from 12 to 1020 bytes long Generic Header -> 12 bytes Additional Fields -> Fixed length field Options -> Variable length field
DCCP Generic Header Source Port Destination Port Data Offset CCVal CsCov Checksum Res Type X = Sequence Number
Sequence Number (low bits) DCCP Generic Header Source Port Destination Port Data Offset CCVal CsCov Checksum Res Type X = 1 Reserved Sequence Number (high bits) Sequence Number (low bits)
Acknowledgement Sub-Header Reserved Acknowledgement Number (high bits) Acknowledgement Number (low bits) X =1 X =0 Acknowledgement Number(low bits)
DCCP data transfer Example B A Each packet carries a seq # Seq # incremented per packet Pure Acks also increment seq # DCCP-DATA(seq # 1) DCCP-DATA(seq # 2) DCCP-ACK(seq # 10, ACK # 2) DCCP-DATA ACK(seq # 3, ACK # 10) DCCP-ACK(seq # 11, ACK # 3)
DCCP data tranfer example B No Retransmissions Ack # = Greatest Seq # received DCCP-DATA(seq # 1) DCCP-DATA(seq # 2) DCCP-ACK(seq # 10, ACK # 2)
Questions ?
Features Connection attribute on whose value two endpoints agree Examples CCID ECN incapable Data checksum DCCP features are identified by a feature number and an endpoint Notation “F/X” is used
F/X Notation Feature location for all F/B Feature location for all F/A Feature Remote for all F/B Feature Remote for all F/A
Feature Negotiation At the connection setup, and whenever either endpoint wants Carried in a reliable way Endpoints send packets containing Change options, until agreement is reached( and signalled by Confirm Option)
Feature Negotiation Example CCID/Server agreed as 2 Change R(CCID, 2) Confirm L(CCID, 2) CCID/Server agreed as 4 Change R(CCID, 3 4) Confirm L(CCID, 4, 4 2)
Feature Negotiation Example Change R(CCID, 2) CCID/Server agreed as 3 Prefer L(CCID, 3) Confirm R(CCID, 3)
Feature Negotiation Example Change R(CCID, 2) CCID/Server agreed as 2 Change R(CCID, 2) Confirm L(CCID, 2)
Questions?
Congestion Control Mechanisms in DCCP TCP Like Congestion Control – CCID 2 TFRC Congestion Control – CCID 3
CCID2: TCP Like Congestion Control AIMD behavior exhibited as in TCP/IP: Slow start Timeouts Congestion event -> Halve congestion window Abrupt rate changes
CCID 2: TCP-like Congestion Control Applications using this: Respond quickly to changes in available bandwidth. Must tolerate abrupt changes Online Interactive Games prefer this kind of congestion control
CCID 3 TFRC, [RFC 3448] Equation-based congestion control Minimizes abrupt changes in sending rate Maintains longer-term fairness with TCP Streaming Media doesn’t need responsiveness but prefer steadier less bursty traffic as provided by TFRC
TCP-Friendly Rate Control The receiver measures the loss event rate and feeds this information back to the sender. The sender also uses these feedback messages to measure the round-trip time (RTT). The loss event rate and RTT are then fed into TFRC's throughput equation, giving the acceptable transmit rate. The sender then adjusts its transmit rate to match the calculated rate.
The throughput equation s X = ------------------------------------------------------------------------------------- {R*sqrt(2*b*p/3) + (t_RTO * (3*sqrt(3*b*p/8) * p * (1+32*p^2)))} Where: X is the transmit rate in bytes/second. s is the packet size in bytes. R is the round trip time in seconds. p is the loss event rate, between 0 and 1.0, of the number of loss events as a fraction of the number of packets transmitted. t_RTO is the TCP retransmission timeout value in seconds. b is the number of packets acknowledged by a single TCP acknowledgement.
Congestion related options Slow receiver option Receiver sends this option to its sender to indicate it is having trouble keeping up with the sender’s data Data dropped option Option indicates that some packets reported as received actually had their data dropped before it reached the application.
Explicit Congestion Notification A network assisted congestion control method Uses two bits of IP header plus two bits in transport level header: Sender sets an ECT bit in outgoing packets If a router is congested, it may set a CE bit in ECT marked packets Receiver reports CE flagged packets as congestion events The sender then reduces its sending rate
DCCP: Miscellaneous Features Prevents DDoS attacks Multihoming and Mobility Path MTU discovery
DCCP and RTP DCCP Figure 28-8 TCP/IP Protocol Suite, Behrouz A. Forouzan
DCCP: Summary Transport layer protocol Unreliable datagrams Bi-directional Congestion-controlled unicast
References Datagram Congestion Control Protocol (DCCP) Eddie Kohler, Mark Handley, and Sally Floyd[Nov 2004] http://www.icir.org/kohler/dcp/draft-ietf-dccp-spec-09.txt DCCP Overview Eddie Kohler and Sally Floyd http://www.icir.org/kohler/dcp/summary.pdf DCCP Eddie Kohler, Mark Handley, Sally Floyd, Jitendra Padhye http://www.icir.org/kohler/dcp/