Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayeshathoi/computer-networks-322
contains sessional work & Term project
https://github.com/ayeshathoi/computer-networks-322
awk cisco cubic-fit ns2-simulator packet-tracer socket-programming tcl term-project
Last synced: 11 days ago
JSON representation
contains sessional work & Term project
- Host: GitHub
- URL: https://github.com/ayeshathoi/computer-networks-322
- Owner: ayeshathoi
- Created: 2022-12-13T22:14:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-24T16:38:52.000Z (5 months ago)
- Last Synced: 2024-11-08T20:15:09.689Z (11 days ago)
- Topics: awk, cisco, cubic-fit, ns2-simulator, packet-tracer, socket-programming, tcl, term-project
- Language: Tcl
- Homepage:
- Size: 22.4 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## **`CSE 322` : Computer Networks Sessional**
- [**`Socket Programming`**](https://github.com/ayeshathoi/Computer-Networking-322/tree/main/SOCKET%20PROGRAMMING%20-%20OFFLINE2)
- [**`Packet Tracer`**](https://github.com/ayeshathoi/Computer-Networking-322/tree/main/Cisco%20Packet%20Tracer)
- [**`Simulation in NS2 (configuring mac,routing protocl etc.)`**](https://github.com/ayeshathoi/Computer-Networking-322/tree/main/NS2_offline)
- **`Wireshark`**- **`Term Project`**
- [`CUBIC-FIT: A High Performance and TCP CUBIC Friendly Congestion Control Algorithm`](https://github.com/ayeshathoi/Computer-Networking-322/tree/main/Ns2%20Project%20CubicFit)
- `TCP Cubic-Fit Modification in ns2`---
## `Installing ns2 on WSL/Ubuntu`
This tutorial is **compitable for Windows 10**
Check your WSL version from Command Prompt:
- `wsl -l -v`Ensure that you are running WSL version 2. If that is not the case, follow [this guide](https://learn.microsoft.com/en-us/windows/wsl/install) to upgrade.
## Step 1: Installing `nam`
Download the suitable `nam` installer from [this link](https://www.linuxquestions.org/questions/linux-newbie-8/ns-stop-couldn%27t-execute-nam-permission-denied-while-executing-exec-nam-4175524760/#2). After downloading, run `sudo dpkg -i FILE_NAME`. The `apt` version didn't seem to work for me.
## Step 2: Installing `ns2-allinone-2.35`
### 2.1 Installing `g++-4.8`
1. Try `sudo apt install g++-4.8`. If this works, you are done. Proceed to step 2.
2. If the above command doesn't work, you will have to manually add the older repository to your system. Execute the following commands:
- `echo "deb [trusted=yes] http://th.archive.ubuntu.com/ubuntu bionic main universe" | sudo tee -a /etc/apt/sources.list `
- `sudo apt update`
- `sudo apt install g++-4.8`
3. If the above commands are successfully executed, you are done. Proceed to step 2.
4. If there are errors, try `sudo apt --fix-broken install` and then proceed to step 2.### 2.2 Installing Dependecies (If needed)
1. You might face error, "fatal error: X11/Xlib.h: No such file or directory". To solve this you need to install _libx11-dev_ using `sudo apt install libx11-dev`
2. You might face error, "otcl-1.14 configuration failed! can't find X includes". To solve this you need to install _xorg-dev_ using `sudo apt-get install xorg-dev`
### 2.3 Installing `ns2-allinone-2.35`
1. Download the installer from [this link](https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing).
2. Unzip the downloaded file: `tar xvf ns-allinone-2.35_gcc5.tar.gz`
3. This will create a directory named `ns-allinone-2.35`. Now run the following commands to install `ns2`:
- `cd ns-allinone-2.35/`
- `export CC=gcc-4.8 CXX=g++-4.8 && ./install`
- `cd ns-2.35/`
- `sudo make install`
4. If the above commands have executed successfully, you should be able to type `ns` in the terminal and a prompt beggining with `%` will appear. This marks a successful installation.
5. Once installed, you can make changes to the source code within the `ns-2.35/` directory. Then you can incorporate those changes by executing:
- `make`
- `sudo make install`## Step 3: Cleanup (optional)
You might want to remove the older repository link from your system by running the following command:
- `sudo sed -i '$ d' /etc/apt/sources.list`
## Step 4: GWSL Setup
For GUI Support in WSL - Windows 10, we need to use X-Server. In this case, I am using `GWSL`. The version in _Microsoft Store_ seem to become a paid app.
1. Download GWSL from [this link](https://github.com/MJKSabit/ns2-installation/releases/download/GWSL/GWSL.Traditional.140.release.x64.exe) from their official github repository.
2. Install GWSL and Run
3. On first run of GWSL, Windows will ask you to allow GWSL through the Windows Firewall. It is important to give it access to **public** and **private** networks. You might be asked to allow it through twice.
4. Open GWSL window from notification panel. Go to `GWSL Distro Tools` > Enable ✅ `Display / Audio Auto Exporting`
5. Optional: Go to `GWSL Distro Tools` > `More shell and options` > Enable ✅ `Bash : Display / Audio Auto Exporting`## Done
You should be able to run `ns2` projects and view simulation of it using `nam`.