Sun Stea

No items matching your keywords were found.

Sun Stea
Sun Stea

Network simulator 2- NS2

Introduction Network Simulator 2:

The starting development in the field of network simulation was made by Lawrence Berkley at the National Laboratory by developing a network simulator named Network Simulator 1(NS1) in the year 1995. Then the development moved further with the launch of Network Simulator 2 (NS2) which had more advanced versions, enhanced features and support of real time simulation. Examining designing of protocols, their communication between each other and performance related issues are taken care of by NS2 apart from developing the real time networks. Important role is played by NS2 in the present world. Network Simulation 2 software is also used for education purpose. In the field of education NS2 has provided the students to carry out real time research of different networks and the license provided is free of cost.

As NS2 is an open source Network Simulator more new versions of NS2 are being researched on and will be available soon in the market (Floyd S, Roy S, Henderson T and Riley G, 2006). Other network simulators like NetSim, OPNET, QualNet, AnyLogic are available in the market, but in accordance to a survey made from the year 2000-2005, NS2 is the most demanding and popular simulator in the market. It was used to simulate around 44% of all the simulations (Kurkowski S, Camp T, Colagrosso M, 2005). The official website from where this simulator can be downloaded is http://www.isi.edu., and all the documentation and related tutorials to use the NS2 can be acquired from the website http://www.isi.edu/ns/tutorial. NS2 can be installed on different O.S like Windows, UNIX, Linux, Solaris etc. the recommended operating systems to run NS2 is UNIX and Linux.

Ease of use:

If a system is user friendly then it becomes more demanding and popular in the market. But if NS is being used on Linux then it becomes some what difficult for the user as Linux is totally a command based operating system. When NS is being used on Windows it becomes easy for the user as it is a friendly O.S. As we only talk of NS then it is very easy to use software and the tools provided by it are very easy to use too by even a beginner. The factors which make NS2 a user friendly and the most demanding software are:

Language Support:

The computer languages like C++ and OTcl which are easily understood by the user are supported by NS2. Network Simulation is created by using the language OTcl.  The response of OTcl language is quick and recompilation of the code is needed by this language. The code takes more time to run the Simulation. On the other hand C++ is used as a system level program language. It manipulates bytes and headers to run different algorithms in large data sets. The compilation time taken by C++ is more than the time taken by the Simulation itself. The objects which are not present in the libraries can be created by using C++. As compared to OTcl, C++ is slow in implementing the changes and the structure of the syntax is complex.

Protocol Support:

NS2 supports multiple protocols which is a positive factor in the demand and popularity of the simulator. By this feature of NS2 it is an appropriate simulator for many networks. NS2 supports protocols of TCP/IP at different OSI layers. Some of the protocols are TCP, UDP, CBR, FTP etc. as application layer of OSI model protocols.

TCP:

Transmission Control Protocol (TCP) works in the direction of making a connection between nodes before any communication is to be done. OSI transport layer support this protocol. When the connection is established it should be error free, acknowledgement of packet received by the user on the other side and retransmission of packet if it is lost during transmission. The packets which are transferred from source to receiver is acknowledged by the receiver it receives the packet with out any errors. In any case an error is reported by the receiver then the packet is to be re-transmitted. Every packet sent from the source is sent after receiving an acknowledgement from the receiver. When compared to UDP connection TCP is slow as UDP does not waits for any acknowledgement from the receiver.

FTP:

File Transfer Protocol (FTP) is the protocol used by TCP in client/server architecture. Two connections of TCP are made by this protocol; one will be for the connection to be established and the other to transfer files. Uploading and downloading of files on the web is the best example of FTP.

UDP:

User Datagram Protocol (UDP) is a protocol used for node to node transmission and is unreliable and connection-less. Bursting of bits is the transmission method used in this protocol. Video streaming is the best example of UDP traffic. In video traffic any clip which gets missed cannot be recovered and in an UDP the packets which are lost can't be recovered. There is no acknowledgement of packet received by the receiver in UDP connection.

CBR:

Constant Bit Rate (CBR) uses UDP protocol for transmission and transmission takes place in continuous form of bits. Constant bandwidth is used during the whole transmission. ATM circuits usually use the CBR traffic.

Graphical Representation Support:

Two graphical representation techniques are used by the NS2 to show the results of the simulation. They are Nam and Xgraph. The real time simulation results are displayed the graphical tool Nam. Nam visually shows the topological design of the simulation network as output and also displays the communication between the nodes as representing the exchange of packets between the nodes. The traffic can be monitored and behaviour too by the designer by using the analyzing tools which shows the position of the network at different times in accordance to the real time simulation.

