Lecture 16 Extra: The TCP Congestion Game
Tom Anderson, CSE/EE 461 Winter 2002.
These are the rules of the game by which we simulate TCP:
- Let there be one sender, one receiver, and one bottleneck router (which has a infinitely fast link in and a slow link out).
- Latency of first hop is 1 time step; latency of second hop is 0
- Bandwidth of first hop is infinite; bandwidth of second hop is 1 packet per time step
- Let post-its be packets; #s to indicate sequence #’s.
- Need approximately 30 post-its
- Let each packet be acked immediately; no delayed acks.
- Let the instructor be the clock that drives the simulation. Graph/observe any quantities at the end of each clock tick.
- Queuing in the router is represented by slots on the whiteboard – need space for four packets in each direction
- Note that we can also check the congestion window by seeing how many packets are "out there in the network" including any lost packets.
Stop and Wait.
Simulate this as a warm-up exercise.
Graph:
- router queuing versus time, with an X on top when there is packet loss.
- number of successful sends over time (could be: acks versus time as a proxy for throughput (since sequence number is too hard to track).
Notice
- low link utilization (1 out of 4 clock ticks)
- negligible queuing at the router.
Slow-Start
Blow out the queue until there is loss. Each ack causes congestion window to be increased by one – i.e., 2 packets to be sent.
Add graph for
- the congestion window versus time
Notice that
- many packets can be lost.
- bursts in transmission of at most 2x the bottleneck rate
- self-clocking effect in the acks.
AIMD
Go through a couple of rounds of the sawtooth. Each successful ack triggers a send; every time a complete window is sent the window increases by one (ack triggers two sends). After a loss, congestion window drops by factor of 2. Carry a special object to signal each RTT round and hence congestion window increase.
Notice
- delay between loss and congestion window reduction.
- single packet loss
- transmission pause after loss is observed.