More Related Content
More from Ijarcsee Journal
More from Ijarcsee Journal (20)
109 113
- 1. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
Performance analysis of networks using RED
for congestion control
Ms. Banshri Raichana and Mrs. Sangeeta Kulkarni
RED monitors the average queue size and marks
Abstract— Congestion avoidance techniques packets. If the buffer is almost empty, all incoming
monitor network traffic load in an effort to packets are accepted. As the queue grows, the
anticipate and avoid congestion at common probability for dropping an incoming packet grows
network bottlenecks. Congestion avoidance is too. When the buffer is full, the probability has
achieved through packet dropping. Among the reached 1 and all incoming packets are dropped. Thus
more commonly used congestion avoidance RED buffer mechanism with constant bit rate traffic
mechanisms is Random Early Detection (RED), can be used at an initial stage to understand the
which is optimum for high-speed transit networks. effect of change of network parameters over system
Random early detection (RED) is an active queue performance.
management algorithm. It not only detects but
RED aims to control the average queue size by
also avoids congestion by randomly dropping
indicating to the end hosts when they should
packets to notify congestion. The main objective of
temporarily slow down transmission of packets.
this paper is to comprehend the working of RED
RED takes advantage of the congestion control
algorithm and to learn the effects of variation of
mechanism of TCP by randomly dropping packets
RED parameters. To improve the performance of
prior to periods of high congestion, RED tells the
a network in terms of drop count, efficiency,
packet source to decrease its transmission rate.
throughput and delay we can optimize our choice
Assuming the packet source is using TCP, it will
of these RED parameters.
decrease its transmission rate until all the packets
Index Term - Congestion, Delay, Drop count, RED, reach their destination, indicating that the congestion
RED parameters, Throughput, is cleared.
I. INTRODUCTION The network designing and simulation here is
accomplished using NS2 (network simulator version
Congestion occurs when the resource demands
2). NS2 is an event-driven network simulator
exceed the network capacity. At some point of time
embedded into the Tool Command Language (Tcl).
network buffers go full and packets are dropped.
An extensible simulation engine which is
During congestion, the network throughput drops
implemented in C++ and is configured and controlled
whereas end to end delay increases. In order to
via a Tcl interface. A network topology is defined,
overcome this situation a congestion avoidance
traffic sources and sinks are configured, statistics are
scheme must be employed. One such method is
collected, and then simulation is invoked using the
Random Early Detection (RED).
'ns' command.
Random early detection (RED) is an active queue
In general, C++ is used for implementing protocols
management algorithm. It is also a congestion
and extending the ns-2 library. OTcl is used to create
avoidance algorithm. In the conventional tail drop
and control the simulation environment and also for
algorithm, a router or other network component
selection of output data. Simulation is run at the
buffers as many packets as it can, and simply drops
packet level, allowing visualization of detailed
the ones it cannot buffer. If buffers are constantly
results.
full, the network is congested. Tail drop distributes
buffer space unfairly among traffic flows. Tail drop The network can be designed to implement
can also lead to TCP global synchronization as all bottleneck and packet drop scenario. Using the
TCP connections "hold back" simultaneously, and available tools of NS2 we can implement the network
then "step forward" simultaneously. Networks congestion avoidance algorithm Random Early
become under-utilized and flooded by turns. RED Detection (RED), then by varying the RED
addresses these issues. parameters discussed in section II we can observe the
effect on network performance.
109
All Rights Reserved © 2012 IJARCSEE
- 2. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
II. DESIGNING THE NETWORK wq the queue weight factor which is used in
computing the average queue size. maxp the
There are four basic steps to design and simulate any maximum dropping probability.
network. First step is to develop a model
(implementation of a protocol); second step is to The RED parameters set in our simulation were
create a simulation scenario (designing a network minimum threshold to5 maximum threshold to 15
topology and traffic scenario); third step is to choose maxp to 0.02 wq to 0.001 and queue size of 35.
and collect statistics through simulation, and finally
fourth step is to visualize simulation and analyze III. RANDOM EARLY DETECTION ALGORITHM
simulation results using awk scripting language.
The most distinct factor of RED is that it does not
As shown in Fig.1, a network with four nodes
operate on instantaneous queue size its functioning is
(Node0, Node1, Node2, Node3) has been designed.
based on average queue size. When a packet arrives
Node 0 and Node1 are sources with FTP aggents
at the RED gateway it calculates the average queue
attached over TCP. Node 3 is the sink for both the
size, using a low-pass filter with an exponential
source nodes. A link with appropriate link type, link
weighted moving average which is given by:
capcity, buffer mechanism is to be defined between
these nodes. In this network, a bottleneck between
avg = avg + wq(q-avg)
node2 and node3 is defined with RED as the buffer
mangement scheme so that we can simulate packet
The average queue size is compared to two
loss and measure overall network perfomance, while
thresholds, a minimum threshold and a maximum
link between node0 and node2 and between node1
threshold. When the average queue size is less than
and node2 would have be droptail mechnaism. The
the minimum threshold, no packets are marked they
simulation time is kept large enough to demonstrate
are enqued into the buffer. When the average queue
congestion behaviour.
size is greater than the maximum threshold, every
arriving packet is marked and discarded. If marked
packets are in fact dropped, or if all source nodes are
cooperative, this ensures that ensures that the average
queue size does not significantly exceed the
maximum threshold.
When the average queue size is between minimum
threshold and maximum threshold, each arriving
packet is marked with the probability which is a
function of average queue size avg. The initial
packet-marking probability pb is given as:
pb = C1avg - C2
C1 = maxp
maxth-minth
C1 = maxp* minth
maxth-minth
The parameters like minth and maxth are user
Fig1. Network simulation window in NS2 defined in the tcl file. While maxp and wq are
constants which can be defined in tcl or their default
In order to perfectly understand the RED algorithm values are taken from ns-default.tcl. After calculating
we must be introduced to the basic RED parameters the packet drop probability, the RED gateways use
The minimum queue threshold minth below which no randomization in choosing which arriving packets to
packets are dropped, maximum queue threshold mark with this method, the probability of marking a
maxth above which all incoming packets are dropped,, packet from a particular connection is roughly
proportional to that connection’s share of the
110
All Rights Reserved © 2012 IJARCSEE
- 3. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
bandwidth through the gateway. In order to do A low minimum threshold achieves high efficiency.
analysis awk files for delay and efficiency have been But a very low minimum threshold would result in
designed to calculate the same and verify the drop under utilization of link and buffer so one must
count to measure the performance of the network. appropriately choose minth
IV. RED PARAMETER ANALYSIS Analysis by varying Maximum Threshold
Signficance of maxp and wq
If we vary the maximum threshold of the bottleneck
Packet marking probability is a linear function of the link buffer from 16 to 30 we see that the efficiency
average queue size. RED gateways perform best when increases in steps, while doing so the other
the packet marking probability changes fairly slowly
parameters of RED are kept constant.
as the average queue size changes. If maxp is set to
1/50 then when average queue size is halfway
between minth and maxth the gateway drops on an
average one out of fifty arriving packets.
The weight wq determines the time constant of low
pass filter The calculation of the average queue size
can be implemented particularly efficiently when wq
is a negative power of two.
Analysis by varying Minimum Threshold
In the network link between the nodes 2 and 3 is
designed with bottleneck and the queuing mechanism
is RED and when minimum threshold of this buffer is
changed from 1 to 14 keeping other parameters
mentioned in section II constant we observe that
efficiency goes on reducing as the number of dropped
packets goes on increasing.
Fig 3 Maximum threshold v/s Efficiecny
Thus we observe from the graph above that higher
the maximum threshold better is the efficiency so we
must choose a very high maximum threshold. But
while doing so if we choose a value that approaches
instantaneous queue size RED gets much shorter
period to notify congestion to sources and congestion
can still occur.
Thus Minimum threshold should be low but should
also maintain link utilization. Max threshold should
be sufficiently high but should allow early detection
and congestion notification. The optimal values for
minth and maxth depend on the desired average
queue size. If the typical traffic is fairly bursty, then
minth must be correspondingly large to allow the link
Fig 2 Minimum threshold v/s Efficiecny utilization to be maintained at an acceptably high
111
All Rights Reserved © 2012 IJARCSEE
- 4. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
level. The optimal value for maxth depends on the
maximum average delay that can be accepted by the
network. Maximum threshold should be at least twice
the minimum threshold. For a queue size of upto 50
min and max threshold values opted are 5 and 15.
Queue Size Variation
For this set of analysis all the RED parameters were
kept constant and queue size was varied. When the
queue size grows it was observed as shown in Fig. 4
that the efficiency too grows but at the same time it
was observed as shown in Fig. 5 that the end to end
delay also increases. This increase in average delay is
an undesired phenomena thus there should be a
tradeoff between maximizing throughput and
minimizing delay.
Fig 5 Queue Size v/s Delay
V. CONCLUSION
The greatest advantage of RED is instead of using
instantaneous queue length RED gateway uses
average queue size short term increase in the queue
size that result from bursty traffic or from transient
congestion do not result in a significant increase in
the average queue size. The only maybe drawback of
RED would be it completely relies upon a TCP based
networks since it expects co-operation from the
sources to reduce their transmission rate when
congestion occurs which would be possible only
through TCP's window mechanism.
For RED to function efficiently it is very essential
to choose optimum values for maximum threshold
and minimum threshold although these depend on
average queue size and the accepted level of delay.
The gateway marks the packets at fairly evenly
spaced intervals, in order to avoid biases and avoid
global synchronization, and to mark packets
Fig 4 Queue Size v/s Efficiecny sufficiently frequently to control the average queue
size.
RED gateways can control the average queue size
while accommodating transient congestion, RED VI. REFERNCES
gateways are well suited to provide high throughput
and low average delay in high speed networks with [1] Introduction to Network Simulator NS2,
TCP connection that have large window sizes. Springer Science + Business Media, LLC,
2009
[2] The ns Manual (formerly ns Notes and
Documentation), The VINIT project, May
2010.
112
All Rights Reserved © 2012 IJARCSEE
- 5. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
[3] NS Simulators for beginners, Lecture notes
2003-2004, Etian Altaman.
[4] Floyd, S., and Jacobson, V., Random Early
Detection gateways for Congestion
Avoidance V.1 N.4, August 1993.
[5] A study of TCP RED congestion control
using RED, Arjit Ganguly, Pasi Lassila, July
2001.
[6] Throughput
http://en.wikipedia.org/wiki/Throughput
[7] Packet and network delay
http://en.wikipedia.org/wiki/Network_delay
[8] AWK
http://en.wikipedia.org/wiki/AWK
113
All Rights Reserved © 2012 IJARCSEE