Xgraph is another technique used to display the simulation results in the form of a graph. Before the simulation a trace file is created and the simulation results are saved in the trace file by utilizing simulation file. The data sets are used for the generation of Xgraph are saved in trace file; hence the trace file becomes the input of the program to generate the Xgraph.

Cost factor of the Simulator:

The cost of the NS2 simulator is nothing as it is free to download for education and research purpose. It is used to simulate large networks and this simulation will cost nothing when compared to the real network implementation. The hardware side of the simulator is cost effective as it needs a machine, O.S and C++ compiler which have to be purchased. O.S like windows have to be purchased but the Linux is available free of cost in the markets. When simple scenarios are to be compiled they will run on normal machines, but when the network is large where the scenario will be also large there we need a machine with large memory which will be cost effective.

The cost of simulation is very less when compared to real implementation of the network. According to the requirement, the network designer designs the network using the simulator on the basis of topology and the network traffic. The results of this simulator are used by the designer to analyze the design. If the designer wants to make any changes in the design then it becomes easy by checking the results.  If the same is considered in real implementation of the network then it would be cost effective and it would also not be as simple to change the network structure and check the results every time and if done so then it would mean a big investments in implementing the changes and time consuming.

If a designer pays for a simulator software and the machine and other software or tools required for simulation then it would be much less than the cost of testing a real network, as real time implementation includes the cost of the cables, hardware, installation, network management and failure recovery. The simulation of a network on a machine would cost around few hundreds but the cost of real implementation would run into bills of few hundred thousand. When a simulation is done on a machine on a network and if there are any changes to be made they will be covered under the same cost, but in real time implementation the change in network structure will require additional amount. So the results on a simulator are much cheaper and reliable when compared to real time implementation of the network.

NS2 Limitations:

NS2 is widely used for research but it has some limitations. It uses traces and monitors for data collection (Stea G, Mingozzi E and Cicconetti C, 2006). Monitor just gives the display of behaviour information of the queues in the network whereas the Trace gives the log information of packet queuing, dropping, forwarding etc. CIDR (classless inter-domain routing) and subnetting are not provided by the NS2 emulation. Support for variable bit rate (VBR) is not there in NS2 as like that of CBR support it provides. At present VBR is used for audio/video streaming in the real networks. NS2 does not support processing delay but support different delays like propagation, queuing and transmission. It has limited functions when the scenario is of a big large network. In a large network there are hundreds of nodes to simulate and NS2 can't give the results of that much large simulations. It is like the more the nodes the slow the simulation becomes.

More enhancements are to be done on NS2 and it is still in development stage especially in the area where classes of mobile node and position handling are required for more enhancements.

Support Material:

Networking research is done using this simulator NS2 which is a separate event simulator. There are many versions available of Network Simulator 2 in the market and they have been developing since the year 1989. The coding is done in C++ and OTcl. This simulator is widely used for university research projects as it is an open source simulator. Control algorithms, TCP behaviour and queuing paradigms are the topics mostly researched on. There is not standard body which hold or manages the simulator but there is much data available on the internet about NS2. One standard website that provides the material for NS2 is www.isi.edu/ns/nsnam. This website provides examples and detail tutorial of NS2 and it gives the solutions to the problems directly. All the features are explained deeply in this tutorial with examples. NS2 was developed for UNIX O.S variants such as FreeBSD, Linux and Sun Solaris, but due to the user friendly option of Windows, it was installed on Win32 compatible O.S with using some tools like cygwin.

Features:

  1. NS core and Optional packages.

NS2 core uses many packages and optional software. Tools like Xgraph which are used for graphical plotting; the other one is network animator (NAM). These two are the optional part of NS2. As now a day the designers provide visual graphics for presenting the results of a simulation, hence NAM not only provides visualize packet animation but it also helps the designer to create a graphical scenario of their work. The core part of the simulator is the kernel and the libraries. Different models like MPLS libraries are provided by NS2 for the protocol traffic. Number of nodes and the level of hierarchy are defined using different set of parameters by these libraries.

 

  1. NS2 Split level Model

Split-level programming is the basic of NS2 model. C++ language gives the simulation behaviour while the simulation scenario is based on tool command language (TCL).

 

The Split level Programming model (Henderson TR and Lacage M, 2006)

C++ which provides faster simulation is used to compile fixed elements. The OTcl defines the protocol objects and topologies for the users ease.

 

About the Author

Done my master's in telecommunication. Working as a coordinator in Transcell Technical Services, India. Want to research on RF technologies to find its affect on the environment.

The Thrills - Don't Steal Our Sun