You are on page 1of 11

Congestion Control

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

In general, we can divide congestion control mechanisms into two broad categories:
open-loop congestion control (prevention) and closed-loop congestion control
(removal) as shown in Figure 4.27.
 
1. Open-Loop Congestion Control
 
In open-loop congestion control, policies are applied to prevent congestion before it
happens. In these mechanisms, congestion control is handled by either the source or
the destination.
 
a.   Retransmission Policy
 
Retransmission is sometimes unavoidable. If the sender feels that a sent packet is
lost or corrupted, the packet needs to be retransmitted. Retransmission in general
may increase congestion in the network. However, a good retransmission policy can
prevent congestion. The retransmission policy and the retransmission timers must be
designed to optimize efficiency and at the same time prevent congestion. For
example, the retransmission policy used by TCP (explained later) is designed to
prevent or alleviate congestion.
 
b.   Window Policy
 
The type of window at the sender may also affect congestion. The Selective Repeat
window is better than the Go-Back-N window for congestion control. In the Go-Back-
N window, when the timer for a packet times out, several packets may be resent,
although some may have arrived safe and sound at the receiver. This duplication
may make the congestion worse. The Selective Repeat window, on the other hand,
tries to send the specific packets that have been lost or corrupted.
 
c.   Acknowledgment Policy
 
The acknowledgment policy imposed by the receiver may also affect congestion. If
the receiver does not acknowledge every packet it receives, it may slow down the
sender and help prevent congestion. Several approaches are used in this case. A
receiver may send an acknowledgment only if it has a packet to be sent or a special
timer expires. A receiver may decide to acknowledge only N packets at a time. We
need to know that the acknowledgments are also part of the load in a network.
Sending fewer acknowledgments means imposing fewer loads on the network.
 
d.   Discarding Policy
 
A good discarding policy by the routers may prevent congestion and at the same
time may not harm the integrity of the transmission. For example, in audio
transmission, if the policy is to discard less sensitive packets when congestion is
likely to happen, the quality of sound is still preserved and congestion is prevented or
alleviated.
 
e.   Admission Policy
 
An admission policy, which is a quality-of-service mechanism, can also prevent
congestion in virtual-circuit networks. Switches in a flow, first check the resource
requirement of a flow before admitting it to the network. A router can deny
establishing a virtual circuit connection if there is congestion in the network or if there
is a possibility of future congestion.
 
2. Closed-Loop Congestion Control
 
Closed-loop congestion control mechanisms try to alleviate congestion after it
happens. Several mechanisms have been used by different protocols.
a. Backpressure
 
The technique of backpressure refers to a congestion control mechanism in which a
congested node stops receiving data from the immediate upstream node or nodes.
This may cause the upstream node or nodes to become congested, and they, in
turn, reject data from their upstream nodes or nodes. And so on. Backpressure is a
node-to-node congestion control that starts with a node and propagates, in the
opposite direction of data flow, to the source. The backpressure technique can be
applied only to virtual circuit networks, in which each node knows the upstream node
from which a flow of data is corning. Figure 4.28 shows the idea of backpressure.
Node III in the figure has more input data than it can handle. It drops some packets
in its input buffer and informs node II to slow down. Node II, in turn, may be
congested because it is slowing down the output flow of data. If node II is congested,
it informs node I to slow down, which in turn may create congestion. If so, node I
inform the source of data to slow down. This, in time, alleviates the congestion. Note
that the pressure on node III is moved backward to the source to remove the
congestion.
 
b.   Choke Packet
 
A choke packet is a packet sent by a node to the source to inform it of congestion.
Note the difference between the backpressure and choke packet methods. In
backpressure, the warning is from one node to its upstream node, although the
warning may eventually reach the source station. In the choke packet method, the
warning is from the router, which has encountered congestion, to the source station
directly. The intermediate nodes through which the packet has traveled are not
warned. We have seen an example of this type of control in ICMP. When a router in
the Internet is overwhelmed with IP datagrams, it may discard some of them; but it
informs the source host, using a source quench ICMP message. The warning
message goes directly to the source station; the intermediate routers, and does not
take any action. Figure 4.29 shows the idea of a choke packet.

