As we learned in the previous lesson, IP addresses uniquely identify computers. Most of the times each computer has more than one services. For instance a computer can be a web server and a file server in 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 a computer services, each port can point to one of 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 user needs to ask the administrator about the details of port configuration. Using these standards are 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:
(For the complete list please refer here)
- 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 it's own ports. For instance a port number on UDP is different from the same port number on the TCP protocol. For easing the differentiate process of these ports we always bring the protocol type after them.
For example : 22/udp or 22/tcp