Module 3Congestion
Module 3Congestion
• If the sender feels that a sent packet is lost or corrupted, the packet needs to be
retransmitted.
• For applications such as audio and video, the first case is completely
acceptable; the second case is not.
• For these applications, it does not matter if the packets arrive with a
short or long delay as long as the delay is the same for all packets. For
this application, the second case is not acceptable.
Bandwidth
• The queues, however, are weighted based on the priority of the queues; higher priority
means a higher weight.
• 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 queue. If the system does not
impose priority on the classes, all weights can be equal In this way, we have fair queuing
with priority.
Traffic Shaping
• Two techniques can shape traffic: leaky bucket and token bucket.
Leaky Bucket
• If 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.
• The input rate can vary, but the output rate remains constant.
• Similarly, in networking, a technique called leaky bucket can smooth out
burst traffic.
• Bursty chunks are stored in the bucket and sent out at an average rate.
• In Figure the host sends a burst of data at a rate of 12 Mbps for 2 s,
• The leaky bucket smooths the traffic by sending out data at a rate of 3
Mbps during the same 10 s.
• Without the leaky bucket, the beginning burst may have hurt the
network by consuming more bandwidth than is set aside for this host
Token Bucket
• For example, if a host is not sending for a while, its bucket becomes empty.
• Now if the host has bursty data, the leaky bucket allows only an average
rate.
• The time when the host was idle is not taken into account.
• Token bucket allows idle hosts to accumulate credit for the future in the
form of tokens.
• The system removes one token for every cell of data sent.
• For each clock tick, the system sends n tokens to the bucket.
• If n is 100 and the host is idle for 100 ticks, the bucket collects 10000
tokens.
• Host can now consume all these tokens with 10 cells per tick.
Resource Reservation