c. Implicit Signaling

In implicit signaling, there is no communication between the congested node or


nodes and the source. The source guesses that there is congestion somewhere in
the network from other symptoms. For example, when a source sends several
packets and there is no acknowledgment for a while, one assumption is that the
network is congested. The delay in receiving an acknowledgment is interpreted as
congestion in the network; the source should slow down.
 
d.   Explicit Signaling
 
The node that experiences congestion can explicitly send a signal to the source or
destination. The explicit signaling method, however, is different from the choke
packet method. In the choke packet method, a separate packet is used for this
purpose; in the explicit signaling method, the signal is included in the packets that
carry data. Explicit signaling, as we will see in Frame Relay congestion control, can
occur in either the forward or the backward direction.
 
i. Backward Signaling
 
A bit can be set in a packet moving in the direction opposite to the congestion. This
bit can warn the source that there is congestion and that it needs to slow down to
avoid the discarding of packets.
 
ii. Forward Signaling
 
A bit can be set in a packet moving in the direction of the congestion. This bit can
warn the destination that there is congestion. The receiver in this case can use
policies, such as slowing down the acknowledgments, to alleviate the congestion.

Leaky bucket algorithm


 Difficulty Level : Easy
 Last Updated : 23 Nov, 2021
In the network layer, before the network can make Quality of service guarantees, it
must know what traffic is being guaranteed. One of the main causes of congestion is
that traffic is often bursty. 
To understand this concept first we have to know little about traffic shaping. Traffic
Shaping is a mechanism to control the amount and the rate of the traffic sent to the
network. Approach of congestion management is called Traffic shaping. Traffic
shaping helps to regulate rate of data transmission and reduces congestion.
There are 2 types of traffic shaping algorithms:
 
1. Leaky Bucket
2. Token Bucket
Suppose we have a bucket in which we are pouring water in a random order but we
have to get water in a fixed rate, for this we will make a hole at the bottom of the
bucket. It will ensure that water coming out is in a some fixed rate, and also if bucket
will full we will stop pouring in it.
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.
 

In the figure, we assume that the network has committed a bandwidth of 3 Mbps for
a host. The use of the leaky bucket shapes the input traffic to make it conform to this
commitment. In Figure the host sends a burst of data at a rate of 12 Mbps for 2 s, for
a total of 24 Mbits of data. The host is silent for 5 s and then sends data at a rate of 2
Mbps for 3 s, for a total of 6 Mbits of data. In all, the host has sent 30 Mbits of data in
10 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. We can also see that the
leaky bucket may prevent congestion.
A simple leaky bucket algorithm can be implemented using FIFO queue. A FIFO
queue holds the packets. If the traffic consists of fixed-size packets (e.g., cells in
ATM networks), the process removes a fixed number of packets from the queue at
each tick of the clock. If the traffic consists of variable-length packets, the fixed
output rate must be based on the number of bytes or bits.
The following is an algorithm for variable-length packets: 
 
1. Initialize a counter to n at the tick of the clock.
2. If n is greater than the size of the packet, send the packet and decrement
the counter by the packet size. Repeat this step until n is smaller than the
packet size.
3. Reset the counter and go to step 1.
Example – Let n=1000 
Packet=
 
Since n> front of Queue i.e. n>200 
Therefore, n=1000-200=800 
Packet size of 200 is sent to the network. 
 

Now Again n>front of the queue i.e. n > 400 


Therefore, n=800-400=400 
Packet size of 400 is sent to the network. 
 

Since n< front of queue 


Therefore, the procedure is stop. 
Initialize n=1000 on another tick of clock. 
This procedure is repeated until all the packets are sent to the network.
Routing
o A Router is a process of selecting path along which the data can be
transferred from source to the destination. Routing is performed by a special
device known as a router.
o A Router works at the network layer in the OSI model and internet layer in
TCP/IP model
o A router is a networking device that forwards the packet based on the
information available in the packet header and forwarding table.
o The routing algorithms are used for routing the packets. The routing algorithm
is nothing but a software responsible for deciding the optimal path through
which packet can be transmitted.
o The routing protocols use the metric to determine the best path for the packet
delivery. The metric is the standard of measurement such as hop count,
bandwidth, delay, current load on the path, etc. used by the routing algorithm
to determine the optimal path to the destination.
o The routing algorithm initializes and maintains the routing table for the
process of path determination.

Routing Metrics and Costs

Routing metrics and costs are used for determining the best route to the destination.
The factors used by the protocols to determine the shortest path, these factors are
known as a metric.
Metrics are the network variables used to determine the best route to the destination.
For some protocols use the static metrics means that their value cannot be changed
and for some other routing protocols use the dynamic metrics means that their value
can be assigned by the system administrator.

The most common metric values are given below:


o Hop count: Hop count is defined as a metric that specifies the number of
passes through internetworking devices such as a router, a packet must travel
in a route to move from source to the destination. If the routing protocol
considers the hop as a primary metric value, then the path with the least hop
count will be considered as the best path to move from source to the
destination.
o Delay: It is a time taken by the router to process, queue and transmit a
datagram to an interface. The protocols use this metric to determine the delay
values for all the links along the path end-to-end. The path having the lowest
delay value will be considered as the best path.
o Bandwidth: The capacity of the link is known as a bandwidth of the link. The
bandwidth is measured in terms of bits per second. The link that has a higher
transfer rate like gigabit is preferred over the link that has the lower capacity
like 56 kb. The protocol will determine the bandwidth capacity for all the links
along the path, and the overall higher bandwidth will be considered as the
best route.
o Load: Load refers to the degree to which the network resource such as a
router or network link is busy. A Load can be calculated in a variety of ways
such as CPU utilization, packets processed per second. If the traffic
increases, then the load value will also be increased. The load value changes
with respect to the change in the traffic.
o Reliability: Reliability is a metric factor may be composed of a fixed value. It
depends on the network links, and its value is measured dynamically. Some
networks go down more often than others. After network failure, some
network links repaired more easily than other network links. Any reliability
factor can be considered for the assignment of reliability ratings, which are
generally numeric values assigned by the system administrator.

Types of Routing

Routing can be classified into three categories:


28.1M
540
History of Java
o Static Routing
o Default Routing
o Dynamic Routing

Static Routing
o Static Routing is also known as Nonadaptive Routing.
o It is a technique in which the administrator manually adds the routes in a
routing table.
o A Router can send the packets for the destination along the route defined by
the administrator.
o In this technique, routing decisions are not made based on the condition or
topology of the networks
Advantages Of Static Routing
Following are the advantages of Static Routing:
o No Overhead: It has ho overhead on the CPU usage of the router. Therefore,
the cheaper router can be used to obtain static routing.
o Bandwidth: It has not bandwidth usage between the routers.
o Security: It provides security as the system administrator is allowed only to
have control over the routing to a particular network.
Disadvantages of Static Routing:
Following are the disadvantages of Static Routing:
o For a large network, it becomes a very difficult task to add each route
manually to the routing table.
o The system administrator should have a good knowledge of a topology as he
has to add each route manually.
Default Routing
o Default Routing is a technique in which a router is configured to send all the
packets to the same hop device, and it doesn't matter whether it belongs to a
particular network or not. A Packet is transmitted to the device for which it is
configured in default routing.
o Default Routing is used when networks deal with the single exit point.
o It is also useful when the bulk of transmission networks have to transmit the
data to the same hp device.
o When a specific route is mentioned in the routing table, the router will choose
the specific route rather than the default route. The default route is chosen
only when a specific route is not mentioned in the routing table.
Dynamic Routing
o It is also known as Adaptive Routing.
o It is a technique in which a router adds a new route in the routing table for
each packet in response to the changes in the condition or topology of the
network.
o Dynamic protocols are used to discover the new routes to reach the
destination.
o In Dynamic Routing, RIP and OSPF are the protocols used to discover the
new routes.
o If any route goes down, then the automatic adjustment will be made to reach
the destination.

The Dynamic protocol should have the following features:


