BCA / B.Tech 7 min read

Setting Link Parameters

Setting Link Parameters in Hindi | Setting Link Parameters in Hindi:


  • Setting link parameters in wired networks directly affects network performance. Using simulators like NS2, we can study the impact of various parameters and optimize the network. This process plays an important role in network design and 
  • traffic engineering.
  • Setting link parameters in wired networks is extremely important for network performance and reliability. Link parameters typically include features like bandwidth, latency, and packet loss rate. To effectively manage these parameters, 
  • various tools and simulators are available, one of the main ones being Network Simulator 2 (NS2).

Introduction to Network Simulator 2 (NS2):

NS2 is an open-source simulator used for simulating network protocols and topologies. It helps researchers and network engineers to study network behavior and evaluate the performance of various protocols.

Steps to set link parameters in NS2:

The following steps are followed to set the link parameters of a wired network in NS2:

  • Simulator Initialization: First, start the NS2 simulator and load the necessary libraries.
  • set ns [new Simulator]
  • Node Creation: Define the nodes included in the network (such as computers or routers).
  • set n0 [$ns node]
  • set n1 [$ns node]
  • Link Creation and Parameter Setting: Establish a link between the nodes and set its bandwidth, latency, and queuing mechanism.
  • $ns duplex-link $n0 $n1 1Mb 10ms DropTail
  • Here, 1Mb represents the bandwidth, 10ms the latency, and DropTail the queuing mechanism.
  • Selection of Queuing Mechanism: Define the queuing mechanism on the link, such as DropTail, RED (Random Early Detection), etc.
  • $ns queue-limit $n0 $n1 10
  • This command sets the queuing mechanism on the link between $n0 and $n1.
  • Simulation Operation: After all the settings, run the simulation and analyze the results.
  • $ns run

Example: Suppose we want to establish a link between two nodes, with a bandwidth of 10 Mbps, latency of 5 ms, and a RED queuing mechanism. The following script can be used for this:

set ns [new Simulator]

# Node creation
set n0 [$ns node]
set n1 [$ns node]

# Link creation and parameter setting
$ns duplex-link $n0 $n1 10Mb 5ms RED

# Selection of queuing mechanism
$ns queue-limit $n0 $n1 20

# Simulation operation
$ns run

  • In this script, we have established a link between $n0 and $n1 with a bandwidth of 10 Mbps, a latency of 5 ms, and a RED queuing mechanism. 
  • To set the queuing mechanism to RED, we have used the command $ns queue-limit $n0 $n1 20, 
  • where 20 represents the queuing limit.

In this Chapter

Setting Link Parameters
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
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