There Is No Such Thing As TCP: TCP: Congestion Control
There Is No Such Thing As TCP: TCP: Congestion Control
There Is No Such Thing As TCP: TCP: Congestion Control
Wolf Richter
Background
● RFC 793 – Original TCP RFC
● RFC 2001 – Close language to class
● RFC 5681 – More up-to-date RFC 2001
● Vint Cerf is here Friday
● http://dl.acm.org/citation.cfm?id=52356 –
Van Jacobson, Congestion Avoidance and Control
● Linux: man tcp
The Learning TCP Problem
● Slide's versions
● Book's version
● RFC versions
● Research paper versions
● Version in your head
● Then, there's the multiple real-world
implementations
Learn Exact Versions of TCP
● Tahoe
● Reno
● New Reno
● Vegas
● That's the goal here unfortunately
As always, experimenting on
your own with a real
implementation is the only
way you will learn anything
valuable.
So, we're making
you implement your own.
Problem: Avoid congestion
with no central coordination,
no knowledge from peers, and
no direct network feedback.
All you see are, essentially,
ACKs.
New Connection: Slow Start [Tahoe]
● Intuition: Don't flood, but quickly optimize
● Start really small: 1 SMSS
● Grow really fast: exponentially
● Occurs: beginning of TCP, after timeout
ssthresh
● cwnd – congestion window
● Governs data transmission (with rwnd)
● SMSS == sender maximum segment size
● On segment ACK, cwnd += SMSS
● ssthresh – slow start threshold
● Use slow start when cwnd < ssthresh
● Use congestion avoidance when cwnd >
ssthresh
u_int32_t tcpi_unacked;
u_int32_t tcpi_rcv_rtt;
u_int32_t tcpi_sacked;
u_int32_t tcpi_rcv_space;
u_int32_t tcpi_lost;
u_int32_t tcpi_retrans;
u_int32_t tcpi_total_retrans;
u_int32_t tcpi_fackets;
};
Cheating TCP: Foul Play
● What happens with two TCP streams, one
from each host, on a 10 Mbps link?
Cheating TCP: Foul Play
● What happens with two TCP streams, one
from each host, on a 10 Mbps link?
● Name them host A and host B. What if
host A opens 10 TCP streams? Host B
keeps only 1 TCP stream?
Cheating TCP: Foul Play
● What happens with two TCP streams, one
from each host, on a 10 Mbps link?
● Name them host A and host B. What if
host A opens 10 TCP streams? Host B
keeps only 1 TCP stream?
● Fair sharing across streams...
● No notion of logical peers
P2P Research: Bandwidth Trading
● UVA limited dorm links in dorm rooms
● We had high-speed WiFi between us
● What if we all colluded?
● Merging many TCP flows out-of-band :-)
● Fun senior thesis project
● P2P Bandwidth Trading (economics+CS)
LPTHW EC [10 Points]
Due November 19
Email Wolf
GitHub: