Sie sind auf Seite 1von 2

ECE6610: Wireless Networks

Programming Assignment 1

• This assignment is due 11:59pm on October 14, 2010. The assignment is worth 75 points (7.5% of your
grade).
• One assignment submission per group. Submit a doc or docx file with your answers explaining the
results. At the end of the doc file, summarize the main code changes that you made. Also attach the
tcl file(s), the modified mac-802 11.h & .cc files (with comments on what you did). All of these items
should be compressed into a zip file and sent to the TA at sri.lsr+6610@gmail.com.
• Use the T-Square wiki to post all questions regarding the assignment.

1 Part 1 - Simulation
The goal of this section is to conduct simulations to compare the performance of the following four medium
access protocols CSMA/CA, CSMA+RTS/CTS, CSMA+ACK, and CSMA. By default NS2 supports the
CSMA/CA protocol for wireless medium access which enables RTS/CTS and ACK packets. You would need
to modify the TCl and/or .cc,.h files to disable RTS/CTS and to disable ACK.

1. Construct a static wireless network with 10 nodes distributed over a 750m by 750m area. We will use
two topologies (T1 and T2). For topology T1, for node i, we will set the coordinates as X(i)=10*i.
Y(i)=10*i, Z(i)=0. As an example, node 5 will have (50,50,0) as its coordinates. For topology T2, we
will use the following coordinates for nodes 1 through 10 respectively: (50,100,0),(500,100,0),(50,450,0),
(500,450,0), (250,600,0), (250,100,0),(700,100,0),(250,450,0),(700,450,0),(450,600,0).
(a) All nodes are wireless but not mobile. We will use a fixed transmission power of 0.282W for
each node. For your information, the default transmission power has a 250m radius of reception
in NS2. We will also set the Carrier Sense Threshold to 5.57346∗10−11 which corresponds to a
carrier sense range of 400m. To do this, insert the following command at the beginning of your
tcl file: Phy/WirelessPhy set CSThresh 5.57346e − 11 .
(b) Although we will only have one-hop flows, we nevertheless need to specify a routing protocol. You
can use any ad-hoc network routing protocol of your choice DSR for instance.
(c) For the chosen network topology, every destination node is one-hop away from its source node.
Nodes 1 to 5 will be the data sources and Nodes 6 to 10 the corresponding destinations. The
sources use TCP New Reno to transport CBR traffic to the destination. The data rate of channel
is set at 1Mbps. The default packet size is 1000 bytes. The rate of each CBR flow is 100 Kbps.
(d) Introduce random packet drops at each node to emulate the wireless channel loss that deteriorates
the packets.
(e) We will do two experiments. In experiment 1, we will use topology T1. We will vary the loss rate
from 0 to 20% in steps of 5%. In experiment 2, we will repeat the same for topology T2 similar
to experiment 1.
(f) We will run each simulation for 100 seconds and take the average throughput of 5 runs for each
flow in that experiment.
(g) Also remember that changes to .cc files require us to recompile ns. After saving the file, go to the
ns-2.34 directory. Type ‘make’ and then ‘sudo make install’. This will create the new ns executable
in the bin folder under ns-allinone-2.34. For ease, I suggest copying the old ns executable under

1
the ns-allinone-2.34/bin directory. i.e. cp ns nsold. Then you can run the experiments with the
old code and new code using different executables, without having to recompile the code for every
run. i.e. ‘ns pa1.tcl’ for the modified code and ‘nsold pa1.tcl’ for the old code.
We will obtain the following results.
(a) (10 points) What is the main conceptual difference between topologies T1 and T2?
(b) (30 points) Obtain the mean of the aggregate end-to-end throughput of the five connections,
and plot it against the packet loss rate for topology 1 and topology 2. Compare the throughput
performance among the medium access strategies. Explain the results.
(c) (10 points) Consider the simulation of plain CSMA with 0 channel loss for T1 and T2. Present
the number of MAC layer packet drops occuring in the simulation for T1 and T2? Is there a
difference in the number of packet drops? What is the reason for the difference? (When answering
this question, remember that the transport protocol is TCP which adapts its sending rate.)
If there are parameter values you need to complete the simulation but not specified, choose them
appropriately. State clearly how your results are obtained.

2 Part 2 - Real-life Experiments


For this part of the assignment a laptop with Linux installed is recommended (Note: If you have only
Windows installed on your laptop, free tools such as netstumbler, can be used to complete the assignment).
Use the Linux wireless tools (iwconfig and iwlist). The Linux wireless tools should be already installed on a
Linux system. You might also need some other Linux commands to finish the problem. Find the following
parameters:

• Connected Network (10 points): Connect your wireless card on the laptop to some wifi network
(Ex: GTLawn). Find the following: the 802.11 standards supported by your wifi card (a/b/g/n),
ESSID of the network connected, MAC ID of the access point, MAC ID of the wifi card, different
bit-rates supported by the access point, whether RTS/CTS is enabled, whether security is enabled and
if yes what kind of security is used.
• All Wifi Networks in the vicinity (15 points): Perform this experiment in a residential area (your
house or apartment. Any sort of campus housing is not a valid location). Scan for all the wifi access
points in the vicinity. If necessary, you might have to disassociate with your network to be able to
scan all the networks. Find the following: number of APs, how many APs have security enabled, the
different channels used by the APs, number of APs using each channel. Repeat the experiment in the
Klaus building. Present the results in the form of a table. You might find that more than one AP has
the same ESSID in Klaus. What is the reason for this ? Qualitatively compare the two types of wifi
deployments (distributed residential and centralized office).

Das könnte Ihnen auch gefallen