TCP and UDP
TCP = Transmission Control Protocol
UDP = User Datagram Protocol
Both are core transport layer protocols in computer networking.
| TCP | UDP |
|---|---|
| Connection Oriented = A connection has to be established & closed |
Datagram Oriented = No connection => easy broadcasting |
| Guarantees data delivery | Cannot guarantee the delivery |
| Extensive error-checking | Error-checking with basic checksums |
| Acknowledgment segment is present | No acknowledgement segment |
| Data arrives in correct sequence | No sequencing by default, it needs to be implemented in the application layer |
| Relatively slow | Faster |
| Lost packages can be retransmitted | Retransmission is not possible |
| 20-60 byte header | 8 byte header |
| Uses handshake | Is connectionless => no handshake |
| No broadcasting supported | Supports broadcasting |
| Used by: HTTP, HTTPS, FTP, SMTP, Telnet | Used by: DNS, DHCP, TFTP, SNMP, RIP, VoIP |