Simulation is one of the important technologies in modern time. The simulation in computer can model hypothetical and real-life objects on a computer so that it can be studied. The network is also simulated on the computer. The technique of implementing the network on the computer is network simulator. Most of the simulators are graphical user interface driven. The simulators which require commands or scripts as we talk about the NS2 which gives input in form of TCL scripts or in AWK scripts.

Network simulators are particularly used to simulate, design and analyze the various kinds of networks and also to analyze the performance by the effect of various network parameters.
For implementing the network , there are so many simulators or software programs which work as simulator such as NS-2 which describes the complete description and design of wired and wireless network and for following security issues and evaluation of routing protocols, network protocols, transport layer protocols, physical layer protocols(MAC, ETHERNET). Being a simulator NS-2 plays a huge role as simulation tool for different type of network. NS2 is simulators that analyzes the performance of protocols and have number of algorithms for queuing and routing the network.
There are many simulators in today’s world which provide a simulation environment to wired or wireless network as NS-2, NS-3, Opnet etc. which provide simulation environment in real world. Simulation environment is necessary and gives ease to real world network. We are using NS-2 through which we evaluate the new designed network or a new wired or wireless network in NS-2 or also evaluate the performance of existing wired or wireless network. NS-2 also provide a simulation environment for designing or implementing network protocols, routing protocols, transport layer protocols (TCP, UDP), Application layer protocols (FTP Traffic, CBR, Exponential Traffic) . and gives the effect of packet traffic or how many packets will depart or arrive or loose from source to destination.
NS-2 uses OTCL programming language which is object oriented and provides simulation environment for number IP written in TCL or in C++ language. In this with the extension all the scripts are written Text editor and saves through TCL. In NS-2 there is a TCL interpreter which interprets the TCL script code line by line. The concept of objects and classes are introduced in the OTCL the kernel of NS-2 which is built in C++ language. Generally, TCL initializes the discrete event schedule, also set the topologies of Network and simulates the source traffic, i.e., CBR (Constant Bit Rate) traffic which will generate constant number of packet as traffic from source.
Goals of NS-2 Simulator:
• Protocol design, network traffic studies
• Protocol compression
• New architecture design
OTCL (object oriented TCL): The User Language
NS is fundamentally called as OTCL in simulation of network while interpreting the network and its object. It tells how to use or how to script programming in NS2.

















