Ports

A port is a virtual endpoint used by computers to identify specific services or applications during network communication. It’s part of the Transport Layer (Layer 4) in the OSI model and works alongside IP addresses to ensure data reaches the correct process. Each port is assigned a number (0–65535), and common services use well known ports some of them are-

  • HTTP — Port 80

  • HTTPS — Port 443

  • FTP — Port 21

  • SSH — Port 22

So when data arrives at a device, the operating system checks the port number to know which application should handle it.

Imagine it like this. An apartment building:

  • The IP address is the building’s street address.

  • The port number is the apartment number.

When mail (data) arrives, the building knows where to deliver it but without the apartment number (port), it would not know which resident (application) it’s for. Ports make sure your email doesn’t end up in your Spotify app and your video stream doesn’t land in your file transfer tool.



Here are some more port numbers and the services they provide. Also, remember when we were talking about TCP and UDP, this also shows you the type of connection as well. If you dont know what TCP/UDP is I would go read about it under “Transport Protocols”

Previous
Previous

Designing a secure network

Next
Next

Transport Protocols