My Project | Low Rate Wireless Personal Area Networks in NS2

My Final Year Project... Thought of Sharing with others..!

Recent Posts

Useful Links

Internet Marketing
LinkAlizer makes it easy and fast for you to to find link exchange partners and increase traffic.
Free Website Directory

NETWORK SIMULATOR

Purpose

NS (version 2) is an object-oriented, discrete event driven network simulator developed at UC Berkely written in C++ and OTcl. NS is primarily useful for simulating local and wide area networks. Although NS is fairly easy to use once you get to know the simulator, it is quite difficult for a first time user, because there are few user-friendly manuals. Even though there is a lot of documentation written by the developers which has in depth explanation of the simulator, it is written with the depth of a skilled NS user. The purpose of this project is to give a new user some basic idea of how the simulator works, how to setup simulation networks, where to look for further information about network components in simulator codes, how to create new network components, etc., mainly by giving simple examples and brief explanations based on our experiences. Although all the usage of the simulator or possible network simulation setups may not be covered in this project, the project should help a new user to get started quickly.

 

3.1.2 Overview

NS is an event driven network simulator developed at UC Berkeley that simulates variety of IP networks. It implements network protocols such as TCP and UPD, traffic source behavior such as... Continue Reading

 

Simple simulation

This section shows a simple NS simulation script and explains what each line does. An OTcl script that creates the simple network configuration and runs the simulation scenario is shown... Continue Reading


EXPLANATION FOR A SIMPLE PROGRAM

The following is the explanation of the script above. In general, an NS script starts with making a Simulator object instance.

set ns [new Simulator]: generates an NS simulator object instance, and assigns it to variable ns (italics is used for variables and values in this section).

What this line does is the following:

Initialize the packet format (ignore this for now)

Create a scheduler (default is calendar scheduler)

Select the default address format (ignore this for now)

 The "Simulator" object has member functions that do the following:

  Create compound objects such as nodes and links (described later)

Connect network component objects created (ex. attach-agent)

Set network component parameters (mostly for compound objects)

Create connections between agents (ex. make connection between a "tcp" and "sink")

Specify NAM display options

Etc... Continue Reading

 

The Network Animator

The network simulator (ns) comes along with an interesting tool, called the Network Animator (NAM). Nam is a Tcl/TK based animation tool for viewing network simulation traces and real world packet trace data. The design theory behind nam was to create an animator that is able to read large animation data sets and be extensible enough so that it could be used in different network visualization situations... Continue Reading

0 comments

Post a Comment