The ATCN-Program is written to simulate the Congestion Control Process in TCP in NS-3.
.
├── README.md
├── experiment
│ ├── 01_result
│ │ ├── ATCN-Program-Tcprate.txt
│ │ └── ATCN-Program-Udprate.txt
│ ├── 02_result
│ │ ├── ATCN-Program-routerBufferSize.txt
│ │ └── ATCN-Program-tcpBufferSize.txt
│ ├── 03_result
│ │ └── ATCN-Program-MTU.txt
│ ├── 04_result
│ │ └── NewReno
│ │ ├── ATCN-Program-ascii
│ │ ├── ATCN-Program-cwnd.txt
│ │ ├── ATCN-Program-inflight.txt
│ │ ├── ATCN-Program-next-rx.txt
│ │ ├── ATCN-Program-next-tx.txt
│ │ ├── ATCN-Program-rto.txt
│ │ ├── ATCN-Program-rtt.txt
│ │ └── ATCN-Program-ssth.txt
│ └── ATCN_experiment_report.pptx
├── sample
│ └── atcn-case-study.cc
└── src
└── ATCN-Program.cc- Download Visual Studio Code and WSL2.
- Prerequisites Configuration.
- NS-3 installation package Download.
- Configure and build NS-3 Environment.
- Run a quick simulator.
-
Switch to the home directory of your Ubuntu ISO file.
$ cd /home/hostname
-
Fetch the latest version of the package list from your distro's software repository.
$ sudo apt update
-
Download the prerequisites to start NS-3.
$ sudo apt install gcc g++ python3 python tcpdump
-
Download the package from gitlab.
$ git clone https://gitlab.com/nsnam/ns-3-dev.git
-
Switch to the
ns-3-devdirectory.$ cd ns-3-dev/
-
Switch to the
ns-3.35branch.(The newer branch uses Cmake to build source codes instead of Waf)$ git checkout -b ns-3.35-branch ns-3.35
Use ./waf instruction to configure and build NS-3 environment. Make sure to run these commands under the root of ns-3-dev.
./waf configure
./waf buildRun the demo simulator scratch-simulator.cc file under the path of scratch/.
./waf --run scratch/scratch-simulator.ccIt is weird that the source program can only run normally in the scratch directory, which may be the internal mechanism of NS-3.
cd /home/hostname/ns-3-dev
git clone https://github.com/ForgottenField/NS3-TCP-Congestion-Simulation.git
cp NS3-TCP-Congestion-Simulation/src/ATCN-Program.cc scratch/
./waf --run scratch/ATCN-Program.ccIf the command ./waf build can not be executed successfully, please use the following command to check whether there is sufficient memory allocated for wsl.
free -gThis command will show your memory size in gibibytes, and you can change the -g option to output in different forms.
After that, you can refer to this answer to increase your virtual memory in wsl.