Friday, April 29, 2011

UDP vs. TCP protocol

UDP vs. TCP protocol

UDP and TCP protocols are used to perform a given command or data transfer. Both UDP and TCP protocols utilize an IP communication protocol for the link layer. The primary difference between UDP and TCP is the level of assurance that the data sent actually arrives at the given address.


UDP (User Datagram Protocol) is a simple protocol for the transfer of data were a small packet or control data is being passed. UDP provides a good low latency point to point solution.

Examples of application using this type of transfer are listed below:

TCP (Transfer Control Protocol) provides an additional level of reliability through adding a more complex feature set. The added features include:
  1. Breaking large amounts of data into smaller datagram size pieces and re-assembling them on the other end;
  2. Handshaking with acknowledge and time out retransmission;
  3. Checksum for both header and data;
  4. Re-sequencing of out of order packets;
  5. Discard redundant Packets;
  6. Flow control to remove buffer over runs.
Example applications that use this more robust protocol include:
  • HTTP – Hyper Text Transfer Protocol;
  • POP3 – Post Office Protocol;
  • PPP – Point to Point Protocol;
  • ICMP – Internet Control Message Protocol (RFC 792);
  • FTP – File Transfer Protocol;
  • IGMP – Internet Group Management Protocol;
  • SMTP – Simple Mail Transfer Protocol.