TCP vs UDP
TCP
|
UDP
|
Both TCP and UDP are protocols used for sending
bits of data – known as packets – over the internet. They both are built on
top of Internet protocol. In other words, whether you are sending a packet
via TCP or UDP, that packet is sent to an IP address.
|
|
Transmission Control Protocol
|
User Datagram Protocol
|
TCP is a connection-oriented.
|
UDP is a connectionless.
|
Connection must be established prior to
transmission.
|
Connection less data is sent without setup.
|
TCP is suited for applications that require
high reliability and transmission time is relatively less critical.
|
USP is suitable for applications that need
fast, efficient transmission, such as games.
|
TCP rearranges data packets in the order
specified.
|
UDP has no inherent order as all packets are
independent of each other.
|
The speed for TCP is slower than UDP.
|
UDP is faster because error recovery is not
attempted.
|
Reliable – There is absolute guarantee that the
data transferred remains intact and arrives in the same order in which it was
sent.
|
There is no guarantee that the messages or
packets sent would reach at all.
|
TCP does error checking and error recovery. Erroneous
packets are retransmitted from the source to the destination.
|
UDP does error checking but simply discards
erroneous packets. Error recovery is not attempted.
|
Receives acknowledgement for each packet sent.
|
No acknowledgement.
|
HTTP, HTTPs, FTP, SMTP, Telnet
|
DNS, DHCP, TFTP, SNMP, RIP, VOIP.
|
Comments
Post a Comment