0% found this document useful (0 votes)
10 views1 page

Wireless ns3 Assignment2

Uploaded by

Sovann Doeur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
10 views1 page

Wireless ns3 Assignment2

Uploaded by

Sovann Doeur
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 1

1

Wireless Networks - Spring 2019


Assignment #2

The objective of this assignment is to create a simple wireless topology and run TCP applications with different
congestion control algorithms. Apart from running the program successfully, this aims at learning pcap tracing and
logging mechanism to extract different informations of the communication and analyze the data with wireshark tools.

Assignment:

1 - Create a program (name it as ”wifi-tcp-perf.cc” ) for performance evaluation of TCP protocol over WiFi. This
involves several components as following:

i) Create a new program (.cc file) with four WiFi nodes as star topology where the access point (AP) will be
at the center and three WiFi stations surrounding it. You need to take help from ”third.cc” example to create the
layers of the protocol stack and mobility model.
Hint: Search for the function ”SetPositionAllocator” in the documentation and also in the ns-3 google groups for
how to use. You can use any coordinates preferably within 30 meters.

ii) Write TCP applications on all the WiFi nodes where the AP will run the server application (Sink) and the
WiFi stations will run as clients. Configure the transmission to send 1000 packets of 1000 bytes each.
Hint: Similar to the Q2 of the assignment 1.

iii) Refer to the example ”tcp-variants-comparison.cc” from the ”examples/tcp” folder from your ns-3 home
directory. Now, from this example, you need extract the code for applying TCP congestion control protocols and
apply to : ”wifi-tcp-perf.cc”
Hint: Check the codes/blocks involving the word ”transport prot”. In the example they used command line argument
so that different protocol values can be passed as an argument while running each time. Check the ns-3 tutorials
or search in the google groups if you need help for executing program with commandline arguments.

iv) Refer to the example ”tutorials/third.cc” again to find out functions for Pcap traces and enable the pcap tracing
on the one of the station (say station 1) and on the AP devices in your code.
Hint: Check for ”EnablePcap” function in the third.cc. Note to change the string name of the file for different set
of experiments, so that you can analyze all of them later. The files will be written in your ns-3 home directory. For
the details of understanding, you can check: https://www.nsnam.org/docs/release/3.9/tutorial/tutorial 23.html

2 - Install ”Wireshark” software in your computer to analyze the stored pcap file. You can get instruction for
installation online.

i) Run your ns-3 code for 6 instances :


a) 3 transport protocols: ”TcpNewReno”, ”TcpVegas” and ”TcpWestWood”.
b) 2 different data rates for the WiFi station 1 only :1 Mbps which is default and 5 Mbps.
Hint: The data rate is defined in last parameter of the ”Setup” function of application.
c) give a different pcap file name for each instance of the experiment.

ii) Analyze the pcap files with wireshark. Show a screenshot of the WiFi protocol in the packet structure.

You might also like