Concept of PORTs in computer networking
- Published on
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:
PORT | Service |
---|---|
21 | FTP - file transfer protocol |
22 | SSH - secure shell |
53 | DNS - domain name system |
80 | HTTP - hypertext transfer protocol |
123 | NTP - network time protocol |
443 | HTTPS - secure HTTP |
587 | SMTP - secure simple mail transfer protocol |
3306 | MySQL database |
3389 | RDP - remote desktop protocol |
27017 | MongoDB 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!