Ports are a very basic concept in computer network technology, whether it is network implementation, operation and maintenance, or software development, it can be said that we are often have to deal with ports. So what is a port? What are the port numbers? Let's take a look!
What is a port?
In network technology, port (Port) has two general meanings: First, the physical sense of the port, for example, ADSL Modem, hubs, switches, routers used to connect other network devices interface, such as RJ-45 ports, SC ports and so on.
The second is the logical sense of the port, generally refers to the TCP / IP protocol ports, port number range from 0 to 65535, such as for web browsing services, port 80, for FTP services, port 21 and so on.
What we are going to introduce is port in the logical sense. The ports we are talking about here are not the I/O ports of the computer hardware, but the concept of the software form, according to the different types of services provided by the tool, ports are divided into two kinds, one is the TCP port, and the other is the UDP port.
When computers communicate with each other, there are two ways:
One is to send information, you can confirm whether the information arrives, that is, there is a way to answer, this way most of the TCP protocol; one is to send the message after it does not care, do not go to confirm whether the information arrives, this way most of the UDP protocol.
The ports provided by the services corresponding to these two protocols are categorized as TCP ports and UDP ports.
Classification of ports
Well-Known Ports: range from 0 to 1023.
They are tightly bound to some services. Usually the communication on these ports clearly indicates the protocol of a service. For example: port 21 is assigned to FTP service, port 25 is assigned to SMTP (Simple Mail Transfer Protocol) service, port 80 is assigned to HTTP service, port 135 is assigned to RPC (Remote Procedure Call) service and so on.
Dynamic Ports: ranging from 1024 to 65535
Dynamic ports are so-called because they are generally not assigned to a service on a fixed basis, but rather on a dynamic basis. Dynamic allocation means that when a system process or application process needs network communication, it requests a port from the host and the host allocates one of the available port numbers for it to use. When the process is shut down, it also releases the occupied port number.