BCA / B.Tech 8 min read

Node Creation of NS2 & NAM

Node Creation of NS2 & NAM in Hindi | Creation of Nodes in NS2 and NAM in Hindi:  


  • The creation of nodes in NS2 and their animation with NAM provides a strong foundation for networking research. By setting up the nodes properly and using NAM, researchers can analyze networking protocols, traffic patterns, and other important aspects.
  • By using these tools properly, it becomes possible to understand and solve various networking issues.
  • NS2 (Network Simulator 2) and NAM (Network Animator) are major tools for network simulation, which are very useful in networking research. By using both of these, we can study various aspects of a network.

Here we will discuss in detail the creation of nodes in NS2 and the use of NAM.

Node Creation of NS2 in Hindi |  Creation of nodes in NS2:

1. What is NS2?

NS2 is an open-source network simulator that allows simulating various networking protocols, topologies, and communication methods. It has been developed using C++ and OTcl (Object Tcl).

2. Creation of a node

To create nodes in NS2, first we need to write a script in which we define the number of nodes, their types, and the relationships between them. Here is a simple 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

In this script:

  • set ns [new Simulator]: creates a new simulator.
  • set node1 [$ns node]: creates a new node node1.
  • $ns connect $node1 $node2: establishes a connection between two nodes.
  • $ns at 1.0 "$node1 send $node2 10MB": gives the command to send 10MB of data from node1 to node2 at time 1.0 second.
  • $ns run: starts the simulation.

What is NAM (Network Animator)?

NAM (Network Animator) is a graphical tool that works with NS2, which is used to see the animation of a network simulation. NAM graphically displays the nodes and their connections during the simulation.

1. Use of NAM in Hindi | Use of NAM

To use NAM, you first need to run the NS2 simulation, and then open NAM and load that simulation file.

nam tracefile.nam

2. View of nodes in NAM

In NAM, nodes are displayed with different sizes and colors, which helps the user to understand which nodes are active in the network and how they are interacting.

3. Features of NAM in Hindi | Features of NAM:

  • Graphical Interface: NAM provides a user-friendly interface that helps to see and understand the simulation.
  • Packet Tracing: NAM provides the facility to track the packets sent during the simulation, which allows the user to analyze packet loss, latency, and throughput.
  • Animation: It provides an animation of the network activities, which is especially useful for educational purposes.

In this Chapter

Node Creation of 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
Running NS2 & NAM
Finish Procedure 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