How do I Run TCL Coding in Ns2

As the matter of fact, our experienced research people provide the complete research support for the research scholars. Mainly, this article is about the description about the process running TCL coding in network simulator 2.

TCL Coding in Ns2

For an instance, we have highlighted some sample TCL coding process in network simulator 2.

  • TCL code to specify the initial position of all nodes

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

$ns initial_node_pos $node_($i) 30

}

  • TCL code to call the source code file

source Algo1

source Algo2

  • TCL code for graph generation using Xgraph

exec ./xgraph AODV_End_to_End_Delay.tr -t “End to End Delay Graph” -x “No.of.MobileNodes” -y “End to End Delay” -bg gray &

exec ./xgraph -bar -brw 0.5 AODV_PDR.tr -t “Packet Delivery Ratio Graph” -x “No.of.MobileNodes” -y “Packet Delivery Ratio” -bg gray &

Run TCL Coding in Ns2

 Most significantly, we have to execute the below mentioned commands to run the TCL code in network simulator 2.

cd /home/research/Desktop/TCL_coding_in_NS2

./ns TCL_coding.tcl

Running TCL Cod in Ns2

Finally, we have highlighted the result which is acquired through running TCL coding in network simulator 2.

Result of Running TCL Code in Ns2

You guys can reach us at any time to clarify your doubts!!!