Port address in computer network

       We realize the communication between computers through logical addresses (that is, IP addresses, which work at the network layer and will not change during transmission, IPv432-bit addresses, IPv6128-bit addresses). The communication between processes between computers is essentially between different computers Process communication, and the port number is the only number that represents these processes. (Process: running program) The port number has 16 bits, 0 to 65535. A total of 2 ^ 16 port numbers. You can find the applications running on the computer through the port number. The port number works at the transport layer. It will not change during the transmission, and the port address is the port number.

Port: refers to the identifier of a process that we access on the host, and the process of communication between computers is realized through the port. When we visit the Baidu homepage, it is actually the process of the browser on our computer accessing the web server process on the Baidu server (one computer)

Port number division

0 ~ 1023: System ports, these ports can only be used by the system authorized process.

1024 ~ 65535: user port

1024 ~ 5000: temporary port, general applications use 1024 to 4999 for communication

5001 ~ 65535: Server port, used to define a port for users

Commonly used TCP and UDP port numbers

DHCP: the port number on the server side is 67

DHCP: The port number on the client side is 68

POP3: POP3 receiving protocol, POP3 client uses SMTP to send mail to the server. The port number used by POP3 is 110

SMTP: The port number is 25. What SMTP really cares about is not how the mail is transmitted, but only whether the mail can reach its destination smoothly.

Telnet: Port number 23 Test the port number, you can use the telnet command to test whether the port number is normally opened or closed

FTP: The port numbers used by FTP are 20 and 21. Port 20 is used for data transmission, and port 21 is used for the transmission of control information. Control information and data can be transmitted at the same time, which is special for FTP. FTP uses a TCP connection

FTP (File Transfer Protocol) is one of the protocols in the TCP / IP protocol group. The FTP protocol includes two components, one is an FTP server and the other is an FTP client. The FTP server is used to store files, and users can use the FTP client to access resources located on the FTP server through the FTP protocol. When developing a website, the FTP protocol is usually used to transfer web pages or programs to a web server. In addition, because FTP transfer efficiency is very high, this protocol is generally used when transferring large files on the network.

By default, the FTP protocol uses the two ports 20 and 21 of the TCP ports, of which 20 is used to transmit data and 21 is used to transmit control information. However, whether to use 20 as the data transmission port is related to the transmission mode used by FTP. If the active mode is used, the data transmission port is 20; if the passive mode is used, the server and the client decide which port to use.

TFTP: Port number 69, using UDP connection TFTP (Trivial File Transfer Protocol, Simple File Transfer Protocol ) is a protocol in the TCP / IP protocol family for simple file transfer between the client and server , providing no complexity 3. File transfer service with low overhead . The port number is 69.

TCP 21 port: FTP file transfer service 
TCP 23 port: TELNET terminal emulation service TCP 25 port: SMTP simple mail transfer service UDP 53 port: DNS domain name resolution service TCP 80 port: HTTP hypertext transfer service 
TCP 110 port: POP3 "Post Office Protocol Version 3 "port used TCP 443 port: HTTPS encrypted hypertext transfer service TCP 1521 port: Oracle database service 

Referenced article links: https://zhuanlan.zhihu.com/p/67442324 , https://blog.csdn.net/xin3983/article/details/80692300

How to check if a certain port number is occupied:

Type in the terminal: netstat -ano

To view the PID corresponding to the occupied port, enter the command netstat -ano | findstr "port number"

Enter tasklist | findstr "PID" to see which process or program occupies the PID

Or you can view it in the task manager.

telnet use

Common commands for Telnet client:
  open: Use openhostname to establish a Telnet connection to the host.
  close: Use the close command to close the existing Telnet connection.
  display: Use the display command to view the current settings of the Telnet client.
  send: Use the send command to send commands to the Telnet server. The following commands are supported:
  ao: Abandon output command.
  ayt: "Are you there" command.
  esc: Send the current escape character.
  ip: interrupt process command.
  synch: Perform Telnet synchronization operation.
  brk: send a signal.
  Commands other than the commands listed in the table above will be sent to the Telnet server as strings. For example, sendabcd will send the string abcd to the Telnet server so that the string will appear in the Telnet session window.
  quit
  Use the quit command to exit the Telnet client.

Keep accumulating and learning.

 

Published 148 original articles · Like 10 · Visitors 20,000+

Guess you like

Origin blog.csdn.net/ab1605014317/article/details/103425510