Visualization of network simulator

We can visualize the output in the network simulator as follows.

  • On clicking on the start button highlighted in green in the figure, the traffic flow starts at 1.0 and ends at 3.0. In the meantime the awk file calculates and stores the required values to be computed.

  • Furthermore, to evaluate the traffic we can calculate throughput and dropped packets in the awk file. The following command is used to run an awk file.
awk -f filename.awk filename.tr
  • The output obtained will be something like this as follows.

Note: Since the connection between nodes was not terminated at any instant, there won’t be any dropped packets. However, the simulation can be customized to include such terminations at certain intervals and in such cases dropped packets may exist.


TCL script to create FTP traffic over TCP

Tcl script also known as Tool Command Language script, is a series of commands that can be used to control software applications. Tcl is a high-level, general-purpose, interpreted, dynamic programming language. In this article, we are going to learn how to write a tool command script to simulate a TCP connection between 2 nodes and pass FTP traffic between them in ns2. We will also know how to display throughput packets dropped, received and sent. 

Similar Reads

Steps to Generate TCL Script to Create FTP Traffic Over TCP :

The routing algorithm used in the program is the Distance Vector Routing Protocol. If you are not familiar with the Network Simulator and Tool Command Language you can check this first https://www.geeksforgeeks.org/basics-of-ns2-and-otcltcl-script/. Now, let’s discuss the implementation part of TCL script to create FTP traffic over TCP step by step as follows....

AWK file creation

Let’s know how to create an awk file to view the number of packets received, dropped and the overall throughput as follows....

Visualization of network simulator

We can visualize the output in the network simulator as follows....