JECET; December2014-February 2015; Sec. B; Vol.4.No.1, 13-18. E-ISSN: 2278 179X Research Article Journal of Environmental Science, Computer Science and Engineering & Technology An International Peer Review E-3 Journal of Sciences and Technology Available online atwww.jecet.org Section B: Computer Science Analysis of User Datagram Protocol and Transmission Control Protocol Communication in Wired Networks Meenakshi Moza 1* and Suresh Kumar 2 1, 2 Department of F.E.T., ECE, Manav Rachna International University Faridabad, Haryana Received: 23 December 2014; Revised: 12 January 2015; Accepted: 22 January 2015 Abstract: Information in a network is transmitted on the basis of traffic scenario namely application traffic agent and data traffic. The importance of traffic scenario necessitates the reliability and capability of the information transmitted thereby rendering it important to go for performance analysis. The objective of this paper is to draw comparison between performances of transmission control protocol / file transfer protocol and user datagram protocol / constant bit rate traffic based communication in wired networks. Network Simulator-2 (NS-2) is used for simulation and evaluation of their performance. Parameters like Throughput, Packet delivery ratio, Packet loss and Delay have been extensively analyzed by varying the packet size and time intervals. Keywords: Transmission Control Protocol (TCP), File transfer protocol (FTP), User Datagram Protocol (UDP), Constant Bit rate (CBR), Network simulator, packet loss, Packet delivery ratio, Quality of service. INTRODUCTION A network is a collection of devices (often referred to as nodes) connected together by communication links. A node is any device having the capability of sending and receiving data, eg. Computer, printer, router etc. These nodes are connected using communication link. A communication link can be a cable, JECET; December 2014-February 2015; Sec. B; Vol.4.No.1, 13-18. 13
air, optical fiber, or any medium used for carrying a signal which is comprised of information. It can be simply stated that a network is formed by connecting a group of computers and related devices. Sharing resources, file transferring and information transfer are the basic requisites of a network. The networks are characterized on the basis of speed of network, capacity of network and physical coverage of network 1-4. Computer networks form the core of modern day communication. Simplification in network design is carried out by layered architecture. To simplify things it can be said that debugging network applications is eased out in a layered architecture network. The various layers of network follow a set of rules called protocols. There are two main protocols namely UDP and TCP, specified for the transport layer in the layered architecture as shown in Figure-1. Figure-1: Simplified IP protocol stack The application decides which one is to be used. Internet applications like email, file transfer and web application make use of TCP for reliable and connection-oriented service. Retransmission is carried out so as to guarantee that all packets reach the destination. Congestion control in the internet is carried out by varying the speed of transmission. Four algorithms namely slow start, congestion avoidance, fast retransmit and fast recovery are used by TCP to provide congestion control. In these protocols packet loss is used as an indicator of congestion, and the number of packets TCP will send is altered before waiting for acknowledgments of those packets. This alteration affects the bandwidth available and is also responsible for delay changes on a link. The UDP, on the other hand, provides unreliable and connectionless service to the internet applications such as streaming multimedia and voice over IP. Here datagram is sent from a sender to receiver as fast as possible. In UDP there is no guarantee that packets will be received at the destination, and it does not perform any congestion control in the network 5-8. Thus, the data transfer in UDP environment can be accomplished without significant time delay and variations. TCP and UDP are different from each other on the basis of data transfer features as listed below: Reliable delivery: TCP is more reliable as compared to UDP. The reason for this is usage of message acknowledgment and retransmissions. Hence possibility of data loss is negligible. But in UDP there is no acknowledgement and no retransmission. Ordering of messages: In TCP, messages are transmitted in a sequence and received in the same order at the destination. But in UDP, there is no transmission message sequence and no ordered data delivery at receiver end. JECET; December 2014-February 2015; Sec. B; Vol.4.No.1, 13-18. 14
Transfer features: TCP reads data as a stream of bytes and message is transmitted in the form of segments. UDP messages are sent in the form of datagrams into the network. Here, in this paper, the TCP and UDP are compared on the basis of the data transfer. METHODOLOGY Performance of any network is evaluated on the basis of certain criteria namely Throughput: Throughput is defined as the measurement of how fast, data can be sent across the network. It is calculated by taking the number of packets transmitted through the network in a unit of time. Throughput = ( received packet size) / (stop time start time) Packet Delivery Ratio (PDR %): It is the ratio of packets received at the intended destination, to the packets sent from the source. The PDR is mainly used as the parameter for evaluating the network performance. Higher the value of PDR, better is the network. Packet Delivery Ratio = (Number of packets received / Number of packets generated)*100 Packet Loss: This parameter is an indicator of the number of packets lost (dropped) during transmission. It is the difference between the number of packets generated and the number of packets received. Packet Loss = (Number of packets received - Number of packets generated) Average end-to-end delay: It is the average time taken by a packet from source to destination. This includes all the delays including queuing delay, propagation delay, processing delay at intermediate nodes etc. Lower the value of the delay, better is the network 9-12. Average end-to-end delay = ( packet receive time - packet sent time) SIMULATION ENVIRONMENT NS2 is an event driven simulator used for simulating wired and wireless networks 13. It is used to analyze events to have a better understanding of the behaviour of network. The topology as shown in Figure-2 has been used to study the performance of UDP and TCP traffic based communication by varying the 14, 15. packet sizes Figure-2: Network topology JECET; December 2014-February 2015; Sec. B; Vol.4.No.1, 13-18. 15
The topology consists of five sender nodes and five receiver nodes with two routers in between connected by a 5Mbps channel. The senders and receivers are connected to routers through a 1Mbps channel. Data flows from node n0 to n7, n1 to n8, n2 to n9, n3 to n10 and n4 to n11. For UDP communication a UDP agent, CBR traffic generator, and a null agent as a traffic sink is required. And similarly for TCP communication a TCP agent, FTP traffic generator and TCP sink is required. The simulation is run for 5 seconds. The size of packets is varied from 200 to 1500, to analyses its effect on the parameters such as throughput, packet delivery ratio, packet loss and average end-to-end delay. RESULT ANALYSIS The main focus in this paper is to analyse the effect of varied packet sizes and interval on throughput, packet delivery ratio, packet loss and average end-to-end delay for TCP and UDP based communication for a particular topology created in NS2. Figure-3 below shows the effect of varied packet size on throughput for both UDP and TCP traffic. Throughput drops significantly with an increase in packet size in both because a bursty traffic is generated that increases contention in the MAC layer which results in collision and packet losses. Throughput is higher in UDP based communication because the retransmitted packets in TCP arrive with high latency as they travel part of the way twice. Figure-3: Packet Size vs Throughput Similarly, Figure-4 shown below depicts the effect of varying packet size on Packet loss. Figure-4: Packet Size vs Packet loss JECET; December 2014-February 2015; Sec. B; Vol.4.No.1, 13-18. 16
Further, effect of varied packet size on average end-to-end delay for both TCP and UDP is analysed. Average end-to-end delay increases with increase in packet size in both the cases as shown in Figure-5. The average delay in case of TCP is higher as compared to UDP. Delay for each packet adds up so average delay increases and unbounded latency is the price to pay for reliable delivery. The effect of varying the packet size on packet delivery ratio is shown in Figure-6. Packet delivery ratio decreases with increase in packet size for UDP. This is because throughput decreases as packet size increases. Decrease of throughput means, packets received decreases. Hence packet delivery ratio decreases. However packet delivery ratio in case of TCP is almost 100% as TCP ensures that every bit of data is delivered correctly. Figure-5: Packet Size vs Av. end-to-end delay CONCLUSION AND FUTURE SCOPE Figure-6: Packet size versus Packet delivery ratio In this paper the effect of varying the packet size and the time interval between the packets on the performance of both TCP and UDP based network is analyzed. It is observed that for both the scenarios the average end-to-end delay is directly proportional to the packet size. The number of packets generated JECET; December 2014-February 2015; Sec. B; Vol.4.No.1, 13-18. 17
is same for the same interval irrespective of the packet sizes 200, 500, 1000 and this value doubles after packet size increases beyond 1000 bytes. In future, soft computing techniques can be used to decide the optimal size of packet to improve the performance of network. REFERENCES 1. Breslan et al. Advances in network simulation in IEEE computer, 2000, 33 (5), 59-67. 2. Fahim and Vilas, Optimization of IPV4 Packet headers, International Journal of Computer science Issues, 2013,10, 1,212-214 3. Gitlin and Haas, On the packet size in integrated networks, 10 th Annual Joint Conference of the IEEE Computer and Communications Societies, Networking in the 90 s,732 740 Volume 2, INFOCOMM 91. 4. Ikegawa and Takahashi, The effect of Retransmitted packet size preservation property on TCP goodput over links with bit errors, Modelling and Optimization in Mobile, Adhoc and Wireless Networks, IEEE WIOPT 2005. 5. Jingsong and Mcleod, A UDP based file transfer protocol with flow control using fuzzy logic approach, Electrical and Computer Engineering, IEEE CCECE 2003. 6. Kim & Krunz, Bandwidth allocation with guaranteed packet loss performance, 2000, 8, 3, 337 349. 7. Li Yantao, Zhen Ren and Gang Zhou, Energy modeling and Optimization through joint packet size analysis of RSN and WIFI networks, Performance Computing and Communication Conference (IPCCC) 30 th IEEE International Conference,2011. 8. Meenakshi, Impact of network size and link bandwidth in wired TCP and UDP network topologies, International Journal of Engineering Research and General science, 2014, 2, 5. 215-223 9. Petrovic Improving TCP/IP performance over wireless LAN s, Department of Computer science, York University, Toronto, Canada, 2012. 10. Kevin and Kannan, the NS Manual. 11. Samprati Next Generation of Internet Protocol for TCP/IP Protocol suite, International Journal of Scientific and Research Publications, 2012, 2, 6,212-214. 12. Santosh Kumar And Sonam Rai, Survey on Transport Layer Protocols TCP &UDP,International Journal of Computer Applications,2012, 46(7): 20-25. 13. Shah et al. Effect of Packet size over Network Performance, International Journal of Electronics and Computer Science Engineering, ISSN: 2277 1956, 2012. 14. Teerawat and Ekram Hossain, Text Book Introduction to NS2, Second Edition. 15. Zhang, Floyd and Peterson, A Reordering robust TCP with DSACK, Network Protocols 11 th IEEE International Conference 2003. Corresponding Author: Meenakshi Moza Department of F.E.T., ECE, Manav Rachna International University Faridabad, Haryana, India JECET; December 2014-February 2015; Sec. B; Vol.4.No.1, 13-18. 18