Nam in Networking

             Nam is denoted as the paybacks over the close relationship with ns and it is capable to collect the required protocol information from the simulation. The network animator is considered as the provision such as,

  • Capabilities of scenario editing
  • Traditional time event plots of protocol actions
  • Protocol graphs
  • Packet level animation

Creation of Wired Network in Ns2

               The wired network is created through the utilization of simple topology along with n number of nodes that are connected through the wired link. When two nodes in the network is capable to be connected through the utilization of duplex link and it is link characteristics such as,

  • Queue type
  • Delay
  • Bandwidth

             The code segment based on Tcl code is capable to create the wired network and the nodes are connected along with the duplex links in the bandwidth 2 megabit, droptail queue and delay of 50ms. All the nodes are assigned along with the label, shape and color. The wireless network along with n nodes is capable to view the network animator window with the implementation of TCL file and the TCL file code is highlighted in the following.

set ns [new Simulator]
set nt [open test1.tr w]
$ns trace-all $nt
#———-creating nam objects—————-#
set nf [open test1.nam w]
$ns namtrace-all $nf
$ns color 1 darkmagenta
$ns color 2 yellow
$ns color 3 blue
$ns color 4 green
$ns color 5 black
set totalNodes 3
for {set i 0} {$i < $totalNodes} {incr i} {
set node_($i) [$ns node]
}
set server 0
set router 1
set client 2
#———- Creating Duplex Link—————-#
$ns duplex-link $node_($server)
$node_($router) 2Mb 50ms DropTail
$ns duplex-link $node_($router)
$node_($client) 2Mb 50ms DropTail $ns duplex-link-op $node_($server)
$node_($router) orient right $ns duplex-link-op $node_($router)
$node_($client) orient right #————Labelling—————-#
$ns at 0.0 "$node_($server) label Server"
$ns at 0.0 "$node_($router) label Router"
$ns at 0.0 "$node_($client) label Client"
$ns at 0.0 "$node_($server) color blue"
$ns at 0.0 "$node_($client) color blue"
$node_($server) shape hexagon
$node_($client) shape hexagon
#———finish procedure——–#
proc finish {} {
global ns nf nt
$ns flush-trace
close $nf
close $nt
puts "running nam…"
exec nam test1.nam &
exit 0
}
#Calling finish procedure
$ns at 10.0 "finish"
$ns run

        In the following, we have highlighted the networks that are created using network animator such as,

  • Queuing disciplines
  • Traffic sources
  • Failure types
  • Wireless networks
  • Satellite networks

        Our research team and developers are highly qualified and are intended uniquely to establish effective research ideas into authenticity. So, the research scholars can enthusiastically contact our experienced research professionals anytime on the subject of the doubts and queries related to networking research field.