Showing posts with label tcp and udp. Show all posts
Showing posts with label tcp and udp. Show all posts

Saturday, November 26, 2011

Difference Between TCP and UDP Protocols

TCP and UDP both are transport layer protocol. They both use for process to process communication. Here I am going to discuss about "Difference Between TCP and UDP Protocols".



What is the Difference Between TCP and UDP Protocols?

1. TCP is a Transmission Control Protocol and UDP is a User Datagram Protocol.

2. TCP is a connection-oriented protocol but UDP is a connection-less protocol.
Connection-oriented means there is first establish connection before transmission and after transmission connection release.
In connection-less there is no need to call setup and call release. There is not send acknowledgement from receiver side so not detection of errors.

3. TCP is a reliable protocol but UDP is a unreliable protocol.

4. TCP packet is called as segment but UDP packet is called as datagram.

5. TCP is used for reliable and large data transfer from source to destination but UDP is used for small message transfer between stations and does not much care about reliability.

6. TCP supports error control but UDP does not support error control.

7. TCP is powerful protocol but UDP is a powerless protocol.

8. TCP is a Heavyweight protocol but UDP is a Lightweight protocol.

9. In TCP, there are control transmission of segment if any segment is loss then retransmit from source to destination but In UDP there is not retransmit loss datagram.

10. In TCP segment transfer in a sequence but In UDP there is not any sequence or order of data transmission.

11. TCP transmission speed is slower than UDP protocol.


Examples: TCP used in WWW, web services, HTTP, FTP, Telnet, IMAP etc.
UDP used in buffering of online audio and video, DNS, online games and other multimedia application where transmission speed matters more than completeness etc.