As the matter of fact, the installation of Ns2 packages in network simulator 2 includes some significant steps and they are highlighted in this article. TCL is defined as the scripting language which is capable to create and simulate the network applications in NS2.
Install Ns2 in Ubuntu
The open terminal window is derived through the execution of below mentioned commands in Ns2.
sudo apt-get update
sudo apt-get install ns2
Install TCL in Ubuntu
To install the TCL files in Ubuntu, we have to implement the following commands in terminal.
sudo apt-get install tcl
TCL Sample Code
For your ease, we have highlighted the sample code to configure the 1.5m height and Omni directional antenna and that is stored with the file extension of .tcl.
Antenna/OmniAntenna set X_ 0
Antenna/OmniAntenna set Y_ 0
Antenna/OmniAntenna set Z_ 1.5
Antenna/OmniAntenna set Gt_ 1.0
Antenna/OmniAntenna set Gr_ 1.0
Run TCL File
Following that, we have to run the TCL file through the implementation of the below mentioned commands.
sudo ./ns Main.tcl
Following that, we have highlighted acquired result based on running the TCL file.
The research scholars can ping to clarify you issues based on TCL in Ns2