top of page
TCP vs UDP
WHAT IS IT?
-
In the OSI model, TCP and UDP are "Transport Layer" Protocols.
-
It handles data communications between terminals in an IP network (the Internet).
-
There are two types of Internet Protocol (IP) traffic.
-
TCP (Transmission Control Protocol)
-
UDP (User Datagram Protocol.)
TCP
UDP
VS
-
Connection-oriented


Connection Set-up
-
Connection less.


Three-way handshake
No setting up of connection
-
TCP is reliable.
-
TCP provides delivery guarantee.
-
When sender does not get delivery ackknolegdement,


Data1
ACK
Reliable
-
UDP is unreliable.
-
Does not provide any delivery guarantee.

Data1
No ACK

-
TCP also guarantees the order of message.


1234
5678
5678
1234
Ordering
-
Does not provide any ordering or sequencing guarantee.
5678
1234
5678
1234


-
Heavyweight.
-
TCP is slow.
-
20 byte header size.
Speed
-
Lightweight.
-
UDP is fast protocol.
-
8-byte header size.

-
Contols congestion and flow control.
Header size

-
No congestion and flow control.
-
Popular transmission protocol
-
HTTP, HTTPs, Telnet, FTP, etc all are based over TCP.
Application
-
Used in DHCP, DNS and some other application.
bottom of page