As we learned in the previous lesson, IP addresses uniquely identify computers. Most of the times each computer has more than one service. For instance, a computer can be a web server and a file server at the same time. For addressing this in addition to having a unique IP address we have a unique PORT for each service on a computer.
Ports are used by transport protocol to uniquely identify different services and applications. Ports are like doors to computer services, each port can point to one of the services on the computer. The idea of “Port” first introduced by ARPANET, but in that time it was known as “Socket number”.
The Internet Assigned Numbers Authority (IANA) created standards for using port numbers. Without knowledge of these ports, the user needs to ask the administrator about the details of port configuration. Using these standards is not compulsory. We can categories ports in two types:
Well known ports are ports between 0 to 1024 which are assigned by IANA for special purposes.
Some of these well-known ports are:
- 20/21 FTP
- 22 SSH
- 23 TELNET
- 25 SMTP
- 53 DNS
- 80 HTTP
- 443 HTTPS
High number ports: are ports between 1025 to 65535 which are available for other services.
The important fact that we need to remember is that each transfer protocol has its own ports. For instance, a port number on UDP is different from the same port number on the TCP protocol. For easing the differentiating process of these ports we always bring the protocol type after them.
For example : 22/udp or 22/tcp