Download Nam for Ns2

        Let’s get to know about the content of this article and that includes how to download Nam for network simulator 2, how to install the Nam package for network simulator 2 and how Ns2 code is used for Nam configuration in the following.

Download Nam for Ns2

       Initially, we have to download the name package for Ns2 using the below mentioned URL and that includes the file extension with .deb.

Link to Download Ns2

Install Nam for Ns2

       Following that, we have to install the nam for Ns2 through the implementation of the below mentioned commands in the terminal.

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

Ns2 Code for Nam Configuration

      In addition, we have highlighted some sample codes that are based on Ns2 for Nam configuration.

  • Declare the nam trace file name and nam configuration for wireless network

set namtrace                [open Spectrum_Sensing.nam w]

$ns trace-all $tracefd

$ns namtrace-all-wireless $namtrace $val(x) $val(y)

  • Stop nam trace generation based on simulation time

$ns at $val(simtim) “$ns nam-end-wireless $val(simtim)”

  • Execute the nam trace

    global ns tracefd namtrace

    close $namtrace

exec ./nam Spectrum_Sensing.nam &

          To this end, we are ready to give suggestion on the stage where you face some issues and required assistance for your research.