450 likes | 596 Views
Datagram Congestion Control Protocol (DCCP). CISC 856 - TCP/IP and Upper Layer Protocols Presentation by Xiaofeng Han xiaofeng@udel.edu Thanks for Kireeti Valicherla’s slides. Overview. Motivation Connection process Unreliable packets flow with acknowledgement Features negotiation
E N D
Datagram Congestion Control Protocol (DCCP) CISC 856 - TCP/IP and Upper Layer Protocols Presentation by Xiaofeng Han xiaofeng@udel.edu Thanks for Kireeti Valicherla’s slides
Overview • Motivation • Connection process • Unreliable packets flow with acknowledgement • Features negotiation • Choice of congestion control • Miscellaneous features
DCCP: Which Layer? DCCP Figure 2-11TCP/IP Protocol Suite, Behrouz A. Forouzan
Streaming Media • What streaming media needs? • Timeliness of data • What streaming media doesn’t need? • Retransmissions of lost and expired packets Source: http://streaming.wisconsin.edu/Accessible_Tutorials/Tutorial1/p1-3.htm
Streaming Media Over TCP Server Client D12 A12 D13 D14 - D16 A12 Data is not useful D13
Streaming Media Over UDP Server Client • No congestion control in UDP flows • Harmful to Internet health
IP B2 IP B1 IP A1 IP B3 IP A2 IP network Streaming Media with SCTP • Multi-streams over a single association • Uses TCP-like congestion control • Retransmission
Solution: DCCP • Reliable connection establishment and termination • Unreliable packet flow • On-demand congestion control • Optional features • Security concerns
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 Client Server DCCP CloseReq DCCP Close DCCP Reset DCCP Close DCCP Reset DCCP Reset Wait 2 MSL Wait 2 MSL
DCCP Data Transfer Example - 1 Server • Pure Seq #, not bytes • Each packet carries a Seq # • Seq # increase per packet • Pure Acks also consume Seq # Client DCCP-DATA (Seq #1) DCCP-ACK (Seq # 10, Ack #1) DCCP-DATA(seq # 2) DCCP-ACK(seq # 11, ACK # 2)
DCCP Data Transfer Example - 2 Server • No Retransmissions • Acks the largest Seq # received Client DCCP-DATA (Seq #1) DCCP-ACK (Seq # 10, Ack #1) DCCP-DATA(seq # 2) DCCP-DATA(seq # 3) DCCP-ACK(seq # 11, ACK # 3) DCCP-DATA(seq # 4) DCCP-ACK(seq # 12, ACK # 4)
DCCP Data Transfer Example - 3 Server GSR + 1 – (W/4) Client DATA (Seq #20) ACK (Seq #60, Ack #20) DATA(seq # 21) DATA(seq # 22) DATA(seq # 23) DATA (Seq #24) ACK(seq # 61, ACK # 24) GSR + 3 * (W/4) • GSR – Greatest Sequence Number Received • GSS – Greatest Ack Number Received • Window Size = 8
DCCP Data Transfer Example - 4 Server GSR + 1 – (W/4) Client DATA (Seq #20) ACK (Seq #60, Ack #20) DATA(Seq # 21) : DATA(Seq # 30) Seq # out of range DATA (Seq #31) Sync(Seq # 61, ACK # 31) SyncAck (Seq #32, Ack 61) GSR + 3 * (W/4) • GSR – Greatest Sequence Number Received • GSS – Greatest Ack Number Received • Window Size = 8
DCCP Packet Formats • DCCP header can be from 12 to 1020 bytes • Generic header: 12 bytes • Additional fields: fixed length field • Options: variable length field
Acknowledgement Sub-Header X =1 X =0
DCCP Checksum • Checksum Coverage (CsCov): 4 bits • CsCov = 0: covers the DCCP header, DCCP options, network-layer pseudoheader, and all application data in the packet (possibly some padding) • CsCov = 1-15: covers the DCCP header, DCCP options, network-layer pseudoheader, and the initial (CsCov-1)*4 bytes of the packet's application data. • Option provides CRC checksum for all application data
Congestion Control in DCCP • Each congestion control mechanism supported by DCCP is assigned a congestion control identifier, or CCID: a number from 0 to 255. • CCID 0 and CCID 1 are reserved • TCP-like congestion control – CCID 2 • TCP friendly rate control (TFRC) – CCID 3 • CCID 4-255 are reserved
CCID 2: TCP-like Congestion Control • Congestion control as in TCP/IP: • Slow start • Timeouts • Congestion event -> Halve congestion window • Abrupt rate changes (initial) ssthresh cwnd Loss, e.g. timeout time
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: TCP Friendly Rate Control • 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 and less burst traffic as provided by TFRC
CCID 3: TCP Friendly Rate Control 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.
CCID 3: TCP Friendly Rate Control • The receiver measures the loss event rate and feeds this information back to the sender • The sender 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
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 ECE set ACK ECT set CWR set ECN enabled sender ECN enabled receiver
Features Negotiation • Connection attribute on what value two endpoints agree • Examples • Congestion control identifier (CCID) • ECN capable / incapable • Data checksum • Sequence Window • 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 B A Feature Remote for all F/B Feature Remote for all F/A
Feature Negotiation • Anytime during the connection process • Carried in a reliable way • Multiple values, priority order • Endpoints keep sending packets containing change options, until agreement is reached ( and signalled by Confirm Option)
Feature Negotiation Example Client Server CCID/Server agreed as 2 Change R (CCID, 2, 3) Confirm L (CCID, 2) CCID/Server agreed as 4 Change L (CCID, 3, 4) Confirm R (CCID, 4, 4 2)
Feature Negotiation Example Client Server Change R(CCID, 2) Change R(CCID, 2) Change R(CCID, 2) Change R(CCID, 2) Confirm L(CCID, 2) CCID/Server agreed as 2
DCCP: Miscellaneous Features • Security Concerns • Prevents DDoS attacks – init cookie • Prevents Sequence Number Attack • Large Sequence Number • Sequence and Acknowledgement Number Windows • Data Corruption • CRC data Checksum Option
DCCP: Miscellaneous Features • Path MTU discovery • DCCP should NOT fragment data • DCCP must maintain maximum packet size (MPS) • Applications can usually get better error tolerance by producing packets smaller than the PMTU • Methods • On IPv4 connections whose applications have requested fragmentation, the sender SHOULD send packets with the DF bit not set • On IPv6 connections whose applications have requested fragmentation, the sender SHOULD use fragmentation extension headers to fragment packets larger than PMTU into suitably-sized chunks (Those chunks are, of course, unfragmentable.)
DCCP and RTP DCCP Figure 28-8TCP/IP Protocol Suite, Behrouz A. Forouzan
DCCP: Summary • Transport layer protocol • Unreliable datagrams • Negotiable features • Optional congestion control
References • Datagram Congestion Control Protocol (DCCP)Eddie Kohler, Mark Handley, and Sally Floyd[May 2005] http://www.icir.org/kohler/dcp/draft-ietf-dccp-spec-09.txt • DCCP OverviewEddie Kohler and Sally Floyd http://www.icir.org/kohler/dcp/summary.pdf • DCCP Eddie Kohler, Mark Handley, Sally Floyd, Jitendra Padhyehttp://www.icir.org/kohler/dcp/ • TCP Friendly Rate Control (TFRC) RFC 3448