BCA / B.Tech 8 min read

Finish Procedure NS2 & NAM

Finish Procedure NS2 & NAM in Hindi


  • The simulation process using NS2 and NAM is done in a systematic and functional way. This is not only important for the study of networking protocols and topologies, but also helps researchers and students to understand various aspects of networking.
  • The post-simulation process includes data collection, analysis, and reporting, which provides a strong foundation for further research and development.
  • The post-simulation process using NS2 (Network Simulator 2) and NAM (Network Animator) is important, which includes analysis of simulation results and interpretation of data.
Here we will discuss in detail the various steps of this process.

The complete process of NS2 and NAM

1. Setting up the simulation

Before starting the simulation, you need to create a proper topology. This topology includes various nodes, links, and protocols. The following steps can be followed to create a topology:

  • Creating a network topology: Describing the nodes and their connections in NS2.
  • Selection of protocol: Deciding which protocol will be used (TCP, UDP, etc.).
  • Traffic generation: Planning how data will flow in the network.

2. Preparing the simulation script

A script has to be written for the simulation which includes all nodes, connections, and required settings. This script is written in OTcl (Object-oriented Tcl) language for NS2.

Example:

# Start of NS2 script
set ns [new Simulator]

# Creation of nodes
set node1 [$ns node]
set node2 [$ns node]

# Adding connection
$ns connect $node1 $node2

# Data sending process
$ns at 1.0 "$node1 send $node2 10MB"

# Running the simulation
$ns run

3. Running the simulation

When the script is ready, the following command is used to run it:

ns simulation.tcl
This will start the simulation, and it will run for the specified time.

4. Tracing the simulation data

During the simulation, NS2 traces various data, such as packet transfer, latency, throughput, and packet loss. This data is stored in a trace file.

5. Loading data in NAM

To load the simulation results in NAM, the following command can be used:

nam tracefile.nam
NAM displays the simulation in an animated form in the graphical interface. This allows users to observe the network activities in real-time.

6. Analysis of results

By using NAM, users can analyze various metrics during the simulation. Important metrics include:

  • Latency: The time taken for data to reach from one node to another.
  • Throughput: The amount of data processed by the network in a period of time.
  • Packet Loss: The number of packets lost in the network.

7. Creating a report of the results

Once you have analyzed the results, the next step is to present those results in the form of a report. This report may include the following points:

  • Purpose and definition of the simulation
  • Topology and protocol used
  • Metrics analyzed
  • Interpretation of results
  • Suggestions for future research

8. Feedback and improvement

In the final step, the need for improvement and changes is assessed based on the simulation results. If the results are not as expected, then modifications to the nodes, protocols, or other settings may be required.

In this Chapter

Finish Procedure NS2 & NAM
Auto-Configuration and Anycast
Modified EUI-64 | What is Modified EUI-64?
Architecture of Mobile Computing
Wireless LAN in Hindi | What is Wireless LAN?
Wireless User Devices
MAC Protocol | What is MAC Protocol?
IEEE 802.11 | What is IEEE 802.11
Mobile IP | What is Mobile IP
Wireless TCP/IP
Unicast & Multicast Communication
Bluetooth | What is Bluetooth?
NS2 & NAM | What are NS2 and NAM?
Purpose & installation of NS2 & NAM
Background of NS2 & NAM
Architecture of NS2 & NAM
Interface of OTcl & C++
Trace Files & Formats
Protocol Support of NS2
Simulation Object of NS2 & NAM
Basic Syntax of NS2 & NAM
Node Creation of NS2 & NAM
Running NS2 & NAM
Invoking external commands within NS2
Nodes & Agents of NS2 & NAM
NS2 Commands
Creating Links in Wired Network
Setting Link Parameters
Sending Traffics Through NS2 Links
Routing Protocol Support of NS2
Scenarios in Wired Networks
Additional Parameters
Setting node positions
God object & topography
Protocol Support
Scenarios in Wireless Networks
What is the Internet? Difference Between Intranet and Extranet
Types of Internet
OSI Model and its Layers
Computer Network (CN) All Important Questions and Answers in English (MDSU)
BCA | Computer Network | 2025 Paper | MDSU Exam Paper
Importance of the Layer Model in Computer Networks
Network Classification
Network Topology
Network Switching & Components
Ethernet
Token Ring
Basic Networking Concepts & Cabling
What is a Computer in English?
Bridges in Computer Networks
Routers in Computer Networks
Gateways in Computer Networks
Public & Private Networks
FDMA (Frequency Division Multiple Access)
BCA | CN(Computer Network) Paper | 2023 MDSU Exam Paper
What is World Wide Web (WWW)
TDMA, SDMA, CDMA
Personal Communication System | What is PCS
IPv4 | What is IPv4?
Subnetting IPv4 Address
Casting in IPv4
Private IPv4 Addressing
IPv4 Address Scheme
IPv6 Addressing Scheme
Types of IPv6 Addressing