15-441 Computer Networking ecture 17-TCP& Congestion Control
15-441 Computer Networking Lecture 17 – TCP & Congestion Control
Good Ideas so far Flow control Stop wait Parallel stop wait Sliding window Loss recovery · Timeouts Acknowledgement-driven recovery(selective repeat or cumulative acknowledgement Lecture 17: TCP Congestion Control
2 Lecture 17: TCP & Congestion Control Good Ideas So Far… • Flow control • Stop & wait • Parallel stop & wait • Sliding window • Loss recovery • Timeouts • Acknowledgement-driven recovery (selective repeat or cumulative acknowledgement)
Outline TCP flow control Congestion sources and collapse Congestion control basics Lecture 17: TCP Congestion Control
3 Lecture 17: TCP & Congestion Control Outline • TCP flow control • Congestion sources and collapse • Congestion control basics
Sequence Numbers (reminder How large do sequence numbers need to be? Must be able to detect wrap-around Depends on sender/receiver window size E.g Max seq=7, send win=recv win=7 If pkts 0. 6 are sent succesfully and all acks lost Receiver expects 7, 0.5, sender retransmits old 0.6! ! Max sequence must be s send window recv window Lecture 17: TCP Congestion Control
4 Lecture 17: TCP & Congestion Control Sequence Numbers (reminder) • How large do sequence numbers need to be? • Must be able to detect wrap-around • Depends on sender/receiver window size • E.g. • Max seq = 7, send win=recv win=7 • If pkts 0..6 are sent succesfully and all acks lost • Receiver expects 7,0..5, sender retransmits old 0..6!!! • Max sequence must be send window + recv window
Sequence Numbers 32 Bits, Unsigned> for bytes not packets! Circular Comparison b Max 0 Max 0 b< a a< b Why So Big? For sliding window, must have Sequence Space>Sending Window +Receiving Window Also, want to guard against stray packets With IP, packets have maximum lifetime of 120s Sequence number would wrap around in this time at 286MB/s=- 2. 3Gbit/s ecture 17: TCP Congestion Control
5 Lecture 17: TCP & Congestion Control Sequence Numbers • 32 Bits, Unsigned → for bytes not packets! • Circular Comparison • Why So Big? • For sliding window, must have • |Sequence Space| > |Sending Window| + |Receiving Window| • No problem • Also, want to guard against stray packets • With IP, packets have maximum lifetime of 120s • Sequence number would wrap around in this time at 286MB/s =~ 2.3Gbit/s (hmm!) Max 0 a b a < b Max 0 b a b < a