Skip to main content

NETWORK ANIMATOR [NAM]

 NAM is a Tcl/TK based animation tool for viewing network simulation traces and real world packet traces. It supports topology layout, packet level animation, and various data inspection tools.It has a graphical interface, which can provide information such as number of packets drops at each link.The network animator "NAM'' began in 1990 as a simple tool for animating packet trace data.Nam began at LBL. It has evolved substantially over the past few years. The NAM development effort was an ongoing collaboration with the VINT project. Currently, it is being developed as an open source project hosted at Sourceforge.


This trace data is typically derived as output from a network simulator like ns or from real network measurements, e.g., using tcpdump.

We can either start NAM with the command 
                                                       
                                                            'nam <nam-file>'

where '<nam-file>' is the name of a NAM trace file that was generated by NS or one can execute it directly out of the Tcl simulation script for visualization of node movement.

NAM window is showed on the following figure;



We can use NAM in network simulation by creating nam trace file and after that executing the nam trace file on TCL script.

SYNTAX:

To create a nam trace file
  
                                set nf [open trace.nam w]
                                $ns namtrace-all $nf

which means we are opening a new nam trace file named as "trace" and also telling that data must be stored in nam format.

"nf" is the file handler that we are used here to handle the trace file.

"w" means write i.e the file trace.nam is opened for writing.

The second line tells the simulator to trace each packet on every link in the topology and for that we give file handler nf for the simulator ns.


To execute a nam file

                                proc finish {} {
                                global ns nf
                                $ns flush-trace
                                close $nf
                                exec nam trace.nam &
                                exit 0
                                }

In here the trace data is flushed into the file by using command $ns flush-trace and then file is closed.Then,execution of nam file is done by using following command.

Animated Network in NAM

program to launch NAM window:


#at start of the programn
set x 500
set y 500
set n 30
set ns [new Simulator]
set f0 [open wir7.tr w]
$ns trace-all $f0
$ns use-newtrace
set namtracefd [open wir7.nam w]
$ns namtrace-all-wireless $namtracefd $x $y

#at end of the program
$ns at 10.0 "stop"
proc stop {} {
    global ns f0 namtracefd
    $ns flush-trace
    close $f0
    close $namtracefd
exec nam wir7.nam &
exit 0
}
#Run the simulation
$ns run


EXTENDED NETWORK ANIMATOR

The Extended Nam Editor is an editor that allows the graphical creation of ns2 scripts. It extends the basic Nam Editor with the following features:

  • Integration with existing topology generators
  • Localization and visualization of set of nodes on large network topologies according to different selection criteria;
  • Instantiation of agents of any types on all the nodes of a given node set;
  • Definition of new node types;
  • Support for simulations of web cache systems.

The Extended Nam Editor work under Linux operating system; it is available for download in links given on the bottom of page.

TOPOLOGY GENERATOR INTERFACE

The manual generation of complex Network Topology is a tedious and error prone activity. In order to simulate networks with realistic topologies, it is a common practice to use ad-hoc topology generators, whose output is usually not compatible with the ns2 syntax. Hence, several tools have been developed to translate topology descriptions generated by topology generators in ns-scripts that can be used in the definition of a simulation scenario. Unfortunately, scripts produced in this way are not compatible with the Nam Editor, hence networks created by common topology generators cannot be modified interactively. Such a limitation is sometimes annoying, in particular when the automatically generated topology needs to be further adapted, e.g. by instantiating agents on particular network nodes.

Our extended Nam-Editor provides a graphical interface to:

  1. GT-ITM topology generator;
  2. INET topology generator;

It is now possible to create, visualize and modify topologies created according to the following topology models:

  1. flat-itm;
  2. hierarchical-itm;
  3. transit-stub-itm;
  4. INET;

In order to integrate the above mentioned topology generators in Nam-Editor, our tool not only provides the generators with the required input parameters, but it also translates the generated topology description in the Nam-Editor internal representation of a network. To create a new network topology the user must:

                                                           

  1. select a generation method from the generator list(Fig.1). 
  2. click the "Topology Generation" button(Fig.1).
  3. fill in a generator-specific input masks, in order to provide the selected generator with the required parameters (see fig. 2).
  4. click the "Create Topology" button (see fig.2).


                                                              
Node Set Tool

Localization of a network agent in a simulation scenario is a two steps process, which requires:

  • the localization of the node in which the agent must be instantiated;
  • the instantiation of the agent.

To support agent instantiation in large topologies we have included in the extended Nam-Editor the concept of Node Set.
A Node Set is a set of nodes selected according to one of the following criteria:

  • leaf node;
  • mutual distance;
  • randomly.

