NS-2 Installation Guide for Windows Users

✅ Method 1: Using Windows Subsystem for Linux (WSL)
🧩 Step 1: Enable WSL
-
Open PowerShell (Admin) and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
-
Then enable Virtual Machine Platform:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
-
Restart your system.
🐧 Step 2: Install Ubuntu from Microsoft Store
-
Go to Microsoft Store → Search for Ubuntu → Install (recommended: Ubuntu 20.04 LTS)
🛠️ Step 3: Install NS-2 inside Ubuntu (refer this)
-
Open the Ubuntu terminal and run:
sudo apt updatesudo apt install ns2
-
Verify:
ns -
To run simulations:
ns filename.tcl
✅ Method 2: Using VirtualBox/VMware + Ubuntu ISO
📦 Step 1: Download Required Tools
💻 Step 2: Install Ubuntu
-
Set up a new VM and boot the ISO
-
Allocate at least 2GB RAM and 20GB disk space
🛠️ Step 3: Install NS-2 in the VM
sudo apt update sudo apt install ns2
✅ Testing It Works
-
Create a file
first.tcl
: -
Run:
ns filename.tcl nam out.nam
💡 Final Tips:
-
Prefer WSL for lightweight, fast setup.
-
Use VirtualBox if you want a full Linux desktop experience.
-
NAM (Network Animator) may require
Xming
on Windows for GUI.
Join the conversation