Sunteți pe pagina 1din 10

Introduction

Ns (network simulator) is a discrete time network simulation primarily used in research. Ns is


build using C++ and Python with scripting capability.
The ns function can be divided into several steps as follows
1.
2.
3.
4.
5.
6.

Topology definition
Model development
Node and link configuration
Execution
Performance analysis
Graphical visualization

Basic Commands of CentOS


PWD
Prints the working directory

CD
Change the existing directory

MKDIR
Create a new folder

LS
To list the file in the directory

LOCATE
Find files

MAN
Help manual

CLEAR
Clear terminal screen

CAT
Print multiple results from various files

MORE
Display output one screen at a time

DATE
Display or change date and time

CHMOD
Change permission

Network Links
Network links are those that connect network nodes.
1. Simplex link
Those which transmit data in one direction only
2. Duplex link
Capable of performing two way data communication

Types of Queue
1. Classes
2. Enumerations

Traffic Contract
1. CBR
Transport traffic at constant bit rate

Internet Protocol
1. UDP
A simple connection less transmission model with minimum protocol mechanism
2. TCP
A core protocol in the internet protocol suite

Agents
In real world networking accessing of network is done through mainly sockets. In simulation
the function of sockets is effectively handled by the agents which can send traffic through
nodes. The receiving packets is usually handled by an agent named null agent.

Simulation Traffic
The ns2 allows two ways to traffic to flow through the nodes.
1. TCP
2. UDP

TCP
There are two major types of TCP agents, one-way agents and a two-way agent. One-way
agents are further subdivided into a set of TCP senders and receivers. The two-way agent is
symmetric in the sense that it represents both a sender and receiver. It is still under
development.

UDP
A UDP agent accepts data in variable size chunks from an application, and segments the data
if needed.

NS2 Simulations
Example1a

Example1b

500 packet size

1000 packet size

Example2

Transfer rate 1 Mb

Transfer rate 2 Mb

Example3

At 1.5 s

At 3 s

At 1.5 s the link is down and during the 3rd second the transferring take the shortest path.

Example4

Conclusion
Though ns2 is easy to handle modelling is very complex and time consuming. One of the main
drawback is the simulator has no graphical user interface.
In real-world systems, applications typically access network services through an applications
programming interface. The most popular of these APIs is known as sockets. In ns these
sockets are mimicked by well-defined agents. As a simulator the ns lacks a GUI and makes it
hard for the user by having to learn the language.

S-ar putea să vă placă și