Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS.

Similar presentations


Presentation on theme: "1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS."— Presentation transcript:

1 1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS

2 2 K. Salah Connection Establishment

3 3 K. Salah Connection Termination

4 4 K. Salah Flow Control  Some Points about TCP’s Sliding Windows:  A sliding window is used to make transmission more efficient as well as to control the flow of data so that the destination does not become overwhelmed with data.  It is called Selective Repeat ARQ.  Built on top of go-back-n ARQ  Accepts segments out of order, but error free  Repeat transmission of only selective segments  TCP’s sliding windows are byte oriented. TCP is a stream-oriented protocol. Data is presented as streams of characters.  The window size specifies the receiver’s current buffer size.  The source does not have to send a full window’s worth of data.  The size of the window can be increased or decreased by the destination.  The destination can send an acknowledgment at any time.

5 5 K. Salah TCP Sliding Window

6 6 K. Salah Corrupted Segment

7 7 K. Salah Lost Acknowledgement

8 8 K. Salah Silly Window Syndrome (SWS) SWS occurs when each acknowledgement advertises a small amount of space available and each segment carries a small amount of data. Avoidance –Receive-Side SWS Avoidance: Before sending an update window advertisement after advertising a zero window, wait for space to become available that is either at least 50% of the total buffer size or equal to a maximum sized segment.  Implementation using Delayed Acknowledgements  Ack every segment but with no increase in window size until sufficient size becomes available.  Delay Acks and Ack one with window size after sufficient size is available. Standards recommend this. »Advantage: decrease in traffic and overhead. »Disadvantage: sender may re-transmit due to long delays.

9 9 K. Salah Timers Retransmission Timeout If an acknowledgment is received for this particular segment before the timer goes off, the timer is destroyed. If the timer goes off before the acknowledgment arrives, the segment is retransmitted and the timer is reset. Round Trip delay may vary as packets and acks travel through the Internet. Calculation To accommodate the varying delays encountered in an internet environment, TCP uses an adaptive transmission algorithm that monitors delays on each connection and adjusts its timeout parameters accordingly. RTT = (  * Old_RTT) + ((1-  )*New_Round_Trip_Sample), 0<  <1 RTT =  * RTT,  recommended to be 2

10 10 K. Salah Timers Persistence Timer TCP uses a persistence timer for each connection. When the sending TCP receives an acknowledgment with a window size of zero, it starts a persistence timer. When the persistence timer goes off, the sending TCP sends a special segment called a probe. A probe queries the receiver periodically to find out if the window has increased. The value of the timer changes and increases exponentially. A probe contains only one byte of data. TCP is allowed to send 1 byte of data beyond the end of closed window. Keepalive Timer Used by the server to check if the client has crashed when the connection has been idle for a long time. A probe message is sent for query.

11 11 K. Salah Congestion Control Remember flow control is between Sender and Receiver, and Congestion Control takes care of congestion in the intermediate nodes (routers). To avoid congestion collapse (I.e., network throughput to be zero), receiver controls the window size. Allowed_Window =Min(receiver_advertisement, congestion_window) –Host can inject into the network as many segments as the receiver_advertisement (I.e. window size of the receiver) allows. –Congestion_window is for controlling congestion at the intermediate router –Initially congestion_window = receiver MSS Congestion Avoidance is a combination of: –Slow-Start and Additive Increase:  Whenever starting traffic on a new connection or increasing traffic after a period of congestion, start the congestion window at the size of a single segment and increase the congestion window by one segment each time an acknowledgement arrives.  In order to avoid increasing the window size too quickly (I.e. exponential increase) and causing more congestion, apply additive increase, meaning only increase window size by 1 after the size reaches the threshold. Initially threshold = ½ receiver_advertisement. –Multiplicative Decrease  Upon loss of a segment, reduce the congestion window down to one segment, and threshold = ½ last allowed window size.

12 12 K. Salah Increasing Strategy Initially advertisement_window = 32 segments.

13 13 K. Salah QoS Metrics Reliability: Lack of reliability means losing a packet or acknowledgement, which entails retransmission Delay: Source-to-destination delay. Jitter: Variation in delay for packets belonging to the same flow. Bandwidth: bits per second


Download ppt "1 K. Salah Module 6.1: TCP Flow and Congestion Control Connection establishment & Termination Flow Control Congestion Control QoS."

Similar presentations


Ads by Google