Datagram Congestion Control Protocol (DCCP) CISC 856 - TCP/IP and Upper Layer Protocols Presentation...
-
Upload
arabella-porter -
Category
Documents
-
view
223 -
download
1
Transcript of Datagram Congestion Control Protocol (DCCP) CISC 856 - TCP/IP and Upper Layer Protocols Presentation...
Datagram Congestion Control Protocol (DCCP)
CISC 856 - TCP/IP and Upper Layer Protocols
Presentation byXiaofeng Han
Thanks for Kireeti Valicherla’s slides
2
Overview
Motivation
Connection process
Unreliable packets flow with acknowledgement
Features negotiation
Choice of congestion control
Miscellaneous features
4
Streaming Media
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 and expired packets
6
Streaming Media Over UDP
No congestion control in UDP
flows
Harmful to Internet health
Server Client
7
Streaming Media with SCTP
Multi-streams over a single association Uses TCP-like congestion control Retransmission
IP network
IP A2
IP B2 IP B1
IP B3IP A1
8
Solution:
DCCP Reliable connection establishment and
termination Unreliable packet flow On-demand congestion control Optional features Security concerns
9
DCCP Response
DCCP Request
DCCP Ack
Client Server
DCCP Connection Setup
DCCP A DCCP B
Similar to TCP
connection setup
11
DCCP Connection Termination
DCCP Close
DCCP Reset
Client Server
DCCP CloseReq
Wait 2 MSL
DCCP Close
DCCP Reset
Client Server
Wait 2 MSL
DCCP Reset
12
DCCP Data Transfer Example - 1
Pure Seq #, not bytes Each packet carries a Seq # Seq # increase per packet Pure Acks also consume Seq #
DCCP-DATA (Seq #1)
DCCP-DATA(seq # 2)
DCCP-ACK(seq # 11, ACK # 2)
ClientServer
DCCP-ACK (Seq # 10, Ack #1)
13
No Retransmissions Acks the largest Seq # received
DCCP-DATA (Seq #1)
DCCP-DATA(seq # 2)
DCCP-ACK(seq # 11, ACK # 3)
ClientServer
DCCP-ACK (Seq # 10, Ack #1)
DCCP Data Transfer Example - 2
DCCP-DATA(seq # 3)
DCCP-DATA(seq # 4)
DCCP-ACK(seq # 12, ACK # 4)
14
GSR – Greatest Sequence Number Received GSS – Greatest Ack Number Received Window Size = 8
DCCP Data Transfer Example - 3
20
GSR + 3 * (W/4)
GSR + 1 – (W/4)
DATA (Seq #20)
DATA(seq # 21)
ACK(seq # 61, ACK # 24)
ClientServer
DATA(seq # 22)
ACK (Seq #60, Ack #20)
DATA(seq # 23)
DATA (Seq #24)
24
15
GSR – Greatest Sequence Number Received GSS – Greatest Ack Number Received Window Size = 8
DCCP Data Transfer Example - 4
GSR + 3 * (W/4)
GSR + 1 – (W/4)
DATA (Seq #20)
DATA(Seq # 21)
:
DATA(Seq # 30)
Sync(Seq # 61, ACK # 31)
ClientServer
ACK (Seq #60, Ack #20)
DATA (Seq #31)
Seq # out of range
SyncAck (Seq #32, Ack 61)
2032
16
DCCP Packet Types
DCCP-Request
DCCP-Response
DCCP-Ack
DCCP-Data
DCCP-DataAck
DCCP-CloseReq
DCCP-Close
DCCP-Reset
DCCP-Sync, DCCP-SyncAck
17
DCCP Packet Formats
Generic Header
Additional Fields (depending on type)
Options (optional )
Application Data Area
• DCCP header can be from 12 to 1020 bytes
• Generic header: 12 bytes
• Additional fields: fixed length field
• Options: variable length field
18
DCCP Generic Header
Source Port Destination Port
Data Offset CCVal CsCov Checksum
Res Type X
=
0
Sequence Number
19
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)
20
Acknowledgement Sub-Header
Reserved Acknowledgement Number (high bits)
Acknowledgement Number (low bits)
Acknowledgement Number(low bits)
X =1
X =0
21
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
CsCov Checksum
22
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
23
CCID 2: TCP-like Congestion Control
Congestion control as in TCP/IP: Slow start Timeouts Congestion event -> Halve congestion window Abrupt rate changes
time
cwnd
Loss, e.g. timeout
(initial) ssthresh
24
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
25
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
26
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.
27
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
28
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.
29
Explicit Congestion Notification
ECT set
ECN enabled sender ECN enabled receiver
CWR set
ECE set ACK
30
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
31
F/X Notation
A B
Feature location for all F/A
Feature location for all F/B
Feature Remote for all F/B
Feature Remote for all F/A
Change L (Local)
Change R (Remote)
Confirm L (Local)
Confirm R (Remote)
32
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)
Type Length Feature # Value(s)
33
Feature Negotiation Example
Change R (CCID, 2, 3)
Confirm L (CCID, 2)
Change L (CCID, 3, 4)
Confirm R (CCID, 4, 4 2)
CCID/Server agreed as 2
CCID/Server agreed as 4
Client Server
34
Feature Negotiation Example
Change R(CCID, 2)
CCID/Server agreed as 2
Change R(CCID, 2)
Change R(CCID, 2)
Change R(CCID, 2)
Confirm L(CCID, 2)
Client Server
35
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
36
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.)
38
DCCP: Summary
Transport layer protocol
Unreliable datagrams
Negotiable features
Optional congestion control
39
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 Padhye
http://www.icir.org/kohler/dcp/
TCP Friendly Rate Control (TFRC) RFC 3448