Home >Common Problem >What is the function of a port? Why are ports divided into three types?
The function of the port is to enable application processes on computers running different operating systems to communicate with each other. Among the ports used by the server, well-known port numbers must be assigned to well-known applications, and port numbers must be registered for applications without well-known port numbers to avoid duplication, so they need to be divided into three types.
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
The function is to unify the application processes of the TCP/IP system so that the application processes of computers running different operating systems can communicate with each other.
Marks regular service processes; registers port numbers, with values ranging from 1024 to 49151, and marks unconventional service processes that do not have well-known ports.
Ports must be divided into two categories, one is used by the server and the other is used by the client; among the ports used by the server, well-known port numbers must be assigned to well-known applications, and well-known port numbers must be assigned to applications that are not well-known. The application of port number registers the port number to avoid duplication. Therefore it needs to be divided into three types.
Extended information:
If the IP address is compared to a house, the port is the door to and from the house. A real house only has a few doors, but an IP address can have as many as 65536 (ie: 2^16) ports! Ports are marked by port numbers, which are only integers ranging from 0 to 65535 (2^16-1).
The service functions of each network are different, so it is necessary to send different packets to different services for processing. When your host has both FTP and WWW services enabled, the data packets sent by others will , it will be processed by the FTP service or the WWW service according to the port number on TCP.
For more computer-related knowledge, please visit the FAQ column!
The above is the detailed content of What is the function of a port? Why are ports divided into three types?. For more information, please follow other related articles on the PHP Chinese website!