Network animator nam is the provision of dynamic visualization of packets and the pass through the links of networks. The network nodes are fixed position in the animation is demonstrated. It is the provision of graphical user interface with various simulation environments as per the parameters that are specified through the user. The network traffic is animated in various methods and the nam interpretation is deployed to trace the file that includes time indexed network events. Ns simulation creates this traces the nam is capable to data processing the live network to generate trace.
How do I run a .TR File in Ns2?
- Install Ns2 and set the path
- When Ns2 is installed, it have to $prompt and run ns filename and ns tcp.tcl
- .nam and .tr files are created in one folder
- The nam tcp.nam is run in GUI to visualize the demo
- The .tr file is considered as the definite file and that is assistive to view the performance factors such as
- Packet drop
- Throughput
- The tracegraph202 and Xgraph are the software used to deployed to parse the .tr file
Wireless Network Coding in Ns2
Here, we have highlighted the steps that are required to create and implement the wireless networks and the steps such as,
Step: 1
Initialization of variables
Step: 2
Creation of simulator objects
#creation of Simulator
set ns [new Simulator]
Step: 3
Creation of animation file and tracing file
#Creation of Network Animation file
set namfile [open wireless.nam w]
$ns namtrace-all-wireless $namfile $val(x) $val(y)
Step: 4
Topography
Step: 5
General operations directors (GOD)
Step: 6
Node creation
Step: 7
Channel creation such as communication Path
Step: 8
Position of the nodes in the wireless nodes required the location
Step: 9
Various mobility codes
Step: 10
TCP and UDP traffic
The simulation is running through the utilization of nam based auto generated trace files.
proc finish {} {
global ns tracefile namfile
$ns flush-trace
close $tracefile
close $namfile
exit 0
}
puts "Starting Simulation"
$ns run
Wired Network Coding in Ns2
It is about the depiction of wired network coding in Ns2 and it is utilizing 6 nodes and interchanging the FTP and CBR packets among the nodes through the below mentioned code.
#create a animation infomration or NAM file creation
set namfile [open wired.nam w]
$ns namtrace-all $namfile
…
#creation of Application CBR, FTP
#CBR - Constant Bit Rate (Example nmp3
files that have a CBR or 192kbps, 320kbps, etc.)
#FTP - File Transfer Protocol (Ex: To download a file from a network)
set cbr [new Application/Traffic/CBR]
$cbr attach-agent $udp
set ftp [new Application/FTP]
$ftp attach-agent $tcp
#Start the traffic
$ns at 1.0 "$cbr start"
$ns at 2.0 "$ftp start"
Computer Network Simulation Using Ns2
The computer network simulation is considered as the provision of solid foundation of computer networking knowledge and skills based on the operating system. The commands are deployed to analyze the complex network performance metrics. The performance of simulation includes the process of rapid evolution of voice and data communication techniques and evolution of computer communication. In this simulation process, we implement various computer network protocols with OSI, TCP and IP models through the utilization of networking devices.
Simulation Flow in Nam
The simulation and localization performance of underwater sensor network are highlighted in the following. The node and channel characteristics include the definition of water environment area and node energy.
- Starting simulator
- Selecting beacon with their position
- Random movement of nodes
- Calculating position and distance
- Execution of .nam file
- Existing Ns
To this end, we are functioning for your research needs and for your research career achievements. So, you can have us from the beginning stage of your research projects based on Nam in computer network. You can also reach us at any stage of you project with your research demands and we provide support and assist you from that stage. Any way, we will bring the massive success in your research work. Reach as to aid more.