This repository contains the implementation over ns-3 of thoretical wireless link models based on Markov Chains. This modeling is intended to carry out performance evalaution of upper layers (e.g. transport) over dynamic channels without the complexity of detailed implementation of wireless technologies.
It has been tested in Ubuntu 22.04.1 LTS
(jammy). It has the following dependencies:
- Dependencies of ns-3
apt install g++ python3 cmake ninja-build git
- python3 and pip3 to automatize the evaluation
apt install python3
apt install python3-pip
- Jupyter optional to generate plots.
-
The folder ns-allinone-3.35 contains a copy of ns-3. The scratch folder contains a generic scenario (p2p_scenarioOnBuild.cc) to generate evaluation topologies. A second scenario p2p_scenarioReusable_taps.cc) has been defined to use the link models with real applications using ns-3 TAP.
-
The scripts folder contains scripts needed to run different topologies. It also contains a Jupyter notebook to represent the outcomes.
Configure and compile ns-3, we disable not used functionalities
cd ns-allinone-3.35/ns-3.35
./waf configure --disable-werror --disable-python --disable-tests --disable-examples --build-profile=optimized
./waf
Below are the scripts that have been used to prepare the results of the paper. The scripts automatically generate the folder tree where the results are stored, and by keeping this structure, a representation of the results can be obtained like in the paper. All results will be generated under the folder ./scripts/RESULTS
In addition, the files used for the simulation of each of the scenarios using Python3 are described below, all of them are collected in scripts. In all cases the evaluation embraces a pair ns-3 client and server sending a 300 MB datafile with a rate of 40 Mbpos, that equals the average capacity of the first link from the sender (access link).
In all cases, the execution of a scenario generates the following logs:
- Congestion window: logCWND.log [time (seconds) | size (B)]
- Received traffic: RXFile.log [pkt number | time (seconds) | pkt size (B)]
- Transmission traffic: TXFile.log [pkt number | time (seconds) | pkt size(B)]
- Access buffer occupancy: logBuffer.log [time (seconds) | size buffer (B)]
- ChannelVar.log: [time (seconds)| State] where State = {LoS=1,Ms=2,Ds=3}
This script deploys a Land-Mobile-System (LMS) link modeled as a 3-state Markov Chain with constant stay times of 5 seconds. It runs the scenario once.
- Run python script sim_ns3_lms_toy.py
cd scripts
python3 sim_ns3_lms_toy.py
- The topology configuration is in file ./ns-allinone-3.35/ns-3.35/scratch/lms_toy.json
- The output is saved in the folder ./scripts/RESULTS/Cubic_SyntheticLMS/.
This script deploys a Land-Mobile-System (LMS) link modeles as a 3-state Markov Chain with exponentially distributed stay times. It runs the scenario once.
- Run python script sim_ns3_lms_toy.py
cd scripts
python3 sim_ns3_lms.py
- The topology configuration is in file ./ns-allinone-3.35/ns-3.35/scratch/lms.json
- The output is saved in the folder ./scripts/RESULTS/Cubic_RealisticLMS/.
This script deploys three links, UP/DOWN LMS links and an inter-satellite-link (ISL) connecting them, with disconnections. The script sweeps the average disconnection time from 0 to 3 seconds with step 0.2 seconds. For each value it runs Nsim independent executions. By default NSim is set to 5, increase it to obtain statistically significant results.
- Run python script sim_ns3_lms_toy.py
cd scripts
python3 sim_ns3_lms.py
- The topology configuration is in file ./ns-allinone-3.35/ns-3.35/scratch/ConfigScenario_stop.json
- The output is saved in the folder ./scripts/RESULTS/endToEndDisconnect/ where one folder is created for each value of the background traffic, and simulation.
This script deploys three links, UP/DOWN LMS links and an inter-satellite-link (ISL) connecting them, with background traffic. The script sweeps the background traffic from 5 to 30 Mbps with step 1 Mbps. For each value it runs Nsim independent executions. By default NSim is set to 5, increase it to obtain statistically significant results.
- Run python script sim_ns3_lms_toy.py
cd scripts
python3 sim_ns3_lms.py
- The topology configuration is in file ./ns-allinone-3.35/ns-3.35/scratch/ConfigScenario.json
- The output is saved in the folder ./scripts/RESULTS/endToEndBackground/ where one folder is created for each value of the background traffic, and simulation.
The scenario p2p_scenarioReusable_taps.cc is created to use real applications with the lightweight channel models. This script runs the scenario using ns-3 TAP to use real applications instead of ns-3 client/server. The script uses the commands tunctl and ip. Install them as follows
apt install uml-utilities
apt install iproute2
Analysis.ipynb contains code snippets to reproduce the results shown in the paper. Figures generated by Analysis.ipynb are saved in figures folder.
Disclaimer: figures in manuscrip are generated with Tikz, points in temporal plots are reduced for better visibility and boxplots are generated with 100 executions.