BCA / B.Tech 18 min read

Setting node positions

Setting node Positions in Wireless Network in Hindi |  Setting node positions in a wireless network in Hindi:


  • Setting the positions of nodes correctly in a wireless network is extremely important for the performance of the network. The position of the nodes has a direct impact on coverage, connectivity, interference, and energy consumption. Using various types of simulation tools, such as NS2,
  • we can set the positions of the nodes through manual, random, grid, and mobility models. The selection of the right positioning strategy depends on the objectives and requirements of the network.
  • Setting the positions of nodes in a wireless network plays an important role in determining the performance and coverage of the network. This is especially important when we model a wireless network using a simulation tool like NS2.
  • In this type of simulation, the determination of the position of the nodes has an impact on the topology of the network, signal coverage, latency, and the quality of communication. In this article, we will discuss various aspects of setting the positions of nodes in a wireless network, and understand
  • why it is important and how it is done.
Importance of position of nodes in wireless networks in Hindi | Importance of the position of nodes in a wireless network

Coverage Area: The position of the nodes affects the coverage area of the network. If the nodes are placed too far apart, the signal strength can be low and communication can fail. On the other hand, if the nodes are placed too close, the signals can overlap, which can cause interference.

Network Connectivity: The position of the nodes also affects the connectivity of the network. Nodes placed in the right position ensure the effective flow of data through the network. If the positions of the nodes are not determined properly, then some nodes in the network will not be able to communicate with each other.

Signal Interference: Not having a proper distance between the nodes can cause interference in the signal, which affects the quality of the network. The positions of the nodes should be set carefully to reduce interference.

Energy Efficiency: Especially in a wireless sensor network (WSN), the position of the nodes also has an impact on energy consumption. If the nodes are very far from each other, then the nodes will need more power for data transmission. Therefore, it is necessary to deploy the nodes properly for energy-efficient communication.

Ways to set the position of nodes in a wireless network in Hindi | Ways to set the position of nodes in a wireless network:

There are many ways to set the positions of nodes in a wireless network simulation. This depends on what type of network is being prepared and what the user's goal is. Some important aspects of setting the positions of nodes in different ways are discussed below:

1. Manual Positioning

  • In this method, the user sets the position of each node manually. In a simulation tool like NS2, each node is given a specific (x, y, z) coordinate, and it is decided that that node will remain at that location. This position can be static or the user can also change it.

For example, the following script can be used to set the positions of nodes in NS2:

# Create a wireless node
set n0 [$ns_ node]

# Set the initial position of the node
$ns_ initial_node_pos $n0 50 50 0

# Create another wireless node
set n1 [$ns_ node]

# Set the initial position of the node
$ns_ initial_node_pos $n1 150 100 0
In this example, n0 and n1 are two nodes whose positions are (50, 50, 0) and (150, 100, 0) respectively. Here, the position is set using x and y coordinates, while the z coordinate is kept at 0, which represents a 2D space.

2. Random Positioning

  • In random positioning, the positions of the nodes are set randomly in a specific area. This is useful when the topology of the network is uncertain, such as in a mobile ad-hoc network (MANET) or a wireless sensor network.

Random positioning can be done in NS2 in the following way:

# Set a random position for node
proc random_position {node} {
    set x [expr rand() * 500]  ;# Random x coordinate
    set y [expr rand() * 500]  ;# Random y coordinate
    set z 0                    ;# 2D plane, so z is 0
    $node set X_ $x
    $node set Y_ $y
    $node set Z_ $z
}
This script places each node at a random position, where the x and y coordinates take a random value between 0 and 500.

3. Grid Positioning

  • In grid positioning, the nodes are arranged in a grid pattern. This is useful when we want to create an organized network topology, such as the network of commercial buildings or a large campus. In this, the nodes are at an equal distance from each other at a specific interval.

For example, if we need to create a 4x4 grid, then the nodes can be arranged in the following way:

set count 0
set grid_size 4
set distance 100

for {set i 0} {$i < $grid_size} {incr i} {
    for {set j 0} {$j < $grid_size} {incr j} {
        set n($count) [$ns_ node]
        set x [expr $i * $distance]
        set y [expr $j * $distance]
        $ns_ initial_node_pos $n($count) $x $y 0
        incr count
    }
}
In this script, the nodes are arranged in the form of a grid where each node is at a distance of 100 units.

4. Mobility Models

In some wireless networks, especially mobile networks, the positions of the nodes are constantly changing. For this, "mobility models" are used. Through these models, the nodes are allowed to move so that the behavior of mobile networks can be understood in the simulation.

Various types of mobility models are available in NS2, such as Random Waypoint, Gaussian Mobility Model, etc.

For example, the Random Waypoint model can be implemented in the following way:

# Set mobility for nodes
$ns_ at 1.0 "$n0 setdest 200 300 20.0"  ;# Node moves to (200, 300) with speed 20 m/s
$ns_ at 2.0 "$n1 setdest 100 150 10.0"  ;# Node moves to (100, 150) with speed 10 m/s
This script allows the nodes to move from one location to another at a specific speed during the simulation.

Important factors for setting the position of nodes in Hindi | Important factors for setting the position of nodes:

  • Network coverage: The position of the nodes should be such that the signal is sufficiently strong throughout the coverage area.
  • Energy Consumption: In a wireless sensor network, the position of the nodes should be set in such a way that energy consumption is minimized.
  • Network Topology: The position of the nodes should be set according to the topology of the network, whether it is a grid pattern, random, or other.
  • Signal Interference: The position of the nodes should be set in such a way that signal interference is minimized.

In this Chapter

Setting node positions
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
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
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