Windows detects whether the remote host is connected or whether a port is open

1. Check whether the host is connected

The ping command is a very frequently used network diagnostic tool, which is applicable to Windows, Unix and Linux systems. It is part of the TCP/IP protocol used to determine whether a local host can exchange datagrams with another host. According to the returned information, we can deduce whether the TCP/IP parameter settings are correct and whether the operation is normal. It should be noted that one or two successful datagram exchanges with another host does not mean that the TCP/IP configuration is correct. A large number of datagram exchanges must be successfully performed to be sure of the correctness of TCP/IP. Let's take the Windows system as an example to introduce the basic usage of the ping command.

step

1. Use the shortcut key Win+R to exit the run command box, enter cmd, and click OK, and a DOS window will pop up.
2. The application format of the ping command:
①ping+IP address or host domain name;
②ping+IP address or host domain name+command parameter;
③ ping+command parameter+IP address or host domain name. Note that "+" should be replaced with a space!

When we use the first format, only four packets are sent by default . For example, let's ping the address http://www.baidu.com, as shown in the figure below. 110.242.68.3 is the address of one of Baidu's hosts;
bytes (bytes) indicates the size of the sent data packet, the default is 32 bytes;
time (time) indicates the time from sending the data packet to receiving the returned data packet ;
TTL means the time-to-live value, this field specifies the maximum number of network segments allowed to pass before the IP packet is discarded by the router.
insert image description here

Detailed article reference: Basic usage of ping command (Windows system)

2. Test whether the port is open

To test whether a port on the remote host is open, there is no need to use too complicated work. Windows comes with a tool, that is, telnet. The ping command cannot detect the port, it can only detect whether you can connect to the corresponding IP.
If you enter telnet in the cmd command line tool and it prompts that there is no such command, it means that the telne tool is not installed (the installation tutorial is below)

step

Test whether a port is open. The port 8080 of 43.143.144.xx is measured. After entering telnet 43.143.144.xx 8080 under cmd , a window will appear, which is minimized. If the window is automatically closed, it means that the port is closed or the host cannot be pinged, otherwise the port is open. For example, if port 8080 is open, the following window will appear, otherwise the window will be closed.
insert image description here
The original text is referenced in: Detecting whether a port on the remote host is open - telnet command

telnet installation

The following introduces the installation of telnet on win10.
First, open the control panel of the computer, find the program, open it,
insert image description here
and then click to enable or disable the windows function.
insert image description here
Then find the Telnet client, check it, click OK
insert image description here
and wait for the installation to complete. I did not install it for the first time. , and then do the same operation again, just do it yourself.
Test it and
enter in cmd: telnet 43.143.144.xx 8080

Guess you like

Origin blog.csdn.net/mfysss/article/details/128680651