Network Layer

Congestion

Congestion is occurred when a network layer has message traffic which will slow down network response time.

Effects of congestion:

That network layer also must deal with congestion.

  • At the point, when more bundles go into a subnet that can be delay packets and execution decline.
  • if the situation continue the subnet may have no alternative but to discard packet.
  • If the delay increase, the sender will  Retransmit the packets which makes the situation even worse.
  • Overall performance degrades.

Congestion control policies:

The approach following will include:

  • Monitor the system to delete when and where congestion occurs.
  • pass this data to where something should be possible about it.
  • Change the framework this should be possible by:

The subnet must prevent additional packets from entering the congestion region unit already present can be processed.

The congested router can discard queued  packets to make room for those that are arriving.

Congestion control algorithms:

Congestion control is a method that controls the entry of the data packets into the network.
There are two congestion control algorithm:

Leaky bucket algorithm:

Imagine a container (Bucket) with a little hole in the base taught in figure (a) regardless of at water rate water enters the bucket the flood is at a consistent rate (p). at the point when there is any water in the bucket and zero when the bucket is vacant. Also once the bucket is full any additional water entering in It spills over the sides and is lost( i.e does not appears in the output stream under the whole)
 
 
Congestion

This the same idea can be applied to packets as shown in the figure (b) consequent each host is connected to the network by an interface containing each bucket that is at infinite internal queue if a packet arrived at the bucket when it is full the packet is discarded in order to words if one or more processes under the host try to send a packet when the maximum numbers are already queue the new packages is unceremoniously discarded . This arrangement club be bull into the hardware interface or simulated by the host operating system it was the first produced by tumor 1986 and is called the leaky bucket algorithm.

Token bucket algorithm:

Token bucket , a similar idea of the leaky, however just the thing is here to manage the full figured traffic that happens in the leaky bucket, we want an adaptable so that was in the leaky back case we want reflexible.

the data is not lost, we have to take care that whatever the data that is sending by the host computer will not be lost will not be overflow that is the concept of token bucket algorithm ,

traffic so whatever traffic that is occurring in the Leaky back again that will be overcome in the token bucket so
step by step:
one by one the tokens are thrown into the buckets (f), the bucket has a maximum capacity,a capacity will be allotted to the bucket so whenever the capacity is full it stops taking the tokens.
when the bucket is full then it will send the packets to its destination.

 

Congestion

Difference between Leaky and Token Buckets

  • leaky bucket discarf packets, token bucket does not, it discards tokens.
  • with token bucket, a packet can only be transmitted if there are enough tokens to cover its length in bytes.
  • broken container sends parcels(Packets) at a typical rate.
  • Token bucket allows for large bursts to be send after by speeding up the output.
  • Token bucket allow saving up tokens to send large
  • token bucket does not allow saving.