How to Install Nam

              In general, the network animator is condensed as Nam and it is deployed to visualize the ns output. The editor in Nam includes the GUI interface to create ns. The nam is capable for the following processes.

  • Read the trace file
  • Create topology
  • Pop up a window
  • Pause at time 0
  • Do the required layout

           Our research professionals are well equipped to provide guidance about the Nam installation. Now, let’s see the step by step process to install Nam in the following.

Install Nam

           The installation process of Nam includes three significant methods and they are listed below. The method one is to download nam package from the following URL, After completing the download process, we have to install the nam package through the implementation of following commands in the terminal window.

sudo apt-get purge nam
sudo dpkg -i nam_1.14_amd64.deb
sudo apt-mark hold nam

            The second method, we have to download the package file using this “” URL. When it is downloaded, we have to remove the nam file that is installed earlier through the utilization of following command.

sudo apt-get remove nam

      Then, the new nam is installed and we have to go to the folder in which the nam file was downloaded and the following command has to be issued.

sudo dpkg --install nam_1.15-10_i386.deb

       The third method, in this we have to install the following command with the update of system using the below mentioned command.

sudo apt-get update

    Following that we have to update the OS to run the following command and to install the package.

sudo apt-get install nam

 In addition, we have enlisted the package details along with all its particulars in the following.

  • Repo or Section
  • Universe / Net
  • Release
  • Xenial Xerus
  • Operating system
  • Ubuntu 16.04
  • Description
  • Network animator for network simulation
  • Home page
  • Maintainer
  • Ubuntu developers
  • Version
  • 15-3
  • Package
  • Nam

Check Nam Installation Status

Additionally, we have conscripted the process and required steps to check the nam installation status. It is about the verification of functions through the implementation of small TCL and Tk simulation script.

set ns [new Simulator]
#Define different colors for data flows
$ns color 1 Blue
$ns color 2 Red
#Open the nam trace file
set nf [open out.nam w]
$ns namtrace-all $nf
#Define a 'finish' procedure
proc finish {} {
global ns nf
$ns flush-trace
#Close the trace file
close $nf
#Execute nam on the trace file
exec nam out.nam &
exit 0
#Create 2 nodes
set n0 [$ns node]
set n1 [$ns node]
#Create a UDP agent and attach it to node n0
set udp0 [new Agent/UDP]
$udp0 set class_ 1
$ns attach-agent $n0 $udp0
# Create a CBR traffic source and attach it to udp0
set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 500
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0
#Connect the traffic sources with the traffic sink
$ns connect $udp0 $null0  
#Schedule events for the CBR agents
$ns at 0.5 "$cbr0 start"
$ns at 4.5 "$cbr0 stop"
#Call the finish procedure after 5 seconds of simulation time
$ns at 5.0 "finish"
#Run the simulation
$ns run

Consequently, we have highlighted the Ns commands based on the creation and control process of Nam animations.

  • Node
$node color [color] ;# sets color of node
$node shape [shape] ;# sets shape of node
$node label [label] ;# sets label on node
$node label-color [lcolor] ;# sets color of label
$node label-at [ldirection] ;# sets position of label
$node add-mark [name] [color] [shape] ;# adds a mark to node
$node delete-mark [name] ;# deletes mark from node
  • Link and queue
$ns duplex-link-op attribute value
$ns duplex-link-op orient right
$ns duplex-link-op color "green"
$ns duplex-link-op queuePos 0.5
$ns duplex-link-op label "A"
  • Agent and features

The following command is about tracing the agents and they are deployed to separate the protocol states from nodes.

$ns add-agent-trace \ \ \
$ns delete-agent-trace \
$ns monitor-agent-trace \

The below mentioned code is about the creation of segments to trace the variable C1_ and about the SRM agent $srm(0).

$ns attach-agent $n($i) $srm(0)
$ns add-agent-trace $srm($i) srm(0)
$ns monitor-agent-trace $srm(0) ;\# turn nam monitor on from the start
$srm(0) tracevar C1_

     To this end, we have provided the required data about the installation of Nam through this article. If you have any queries you guys can reach us at any time and we provide the complete research assistance.