NS‑2: Install & Run on Ubuntu/Debian (Simplified Guide)
🛠️ Step 1: Install NS‑2
Open the terminal and run:
This installs the NS‑2 simulator package.
📦 Step 2: Install NAM (Network Animator)
To get the graphical user interface for NS‑2:
Then download the appropriate .deb file and install it:
This ensures NAM remains installed and stable.
✅ Step 3: Verify NS‑2 Installation
You should now have both NS‑2 and NAM installed successfully.
🚀 Step 4: Run Simulation
-
Create a .tcl script in your home folder—give it any name like filename.tcl
-
In terminal, execute:
-
This runs the simulation and outputs terminal results.
-
It also generates an output file, usually named out.nam
-
🎬 Step 5: View Network Animation
To visualize the simulation:
This opens the NAM graphical interface. You can explore and interact with the network simulation visually.
💡 Tips & Troubleshooting
-
Ensure you run these commands with proper user permissions.
-
If nam isn’t found, double-check the .deb filename and installation path.
-
Always confirm your .tcl scripts are correctly formatted and located in your home directory.
❓ Questions?
Drop your queries in the comments below—happy to help!
Join the conversation