Concept of PORTs in computer networking

By Łukasz Kallas
Picture of the author
Published on
network image

There are many computers and numerous services across the entire Internet. We know that to connect to a location, we use a network address such as IP xxx.xxx.xxx.xxx or a hostname like example.com. However, a single host can run multiple services:

  • it can serve us a webpage

  • it can process emails

  • it can have some kind of database

    ... and more.

We usually don't think about how all of this happens in parallel and this is where the concept of ports comes into play. A port number is an integer from 0 to 65535 on which a specific service is listening and processing requests. Many of them are assigned by default and made standardized, for example, an HTTP server serving a website typically uses port 80, or port 443 for HTTPS (secure). This standard gives as a possibility to enter only the host or IP address, without needing to specify the port number. On the other hand, if we need to provide one, we do it after the host or IP using ":"

host:port

Most popular ports are:

PORTService
21FTP - file transfer protocol
22SSH - secure shell
53DNS - domain name system
80HTTP - hypertext transfer protocol
123NTP - network time protocol
443HTTPS - secure HTTP
587SMTP - secure simple mail transfer protocol
3306MySQL database
3389RDP - remote desktop protocol
27017MongoDB database

Ports between 0 to 1023 are standardized ports or system ports.
Ports between 1024 and 49151 can be registered upon request by IANA (Internet Assigned Numbers Authority)
Ports between 49152 and 65535 are called ephemeral ports, typically used temporarily for private or custom services.

Don't worry if some of this services don't mean much to you yet, we will go through them in the future 🙂 See you tomorrow!

Stay Tuned

Want to learn?
The best articles, links and news related to software development delivered once a week to your inbox.