You are on page 1of 3

Lab 4 CSMA CA performance solutions:

Q1 [4 marks]:
1) [1 mark] In the directory ns-3.27/examples/wireless/
2) [1 mark] wifi-simple-infra-0-0.pcap and wifi-simple-infra-1-0.pcap
3) [1 mark] Association Request, Association Response, Beacon Frame
4) [1 mark] Any of two of these is fine
Program Arguments:
--phyMode: Wifi Phy mode [DsssRate1Mbps]
--rss: received signal strength [-80]
--packetSize: size of application packet sent [1000]
--numPackets: number of packets generated [1]
--interval: interval (seconds) between packets [1]
--verbose: turn on all WifiNetDevice log components [false]

Q2 [6 marks]:
1) [1 mark]
Observation from the code and pcap file matches in case of Direction of flow of
packets and packet size. (They can argue about the header making the packet length vary.)
However data rate does not match. 100Mbps in the code but observed rate in pcap file is 65
Mbps (no need to mention the values)
2) [1 mark]
Time STA0->AP
1.000000 54.8408
2.000000 59.5395
3.000000 59.5512
4.000000 59.563
5.000000 59.4924
Average throughput = 58.6 Mbps (either average or all 5 values is
sufficient)
3) [1 mark]
(Reason : 1472 bytes * number of packets / total time taken
1472 * 25986 / (5.145007 - 0.004461) = 59.528916 Mbps
Not necessary to show the calculations.)
Approximately 59 Mbps and thus matches with the above obtained throughput
4) [1 mark]
PHY data rate - 65 Mbps. (Found in 802.11 radio information in the pcap file)
5) [1 mark]
Final payload at physical layer = 1534 bytes(obtained directly from the pcap file
or add header lengths to initial application layer payload)
From the out of video quiz we have :
DIFS=28us
SIFS=10us
802.11 ACK = 30us
PHY header = 20 us
One station. So assuming to no backoff,
Transmission time = 1534*8/65Mbps +PHY header = 208.82 us
Total time taken = Transmission time+DIFS+SIFS+ACK = 208.82+30+10+28 =
276.82 us
Theoretical application layer throughput = 1472*8/276.82 = 42.5 Mbps
Theoretical throughput is less than observed throughput
6) [1 mark]
Variable (give marks for any time value. Reason should be similar to the one
below)
Simulation time varies because it depends on the computing power.

Q3 [10 marks]:
1) [3+1 marks]
Decreasing Graph
As the number of nodes increases we end up with increasing number of collision
of packets as we have an increasing chance of two nodes choosing backoff values such that
they start their transmission at the same time. Thus we have wasted transmission(collisions)
which results in average total throughput of all the nodes decreasing with increasing number of
nodes.
2) [3+1 marks]
Decreasing Graph
As the number of nodes increases, the chance that a node gets lesser
throughput compared to others increases. This is mainly because other nodes end up choosing
smaller backoff values and transmit while this nodes ends up with conflicts and thus choosing a
bigger backoff slot.
3) [1+1 marks]
Decreasing Graph with small irregularities
Same as above. But less smoother or some irregularities because of averaging
the throughput of nodes over 10 seconds. Averaging over the whole simulation periods gives
each node atleast comparable throughputs. Thus fairness index for n nodes might be more than
n-1 nodes for some n's.

Q4 [10 marks]:
1) [3+1 marks]
Increasing with number of nodes
Number of packets with retry bit set to 1 increases with number of nodes. This is
clearly because of with increase in the number of nodes, more nodes tend to pick up backoff
values such that it leads to collision of packets sent from those frames. Thus with more nodes
we have more collisions and thus more packets with retry bit set. Also for a single node number
of collisions is 0 and thus no retransmissions ie no packets with retry bit set for single node
configuration.
2) [4+2 marks]
Graph with lesser number of nodes reaches CDF value 1 at smaller time
difference. (x axis values are smaller for smaller number of nodes)
As before more nodes leads to more collisions. Thus inter-arrival time between
packets becomes larger(because of collisions) which results in the graph for largest number of
nodes having scale of x-axis larger than graph for single node.

You might also like