This Writeup is Very useful for the beginners to start working with NS2 and Projects on the Domain of Computer Networks and Network Security! integrated with VANET,MANET and WSN ,etc.
Tools Required: NS2 , NAM ,NSG2.1.jar , Linux-Terminal or Cygwin.
1)Fire up your Terminal:
2)Install NSG2.1.jar:
URL: https://sites.google.com/site/pengjungwu/nsg/NSG2.1.jar?attredirects=0
3)Install NS2 and NAM:
Type $sudo
apt-get install
ns2
wait for it to complete then type $sudo
apt-get install
nam
4)Run NSG2.1:
Locate the jar file and type $java -jar NSG2.1.jar
to execute the Network Script Generator NSG2.1 in GUI Console!
5)Working on NSG2.1:
Click on Scenario and Select New wireless Scenario / new Wired scenario based on you wish!
6)Automatic TCL script Genration:
then Click Node Button Once, In GUI and then click on the environment wherever you want and click TCL which open ups window with source code as Save and Save as Buttons, by Default NSG saves source code as a .tcl file extension!
7)RUN:
type the command $ns <fileame>.tcl
,The output execute with the NAM GUI Console with Deployed Nodes and with Files such as out.nam and out.tr