
This the way in which u can create a tcl file and simulate the environment
This blog will help to tell about the network simulator ns2 which proves to be very helpful in simulating networks environments. There are contents on how to install ns2. the requirements of ns2 and other ns2 related stuff.
Currently the package contains:
Currently, ns-allinone works on Unix systems and under Cygwin for Windows 9x/2000/XP. If you have problems with allinone, we encourage you to build it from its pieces.
Download source:
Important:Please check the bug fixes after you finish installation! .
so download that..
installing ns2
u need to untar the files as u download it.
the files would be downloaded on to the desktop of ur fedora operating system.
then open the terminal ">" the greater arrow is used to represent terminal
> su root
(switch to the root )
> cp ns-allinone-2.31.tar /opt/
( this will copy the ns2 to the opt folder
>cd /opt/
( u will go to the opt directory)
>tar -xvf ns-allinone-2.31.tar
(this will untar ur file and create a directory ns-allinone-2.31)
>cd ns-allinone-2.31.tar/
( u get inside the ns2 directory)
>./install
( this will install the ns2 simulator)
>./validate
(this will validate ur ns2)
> vi /opt/bashrc
(press i and type this or paste this)
export PATH=$PATH:/opt/ns-allinone-2.31/bin:/opt/ns-allinone-2.31/tcl8.4.14/unix:/opt/ns-allinone-2.31/tk8.4.14/unix
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ns-allinone-2.31/otcl-1.13:/opt/ns-allinone-2.31/lib
export TCL_LIBRARY=$TCL_LIBRARY:/opt/ns-allinone-2.31/tcl8.4.14/library
(press esc (plus) : (colon) then press the keys wq )
Simple ns2 emulation program
>cd /opt/ns-allinone-2.31/ns-2.31/tcl/ex
>ns wireless-demo-csci694.tcl
>nam 694demo.nam
ur first nam out put hurray the ns2 is working...