Network Performance Analysis Based on Network Simulator NS-2.

NS-2 is a tool to simulate networks and events that occur per packet sequentially based on time and are widely used in the research field. NS-2 comes with NAM (Network Animator) that produces a visual representation it also supports several simulation protocols. The network can be tested end-to-end. This test includes data transmission, delay, jitter, packet-loss ratio and throughput. The Performance Analysis simulates a virtual network and tests for transport layer protocols at the same time with variable data and analyzes simulation results based on the network simulator NS-2.


Introduction
The purpose of its development was simulating the events that occur in the network separately.And provide support for simulate network protocols (Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and guidance and multicast protocols for both wired and wireless networks [1].The network simulator NS-2 is open source program built in C++ language in terms of interfaces and OTCL object oriented language for simulation [6].Within this environment, simulator user designs its network by typing OTCL text then simulation program simulated it within specific factors [7].

Related Work
Recently SharatKaushik , Poonam , Anita Tomar(2014) studied the comparison of both protocol and fund that TCP is more reliable than UDP because its packet loss rate is less than UDP as it sends through two transmission nodes.

Basic Architecture of NS-2
The NS-2 was designed depending on two languages C++ and OTCL language commands.These two languages have been linked by TCLCL is a set of functions and through which connectivity between C++ and OTCL [8].After completion of simulation process the simulator generates the results in two ways: The first is a graphical simulation of network operations which shows through NAM and the second is Trace file that explains the events and the chronology of their occurrence.To interpret these results graphically and interactively there are tools available such as NAM and XGraph.To analyze certain events in the network it extracts texts based on the given data to configure concept display.The basic architecture of the simulators is shown in Figure (1).[4].It simulates events and it can simulate the entire network environment, knowing the events and the chronology of their occurrence.This research creates a virtual network using both transport layer protocols to compare the performance of the protocols on the same channel with different nodes and same transmission time.The network consists of 6 nodes works as a client and 2 nodes as host represent the routers in the network and the use of the protocol TCP was inserted between the node (0) from the first side of the network with node (4) from the other side and the TCP sinkProtocol at the end of the node (4) to receive data as a client and notify the ACK to sender .The UDP protocol was proposed to use between the nodes (1) from the first end of the same network with nodes (5) to the other end of the network as shown in Figure (2

Simulation Setup and Scenario Assumptions
At the time of executing TCL text will get all the data during the implementation process so we can analyze that data which appeared in the trace file as shown in figure (4) after simulation and knowledge of network efficiency.Networks simulator NS-2 provides ability to track and monitor data.We can record and track packages all the time by following files (trace file), which records each packet in the channel or in the queue and tracks its progress, arrival or loss.Monitoring simulations can also be used to monitor all packets and data streams for a specific signal at the same time it provides a dynamic view of the simulation process via the NAM controller, to start executing we insert the command "ns ABC.TCL", the program will automatically generate an (NAM) monitor.The meaning of red and green objects in figure (3) is the drop rate of data for both nodes where the red for nodes used UDP and green for node used TCP. at the end of the simulation, two files will generate the first is ABS.nam which represents the source file for the visual simulation process which is used in the NAM controller and another fileABC.tr,where the latter records the process of data transfer and all events which is done through the data recorded by the network performance analysis.

Experimental Results and Comparative Analysis
NS-2 has a high ability to process results.The simulator uses (AWK) language to analyze and process data in the trace file (TR .AWK) and it's a powerful software language in data processing.
The network performance analysis is done by analyzing the data string in the trace file (TR) in terms of delay time, transmission tension, throughput, finally packets loss rate.The trace files(TR) show the sequences of events in the simulation where the trace string contains the event, time of event, sent nodes, nodes sent to it, the protocol, package size, sender's address, recipient address and finally the ID of the package as shown in Figure (4).

Figure (5): Delay time
Throughput of data transferred on the same network for the same time was different as it's described in figure (6) where UDP are much higher than TCP and the reason is no flow control or acknowledgement.The UDP shows nearly constant behavior with increasing throughput.

Figure (6): Throughput is measured in bits per second (mbps).
Data transmission jitter within the network depending on data received for the nodes (8, 13) within the same time was the rate of jitter in TCP is higher than the UDP.But UDP showed a higher Jitter rate in the first transmitter and stabilized in 2Sand decreased less than a TCP and remained at this rateup to 9S as shown in figure (7).

Conclusion
Network performance analysis is the key to understand the efficiency of managing and network operation.Network simulators provide a practical and reliable way to plan and test communications networks.In this research assumed a wire mesh model and analyze it and monitoring the performance of assumed networks.Two of the most important network protocols have been Applied (TCP, UDP) on suggested network in terms of delay time, throughput, data jitter by analyzing the network performance using NS-2 simulator .

Figure ( 3 )
views network simulation traces and real world packet traces.