How Can I Run Simple Ns2 Program in Ubuntu

Do you guys want to know about the process of running simple program based on network simulator 2 in Ubuntu? Then, you guys have to take a look at this article and we have highlighted all required steps about the implementation of Ns2 program.

Simple Ns2 Program Code in Ubuntu

We have to write the Ns2 program code in main simulation script file in workspace location along with the file extension of .tcl.

  • Ns2 program code to declare routing protocol object

set val(netif)  Phy/WirelessPhy

set val(mac)                Mac/802_11

set val(rp)       AODV

  • Ns2 program code to specify annotation text

$ns at 0.2 “$ns trace-annotate \” perform the process of  RREQ and RREP transmission  \””

$ns at 0.2 “$ns trace-annotate \”          \””

$ns at 1.5 “$ns trace-annotate \” Select the Route By Using AODV  \””

Run Simple Ns2 Program in Ubuntu

In addition to that, we have to implement the below mentioned commands to run the simple Ns2 program in Ubuntu.

cd /home/research/NS2_program

sudo ./ns program.tcl

Running Ns2 Program in Ubuntu

At this moment, we have highlighted the result to run the simple program based on network simulator 2.

To this end, we assure that we provide the complete research assistance for the research scholars.