Difference between TCP and UDP

Transmission control protocol (TCP) and User Datagram Protocol(UDP) is a transportation protocol that is one of the core of protocols of the internet protocol Suite. Both TCP and UDP work at transport layer TCP/IP model and both have very different usage.
 
                             
TCP and UDP

TCP



-- TCP protocol is a communication oriented protocol. It needs to open a connection to the device before sending the data and closes the connection once the data has been sent.

-- You are a assures about the reliability of the data transfer.

-- TCP provides with error detection to assure acknowledgement of the data.

-- Sequencing of data is done in TCP.

-- TCP also assures guarantee of data delivery.

-- Lost packets can be retransmitted in case of packet loss in TCP.

-- As TCP has extensive error checking mechanism, TCP is slow protocol.

-- Example:- Mailing system.


UDP


-- UDP is connection less protocol. So no need of overhead of for opening and closing the connections.

-- UDP does not assure reliability of data transfer.

-- No sequencing of data is possible in UDP.

-- UTP provides only basic error checking mechanism.

-- UDP never assure guarantee of that delivery.

-- There is no retransmission of Lost packets in UDP.

-- As UDP does not have extensive error checking mechanism it is faster, simpler and more efficient than TCP but is comparatively less robust.

-- Example:- Live concert




No comments:

Post a Comment