STUDY OF SOCKET PROGRAMMING AND CLIENT SERVER MODEL AIM: To conduct an experiment to demonstrate the working of file transfer with the UDP Server and Client. APPARATUS REQUIRED: PC with network simulation software. The Network Interface Card must be provided with an IP Address THEORY: The client server model of computing is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients. Often clients and servers communicate over a computer network on separate hardware, but both client and server may reside in the same system. A server host runs one or more server programs which share their resources with clients. A client does not share any of its resources, but requests a server's content or service function. Clients therefore initiate communication sessions with servers which await incoming requests.
PROCEDURE: In main window, enter Cd network,cd layer, Cd Phy_Lyr,./main Choose Layers - Transport Layer - Socket - UDP. After choosing UDP protocol, Click on Let s Begin button on both the systems. To start the server, click on the Server Socket. Click on the Bind button, which will bind the socket. To start the Client, first enter the IP Address of a machine where the server is listening. Enter the file name as a request as shown in Screen. Click on socket to initiate the client socket. Click on the bind option. Click on the Send To button to write the request. Click on the RecvFrom button, which will be highlighted upon receiving a request in server system. Click on the Send To button to write the file contents in the server system. Click on RecvFrom button in the client system to read the contents of the file. Observe the text for the output of the file as shown in Screen. RESULT: Thus the working of Client Server Model concept was understood and output was verified
Study of Network Simulator (NS-2) and Simulation of Congestion Control Algorithms Using NS-2 Aim: To Study of Network simulator (NS).and Simulation of Congestion Control Algorithms using NS NET WORK SIMULATOR (NS-2) NS Overview NS programming: A Quick start Case study I: A simple Wireless network Case study II: Create a new agent in NS NS OVERVIEW NS Status Periodical release (ns-2.26, Feb 2003) Platform support FreeBSD, Linux, Solaris, Windows and Mac NS UNCTIONALITIES Routing, Transportation, Traffic sources,queuing Disciplines, QoS Wireless Ad hoc routing, mobile IP, sensor-mac Tracing, visualization and various utilities NS(Network Simulators)
Most of the commercial simulators are GUI driven, while some network simulators are CLI driven. The network model / configuration describe the state of the network (nodes, routers, switches, and links) and the events (data transmissions, packet error etc.). An important output of simulations is the trace files. Trace files log every packet, every event that occurred in the simulation and are used for analysis. Network simulators can also provide other tools to facilitate visual analysis of trends and potential trouble spots. Simulation of networks is a very complex task. For example, if congestion is high, then estimation of the average occupancy is challenging because of high variance. To estimate the likelihood of a buffer overflow in a network, the time required for an accurate answer can be extremely large. Specialized techniques such as "control variates" and "importance sampling" have been developed to speed simulation. Examples of network simulators There are many both free/open-source and proprietary network simulators. Examples of notable network simulation software are, ordered after how often they are mentioned in research papers: 1. NS (open source) 2.OPNET (proprietary software) 3. NetSim (proprietary software)
Uses of Network Simulators Network simulators serve a variety of needs. Compared to the cost and time involved in setting up an entire test bed containing multiple networked computers, routers and data links, network simulators are relatively fast and inexpensive. They allow engineers, researchers to test scenarios that might be particularly difficult or expensive to emulate using real hardware - for instance, simulating a scenario with several nodes or experimenting with a new protocol in the network. Network simulators are particularly useful in allowing researchers to test new networking protocols or changes to existing protocols in a controlled and reproducible environment. A typical network simulator encompasses a wide range of networking technologies and can help the users to build complex networks from basic building blocks such as a variety of nodes and links. With the help of simulators, one can design hierarchical networks using various types of nodes like computers, hubs, bridges, routers, switches, links, mobile units etc. Congestion Control Algorithms: By studying congestion control techniques used in TCP implementation software and network hardware we can better comprehend the performance issues of packet switched networks and in particular, the public Internet. Interaction between Transmission Control Protocol (TCP) and Random Early Detection (RED) gateways can be captured using dynamical models. In order to curtail the escalating packet loss rates caused by an exponential increase in network traffic, active queue management techniques such as Random Early Detection (RED) have come into picture.
Stochastic Fair Queuing (SFQ) ensures fair access to network resources and prevents a busty flow from consuming more than its fair share. In case of (Random Exponential Marking) REM, the key idea is to decouple congestion measure from performance measure (loss, queue length or delay). Performance parameter of RED, SFQ and REM algorithm is analysis using NS-2 network simulator. Congestion Control Following Parameters are Consider Packet Loss Throughput Delay Queue Length SIMULATION SCENARIO:
There are eight nodes at each side of the bottleneck link. Here eight nodes are acting as a TCP source and eight nodes are acting as a TCP sink so that both routers are applying the congestion control algorithm. There is twoway traffic in the system. We consider the network scenario as shown in Figure 2. We simulate this network on ns2 for different AQM algorithms RED, SFQ and REM for same network parameters as given in Table 1 except to the bottleneck link. We simulated these three algorithms RED, SFQ, and REM on the same bottleneck link node 8 and node 9. Firstly we consider the bottleneck link to 5Mbps for each considered AQM algorithm. We considered a fixed packet size of 5 KB and buffer capacity of 8KB throughout the simulation. Round trip delay for each link has been displayed in Table 1. Performance RED SFQ REM Queue length (Max) 4 4 4 Throughput (Max) 6.63 7.89 9.10 Delay (Max) 75.75 110.01 112.25 Send Packets 38515 45524 50114 Lost Packets 162 62 92 Average Loss Ratio (%) 0.5267 0.2143 0.2156 Utilization (%) 60.21 79.54 89.41 RESULT Thus the study of Network simulator (NS2)was studied