Xgraph in Ns2
Let’s get to know about the significance of Xgraph in network simulator 2 with the assistance of our research experts.
Step: 1 Install Xgraph and Ns2
Firstly, we have to execute the commands that have been highlighted in the following to install Xgraph and other required packages of Ns2.
sudo apt-get install perl xgraph libxt-dev libx11-dev libxmu-dev
To install Ns2.35, we have to download ns-allinone-2.35 package and change the package location to execute the commands that have been highlighted in the following.
cd /home/ns-allinone-2.35/
sudo ./install
Ns2 Code to Execute Xgraph
Here, we have highlighted the sample Ns2 Tcl code to execute the Xgraph based on the author generated trace file.
exec xgraph PDR.tr -t “PDR Graph” -x “No.of.Nodes” -y “PDR” -bg pink &
exec xgraph Delay.tr -t “Delay Graph” -x “No.of.Nodes” -y “Delay” -bg pink &
Run Ns2 Code
To run the Ns2 simulation, we have to acquire the Xgraph based graph results in main file through the execution of below mentioned commands.
cd /home/research/trace_file_in_ns2
sudo ./ns main.tcl
Finally, we have highlighted the graph result for delay which is based on the number of nodes.
If you are looking for the best assistance based on the appropriate implementation of Xgraph in network simulator 2 then you guys can reach us.