UDP( User Datagram protocol ) – Connection-less protocol (No-handshake)
- Transport layer protocol used with IP (Internet Protocol) Network layer protocol. It is based on RFC 768
- Used for low-latency and loss-tolerating connection between applications on the internet.
- It sends short packets of data called data-grams.
- Provides Port Numbers to distinguish between various user requests
- Checksum to check if the data arrived is intact
- Lower bandwidth overhead and latency as it send only small data packets.
- No guarantee that message/packets sent will reach the destination intact.
- Faster as there is no error check for packets.
- Header size is 8 bytes
- Lightweight – No ordering of messages, no tracking connections.
- Supported Protocols – DNS, DHCP,SNMP,VOIP,RIP,TFTP
- No order – as each packets are individual. Ordering of packets to be implemented at application layer.
- Network applications where latency is critical such as gaming , voice and video communication. Loosing data would not affect much.
TCP ( Transmission Control Protocol) – Connection oriented
- Rearranges data packets in specified order
- Supported Protocol – HTTP, HTTPS, FTP, SMTP, Telnets
- Slower than UDP
- Header size – 20 bytes
- Heavy weight – requires 3 packets to setup socket connection
- Does error checking
- Supports hand-shake
- Applications that require high reliability and transmission time is less critical