This repository contains a series of NS-3 simulations designed for the Wireless Networks course assignment. The simulations create a network topology with multiple WiFi clients connected to an access point (AP), which in turn is connected to a server through point-to-point (p2p) links. The objective is to analyze the network behavior under various conditions, including file transfers and the use of different WiFi management features like RTS/CTS and rate adaptation.
The code is organized into separate files for each part of the assignment:
a.cc
: Sets up the basic WiFi and p2p networks.b.cc
: Adds file download capabilities to each client and plots completion times.c.cc
: Integrates an upload application along with the download.d.cc
: Implements a path loss and fading model with MistrelHTManager for rate adaptation.e.cc
: Turns on RTS/CTS to analyze its effect on network performance.
Each part builds on the previous, adding complexity to the simulation.
To run these simulations, you will need to have NS-3 installed on your machine. Follow the installation guide on the NS-3 website.
To run any part of the assignment, navigate to your NS-3 project directory and use the following command:
./ns3 run "scratch/a --numClients=10" # Replace 'scratch/a' with the part you want to run.
To visualize the network topology and packet flows, you can use NetAnim or other NS-3 supported visual tools. Instructions for setting up NetAnim can be found here.
I've plotted the download completion times using a Python script.
Contributions are welcome. Please fork this repository, make your changes, and submit a pull request.