You are on page 1of 14

Galgotias University

Subject Name:Data Communication and Networking Subject Code: BCSE2370

CAT-3 Presentation
Congestion Control Algorithms

Programme Name: B.Tech CSE


Section:2
Student Name: HARSH CHAUHAN , AMAN KUMAR PANDEY, ABHINAV TRIPATHI
Admission No: 20SCSE1010094, 20SCSE1010067, 20SCSE1010498

Submitted to:
Mr. Mukesh Jha
Galgotias University
CONGESTION

 Congestion state occurs in the network layer when the message traffic is so heavy that it
slows down network response time.
 In other words when too much traffic is offered, congestion sets in and performance
degrades sharply
CONGESTION

 Congestion is an important issue that can arise in packet switched network. Congestion is a
situation in Communication Networks in which too many packets are present in a part of
the subnet, performance degrades.
 Congestion in a network may occur when the load on the network (i.e. the number of
packets sent to the network) is greater than the capacity of the network (i.e. the number of
packets a network can handle). Network congestion occurs in case of traffic overloading.
Causes of Congestion

The various causes of congestion in a subnet are:


1. The input traffic rate exceeds the capacity of the output lines. If suddenly, a stream of
packet start arriving on three or four input lines and all need the same output line.
2. The routers are too slow to perform bookkeeping tasks (queuing buffers, updating tables,
etc.).
3. The routers’ buffer is too limited.
4. Congestion in a subnet can occur if the processors are slow. Slow speed CPU at routers
will perform the routine tasks such as queuing buffers, updating table etc slowly. As a
result of this, queues are built up even though there is excess line capacity.
5. Congestion is also caused by slow links.
Effect of Congestion

Effects of congestion are:


1. As delay increases, performance decreases.
2. If delay increases, retransmission occurs, making situation worse.
3. Queuing Delay 
4. Packet Loss
5.  Blocking of new connections
Congestion Control Algorithm

Congestion Control refers to algorithms and mechanisms that can either prevent congestion,
before it happens, or remove congestion, after it has happened.

There are two Congestion Control Algorithms:


1. Leaky Bucket Algorithm
2. Token Bucket Algorithm
LEAKY BUCKET ALGORITHM

 The leaky bucket algorithm discovers its use in the context of network traffic shaping or
rate-limiting. The algorithm allows controlling the rate at which a record is injected into a
network and managing burstiness in the data rate.
 This algorithm is used to control the rate at which traffic is sent to the network and shape
the burst traffic to a steady traffic stream.
LEAKY BUCKET ALGORITHM

In this algorithm, a bucket with a volume of, say, b bytes and a hole in the Notes bottom is
considered. If the bucket is null, it means b bytes are available as storage.
 A packet with a size smaller than b bytes arrives at the bucket and will forward it.
 If the packet's size increases by more than b bytes, it will either be discarded or queued.
 It is also considered that the bucket leaks through the hole in its bottom at a constant rate
of r bytes per second.
 The outflow is considered constant when there is any packet in the bucket and zero when it
is empty.
 This defines that if data flows into the bucket faster than data flows out through the hole,
the bucket overflows.
LEAKY BUCKET ALGORITHM

The disadvantages of Leaky-bucket Algorithm:-


The Inefficient use of available network resources - The leaky-bucket algorithm does not allow
individual flows to burst up to port speed to effectively consume network resources when there
would not be resource contention in the network instead the leaky bucket algorithm enforces
output patterns at the average rate.

So in order to deal with the busty traffic, we need a


flexible algorithm so that the data is not lost. One
such algorithm is the token bucket algorithm.
TOKEN BUCKET ALGORITHM

It is a control algorithm that indicates when traffic should be sent. This order comes based on the
display of tokens in the bucket. The bucket contains tokens. Each of the tokens defines a packet
of predetermined size. Tokens in the bucket are deleted for the ability to share a packet.
TOKEN BUCKET ALGORITHM

Token bucket algorithm is a control algorithm that indicates when traffic should be sent. This
order comes based on the display of tokens in the bucket. The bucket contains tokens. Each of
the tokens defines a packet of predetermined size. Tokens in the bucket are deleted for the
ability to share a packet

When tokens are shown, a flow to transmit traffic appears in the display of tokens. No token
means no flow sends its packets. Hence, a flow transfers traffic up to its peak burst rate in good
tokens in the bucket
TOKEN BUCKET ALGORITHM

Thus, the token bucket algorithm adds a token to the bucket each 1 / r seconds. The volume of
the bucket is b tokens. When a token appears, and the bucket is complete, the token is discarded.
If a packet of n bytes appears and n tokens are deleted from the bucket, the packet is forwarded to
the network..
When a packet of n bytes appears but fewer than n tokens are available. No tokens are removed
from the bucket in such a case, and the packet is considered non-conformant. The non-
conformant packets can either be dropped or queued for subsequent transmission when sufficient
tokens have accumulated in the bucket.
They can also be transmitted but marked as being non-conformant. The possibility is that they
may be dropped subsequently if the network is overloaded
References

The materials presented in this presentation has been taken from various books and
internet websites. This instruction materials is for instructional purposes only.

 https://ecomputernotes.com/computernetworkingnotes/communication-
networks/what-is-congestion-control-describe-the-congestion-control-algorithm-
commonly-used

 https://www.tutorialspoint.com/what-is-congestion-control-algorithm

https://cis.temple.edu/~
latecki/Courses/CIS61704/slides/Ch5NetworkLayerCongestion.ppt
Thank You…..

You might also like