TCP, UDP and port numbers in simple terms
In short: IP gets data to the right device; port numbers get it to the right app. TCP delivers reliably with checks and resends; UDP is faster with no guarantees.
Two ways to deliver data
| TCP | UDP | |
|---|---|---|
| Comparison | A tracked parcel with delivery confirmation | A postcard: quick, but no confirmation |
| Reliability | Checks everything arrived, in order; resends anything lost | No checking or resending |
| Speed | A little slower | Faster, less overhead |
| Used for | Websites, email, file transfers, SSH | Voice and video calls, gaming, DNS lookups, live streams |
The TCP handshake
Before sending data, TCP sets up a connection in three steps: SYN ("can we talk?"), SYN-ACK ("yes, can you hear me?"), ACK ("yes, let's start").
What port numbers do
A server can run many services at once. The IP address finds the device; the port number finds the app, like a flat number in an apartment building.
| Port | Service |
|---|---|
| 22 | SSH (secure remote login) |
| 53 | DNS |
| 80 | HTTP (unencrypted web) |
| 443 | HTTPS (encrypted web) |
| 3389 | Remote Desktop (RDP) |
Look up more with the free port lookup tool.
Why this matters for security
Firewalls allow or block traffic by IP address and port. Closing ports you don't need is one of the simplest ways to reduce risk.
Real-world example: a video call and a download at the same time
At home, one person is on a video call while someone else downloads a large game update on the same Wi-Fi. The connection gets busy for a moment.
On the video call, the picture briefly turns blocky or a word drops out, then the call carries on. That is typical UDP behaviour: a missing piece of a live conversation is no use a second later, so the app simply moves on. The game update just slows down for a moment, but when it finishes, every byte is correct. That is TCP: anything lost is sent again, so the file is never corrupted, even if it takes a little longer.
Both streams arrive at the same devices through the same router. Port numbers keep them apart, so the call audio goes to the calling app and the download goes to the game launcher.
Try this: on Windows, open a few websites and run netstat -ano. Look at the "Foreign Address" column: entries ending in :443 are your secure web connections.
Key takeaways
- IP finds the device; the port finds the app.
- TCP = reliable and ordered; UDP = fast with no guarantees.
- TCP starts with a three-step handshake: SYN, SYN-ACK, ACK.
- Close ports you don't need.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.