The 4-layer TCP/IP stack · protocols at each layer · TCP vs UDP
| Feature | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented (handshake) | Connectionless |
| Delivery | Guaranteed, in order | Not guaranteed |
| Speed | Slower (overhead) | Faster (low overhead) |
| Use cases | Web, email, file transfer | Streaming, gaming, VoIP |
| Protocol | Port | Use |
|---|---|---|
| HTTP | 80 | Web (unencrypted) |
| HTTPS | 443 | Web (encrypted) |
| FTP | 21 | File transfer |
| SMTP | 25/587 | Send email |
| SSH | 22 | Secure remote access |