802.11 CC Project
802.11 CC Project
802.11 CC Project
Abstract—802.11 networks are a set of evolving 802.11 and draw inferences regarding the inner
standards for wireless local area networks developed workings of these networks.
by IEEE. These networks have become extremely The paper follows the following order. Sections 2 and
popular and are found almost everywhere. These 3 look in to details of 802.11. Followed by section 4
networks overcame many problems associated with explaining NS-2 in details. Then we look in to
extreme noise present in air interface and also simulations done using NS-2 in sections 5 and 6.
security issues. In this paper, we will discuss the
fundamental properties of these networks. Then we
will study these networks using NS-2, a network II.802.11
simulator.
The idea of wireless networks is quite compelling. But
it has some fundamental challenges. Radio transmission
is highly susceptible to noise and also signal strength
Index Terms— IEEE 802.11, Network Simulator-2, plays an important role in these systems. Having
CSMA/CA, Contention Window. concrete walls can seriously degrade the quality of signal
making the system inaccessible with short distances. The
medium of communication here is air and it’s
everywhere. This makes it both strongest and weakest
I. INTRODUCTION
point of 802.11. This quality gives us the advantages of
Communication is an important part of livelihood on mobility and at the same time making it insecure. There
this planet. From the evolution of language, is no way we can secure air from eavesdropping. Finally
communicating has played a key role in human lives. In radio communications use spectrum, which is scarce and
recent years, there has been an explosion in regulated. Spectrum issue was addressed by using
communication systems. From analog systems to high- unlicensed bands of 2.5Ghz and 5Ghz. The protocol was
speed digital systems these networks are pervasive. developed to incorporate strong error control and
Initially these were wired and fixed at a particular place. security measures to overcome these problems.
Mobility has become key in present era ability to access Wireless LANs can be divided in to two types: Ad-
information the go provides an advantage to businesses. Hoc and infrastructure LANs. Ad-Hoc networks are
802 standards were first developed for wired LANs temporary in nature. It usually has a group of stations
and then extended to wireless in terms of 802.11. 802.11 communicating with each other and can be formed
are basically a MAC layer specification as were previous spontaneously.
To understand Infrastructure networks we need to look
specification since 802.3. These standards started with
in to concept of Basic Service Set (BSS). BSS is a set of
speeds of 2Mbps and now reached theoretical speeds of
stations coordinating access over a medium.
500Mbps (802.11n). WiFi devices, which use these
Infrastructure networks combine BSSs with a Access
standards for wireless LANs, have made this standard Point and a distribution system combining with a Portal
greatly reachable and popular. Now, we can find 802.11 to internet. These also have options of authenticating
compatible devices in almost all portable computers, stations and privacy options. When Multiple BSSs are
smart phones and gaming consoles. interconnected it’s called an Extended Service Set.
The standard uses features form Ethernet along with To provide compatibility with 802 LANs all MAC
CSMA/CA (Carrier Sense Multiple Access with layers should present same format to LLC so MAC layer
Collision Avoidance). This is basically CSMA version handle the mobility of the stations.
from Ethernet adapted to wireless LANs. In this paper
we study these components of 802.11. We use NS-2 to The 802.11 MAC layer uses coordination functions to
study these networks. NS-2 is basically present determine when stations are allowed to transmit. 802.11
generation network simulator developed using C++ and mainly use Distributed Coordination Function (DCF)
OTCL. We use this to conduct some simulations of under which all stations are in contention for channel.
Another Coordination function, Point Coordination
> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 2
Function (PCF), is optionally included in the frame. If another station obtains this channel before
specification. In this the access point can describe back-off slot expires then the timer restarts again when
contention and contention free periods. Contention free the contention period starts. This means that stations
period gives AP the control on who gets the channel waiting for longer time can obtain the channel earlier
eliminating any contention. than newer stations waiting. This introduces some
amount of fairness in sharing of the wireless channel.
When a station fails on transmission, didn’t receive
A. Distributed Coordination Function:
ACK frame with in time out, then for re-transmission the
DCF supports asynchronous data transmission on best back-off slot number is not selected from [0,CWmin] but
effort basis. Ad-Hoc networks use only DCF while is doubled until CWmax is reached. If the number of re-
infrastructure networks can use both DCF and PCF. This transmissions exceeds a certain value the frame is
function sits over physical layer. DCF is mainly based dropped and CW value is reset to its minimum. This
on CSMA/CA (Carrier Sense Multiple Access/Collision time frame is vendor dependant.
Avoidance) protocol. One thing we can understand from this is that if
CSMA was first used in 802.3 LANs where it used CWmin value is high station may needed to wait longer
collision detection. In CSMA, nodes check if channel is than necessary to transmit reducing throughput. In
idle to start a transmission. In 802.3 LANs when a 802.11 standard CW value is defaulted to 31. When
channel detects collision it backs off for a certain slot stations in the system are low, smaller CW sizes can
time and wais for channel to get idle. This method works provide better throughput. In following sections we will
fine in a wired medium where it is possible to detect explore this using simulations of a five-node network.
collision using electrical energy of signal. But in 802.11 networks suffer from a problem called hidden
wireless medium detecting collision is nearly node problem. For example take 3 nodes A, B, C where
impossible. There are many interfaces in the medium, B can see A and C while A and C are unaware of each
which can’t be controlled, and also the factor of mobility other existence. So A can think that B is idle and start
of stations makes detection not feasible on a noisy transmission but in reality C is already transmitting to B.
channel. To avoid collisions a mechanism called RTS/CTS is
To overcome this problem the protocol with Collision employed. For example if A wants to transmit to B, it
Avoidance was developed. Since collisions can’t be sends a RTS packet B and if B is idle it sends a CTS
detected we avoid them. Here each station tries to obtain packet to all the stations in its range. So C knows that Bb
the channel at times generated randomly. CSMA/CA is already in transmission and wait till that transmission
works by making the channel idle for certain period after ends.
a transmission. This time is called inter-frame Space This method is disabled by default in 802.11
(IFS). networks. This is because usually WLANs are simple
The IFS depends on priority of frames. If it’s a high enough and don’t require this and also using RTS/CTS
priority frame like a ACK frame waits smaller time can degrade the throughput of the system.
called SIFS (short IFS). Then there is normal waiting Since we are going to deal with Ad-Hoc networks ony
time called DIFS (DCF IFS), which applies to normal in this paper, we aren’t discussing PCF which is not
data. There is an intermediate IFS called PIFS used by possible in Ad-Hoc Networks.
PCF when contention free period is set. Along with deciding channel access to stations, 802.11
Every station has to wait for a random Back-Off time MAC layer has to take care of protocol data unit
when it fails to obtain the channel. This random number addressing, frame formatting, error checking,
is chose using Contention Window. A value CWmin is fragmentation and reassembly. It also manages the
set and each channel chooses a random number between security and power management of the stations.
[0,CWmin] which specifies the Back-Off slots. Time of
each Back-Off slot is determined by PHY layer
parameter slot time. This time differs for standards like
802.11b uses 20 microseconds while 802.11g- only uses
9 microseconds. One thing to remember here is that to
provide backward compatibility 802.11g+802.11b can III. NETWORK SIMULATOR-2
use 20 microseconds if any legacy devices are also Network Simulator is a discrete event simulator
present in network. developed at UC Berkley in C++ and OTcl. It schedules
So when a station transmits a frame and on successful events like packet transmission and timer expiration.
receipt of ACK frame, it waits for specifies DIFS and Since it is a discrete event scheduler it can’t simulate
random contention slot it selected to transmit the next events in parallel but that’s not a problem for most
> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 3
simulations. The simulator includes protocol sink. It is a simple and best way to analyze the system
implementations for most network components. It can involving multiple connections. We will use these tools
simulate UDP, TCP agents, it can generate application to analyze the network and deduce our observations.
traffic like FTP, CBR (Constant Bit Rate), VBR To create a wireless network we need to specify
(Variable Bit Rate). It also simulates various queuing various properties like method of prorogation, Antenna
systems like DropTail. The wireless extensions were type, Interface queue length and routing type. Figure2
derived from CMU Monarch Project.
NS-2 has two components C++ implementations of
various network components and Tcl scripts to access
those classes. NS is a OTcl interpreter with network
simulation object libraries. OTcl scripts uses objects
from these libraries to create overlay of a network.
Nodes, TCP and UDP agents, scheduling these agents,
bandwidth of links, RTS thresholds, etc all can be
changed using simple objects. We can also access the
C++ libraries in order make any custom objects are
changes.
Ns-2 produces a trace file after completion of Figure2 Properties of Wireless Channel in NS-2 Code
simulation. Studying this trace file gives us the
information we need to understand the workings of the shows a snippet from the code written for simulations
simulation. Each line in trace file starts with an
corresponding to wireless properties.
abbreviation for a event like receive, send, drop, enqueue
and dequeue. Followed by information about nodes that
We create a grid where we place the nodes at specific
it originated or reached, Network Trace level destination
and source address. Parsing these files we obtain packets positions and we can also specify their movement speed
received and dropped and calculate throughput, delay with respect to each other. One thing to remember in
and other parameters of the system. practical implementation RTS/CTS is off by default, but
NAM is another tool with ns-2. It gives us a graphical in NS-2 it’s on by default. To disable this we need to set
representation of the network and packets traversing RTS threshold to 3000, which is, enable RTS only when
through the network. It helps to have cursory glance and packet size is 3000, which will be never.
deduce some events happening in the simulation. Now in next sections we do simulations with above
Figure1 shows a example of graphical representation of settings. First we will see how RTS/CTS affects the
a wired network. system and how effective is it. And next we will see how
contention window affects the throughput of a five-node
network.
IV. SIMULATIONS
In this section, we will see some few simulation
scenarios to understand these networks in detail. First we
will see a simple scenario of four nodes where adjacent
nodes are in range to one another. Then we will simulate
disable it I set the RTS threshold as 3000. This means and yellow show packets received and lost at node 2.
that RTS is switched on only when packet size is more here we can see node 2 had pretty much perfect
than 3000, which will be never. transmission. While node 3 did not have perfect
In first simulation as been told previously 4 nodes are transmission in fact it lost quite an amount of packets.
present. Topology size is 600x600 and nodes are placed This is because node 2 is a busy receiving packet from 3
with 250 units of distance separating them. In figure 3, and queue at 1 gets full and packets start dropping. Now
We can see the arrangement. we may expect RTS/CTS may improve this situation. In
All nodes are connected to a TCP agent with a next simulation RTS/CTS was on.
constant bit rate. In this simulation we are going to look In figure 5 we see the statistics with RTS/CTS on .H
it to how ongoing transmissions affect each other even if ere we see even more degradation of service here.
RTS/CTS is present. To see how this affects the packets RTS/CTS is not failing in prevention of collisions but in
we simply look how many packets are lost and reached the aim of stopping the collisions its keeping the nodes
at respective nodes. in waiting. The reason here is nodes need to wait extra
To do this we add an agent called loss monitor to the time to start their transmission. This gives node to not
destination nodes. Loss monitor simply counts the transmit when node is busy. But it doesn't make a
packets, which were received or lost due to insufficient difference since they are interfering with each other and
queue in the system. We capture this data in to a trace packets are being lost because queues are getting filled.
file. We load these files using x-graph and we see the As you can see even node 2 saw loss of packets, which
statistics of the system. was, not see previously. Here because of the entire
The first configuration is one where we connect node waiting involved queue get full and packets start to drop.
1 to node 3 and node 3 to node 2. The simulation is done
for 10 secs. In figure 4 we can see the results with
RTS/CTS off.
Table 2 Contention Window size and throughput With From the table we can see that window size of 15
RTS CTS gives us the best throughput followed by window size of
31. Here the effective throughput of the network is lower
Contention Window Size Throughput (bytes/sec) than UDP. This is because TCP has an
2 110520 acknowledgement system. This makes it more efficient
but also provides lesser throughput.
7 295679 Finally I conducted simulations with different values
15 299081 for CWmin and CWmax. Since these can be a huge set
31 288801 of combinations here I just simulated for some
combinations. Table 6 shows us those values. These
64 271999
values are again for a system with complete UDP
128 210920 network.
Table 6
1024 66922
CW min CW max Throughput
1024 41096
> REPLACE THIS LINE WITH YOUR PAPER IDENTIFICATION NUMBER (DOUBLE-CLICK HERE TO EDIT) < 7
VI. CONCLUSION
In this paper, we have looked in to the inner workings of
802.11 networks. These networks have become
widespread in present day world. These networks make
communication possible through a highly noisy
environment. These concepts have been applied and
extended to advanced technologies like power line. We
studied the use of DCF and PCF in resolving contention
for channels. Ns-2 was used to simulate the wireless
networks. The results showed that for a 5-node network
a contention window size of 15 was optimum with 31
also being very close to the optimal value.
REFERENCES
[1] http://www.isi.edu/nsnam/ns/tutorial/ Marc Greis
Ns-2 Tutorial
[2] http://www.cse.msu.edu/~wangbo1/ns2/ Network
Simulator-2
[3] http://old.nabble.com/Network-Simulator-ns-2-
f15582.html Ns-2 Forum
[4] http://www.ieee802.org/11/ 802.11 Forum
[5] http://standards.ieee.org/getieee802/802.11.html
802.11 standards
[6] Wireless Communications Rappaport
[7] http://evanjones.ca/ns2/ Ns-2 Tutorial
[8] Effects of contention window and packet size on the
energy efficiency of wireless local area network
[9] On the Effect of Contention-Window Sizes in IEEE
802.11b Networks by Sachin garg, Martin Kappes,
A.S Krishna Kumar
[10] Effect of the contention window size on
performance and fairness of the IEEE 802.11
standard Azade Khalaj, Nasse Yazdani, Maseud
Rahgozar
[11] http://www.winlab.rutgers.edu/~zhibinwu/html/net
work_simulator_2.html Rutgers Lab on Wireless
NS-2
[12] http://www.joshuarobinson.net/docs/ns-
802_11b.html Ns-2 Guide