Free tech learning for everyone, from basics to pro

Start hereNetworking fundamentalsBasics

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

TCPUDP
ComparisonA tracked parcel with delivery confirmationA postcard: quick, but no confirmation
ReliabilityChecks everything arrived, in order; resends anything lostNo checking or resending
SpeedA little slowerFaster, less overhead
Used forWebsites, email, file transfers, SSHVoice and video calls, gaming, DNS lookups, live streams
Tracked parcel or postcard?TCP: tracked parcelHandshake before sendingEvery piece is confirmedLost pieces are resentWeb, email, file downloadsUDP: postcardJust sends straight awayNo confirmationLost pieces are skippedCalls, games, DNS lookups
Figure 1. TCP is like a tracked parcel that must arrive complete, while UDP is like a postcard that arrives quickly but without any guarantee.

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.

PortService
22SSH (secure remote login)
53DNS
80HTTP (unencrypted web)
443HTTPS (encrypted web)
3389Remote 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.

Frequently asked questions

What are the most common UDP port numbers?

DNS 53, DHCP 67 and 68, TFTP 69, NTP 123, SNMP 161 and 162, and syslog 514. Many voice and video apps also use UDP on higher ports.

What is the difference between a TCP port and a UDP port?

Both are numbers from 0 to 65535 that identify a service on a device. TCP ports are used with reliable, connection-based delivery; UDP ports with fast, connectionless delivery. The same number can mean different services on TCP and UDP.

What are well-known ports?

Ports 0 to 1023, reserved for common services such as HTTP 80, HTTPS 443, SSH 22 and SMTP 25. Registered ports run from 1024 to 49151, and 49152 to 65535 are dynamic ports used by clients.

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.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
FM TecHub Team
Role
Editorial team
Reviewer credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

The team writes practical, plain-English guides on networking, security and cloud.

More about the team →

Original content written by the FM TecHub Team. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Get free updates by email

New notes, tools, CCNA and Security+ tips and important security news from FM TecHub, explained simply. Free, about twice a month. Unsubscribe anytime; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesup

Free · no spam · past emails · powered by Buttondown