0% found this document useful (0 votes)
18 views2 pages

27-TCP and UDP

TCP (Transmission Control Protocol) is a connection-oriented protocol that ensures reliable, ordered delivery of data packets, while UDP (User Datagram Protocol) is a connectionless protocol that allows faster transmission without guarantees of delivery or order. TCP is heavier with a larger header size and includes error checking and recovery mechanisms, whereas UDP is lightweight with a smaller header and minimal error checking. Both protocols serve different purposes in network communications, with TCP being used for applications requiring reliability and UDP for those prioritizing speed.

Uploaded by

ep230842
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)
18 views2 pages

27-TCP and UDP

TCP (Transmission Control Protocol) is a connection-oriented protocol that ensures reliable, ordered delivery of data packets, while UDP (User Datagram Protocol) is a connectionless protocol that allows faster transmission without guarantees of delivery or order. TCP is heavier with a larger header size and includes error checking and recovery mechanisms, whereas UDP is lightweight with a smaller header and minimal error checking. Both protocols serve different purposes in network communications, with TCP being used for applications requiring reliability and UDP for those prioritizing speed.

Uploaded by

ep230842
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/ 2

TCP:

TCP stands for Transmission Control Protocol. TCP is a connection-oriented protocol, i.e. it
provides a process to process (end to end) communications. The transmission control protocol
is used to show the relation between other protocols lies in the TCP/IP protocol. TCP was
designed to offer a highly reliable, end-to-end byte stream over an unreliable network. It is one
of the most widely used protocols over the TCP/IP network. TCP ensures reliability, end-to-end
delivery, resequencing and retransmitting of data until a timeout condition is reached or
acknowledgment of data packets is received. TCP enables the establishment of a strong
connection between two hosts to exchange data in streams. TCP guarantees to deliver data in
the same ordered manner as sent from server to user and vice versa. TCP transmits data
packets in the same sequence as received. In case data packets are arriving in the wrong order,
TCP reorders them and delivers in the correct order.

UDP:
UDP is a Datagram oriented protocol. It is used for broadcast and multicast type of network
transmission. The full form of UDP is User Datagram Protocol. It is also known as the "fire-and-
forget" protocol as it sends the data and does not care whether the data is received or not.
The UDP protocol works almost similar to TCP, but it throws all the error-checking stuff out, all
the back-and-forth communication and deliverability. It is used to send a small message from
one host to another. UDP is faster than TCP as it does not provide the assurance for the delivery
of the packets. UDP, messages sent in a particular sequence may or may not be maintained
while delivering the host. Therefore, the sequence or order in which packets will be transmitted
is unpredictable.

1|Page
TCP UDP
TCP stands for Transmission Control Protocol. UDP stands for User Datagram Protocol.
It is a connection-oriented protocol. It is a connectionless protocol.
TCP reads data as streams of bytes, and the UDP messages contain packets that were
message is transmitted to segment sent one by one. It also checks for integrity at
boundaries. the arrival time.
TCP messages make their way across the It is not connection-based, so one program
internet from one computer to another. can send lots of packets to another.
TCP rearranges data packets in the specific UDP protocol has no fixed order because all
order. packets are independent of each other.
The speed for TCP is slower. UDP is faster as error recovery is not
attempted.
Header size is 20 bytes Header size is 8 bytes.
TCP is heavy-weight. TCP needs three packets UDP is lightweight. There are no tracking
to set up a socket connection before any user connections, ordering of messages, etc.
data can be sent.
TCP does error checking and also makes error UDP performs error checking, but it discards
recovery. erroneous packets.
Acknowledgment segments No Acknowledgment segments
Using handshake protocol like SYN, SYN-ACK, No handshake (so connectionless protocol)
ACK
TCP is reliable as it guarantees delivery of The delivery of data to the destination can’t
data to the destination router. be guaranteed in UDP.
TCP offers extensive error checking UDP has just a single error checking
mechanisms because it provides flow control mechanism which is used for checksums.
and acknowledgment of data.
Use by other protocols HTTP, HTTPs, FTP, Use by other protocols DNS, DHCP, TFTP,
SMTP, Telnet, SSH SNMP, RIP, VOIP,IPTV
Using TCP port number Using UDP port numbers
Packets in TCP is called a segment Packets in UDP called a user datagrams
TCP support error control mechanism No error control mechanism in UDP

Feature TCP UDP


Reliability Yes No
Data loss No Yes
Data transfer speed Slow Fast
Header size 20 bytes 8 bytes
Error checking Yes Yes
Error recovery Yes No
Flow control Yes No

2|Page

You might also like