
ECE6610: Wireless Networks
Programming Assignment 2
•This assignment is due March 5.
•One assignment submission per group.
•Submit a doc file with your answers, the tcl file, the modified mac-802 11.h & .cc files (for CSMA with
•Use the T-Square wiki to post all questions regarding the assignment. Info about modifying source files
is given in the wiki.
1. Construct a static wireless network with 10 nodes randomly distributed over a 600m by 600m topog-
raphy and conduct the following simulation to compare the performance of IEEE 802.11, and CSMA
medium access control protocols.
(a) All nodes are wireless but not mobile. Chose the locations of the nodes such that the network
is not fully connected (there are ”hidden nodes”) and is not partitioned also. Use the default
transmission power (0.282W) for each node. For your information, the default transmission power
has a 250m radius of reception in ns-2. The default carrier sense range is twice the transmission
range (500m).
(b) Use DSR as the ad-hoc network routing protocol.
(c) For the chosen network topology, randomly group the 10 nodes into 5 source-destination pairs.
Every destination node is one-hop away from its source node (source and destination are neigh-
boring nodes). The sources use TCP to transport CBR traffic with 100kbps data rate (the packet
size is 1000 bytes) to the destination. The data rate of channel is set at 1Mbps.
(d) Introduce random packet drops at each node to emulate the wireless channel loss that deterio-
rates the packets. Vary the packet drop rate from 0 to 20%. The IEEE 802.11 MAC protocol
uses RTS-CTS-DATA-ACK handshaking for medium access control. First remove the RTS-CTS
handshaking to make it behave like pure CSMA (DATA is sent out whenever the channel is sensed
idle). Then remove ACK from the handshaking. You need to modify the mac-802 11.h and
mac-802 11.cc files to achieve this. Also set the CS range = transmission range for CSMA.
Run the simulation for 100 seconds, and obtain the following results.
(a) (1 point) Plot the node distribution in the network. Label clearly the node ID and coordinates
and indicate the source-destination pairs such that the node contention relationship can be inferred
from the constellation.
(b) (4 points) Obtain the mean and standard deviation of the end-to-end throughput and end-to-end
delay of 5 connections, and plot (4 figures: mean of throughput, SD of throughput, mean of delay
and SD of delay) against the packet drop rate. Compare the throughput and fairness performance
among IEEE 802.11, MACA with carrier sense, and CSMA. Explain the results.
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. It was discussed in class that the hidden terminal problem can be also be solved by using a carrier
sensing range that is twice the transmission range. In this part of the assignment you will study the
relative benefits of each of the two mechanisms for solving the hidden terminal (RTS/CTS and CS range
= twice transmission range). Repeat the experiment in part 1 for RTS/CTS, CS rang =2xTransmission
range and CSMA with the following parameters.
1