You are on page 1of 11

SYNOPSIS ON STUDY OF 802.

11 WITH NS-2 SOFTWARE


SUBMITTED IN THE PARTIAL FULFILLMENT FOR THE AWARD OF DEGREE OF BACHELOR OF TECHNOLOGY

IN DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING

HARYAN COLLEGE OF TECHNOLOGY AND MANAGEMENT, KAITHAL-136027

SUBMITTED BY:
GURDEV SINGH (1707417) MONIKA SHARMA (1707405)

GUIDE:
ASSOC. PROF. RAJEEV CHECHI (HOD, ECE Deptt.)

ELECTRONICS & COMMUNICATION ENGINEERING KURUKSHETRA UNIVERSITY KURUKSHETRA

OBJECTIVE :
To study and realise the performance of 802.11 with the NS-2 software.

INTRODUCTION:
Wi-Fi stands for Wireless Fidelity. Wi-Fi is based on the IEEE 802.11 family of standards and is primarily a local area networking (LAN) technology designed to provide in-building broadband coverage. Current Wi-Fi systems based on IEEE 802.11a/g support a peak physical-layer data rate of 54Mbps and typically provide indoor coverage over a distance of 100 feet. Wi-Fi has become the defacto standard for last feet broadband connectivity in homes, offices, and public hotspot locations. systems can typically provide a coverage range of only about 1,000 feet from the access point. Wi-Fi offers remarkably higher peak data rates than do 3G systems, primarily since it operates over a larger 20MHz bandwidth but Wi-Fi systems are not designed to support high-speed mobility. The Wi-Fi Alliance also provides interoperability for IEEE 802.11a, 802.11b, and 802.11g. The alliance has developed a wireless Internet service provider (WISP) roaming (WISPr) recommendation too. The WISPr recommendation was developed to allow WLAN users connectivity at any other WISPs hotspot while being charged at one account.The WiFi standards define a fixed channel bandwidth of 25 MHz for 802.11b and 20 MHz for either 802.11a or g networks. IEEE 802.11: Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) Medium Access Control (MAC), and 1 and 2 Mbps for DSSS, FHSS in 2.4 GHz band, and Infrared, ratified in 1997; IEEE 802.11a: Works at 6, 9, 12, 18, 24, 36, 48 and 54 Mbps in 5GHz band, ratified in 1999; IEEE 802.11b: Works at 5.5 and 11 Mbps in 2.4 GHz band, ratified in 1999; IEEE 802.11e: MAC enhancements for Quality of Service (QoS), work ongoing; IEEE 802.11f: Inter Access Point Protocol (IAPP), ratified in 2003;

Here is the technical description of three major Wi-Fi standards.


Freature Primary Application Frequency Band Channel Bandwidth Half/Full Duplex Radio Technology Bandwidth Efficiency Modulation FEC Encryption Mobility Mesh Access Protocol Wi-Fi (802.11b) Wireless LAN 2.4 GHz ISM 25 MHz Half Direct Sequence Spread Spectrum <=0.44 bps/Hz QPSK None Optional- RC4 (AES in 802.11i) In development Vendor Proprietary CSMA/CA Wi-Fi (802.11a/g) Wireless LAN 2.4 GHz ISM (g) 5 GHz U-NII (a) 20 MHz Half OFDM (64-channels) <=2.7 bps/Hz BPSK, QPSK, 16-, 64-QAM Convolutional Code Optional- RC4 (AES in 802.11i) In development Vendor Proprietary CSMA/CA

Wireless LANs: Characteristics:


Advantages Flexible deployment; Minimal wiring problems More robust against disasters Historic buildings, conferences, Disadvantages Low bandwidth compared to wired networks Need to follow wireless spectrum regulations

802.11 Architecture
The basic service set (BSS) is the basic building block of an IEEE 802.11 LAN

The ovals can be thought of as the coverage area within which member stations can directly communicate The Independent BSS (IBSS) is the simplest LAN. It may consist of as few as two stations IBSS is also called the ad hoc mode in 802.11

802.11 components
Station (STA): terminal with access mechanisms to the wireless medium and radio contact to the access point Basic Service Set (BSS): group of stations using the same radio frequency Access Point: station integrated into the wireless LAN and the distribution system Portal: bridge to other (wired) networks Distribution System: interconnection network to form one logical network (EES: Extended Service Set) based on several BSS

What is NS-2
NS is a discrete event simulator for networking research. It provides substantial support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks. NS is under /net/cs455/ns

Starting NS
Let your path point to the directory with ns executable. Add the appropriate directory to your PATH environment variable. NS can be started with the command ns <tclscript>, where tclscript is the name of Tcl script file that defines the simulation scenario. Usually, a Tcl script is composed of three parts network topology definition, traffic definition, and event scheduling.

