Current location - Trademark Inquiry Complete Network - Trademark inquiry - What is the meaning of port and how to determine whether a port is occupied?
What is the meaning of port and how to determine whether a port is occupied?

Briefly talk about your understanding of ports and an introduction to some port-related commands.

1. Background introduction

What is a port?

On the Internet, hosts send and receive datagrams through the TCP/TP protocol. Each datagram is based on The IP address of the destination host is used for routing in the Internet.

We know that most operating systems support multiple programs (processes) running at the same time, so which one of the many concurrently running processes should the destination host send the received datagram to?

The port mechanism was introduced from this.

The local operating system will allocate protocol ports (protocal ports, which we often call ports) to those processes that require them. Each protocol port is identified by a positive integer, such as: 80, 139, 445, etc.

When the destination host receives the datagram, it will send the data to the corresponding port according to the destination port number in the header of the message, and the process corresponding to this port will receive the data and wait for the next Arrival of group data.

2. Knowledge analysis

Classification of ports? On the Internet, according to the protocol type, ports are divided into two categories: TCP ports and UDP ports

Although They are all identified by positive integers, but this does not cause ambiguity, such as TCP port 80 and UDP port 80, because the datagram will also indicate the port type while indicating the port.

From the perspective of port allocation, ports are divided into two categories: fixed ports and dynamic ports: Fixed ports (0-1023): use a centralized management mechanism, that is, obey the assignment of ports by a management agency , the agency responsible for issuing these assignments.

Since these ports are tightly bound to some services, we will often scan these ports to determine whether the other party has opened these services, such as TCP 21 (ftp), 80 (/login/1/13397829)