0% found this document useful (0 votes)
19 views28 pages

Networking - Lec 25

Network Lecture
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
19 views28 pages

Networking - Lec 25

Network Lecture
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 28
©) TCP Flow Control I —————————————— a 2 TCP uses sliding window to handle the flow control. TCP sliding window looks like the Go-Back-N protocol because it does not use NAKs ; © It looks like selective repeat because the receiver holds the out of order segment until the missing one arrives. TCP-SLDING WINDOW Pech ne Sliding window of TCP is byte oriented Sliding window of data link layer is frame oriented TCP sliding window is variable size Data link layer sliding window is fixed size A. Biswas ©) TCP Error Control re © Error control in TCP is achieved through the use of three simple tools: o Checksum o Acknowledgment © Cumulative Acknowledgment (ACK) © Selective Acknowledgment (SACK) © Retransmission © Retransmission after RTO(Retransmission time-out) 1 Retransmission after Three Duplicate ACK Segments » TCP Congestion Control eS ee eee © Two Categories of Congestion Control Mechanisms: Open Loop Congestion Control These policies are applied to prevent congestion before it happens. ‘ln these mechanisms, congestion control is handled by either source or destination. Closed Loop Congestion Control mThese mechanisms try to overcome congestion after it happens ©) Types of Congestion Control = A.Biewan » TCP Congestion Control Implementation (Generic) ———— SESS © Congestion Window aThe TCP sender uses the occurrence of two events as signs of congestion in the network: time-out and receiving three & duplicate ACKs. othe lack of regular & timely receipt of ACKs, which results in a time-out, is the sign of a strong congestion; athe receiving of three duplicate ACKs is the sign of a weak congestion in the network. Sender window and Parameters ————_—————_—————_ © Send window is minimum of receiver's advertisement and a computed quantity known as the congestion window 5 Send Window = MIN (flow control window, congestion window) 1 flow Lontrol window is advertised by the r 5 congestion window is set at sender and adjusted based upon feedback from the network a @& iver © The sender uses two parameters: 5 Congestion Window (cwnd) Initial value is 1 MSS (=maximum segment size) counted in bytes © Slow-start threshhold Value (ssthresh) © Initial value of ssthresh is the advertised window size (senders flow control window) ©) Congestion Policies ———————EEE SEE 3 Slow Start: Exponential Increase algorithm If (cwnd < ssthresh) 3 AIMD (Additive Increment Multiplicative Decrement) Otherwise i.e. (cwnd >= ssthresh) (a) Congestion Avoidance: Additive Increment f(b) Congestion Detection: Multiplicative Decrement '=(i) Retransmission on Time-out =(ii) Retransmission on 3 duplicate Ack: Fast Retransmission and Fast Recovery Slow Start © Initial value: 5 cwnd = 1 segment © ewnd is measured in bytes 1 1 segment = MSS bytes o Each time an ACK is received, the congestion window is increased by MSS tes. © cwnd = cwnd + Isegment 1 If an ACK acknowledges two or more segments (cumulative ACK), cwnd is still ncreased by only 1 segment. 15 Evenif ACK acknowledges a segment that is smaller than MSS bytes long, cwnd is still increased by 1 segment. a Does Slow Start increment slowly? Not really. In fact, the increase of cwnd can be exponential Slow start Example a © The congestion window size grows very rapidly 0 For every ACK, we increase cwnd by 1 irrespective of the number of segments ACK’ed. 5 TCP slows down the increase of cwnd and goes into congestion avoidance mode when ewnd >= ssthresh ©) Congestion Avoidance-Additive Increment a a a If cwnd< ssthresh then Each time an Ack is received: cwnd = cwnd + 7 else /* cwnd >= ssthresh */ Each time an Ack Is received : swnd = cwnd + 1 /[ cwnd ] endif A Biswas © Example of Slow Start/Congestion Avoidance Assume that ssthresh = 8 147 12 + 10 + 8+ oN nO & & oe A.Biewos ©) Detecting Congestion aaa ee a © Most often, a packet loss in a network is due to an overflow at a congested router (rather than due to a fransmission error) © TCP assumes there is congestion if it detects a packet loss © ATCP sender can detect a packet loss via: © Timeout of a retransmission timer 1 Receipt of a duplicate ACK (receiver resends last ACK when it receives an out of order packet — Le. revel Seq No. = Ack No. ) A. Biewos ©) Congestion Detection-Multiplicative Decrement a © Congestion is assumed if sender has timed-out or received a duplicate ACK © Each time when congestion occurs, © cwnd is reset to one: ound = 1 ssthresh Is set to half the current size of the congestion window: ssthressh = [cwnd / 2] © and slow-start is entered © This is also referred as TCP Tahoe or Classic TCP TCP Tahoe Plotting Example ee © Atypical plot of cwnd for a TCP connection (MSS = 1500 bytes) with TCP Tahoe: — A.Biewor ow @) TCP Error Control es = TCP implements a variation of the Go-back-N retransmission scheme © That means that if a packet is lost, all subsequent packets are dropped by the receiver -> sender has to retransmit all packets starting from “lost” packet ‘= The reception of each subsequent packet from the sender triggers the transmission of an ACK packet, with the ACKNo repeating the SeqNo. of the missing packet -> Duplicate ACKs (DUPAck) = TCP Tahoe reacts after receiving the 3° DUPAck by retransmitting that packet and all subsequent packets. © TCP uses cumulative ACKs. Several received packets can be ACKed by one ACK by sending an ACKNo that corresponds to the last correctly received consecutive packet ©) Fast Retransmit-TCP Tahoe a SS = TCP couples error control and congestion control (i.e., it assumes that errors (losses) are caused by congestion) © Two conditions will cause TCP to go into Slow Start Mode (from any state): © A timeout occurs for « transmitted packet - causes a retransmission and go back to SLOW START mode | When 3 DUPAcks are received TCP will assume packet is lost, retransmit and go back into SLOW START mode © It does not wait for timeout, once get 3 DUPAck starts retransmitting i.e. Fast Retransmission © Note that when a packet is received by TCP and an error is detected the receiver will discard the packet and send a DUPAck repeating the last ACK No. it sent out. DUPAcks are also sent when packets are received out of order. o @) Fast Recovery-TCP Reno 5 In TCP Tahoe, with 3 DUPAck starts fast retransmission but goes into slow start i.e. cwnd=1, ssthresh=cwnd/2 yields slow recovery from congestion state 5 So, accelerated recovery implemented - Fast Recovery © After a fas retransmit is sen, it goes into Fast Recovery Mode using (current CWND}/2 a8 new SSThresh and the new CWND = new $SThresh + 3 © Le. SSThresh=cwnd/2 and cwnd=SSThresh+3 & When in Fast Recovery: © if a timeout occurs for retransmitted packet, you go into SLOW START mode with $SThre: CWND/2, and CWND = 1. © if you receive an ACK for retransmitted packet you go back into Congestion Avoidance mode with CWND = SSThresh A. Biewor © Techniques to Improve QoS (Quality of Services) 2 © Four Common Methods are: 1 Scheduling-FIFO Queuing, Priority Queuing, and Weighted Fair Queuing 1 Traffic Shaping-Leaky Bucket and Token Bucket © Admission Control 15 Resource Reservation ABawor ®) Scheduling © Packets from different flows arrive at switch or router for scheduling. 5 A good scheduling technique treats the different flows in a fair and appropriate manner. 5 FIFO Queuin 5 Priority Queuing 5 Weighted fair Queuing A.Bawar ) FIFO Queuing © Packets wait in a buffer (queve) until the node (router or switch) is ready to process them. 0 If the average arrival rate is higher than the average processing rate, the queue will fill up and new packets will be discarded. Arrival ©) Priority Queuing © Packets are first assigned to a priority class. Each priority class has its own queve. © The packets in the highest-priority queve are processed first. Packets in the lowest- priority queve are processed last. © Note that the system does not stop serving a queue until it is empty. The switch tars to the ther = qucue when the current one is empy. Amival Departure A.Biewos ©) Weighted fair Queuing cont... De © The packets are still assigned to different classes and admitted to different queues. 5 The queues, however, are weighted based on the priority of the queues; higher priority means a higher weight. 5 The system processes packets in each queue in a round-robin fashion with the number of packets selected from each queue based on the corresponding weight. © For example, if the weights are 3, 2, and 1, three packets are processed from the first queue, two from the second queue, and one from the third queve Arrival The tuming switch selects 3 packets from first queue, then 2 packets from the second queue, then | packet from the third queue. The cycle repeats Departure ©) Traffic Shaping BS © Leaky Bucket olf a bucket has a small hole at the bottom, the water leaks from the bucket at a constant rate as long as there is water in the bucket. The rate at which the water leaks does not depend on the rate at which the water is input to the bucket unless the bucket is empty. 1 The input rate can vary, but the output rate remains constant. © Similarly, in networking, a technique called leaky bucket can smooth out bursty traffic. © Bursty chunks are stored in the bucket and sent out at an average rate. A Bios @) Leaky Bucket Example & Implementation [— 12Mope aides [Lsaky buskst algorithm 12345678910 Remove pacts | ror conan N Aviva Full) Processor fe Departure 4 1-1-1 7 Gone 0 234567E510 + Dhecend Tackencaan A. Biswas Ay (@) Token Bucket ————————————— © The leaky bucket is very restrictive. It does not credit an idle host. © The token bucket algorithm allows idle hosts to accumulate credit for the future in the form of tokens. © For each tick of the clock, the system sends n tokens to the bucket. © The system removes one token for every cell (or byte) of data sent. A leaky bucket algorithm shapes bursty traffic into fixed-rate traffic by averaging the data rate. It may drop the packets if the bucket is full. The token bucket allows bursty traffic at a regulated maximum rate. ©) Token Bucket Example = One token added pertick (©) Resource Reservation and Admission Control = Resource Reservation A flow of data needs resources such as a buffer, bandwidth, CPU time, and so on. 1 The quality of service is improved if these resources are reserved beforehand. = Admission Control 1 The mechanism used by a router, or a switch, to accept or reject a flow based on predefined parameters called flow specifications. 5 Before a router accepts a flow for processing, it checks the flow specifications to see if its capacity (in terms of bandwidth, buffer size, CPU speed, etc.). a It also checks previous commitments to other flows can handle the new flow. ABirwos

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy