Difference between TCP and UDP

LinuxOperating SystemNetwork

As we know that both TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are the most widely used Internet protocols among which TCP is connection oriented − once a connection is established, data can be sent bidirectional. UDP is a simpler, connectionless Internet protocol. Multiple messages are sent as packets in chunks using UDP. Now on the basis of features of attributes we can distinguish between TCP and UDP

Following are the important differences between TCP and UDP.

Sr. No.KeyTCP (Transmission Control Protocol)UDP (User Datagram Protocol)
1DefinitionIt is a communications protocol, using which the data is transmitted between systems over the network.
In this, the data is transmitted into the form of packets.
It includes error-checking, guarantees the delivery and preserves the order of the data packets.
It is same as the TCP protocol except this doesn’t guarantee the error-checking and data recovery.
If you use this protocol, the data will be sent continuously, irrespective of the issues in the receiving end.
2DesignTCP is a connection oriented protocol.UDP is a connection less protocol.
3ReliableAs TCP provides error checking support and also guarantees delivery of data to the destination router this make it more reliable as compared to UDP.While on other hand UDP does provided only basic error checking support using checksum so the delivery of data to the destination cannot be guaranteed in UDP as compared to that in case of TCP.
4Data transmissionIn TCP the data is transmitted in a particular sequence which means that packets arrive in-order at the receiver.On other hand there is no sequencing of data in UDP in order to implement ordering it has to be managed by the application layer.
5PerformanceTCP is slower and less efficient in performance as compared to UDP. Also TCP is heavy-weight as compared to UDP.On other hand UDP is faster and more efficient than TCP.
6RetransmissionRetransmission of data packets is possible in TCP in case packet get lost or need to resend.On other hand retransmission of packets is not possible in UDP.
raja
Published on 09-Jun-2020 11:52:49
Advertisements