o All the routers must have the same dynamic routing protocol in order to
exchange the routes.
o If the router discovers any change in the condition or topology, then router
broadcast this information to all other routers.
Advantages of Dynamic Routing:
o It is easier to configure.
o It is more effective in selecting the best route in response to the changes in
the condition or topology.
Disadvantages of Dynamic Routing:
o It is more expensive in terms of CPU and bandwidth usage.
o It is less secure as compared to default and static routing.
What is network simulation in computer network?
In computer network research, network simulation is a technique whereby a
software program replicates the behavior of a real network. This is achieved by
calculating the interactions between the different network entities such as routers,
switches, nodes, access points, links, etc.
What is simulation in computing?
computer simulation, the use of a computer to represent the dynamic responses
of one system by the behaviour of another system modeled after it. A
simulation uses a mathematical description, or model, of a real system in the form of
a computer program.

Why is network simulation important?


Network simulation offers an efficient, cost-effective way to assess how the
network will behave under different operating conditions. Simulation results can
be analyzed to assess network performance, identify potential problems, understand
the root cause, and resolve the issues prior to deployment.

What are the key issues of computer network?


The Five Most Common Computer Network Issues for Businesses
1. Using Outdated Hardware or Software. Equipment and software that isn't
updated or patched on a regular basis leave your network wide open for
attackers. ...
2. No Data Backups. ...
3. Bad Network Connectivity. ...
4. Security Leaks. ...
5. Lack of IT User Support.

Network Simulator 3
 Difficulty Level : Easy
 Last Updated : 08 Aug, 2019
Network simulator is a tool used for simulating the real world network on one
computer by writing scripts in C++ or Python. Normally if we want to perform
experiments, to see how our network works using various parameters. We don’t
have required number of computers and routers for making different topologies.
Even if we have these resources it is very expensive to build such a network for
experiment purposes.
So to overcome these drawbacks we used NS3, which is a discrete event network
simulator for Internet. NS3 helps to create various virtual nodes (i.e., computers in
real life) and with the help of various Helper classes it allows us to install devices,
internet stacks, application, etc to our nodes.
Using NS3 we can create PointToPoint, Wireless, CSMA, etc connections between
nodes. PointToPoint connection is same as a LAN connected between two
computers. Wireless connection is same as WiFi connection between various
computers and routers. CSMA connection is same as bus topology between
computers. After building connections we try to install NIC to every node to enable
network connectivity.
When network cards are enabled in the devices, we add different parameters in the
channels (i.e., real world path used to send data) which are data-rate, packet size,
etc. Now we use Application to generate traffic and send the packets using these
applications.
Ns3 gives us special features which can be used for real life integrations. Some of
these features are:
1. Tracing of the nodes:
NS3 allows us to trace the routes of the nodes which helps us to know
how much data is send or received. Trace files are generated to monitor
these activities.
2. NetAnim:
It stands for Network Animator.It is an animated version of how network
will look in real and how data will be transferred from one node to other.
3. Pcapfile:
NS3 helps to generate pcap file which can be used to get all information of
the packets (e.g., Sequence number, Source IP, destination IP, etc).
These pcaps can be seen using a software tool known as wireshark.
4. gnuPlot:
GnuPlot is used to plot graphs from the data which we get from trace file of
NS3. Gnuplot gives more accurate graph compare to other graph making
tools and also it is less complex than other tools.

Computer simulation
A computer simulation is an application designed to imitate a real-life situation. An
example is software which simulates the experience of piloting a plane.
Part of
ICT
Modelling and simulation

Advantages and disadvantages of simulation


Advantages

 It can avoid danger and loss of life.


 Conditions can be varied and outcomes investigated.
 Critical situations can be investigated without risk.
 It is cost effective.
 Simulations can be sped up so behaviour can be studied easily over a long
period of time.
 Simulationscan be slowed down to study behaviour more closely.
Disadvantages

 Itcan be expensive to measure how one thing affects another, to take the
initial measurements and to create the model itself (such as aerodynamic
wind tunnels).
 To simulate something, a thorough understanding is needed and an
awareness of all the factors involved. Without this, a simulation cannot be
created.

You might also like