NS-2 Installation Guide for Windows Users

 ✅ Method 1: Using Windows Subsystem for Linux (WSL)

🧩 Step 1: Enable WSL

  1. Open PowerShell (Admin) and run:

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  2. Then enable Virtual Machine Platform:

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  3. 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)

  1. Open the Ubuntu terminal and run:

    sudo apt update
    sudo apt install ns2
  2. Verify:

    ns
  3. 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

  1. Create a file first.tcl:

  2. 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.