Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Performance Analysis of TCP and UDP: A Comparative Study, Summaries of Computer Science

An in-depth analysis of the performance comparison between TCP and UDP using NS2 network simulator. It discusses the features, segment fields, and simulation scenarios of both protocols, and presents the results and interpretations of packet delivery ratio, average throughput, and average end-to-end delay in two different scenarios where bandwidth and packet size are varied. The study concludes that TCP outperforms UDP in both scenarios.

What you will learn

  • What is the difference between TCP and UDP in terms of reliability and connection establishment?
  • What are the performance metrics used in the study and how do they differ between TCP and UDP?
  • Which protocol, TCP or UDP, is better suited for applications with large packet sizes?

Typology: Summaries

2020/2021

Uploaded on 11/12/2021

19z218-immaculate-johanna-smriti
19z218-immaculate-johanna-smriti 🇮🇳

4 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
PERFORMANCE ANALYSIS OF TCP AND UDP
1.INTRODUCTION
This document attempts to investigate the performance comparison of TCP and
UDP variants and find out which one is the better and suitable for different
applications
The simulation tool used for investigation is NS2(Network Simulator version 2)
which is used for studying dynamic nature of communications , for both wired
and wireless network functions and for routing algorithms
2.OVERVIEW :
1) TCP :
a) The Transmission Control Protocol is used for transmission in a network.
b) It is widely use to perform data transmission
c) In order to perform transmission connection needs to be established between
the client and server
d) The connection is initiated from the client and sends the Sequence number to
the server. The server acknowledges it back and sends its own sequence number
which is one more than client’s sequence number
e) The client then sends an acknowledgement for server’s response
2) UDP:
a) The User Datagram Protocol is the simplest protocol available of the TCP/IP
protocol suite
b) The communication mechanism involved is minimum since the protocol is a
unreliable one and best delivery mechanism
c) There is no generation of acknowledgement and the sender doesn’t wait for any
acknowledgement
d) UDP is used in cases where there are lot more packets to be sent, Eg Video
Streaming wherein the number of packets are huge in number and sending
acknowledgments all those packets can be troublesome
i) In such applications , missed packets are ignored
3.COMPARISON BETWEEN TCP AND UDP :
TCP UDP
It keeps track of lost packets and makes
sure that lost packets are re sent
It doesn’t keep track of the lost packets
Adds sequence numbers to packets and
reorders any packets that arrive in wrong
order
Doesn’t reorder the packets and has no
ordering of packets
It is slower due to added functionalities Faster since unreliable and no added
functionalities
Requires more computing resources
because the OS needs to keep track of
ongoing communication sessions and
Requires less computing resources
pf3
pf4
pf5
pf8

Partial preview of the text

Download Performance Analysis of TCP and UDP: A Comparative Study and more Summaries Computer Science in PDF only on Docsity!

PERFORMANCE ANALYSIS OF TCP AND UDP

1.INTRODUCTION

 This document attempts to investigate the performance comparison of TCP and UDP variants and find out which one is the better and suitable for different applications  The simulation tool used for investigation is NS2(Network Simulator version 2) which is used for studying dynamic nature of communications , for both wired and wireless network functions and for routing algorithms **2.OVERVIEW :

  1. TCP : a)** The Transmission Control Protocol is used for transmission in a network. b) It is widely use to perform data transmission c) In order to perform transmission connection needs to be established between the client and server d) The connection is initiated from the client and sends the Sequence number to the server. The server acknowledges it back and sends its own sequence number which is one more than client’s sequence number e) The client then sends an acknowledgement for server’s response 2) UDP: a) The User Datagram Protocol is the simplest protocol available of the TCP/IP protocol suite b) The communication mechanism involved is minimum since the protocol is a unreliable one and best delivery mechanism c) There is no generation of acknowledgement and the sender doesn’t wait for any acknowledgement d) UDP is used in cases where there are lot more packets to be sent, Eg Video Streaming wherein the number of packets are huge in number and sending acknowledgments all those packets can be troublesome i) In such applications , missed packets are ignored 3.COMPARISON BETWEEN TCP AND UDP : TCP UDP It keeps track of lost packets and makes sure that lost packets are re sent It doesn’t keep track of the lost packets Adds sequence numbers to packets and reorders any packets that arrive in wrong order Doesn’t reorder the packets and has no ordering of packets It is slower due to added functionalities Faster since unreliable and no added functionalities Requires more computing resources because the OS needs to keep track of ongoing communication sessions and Requires less computing resources

manage them in deeper level Example : TCP : HTTP HTTPS FTP Many other games Example : UDP : DNS IP telephony DHCP Many computer games 4.SEGEMENT FIELDS OF TCP AND UDP :

6.PERFORMANCE METRICS :

Packet Delivery Ratio (PDR)  PDR is the percentage of data packets transported to the destination to those produced by sources  PDR = Sum(No of Packets received)/ Sum(num of Packets Sent) *  Average Throughput (TP):  It is the bytes successfully received and is calculated as :  TP = No. of Bytes Received * 8 * Simulation Time * 1000 Kbsp  Average End To End Delay (e2e Delay) :  It is the mean time of the successfully transmitted data packet over the network from source to destination.  It is computed as :  E2e delay = Sum(arrive_time - send_time) / Sum(number of connection)  Packet Loss (PL):  It is the difference among the data packets transmitted and the data packets received  PL = No of data packets sent – No of data packets received 7.NETWORK METRICS :Bandwidth :  It is the data number that transfer from source to destination  Packet Size :  A packet is the unit of data which is routed between the source and destination

8.SIMULATION RESULTS : (Vs BandWidth)

9.SIMULATION RESULTS AND INTERPRETATIONS :

 In this entire procedure the simulation is done in two different scenario wherein one scenario the bandwidth is varied and in other packet size is varied  First Scenario :TP based analysis :  In first scenario the bandwidth is varied and we can see from the figures that the TCP has achieved 700.71 of throughput while UDP stops with 687.1 meaning TCP receives more data than UDP  e2e Based Analysis :  In figure 5 the behavior of protocols based on e2e delay is projected and we can see TCP has an average of 0.62018 sec while UDP has 0. sec .It is very obvious that there is no huge difference between the protocols in e2e delay  PDR Based Analysis :  In terms of PDR (fig 6) the TCP has a better behavior as TCP has obtained 100% of network while UDP obtained 4.04 of PDR  PDL Based Analysis :  However TCP has 0% PDL while UDP has 95.96 shown in fig 7  These results conclude that TCP is better in this scenario based on this performance measures  Second Scenario :TP Based Analysis :  In second scenario the packet size is varied and the results show that TCP has 580.67 of throughput while UDP has 302.67 (fig 8)  e2e Based Analysis :  TCP has 0.93883 sec while UDP has 2.84602 sec and so TCP performance is faster than UDP in sending and receiving data (fig 9)  PDR Based Analysis :  TCP has outperformed UDP by having 95.7 of PDR while UDP has 3 (fig 10)  PL Based Analysis :  TCP has 4.74 of PL while UDP has 97  Thus the second scenario also shows that TCP is better than UDP by analyzing the performance measures 10.CONCLUSION :  Thus from the observations made on the two scenarios and the performance measures recorded it is obvious that TCP outperforms UDP in both scenarios and it is the better transport layer protocol