1 / 26

TCP Congestion Control and Queue Management

TCP Congestion Control and Queue Management. Outline. Congestion Control Slow start AIMD Fast Retransmit/Recovery Queue Management ECN RED WRED RIO. Why Study TCP Congestion Control in a QoS Course?. Most Internet services are based on TCP

Download Presentation

TCP Congestion Control and Queue Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TCP Congestion Control and Queue Management

  2. Outline • Congestion Control • Slow start • AIMD • Fast Retransmit/Recovery • Queue Management • ECN • RED • WRED • RIO Engineering Internet QoS

  3. Why Study TCP Congestion Control in a QoS Course? • Most Internet services are based on TCP • file transfer, e-mail, world wide web, telnet all use TCP • Quality of these valuable services largely depends on TCP’s congestion control mechanisms • These services will still be very valuable even in the next generation Internet with many new multimedia services Engineering Internet QoS

  4. IPv4 Header Format (Revision) Engineering Internet QoS

  5. 31 0 Destination port # Source port # Sequence number Acknowledgement number Receiver window size Header length Unused U A P R S F Checksum Urgent pointer data Options (variable ) Application Data (variable length) TCP Segment Format (Revision) Engineering Internet QoS

  6. UDP Header (Revision) Engineering Internet QoS

  7. SYN, SeqNo=88 SYN, ACK, SeqNo=155, AckNo=89 ACK, AckNo=156 Server Client 3-Way Handshake (Revision) Reprinted with Permission from “Engineering Internet QoS - Jha & Hassan, Artech House Publishing, Norwood, MA, USA. www.artechhouse.com Engineering Internet QoS

  8. 5 6 7 8 9 10 11 12 13 0 1 2 3 4 Step 1 Step 2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 Step 3 5 6 7 8 9 10 11 12 13 0 1 2 3 4 Step 4 3 4 5 6 7 8 9 10 11 12 13 0 1 2 Time Can be sent Acknowledged Can't be sent Waiting for ACK Sliding Window (Revision) Reprinted with Permission from “Engineering Internet QoS - Jha & Hassan, Artech House Publishing, Norwood, MA, USA. www.artechhouse.com Engineering Internet QoS

  9. TCP Congestion Control • Assumes FCFS or FQ scheduling discipline • Acknowledgements used to regulate transmission speed • Feed is of implicit nature • no explicit rate notification from network • Each source determines network capacity • Dynamically adapt to capacity changes Engineering Internet QoS

  10. Congestion Control Mechanism • Congestion indicated by retransmission timout • Sliding Window mechanism used for Congestion control • Window size is control as follows • Increased upon receipt of ACKs • Decreased upon expiration of retransmission timer Engineering Internet QoS

  11. Slow Start • Initially CongestionWindow = 1 MSS • Increase CongestionWindow by 1 upon receipt of ACK • Allowed window size = min (AdvertisedWindow, CongestionWindow) • AdvertisedWindow = Receiver’s available window size • Window size doubled every RTT • See figure on next foil • Initially 1 segment sent • Upon receipt of 1stACK, 2 segments are sent • Once ACK for these two segments arrive, four segments are sent Engineering Internet QoS

  12. Reprinted with Permission from “Engineering Internet QoS - Jha & Hassan, Artech House Publishing, Norwood, MA, USA. www.artechhouse.com Slow Start Example Engineering Internet QoS

  13. Additive Increase/Multiplicative Decrease • Additive Increase phase • Increase window size by 1/CongestionWindow for each ACK received • Window size increase by 1 every RTT • Transition from Exponential • Variable ssthresh = ½ initial window size • Upon loss, ssthresh set to half the current window size • Rather maximum of the min (Congestion Window, Adverstised Window)/2 or 2 MSS Engineering Internet QoS

  14. AIMD Engineering Internet QoS Reprinted with Permission from “Engineering Internet QoS - Jha & Hassan, Artech House Publishing, Norwood, MA, USA. www.artechhouse.com

  15. Fast Retransmit • Timer implementation may be too big • wastage of bandwidth • Fast retransmit adapts to congestion quickly • Duplicate ACKs trigger retransmission • TCP-Reno: 3 duplicate ACKs before retransmission timer expiration triggers retransmission of segment • TCP-Reno also uses fast recovery : No slow start after fast retransmission Engineering Internet QoS

  16. Proactive Congestion Management • TCP-Vegas • Keep track of RTT measurements • Longer RTT indicates future congestion • Rate reduced linearly Engineering Internet QoS

  17. Queue Management • Queue management different from packet scheduling • Packet scheduling – which packet to send next + per-flow bandwidth Guarantees • Queue management tasks: • Move packets to appropriate queue • Remove packets from a queue on request from packet scheduler • Drop and remark packets if queue full or approaching saturation Engineering Internet QoS

  18. Explicit Congestion Notification • RFC2481 proposed ECN scheme (based on DECbit) • IPv4 ToS field to indicate • ECN Capable Transport (ECT) bit: whether end system is ECN capable • Congestion Experienced (CE): Network elements mark this flag to indicate congestion Engineering Internet QoS

  19. Global Synchronization Problem • Drop tail scheme creates global synch. Problem • Congested router drops packet from multiple flows simultaneously • Each TCP sender detects loss and goes into slow start • Congestion situation improves at the bottleneck router • TCP sources start increasing their rate again • If the router can’t cope with this load, source back off again. • RED proposal to eliminate this problem Engineering Internet QoS

  20. Random Early Detection (RED) • Drop packets from randomly selected flows with some drop probabilitywhenever the queue length exceeds some threshold • Don’t wait for queue to become full (proactive). • No explicit indication to source • TCP source use standard implicit timeout mechanism Engineering Internet QoS

  21. RED Queue Reprinted with Permission from “Engineering Internet QoS - Jha & Hassan, Artech House Publishing, Norwood, MA, USA. www.artechhouse.com Engineering Internet QoS

  22. RED Details (contd) • Two queue length thresholds • if AvQlent < Minth then buffer the packet; • No congestion • if AvQlent > Maxth , discard packet (drop probability 1); • High congestion • If Minth <= AvQlent <= Maxth , packet drop based on drop probability p. • Drop proability increases linearly towards Maxp as buffer occupancy approaches Maxth Engineering Internet QoS

  23. RED packet drop probability Reprinted with Permission from “Engineering Internet QoS - Jha & Hassan, Artech House Publishing, Norwood, MA, USA. www.artechhouse.com Engineering Internet QoS

  24. Weighted RED • Set of Minth , Maxth and and Maxp for each class • Drop probability is applied from this set based on packet marking • Packets to be marked with different drop levels • Diffserv chapter to revisit packet marking etc. • Higher drop priority to be discarded first if queue occupancy increases beyond minimum threshold • Router vendors support up to 8 set of values based on IPv4 precedence level Engineering Internet QoS

  25. Reprinted with Permission from “Engineering Internet QoS - Jha & Hassan, Artech House Publishing, Norwood, MA, USA. www.artechhouse.com WRED Engineering Internet QoS

  26. RED with In/Out (RIO) • RIO scheme assumes edge router marking of packets conforming to SLA • Conforming packets, in profile • Non-conforming packets, out of profile • Packets out of profile dropped first if a router suffers congestion • Different set of parameters used for in/out of profile packets Engineering Internet QoS

More Related