When a network topology is created with one of the supported topology generators, a few Node Sets are automatically created, reflecting the topology model. For instance, in the case of a transit-stub topology, a Node Set is associated to each transit domain and to each stub domain. With the Node Set Tool it is possible to (see fig. 3):

  1. visualize all the nodes included in a given set;
  2. associate a color to all the nodes included in a given set;
  3. instantiate an agent on all the nodes of a given set;
  4. instantiate a Web Server on all the nodes of a given set (See Web Tool);
  5. instantiate a Web Client on all the node of a given set (See Web Tool);
  6. instantiate a Web Cache on all the node of a given set (See Web Tool);



Editor Configuration

The ns2 is an extensible network simulator.
New protocols can be simulated through the definition of a new Agent type.
Likewise, particular network scenarios may require the definition of new Node types.
The GUI of our Extended Nam Editor can be customized to:

  • add an user-defined agent to the agent list;
  • customize the parameters of a user-defined agent;
  • define new node type and its parameters;
  • associate a particular node type to any node.

To create a new agent type (or a new node type) the user must:

  • select the "Configure Editor" entry from the Edit menu;
  • click the "Define New Agent" button (see fig. 4);
  • fill in the new agent mask and click the "Continue" button (see fig. 4);


                                                            
  • define the Name and the Default value for any agent parameter (see fig. 5);
  • click the "Continue" button (see fig. 5).


Once the previous steps have been completed, the new agent type is permanently included in the agent list.

Web Tool

A special support as been provided in our Extended Nam Editor for simulating web cache systems. A proper tool (see fig. 6) can be used to create web-page pools and to deploy system of caches, servers and clients onto a previously generated topology.



The configuration of any web element is made through a configuration window (see fig. 7); for the meaning of the parameters included in this window please refer to the ns Manual.

                                               

Install instructions

If you start from the source distribution:

  1. cd to your ns-allinone
  2. remove the nam-1.0a11 directory (rm -rf nam-1.0a11)
  3. expand the ext-nam-1.0a11.tar.gz archive (tar xzvf ext-nam-1.0a11.tar.gz)
  4. cd nam-1.0a11
  5. build the extended nam editor (./configure; make clean; make)

If you start from the binary distribution:

  1. expand the ext-nam-1.0a11.gz file (gunzip ext-nam-1.0a11.gz);
  2. put the nam binary in your path.
For DOWNLOAD,click:
                                        1. For binary distribution
                                        2. For source distribution             

Comments

Popular posts from this blog

Link State Routing Protocol

Link state routing is a method in which each router shares its neighborhood’s knowledge with every other router on the internetwork. In this algorithm, each router in the network understands the network topology and then makes a routing table depending on this topology. Each router will share data about its connection to its neighbor, who will, consecutively, reproduce the data to its neighbors, etc. This appears just before all routers have constructed a topology of the network. In LSP, each node transmits its IP address and the MAC to its neighbor with its signature. Neighbors determine the signature and maintain a record of the combining IP address and the MAC. The Neighbor Lookup Protocol (NLP) of LSP derives and maintains the MAC and IP address of every network frame accepted by a node. The extracted data can support the mapping of MACs and IP addresses. The link-state flooding algorithm prevents the general issues of broadcast in the existence of loops by having every node mainta...

Matter: A next generation home standard

The smart home is evolving. To date, if you've wanted to get into developing a smart home, you've had to deal with the multitude of smart home ecosystems, and making sure that each device you buy is compatible. That, however, may soon change — thanks to new smart home standard called Matter. Matter isn't available just yet, but when it is finally released, it could completely change how you buy smart home products, for the better. All of the best smart home devices could soon support the standard, helping them all work together nicely, and ensuring that no matter what products you buy, you'll be able to use them. Matter is basically the name of a new smart home connectivity standard . But this standard is a little unlike others. That's because of the fact that it's being developed by the Connectivity Standards Alliance, which counts hundreds of companies as members. That includes the likes of Google, Alexa, and Apple. So, whether you prefer to use Google Assista...

New interactive stickers for Stories

Instagram has introduced several new features to Stories, offering interactive ways to share music, photos, and videos. One of the most interesting additions is a feature called Reveal , which blurs the content of a story post and requires viewers to DM the person who shared it in order to see it. Instagram's head, Adam Mosseri, has emphasized the importance of direct messages on the platform, with stories and DMs driving most of Instagram's growth. Requiring a DM to view content represents the next step in boosting engagement, and creators are likely to use it as a tactic to increase their stories' engagement. Another new feature, Frames, adds a Polaroid overlay to images that initially appear gray. Users can shake their phone to reveal the photo, resembling the process many people associate with Polaroid pictures, despite the fact that shaking Polaroids is not recommended by the company during development. Instagram has also introduced a music-based template feature calle...