0% found this document useful (0 votes)
11 views1 page

Difference Between TCP and UDP (With Comparison Chart) - Tech Differences

The document outlines the differences between TCP (Transmission Control Protocol) and UDP (User Datagram Protocol), highlighting that TCP is connection-oriented and reliable, while UDP is connectionless and faster but less reliable. It provides a comparison chart detailing aspects such as speed, reliability, header size, and use cases for both protocols. The conclusion emphasizes that both protocols serve essential roles in data transmission, with TCP being robust and reliable, and UDP being efficient for applications like audio and video streaming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Difference Between TCP and UDP (With Comparison Chart) - Tech Differences

The document outlines the differences between TCP (Transmission Control Protocol) and UDP (User Datagram Protocol), highlighting that TCP is connection-oriented and reliable, while UDP is connectionless and faster but less reliable. It provides a comparison chart detailing aspects such as speed, reliability, header size, and use cases for both protocols. The conclusion emphasizes that both protocols serve essential roles in data transmission, with TCP being robust and reliable, and UDP being efficient for applications like audio and video streaming.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Networking

Programming
DBMS
Operating System
Internet
Hardware
Software

Tech Differences

Know the Technical Differences

Difference Between TCP and UDP


April 13, 2016 2 Comments

xThe protocols TCP and UDP are the two TCP/IP transport layer protocols. There exist some similarities and dissimilarities between the Transmission Control Protocol (TCP) and User Datagram
Protocol (UDP).

One of the differences is that TCP is a connection-oriented protocol as it establishes an end to end connection between computers before transferring the data. On the other hand, UDP is a connection-
less protocol since it does not determine the connection before sending data. The TCP and UDP protocol present in the Transport Layer of TCP/IP Model.

When we ponder over the layer 3 protocols which work on IP, these are connectionless, unacknowledged and unreliable. Therefore, it would not be possible to provide the guaranteed delivery of the
data. This emerged the need for the TCP and UDP protocol, which facilitate the automatic management and deals with the problems like congestion control and flow control.

However, designers also thought to build these abilities directly into the IP as it was before when there was just a single protocol TCP, but all these features were provided at the cost of time and
bandwidth. The better solution was to define the two protocols at the transport layer and let the network layer (IP) to take care of elementary data movement on the internetwork.

Thence, the TCP and UDP protocols were developed among which TCP intended to provide a rich set of services or the applications that require those functionalities, which would require some amount
of overhead for using it. While the main purpose of UDP was to provide some sort of layer 4 functions but in a simple, easy to use and fast way.

Content: TCP Vs UDP


1. Comparison Chart
2. Definition
3. Key Differences
4. Conclusion

Comparison Chart

Basis for Comparison TCP UDP

Meaning TCP establishes a connection between the computers before UDP sends the data directly to the destination computer without checking whether the
transmitting the data system is ready to receive or not

Expands to Transmission Control Protocol User Datagram Protocol

Connection Type Connection Oriented Connection Less

Speed Slow Fast

Reliability Highly Reliable Unreliable

Header Size 20 Bytes 8 Bytes

Acknowledgement It takes acknowledgement of data and has the ability to retransmit It neither takes acknowledgement, nor it retransmits the lost data.
if the user requests.

Protocol connection setup Connection-oriented, the connection must be established prior to Connectionless, data is sent without setup
transmission

Data interface to the application Stream-based Message-based

Retransmissions Delivery of all data is managed Not performed

Features provided to manage the Flow control using sliding window protocol None
flow of data

Overheads Low but greater than the UDP Very low

Data quantity suitability Small to moderate amounts of data Small to enormous amounts of the data

Implemented over Applications where reliable transmission of data matters. Application where data delivery speed matters.

Applications and protocols FTP, Telnet, SMTP, IMAP etcetera. DNS, BOOTP, DHCP, TFTP etcetera.

Definition Of TCP

TCP or Transmission Control Protocol is a connection-oriented protocol, found in the transport layer of the TCP/ IP Model. It establishes a connection between source and destination computer before
starting the communication. TCP is highly reliable, as it uses the 3-way handshake, flow, error and congestion control. Transmission Control ProtocolIt makes sure that the data sent from the source
computer are received accurately by the destination computer. If in case, data received is not in the proper format, then TCP retransmits the data. In TCP, transmissions are handled using the sliding
window system which helps in detecting the acknowledged transmission and automatically retransmit it.

Functions performed by TCP

1. Addressing/multiplexing – Higher-layer application processes are determined through using TCP ports. This layer mainly multiplexes the data received from the various processes and sends data
with the help of the underlying network layer protocol.
2. Establishing, managing and terminating connections – There are a group of procedures which are followed by the devices to set up a connection through which data can travel. Once the
connection is established, it is needed to manage, and at last, after finishing the TCP connection, it is terminated.
3. Handling and packaging data – This feature provides a mechanism which enables the data to be sent to TCP from higher layers, which is then packaged into the message to send it to the
destination TCP software further. The software residing at the receiving end unpackages the data and supply it to the application on the destination machine.
4. Transferring data – In this step, the packaged data is transferred to the TCP process on the other devices through following the layering principle.
5. Providing reliability and transmission quality services – It involves the services and features that permits an application to consider the protocol a reliable medium of transferring the data.
6. Providing flow control and congestion avoidance features – This feature controls the flow of the data between the two devices and deals with the congestion.

