Current location - Quotes Website - Team slogan - What ports do HTTP, FTP, SMTP and TELNET use respectively?
What ports do HTTP, FTP, SMTP and TELNET use respectively?
1, HTTP: use port 80.

HTTP belongs to hypertext transfer protocol, and all WWW files must conform to this standard. HTTP is the request and reply standard (TCP) for clients and servers. The client is the end user and the server is the website. By using a web browser, web crawler or other tools, the client initiates an HTTP request to the designated port (the default port is 80) on the server.

2.FTP: Use 20/2 1 port.

It is mainly used to transfer files. For example, websites are often used to upload home pages or download files for modification. FTP is an 8-bit client-server protocol that can manipulate any type of file without further processing, just like MIME or Unicode. However, the delay of FTP is very high, which means that the time from the request to the first receipt of the required data will be very long.

3.SMTP: use port 25.

SMTP defines a simple mail transmission protocol, which is now used by many mail servers to send mail. For example, this mail service port is used for common free mail services.

4.TELNET uses port 23.

Telnet is a port for remote login. Users can connect to the computer remotely as themselves, and can provide communication services based on DOS mode through this port.

Extended data

According to the port number can be divided into three categories:

(1) Well-known ports: from 0 to 1023, which are closely bound with some services. Usually, the communication of these ports clearly indicates the protocol of a certain service. For example, port 80 has always been HTTP communication.

(2) Registration port: from 1024 to 49 15 1. They are loosely bound to some services. In other words, many services are bound to these ports, and these ports are also used for many other purposes. For example, many systems handle a dynamic port of about 1024.

(3) Dynamic and/or dedicated ports: from 49 152 to 65535. Theoretically, these ports should not be assigned to services. In fact, machines usually allocate dynamic ports from 1024. But there are exceptions: SUN's RPC port starts at 32768.

The header of each TCP message contains a source port and a destination port, which are used to identify and distinguish the application processes of the source device and the destination device.

In the TCP/IP protocol stack, the source port number and the destination port number form a socket with the source IP address and the destination IP address respectively, which uniquely determines a TCP connection.

Compared with TCP message, UDP message has only a few fields: source port number, destination port number, length, checksum and so on. The function of each field is the same as that of the corresponding field in the TCP message.

The following takes TCP message as an example to illustrate the function of port number:

Suppose PC 1 initiates a Telnet remote connection to PC2, where the destination port number is well-known port number 23 and the source port number is 1028. There is no special requirement for the source port number, just make sure that the port number is unique on this machine.

After receiving the data packet, PC2 judges that the data packet is a Telnet data packet according to the destination port 23, and forwards the data packet to the upper Telnet protocol.

Baidu encyclopedia-network port