Architecture view of NS:

Figure. Architectural View of NS

Figure shows the general architecture of NS. In this figure a general user (not an NS developer) can be thought of standing at the left bottom corner, designing and running simulations in Tcl using the simulator objects in the OTcl library. The event schedulers and most of the network components are implemented in C++ and available to OTcl through an OTcl linkage that is implemented using tclcl. The whole thing together makes NS, which is a OO extended Tcl interpreter with network simulator libraries.

SIMULATION EXAMPLE:
This section shows a simple NS simulation script and explains what each line does. Example 3 is an OTcl script that creates the simple network configuration and runs the simulation scenario in Figure 4. To run this simulation, download "ns-simple.tcl" and type "ns ns-simple.tcl" at your shell prompt.

Figure. A Simple Network Topology and Simulation Scenario

This network consists of 4 nodes (n0, n1, n2, n3) as shown in above figure. The duplex links between n0 and n2, and n1 and n2 have 2 Mbps of bandwidth and 10 ms of delay. The duplex link between n2 and n3 has 1.7 Mbps of bandwidth and 20 ms of delay. Each node uses a DropTail queue, of which the maximum size is 10. A "tcp" agent is attached to n0, and a connection is established to a tcp "sink" agent attached to n3. As default, the maximum size of a packet that a "tcp" agent can generate is 1KByte. A tcp "sink" agent generates and sends ACK packets to the sender (tcp agent) and frees the received packets. A "udp" agent that is attached to n1 is connected to a "null" agent attached to n3. A "null" agent just frees the packets received. A "ftp" and a "cbr" traffic generator are attached to "tcp" and "udp" agents respectively, and the "cbr" is configured to generate 1 KByte packets at the rate of 1 Mbps. The "cbr" is set to start at 0.1 sec and stop at 4.5 sec, and "ftp" is set to start at 1.0 sec and stop at 4.0 sec.

#Create a simulator object set ns [new Simulator] #Define different colors for data flows (for NAM) $ns color 1 Blue $ns color 2 Red #Open the NAM trace file set nf [open out.nam w] $ns namtrace-all $nf #Define a 'finish' procedure proc finish {} { global ns nf $ns flush-trace #Close the NAM trace file close $nf #Execute NAM on the trace file exec nam out.nam & exit 0 } #Create four nodes set n0 [$ns node] set n1 [$ns node] set n2 [$ns node] set n3 [$ns node] #Create links between the nodes $ns duplex-link $n0 $n2 2Mb 10ms DropTail $ns duplex-link $n1 $n2 2Mb 10ms DropTail $ns duplex-link $n2 $n3 1.7Mb 20ms DropTail #Set Queue Size of link (n2-n3) to 10 $ns queue-limit $n2 $n3 10 #Give node position (for NAM) $ns duplex-link-op $n0 $n2 orient right-down $ns duplex-link-op $n1 $n2 orient right-up $ns duplex-link-op $n2 $n3 orient right #Monitor the queue for link (n2-n3). (for NAM) $ns duplex-link-op $n2 $n3 queuePos 0.5 #Setup a TCP connection set tcp [new Agent/TCP] $tcp set class_ 2 $ns attach-agent $n0 $tcp set sink [new Agent/TCPSink] $ns attach-agent $n3 $sink $ns connect $tcp $sink $tcp set fid_ 1 #Setup a FTP over TCP connection set ftp [new Application/FTP]

$ftp attach-agent $tcp $ftp set type_ FTP #Setup a UDP connection set udp [new Agent/UDP] $ns attach-agent $n1 $udp set null [new Agent/Null] $ns attach-agent $n3 $null $ns connect $udp $null $udp set fid_ 2 #Setup a CBR over UDP connection set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp $cbr set type_ CBR $cbr set packet_size_ 1000 $cbr set rate_ 1mb $cbr set random_ false #Schedule events $ns at 0.1 "$cbr $ns at 1.0 "$ftp $ns at 4.0 "$ftp $ns at 4.5 "$cbr for the CBR and FTP agents start" start" stop" stop"

#Detach tcp and sink agents (not really necessary) $ns at 4.5 "$ns detach-agent $n0 $tcp ; $ns detach-agent $n3 $sink" #Call the finish procedure after 5 seconds of simulation time $ns at 5.0 "finish" #Print CBR packet size and interval puts "CBR packet size = [$cbr set packet_size_]" puts "CBR interval = [$cbr set interval_]" #Run the simulation $ns run

REFERENCES:
compnetworking.about.com www.tech-faq.com www.wi-fi.org 802.11 WLAN AND NETWORKING BY : Anand R. Prasad, Neeli R. Prasad

You might also like