TCP protocols

HTTP(Hypertext Transfer Protocol),


HTTPs(Hypertext Transfer Protocol Secure),
FTP(File Transfer Protocol),
SMTP(Simple Mail Transfer Protocol), etc.

Definition Of UDP

UDP or User Datagram Protocol is a connectionless protocol found in the transport layer of TCP/IP Model. It neither establishes a connection nor checks whether the destination computer is ready to
receive or not; it just sends the data directly. UDP is used to transfer the data at a faster rate. It is less reliable and so used for transmitting data such as audio and video files.

UDP neither guarantees the delivery of data, nor does it retransmits the lost packets. It is just a wrapper protocol that facilitates application in accessing the IP.

Functions performed by UDP

The main task of a UDP is to take data from the Higher-layer protocols and position it in UDP messages, which is then moved to the IP for transmission. It follows some specific steps to transmit the
data which are given below.

1. Higher-Layer Data Transfer – In this step, a message is sent to the UDP software by an application.
2. UDP Message Encapsulation – It includes the encapsulation of the message into the Data field. The headers of the UDP message along with the source port field and destination port field, are
added. It also computes the checksum value.
3. Transfer message to IP – At last the UDP message is transferred to the IP for transmission.

Similarly, when the destination end receives the message, this whole process gets reversed.

UDP Protocols

BOOTP(Bootstrap Protocol),
DHCP(Dynamic Host Configuration Protocol),
DNS(Domain Name Server),
TFTP(Trivial File Transfer Protocol), etc.

Key Differences Between TCP and UDP


1. TCP is Connection-oriented whereas, UDP is Connectionless protocol.
2. TCP is highly reliable for transferring useful data as it takes the acknowledgement of information sent. Also, resends the lost packets if any. Whereas in the case of UDP if the packet is lost it
won’t request for retransmission and the destination computer receives corrupt data. So, UDP is an unreliable protocol.
3. TCP is slower as compared to UDP since TCP establishes the connection before transmitting data, and ensures the proper delivery of packets. On the other hand, UDP does not acknowledge
whether the data transmitted is received or not.
4. Header size of UDP is 8 bytes, and that of TCP is more than double. TCP header size is 20 bytes since, and TCP header contains options, padding, checksum, flags, data offset,
acknowledgement number, sequence number, source and destination ports, etc.
5. Both TCP and UDP can check for errors, but only TCP can correct the error since it has both congestion and flow control.

TCP vs UDP Protocol: Difference between them with comparison chart

Conclusion

Both TCP and UDP have their advantages and disadvantages. UDP is faster, simpler and efficient and hence generally used for sending audio, video files. TCP, on the other hand, is robust, reliable and
guarantees the delivery of packets in the same order.

Hence, we conclude that both TCP and UDP are essential for data transmission.

Related Differences:
1. Difference Between Flow Control and Congestion Control
2. Difference Between TCP/IP and OSI Model
3. Difference Between Flow Control and Error Control
4. Difference Between Connection-oriented and Connection-less Services
5. Difference Between FTP and TFTP

Filed Under: Networking

Comments

1. Shikha says

October 1, 2019 at 7:02 pm

Very elaborative information…..

Reply

2. s.manikanta says

October 31, 2019 at 12:52 pm

I have learned the differences, thanks.

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment

Name *

Email *

Website

Post Comment

Search the site ... Search

Top 10 Differences

Difference Between Logical and Physical Address in Operating System


Difference Between Preemptive and Non-Preemptive Scheduling in OS
Difference Between Synchronous and Asynchronous Transmission
Difference Between Paging and Segmentation in OS
Difference Between Internal and External fragmentation
Difference Between while and do-while Loop
Difference Between LAN, MAN and WAN
Difference Between Pure ALOHA and Slotted ALOHA
Difference Between Recursion and Iteration
Difference Between Go-Back-N and Selective Repeat Protocol

Recent Addition

Difference Between Cohesion and Coupling


Difference Between VGA and SVGA
Difference Between Product and Process
Difference Between MPLS and VPN
Difference Between Router and Firewall

Categories

DBMS
Hardware
Internet
Networking
Operating System
Programming
Software

Tech Differences
1,911 likes

Like Page Share

Be the first of your friends to like this

Tech Differences
about 3 months ago

Find the differences between Quick sort and


Merge sort......
https://techdifferences.com/difference-
between-quick-sort-a…

TECHDIFFERENCES.COM
Difference Between Quick Sort and…
The prior difference between the quick and…

Like Comment Share

Tech Differences

Copyright © 2020 · Tech Differences · Contact Us · About Us · Privacy

You might also like