How to run a tcl in ns2 (Network Simulator 2)

1. Install NS2

2. Go to Terminal and run ns filename

e.g. ns test.tcl (test.tcl is file name)

3.Run nam tcp.nam

4. Check .tr file to see the performance.



Install ns2 on Ubuntu 9.10 

1. Remove all ns-allinone-2.3x directory.

2. Type following command on terminal and enter:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B3F3334F

3. Add following ppa repository

deb http://ppa.launchpad.net/wouterh/ppa/ubuntu karmic main
deb-src http://ppa.launchpad.net/wouterh/ppa/ubuntu karmic main

4. Type following command on terminal and enter

sudo apt-get update

sudo apt-get install ns nam xgraph

5. Go to Terminal and run ns filename

e.g. ns test.tcl (test.tcl is file name)

6.Done