How to Use Ns2
Do you want to know, what are processes that are required to run the Ns2 file? If yes! Then, take a look at this article.
Step: 1 Ns2 Installation in Ubuntu
We have to execute the following commands in Ubuntu terminal window to install Ns2 in Ubuntu.
cd /home/research/ns-allinone-2.35
sudo ./install
![Installation of Ns2 in Ubuntu](https://www.ns2project.com/wp-content/uploads/2023/05/ns2-installation-in-ubuntu-1.png)
Step: 2 Creation of Ns2 Simulation in Ubuntu
To perform the Ns2 simulation, we have to create the simulation file with the file extension .tcl in the workspace location.
![Main File of Ns2 Simulation in Ubuntu](https://www.ns2project.com/wp-content/uploads/2023/05/main-file-for-ns2-simulation-in-ubuntu.png)
Step: 3 Run Ns2 Simulation in Ubuntu
We have to execute the below mentioned commands in Ubuntu terminal window to run the Ns2 simulation in Ubuntu.
cd /home/research/Desktop/ns2_simulation
sudo ./ns Main.tcl
![Run Ns2 Simulation in Ubuntu](https://www.ns2project.com/wp-content/uploads/2023/05/run-ns2-simulation-in-ubuntu-1.png)
Following that, we have highlighted the result which is acquired through running Ns2 simulation in Ubuntu.
![Result of Running Ns2 Simulation in Ubuntu](https://www.ns2project.com/wp-content/uploads/2023/05/result-for-run-ns2-simulation-in-ubuntu-1024x548.png)
Metrics Calculation Using Ns2
Now let’s get to know about the list of performance metrics calculation through executing the Ns2 simulation.
- Encryption and decryption time
- Attack detection rate
- Throughput
- Packet delivery ratio
- End to end delay
- Energy consumption
If you have any complications while running the Ns2 file, then just ring us and our team of research helpers will clarify all your queries.