Download - Lecture 4: TCP and TFRC
![Page 1: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/1.jpg)
1
TCP"Reno, NewReno, SACK
4 September 2009 CS5229, Semester 1, 2009/10
![Page 2: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/2.jpg)
2
TCP Reno
4 September 2009 CS5229, Semester 1, 2009/10
![Page 3: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/3.jpg)
3
0
2
4
6
8
10
12
14 cwnd ssthresh
4 September 2009 CS5229, Semester 1, 2009/10
![Page 4: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/4.jpg)
5
new ack:"if (cwnd < sstresh)" cwnd += 1"else" cwnd += 1/cwnd
4 September 2009 CS5229, Semester 1, 2009/10
![Page 5: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/5.jpg)
6
timeout:"retransmit 1st unacked"ssthresh = cwnd/2"cwnd = 1"
4 September 2009 CS5229, Semester 1, 2009/10
![Page 6: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/6.jpg)
7
3rd duplicate ACK:"fast retransmission" (ie, retransmit 1st unack) "fast recovery" (details today)"ssthresh = cwnd = cwnd/2
4 September 2009 CS5229, Semester 1, 2009/10
![Page 7: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/7.jpg)
10
TCP’s rule"
send more packets if "L + cwnd > H"
[ L .. H-1 ] are outstanding packets 4 September 2009 CS5229, Semester 1, 2009/10
![Page 8: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/8.jpg)
11 4 September 2009 CS5229, Semester 1, 2009/10
![Page 9: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/9.jpg)
12
Data Packets
ACK Packets (received up to this seq number)
Congestion Window
Sequence Number
Time 4 September 2009 CS5229, Semester 1, 2009/10
![Page 10: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/10.jpg)
13
3rd dup ack:"retransmit 1st unacked"ssthresh = cwnd/2"cwnd = cwnd/2
4 September 2009 CS5229, Semester 1, 2009/10
![Page 11: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/11.jpg)
14
X
Incorrectly clamping the congestion window too soon (without fast recovery)
4 September 2009 CS5229, Semester 1, 2009/10
![Page 12: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/12.jpg)
15
fast recovery:"
keep the pipe occupied"
4 September 2009 CS5229, Semester 1, 2009/10
![Page 13: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/13.jpg)
16
X
4 September 2009 CS5229, Semester 1, 2009/10
![Page 14: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/14.jpg)
17 4 September 2009 CS5229, Semester 1, 2009/10
![Page 15: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/15.jpg)
18
X
X
4 September 2009 CS5229, Semester 1, 2009/10
![Page 16: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/16.jpg)
19
TCP Reno timeout with multiple losses in a window
4 September 2009 CS5229, Semester 1, 2009/10
![Page 17: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/17.jpg)
20
TCP NewReno
4 September 2009 CS5229, Semester 1, 2009/10
![Page 18: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/18.jpg)
21
X
X
4 September 2009 CS5229, Semester 1, 2009/10
![Page 19: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/19.jpg)
22 4 September 2009 CS5229, Semester 1, 2009/10
![Page 20: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/20.jpg)
25
3rd dup ack:"retransmit 1st unacked"ssthresh = cwnd/2"cwnd = cwnd/2 + 3"remember highest
4 September 2009 CS5229, Semester 1, 2009/10
![Page 21: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/21.jpg)
26
“complete” ack:"(all are acked) "cwnd = ssthresh
4 September 2009 CS5229, Semester 1, 2009/10
![Page 22: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/22.jpg)
27
“partial” ack:"(acknowledge n packets)"retransmit"cwnd = cwnd - n + 1
4 September 2009 CS5229, Semester 1, 2009/10
![Page 23: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/23.jpg)
29
Note: RFC2581/RFC2582 give the accurate/gory details. Simplified version is presented here (eg. cwnd vs FlightSize, update of cwnd upon partial ACK).
4 September 2009 CS5229, Semester 1, 2009/10
![Page 24: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/24.jpg)
30
What does a dup ACK tell us?
4 September 2009 CS5229, Semester 1, 2009/10
![Page 25: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/25.jpg)
31
“Coarse Feedback”
4 September 2009 CS5229, Semester 1, 2009/10
![Page 26: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/26.jpg)
32
TCP SACK
4 September 2009 CS5229, Semester 1, 2009/10
![Page 27: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/27.jpg)
33
Use TCP header options to report
received segments.
4 September 2009 CS5229, Semester 1, 2009/10
![Page 28: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/28.jpg)
34
SACK Blocks:"
1st block - report most recently received segments"
subsequent blocks - repeat most recent previous blocks
4 September 2009 CS5229, Semester 1, 2009/10
![Page 29: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/29.jpg)
35
pipe: num of outstanding packets in the pipe."
send only if pipe < cwnd
4 September 2009 CS5229, Semester 1, 2009/10
![Page 30: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/30.jpg)
36
scoreboard: which packets have been received?
4 September 2009 CS5229, Semester 1, 2009/10
![Page 31: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/31.jpg)
37
X
X
4 September 2009 CS5229, Semester 1, 2009/10
![Page 32: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/32.jpg)
38
3rd dup ack:"pipe = cwnd - 3"retransmit 1st unacked"ssthresh = cwnd/2"cwnd = cwnd/2 + 3
4 September 2009 CS5229, Semester 1, 2009/10
![Page 33: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/33.jpg)
39
subsequent dup ack:"cwnd++"pipe--"
if pipe < cwnd" send packet, pipe++
4 September 2009 CS5229, Semester 1, 2009/10
![Page 34: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/34.jpg)
40
“partial” ack:"retransmit"cwnd = cwnd - n + 1"pipe -= 2"if pipe < cwnd" send packet, pipe++
4 September 2009 CS5229, Semester 1, 2009/10
![Page 35: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/35.jpg)
43
Idea of SACK:"
Which packet has left the network?"Where is the gap?"
Decouple when to send and what to send.
4 September 2009 CS5229, Semester 1, 2009/10
![Page 36: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/36.jpg)
44
TCP SACK recovers faster than NewReno with multiple losses in a window.
4 September 2009 CS5229, Semester 1, 2009/10
![Page 37: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/37.jpg)
57
Deployment
4 September 2009 CS5229, Semester 1, 2009/10
![Page 38: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/38.jpg)
58
77%
15%
8%
NewReno
Reno
Tahoe
Feb 2004
4 September 2009 CS5229, Semester 1, 2009/10
![Page 39: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/39.jpg)
59
70% "SACK capable
4 September 2009 CS5229, Semester 1, 2009/10
![Page 40: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/40.jpg)
63
TCP BIC/CUBIC"Linux 2.6.x
4 September 2009 CS5229, Semester 1, 2009/10
![Page 41: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/41.jpg)
64
Compound TCP "MS Windows Vista
4 September 2009 CS5229, Semester 1, 2009/10
![Page 42: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/42.jpg)
65
TFRC"equation-based"
congestion control
4 September 2009 CS5229, Semester 1, 2009/10
![Page 43: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/43.jpg)
66
Not everyone uses TCP
4 September 2009 CS5229, Semester 1, 2009/10
![Page 44: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/44.jpg)
67
UDP:"
Media streaming"Gaming"
VoIP
4 September 2009 CS5229, Semester 1, 2009/10
![Page 45: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/45.jpg)
68
Why not congestion controlled?"
1. UDP has low delay, no need full reliability. UDP "
is not congestion controlled.
4 September 2009 CS5229, Semester 1, 2009/10
![Page 46: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/46.jpg)
69
Why not congestion controlled?"
2. No incentive. OTOH, there are incentives NOT to use
congestion control.
4 September 2009 CS5229, Semester 1, 2009/10
![Page 47: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/47.jpg)
70 Sally Floyd, h+p://www.icir.org/floyd/tcp_unfriendly.html 4 September 2009 CS5229, Semester 1, 2009/10
![Page 48: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/48.jpg)
71
“Unresponsive Flows”
4 September 2009 CS5229, Semester 1, 2009/10
![Page 49: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/49.jpg)
72
Bad: lead to unfairness and congestion collapse.
4 September 2009 CS5229, Semester 1, 2009/10
![Page 50: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/50.jpg)
73
Unfairness: unresponsive flows consume more bandwidth
than congestion controlled flows.
4 September 2009 CS5229, Semester 1, 2009/10
![Page 51: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/51.jpg)
77
Congestion Collapse: wasting bandwidth by sending packets that will be dropped
4 September 2009 CS5229, Semester 1, 2009/10
![Page 52: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/52.jpg)
78
Today: "a TCP-friendly"
unreliable protocol
4 September 2009 CS5229, Semester 1, 2009/10
![Page 53: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/53.jpg)
79
Idea: "send at a rate that a TCP
flow would send
4 September 2009 CS5229, Semester 1, 2009/10
![Page 54: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/54.jpg)
80
we can do the AIMD-thing"at the source, or
4 September 2009 CS5229, Semester 1, 2009/10
![Page 55: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/55.jpg)
81 4 September 2009 CS5229, Semester 1, 2009/10
![Page 56: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/56.jpg)
82
equation-based "congestion control
4 September 2009 CS5229, Semester 1, 2009/10
![Page 57: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/57.jpg)
83
steady"fair"
responsive
4 September 2009 CS5229, Semester 1, 2009/10
![Page 58: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/58.jpg)
84
how to determine"RTT"tRTO"p
4 September 2009 CS5229, Semester 1, 2009/10
![Page 59: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/59.jpg)
85
p is not packet loss rate"but "
loss event rate
4 September 2009 CS5229, Semester 1, 2009/10
![Page 60: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/60.jpg)
86 4 September 2009 CS5229, Semester 1, 2009/10
![Page 61: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/61.jpg)
87 4 September 2009 CS5229, Semester 1, 2009/10
![Page 62: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/62.jpg)
88 4 September 2009 CS5229, Semester 1, 2009/10
![Page 63: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/63.jpg)
89
RTT can fluctuates
4 September 2009 CS5229, Semester 1, 2009/10
![Page 64: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/64.jpg)
90 4 September 2009 CS5229, Semester 1, 2009/10
![Page 65: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/65.jpg)
91 4 September 2009 CS5229, Semester 1, 2009/10
![Page 66: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/66.jpg)
92 4 September 2009 CS5229, Semester 1, 2009/10
![Page 67: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/67.jpg)
93 4 September 2009 CS5229, Semester 1, 2009/10
![Page 68: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/68.jpg)
94
how to initialize?
4 September 2009 CS5229, Semester 1, 2009/10
![Page 69: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/69.jpg)
95
slow start"(until loss occur)"
Tnow = min(2Tprev, 2Trecv)
4 September 2009 CS5229, Semester 1, 2009/10
![Page 70: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/70.jpg)
96
no loss history, how?"
solve p given T, RTT
4 September 2009 CS5229, Semester 1, 2009/10
![Page 71: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/71.jpg)
97 4 September 2009 CS5229, Semester 1, 2009/10
![Page 72: Lecture 4: TCP and TFRC](https://reader033.vdocuments.us/reader033/viewer/2022052506/5576450dd8b42ac31b8b4cdb/html5/thumbnails/72.jpg)
98
TFRC is now part of DCCP
4 September 2009 CS5229, Semester 1, 2009/10