How do I create a TCL script

Are you guys are exciting to know about the creation of TCL script and the process required to create a TCL script? Then stay tuned!!!  This article provides you the appropriate and significant steps to create a TCL script.

Install TCL

    The first step to create a TCL script is, you have to install TCL. Execute the following commands in the Ubuntu terminal to install TCL,

sudo apt install tcl

Install TCL

Create a TCL script

       Once the TCL is installed, and then create a network Topology. To create a network topology, create a TCL script with the following code,

The following code is deployed to specify the number of node and other configurations.

set val(netif)  Phy/WirelessPhy

set val(mac)                Mac/802_11

set val(rp)       AODV

set val(nn)       75

This part of code is used to specify the node size,

for {set i 0} {$i < $val(nn)} { incr i } {

$ns initial_node_pos $node_($i) 30


The following code is to specify the node initial position

$node_(0) set Z_ 0.0

$node_(0) set Y_ 369

$node_(0) set X_ 656

Run a TCL script

The process of install Tcl and creation of TCL is completed, and then you have to run your TCL script. To run a TCL script in Ubuntu, execute the following command in terminal window,

cd /home/research/Desktop/Tcl_Script

sudo ./ns Tcl_Script_File.tcl


If you have any queries based on creation of TCL script, please feel free to contact us. Our technical experts gave you a proper guidance to create a TCL script.

Opening Time


Lunch Time


Break Time


Closing Time


  • award1
  • award2