Ping
Ping is a very useful tool for testing network connection status and packet sending and receiving status. It is the most commonly used command for network testing. Ping sends a reply request packet to the target host (address), requiring the target host to give a reply after receiving the request, thereby determining the response time of the network and whether the local machine is in communication with the target host (address).
If the Ping is not successful, you can predict that the fault occurs in the following aspects: network cable failure, network adapter configuration is incorrect, and IP address is incorrect. If the Ping is successfully executed but the network still cannot be used, the problem is most likely in the software configuration of the network system. Success in Ping can only ensure that there is a physical path connected between the local machine and the target host.
Command format:
ping IP address or host name [-t] [-a] [-n count] [-l size]
Parameter meaning:
-t keep sending data to the target host;
-a Displays the network address of the target host in IP address format;
-n count Specifies how many times to ping, and the specific number of times is specified by count;
-l size Specifies the size of the packet sent to the target host.
For example, when your machine cannot access the Internet, first you want to confirm whether it is a failure of the local LAN
. Assuming that the proxy server IP address of the LAN is 202.168.0.1, you can use Ping to avoid the 202.168.0.1 command to check whether the machine is in communication with the proxy server. For example, the common command to test whether the network card of this machine is installed correctly is ping 127.0.0.1.
Tracert
The Tracert command is used to display the path through which the packet reaches the target host and to display the time it reaches each node. The command function is similar to Ping, but the information it obtains is much more detailed than the Ping command. It displays all the paths taken by the data packet, the IP of the node, and the time it takes. This command is more suitable for large networks.
Command format:
tracert IP address or host name [-d][-h maximumhops][-j host_list] [-w timeout]
Parameter meaning:
-d does not resolve the name of the target host;
-h maximum_hops Specifies the maximum number of jumps to search for the target address;
-j host_list Release source routes according to the address in the host list;
-w timeout Specifies the timeout interval, the default time unit of the program is milliseconds.
For example, if you want to know your computer and target hostFor detailed transmission path information between them, you can enter tracert in MS-DOS mode.。
If we add some parameters to the Tracert command, we can also detect other more detailed information, such as using parameter -d, we can specify that the program also resolves the domain name of the target host when tracking the path information of the host.
Netstat
The Netstat command helps network administrators understand the overall usage of the network. It can display details of the currently active network connection, such as displaying network connections, routing tables, and network interface information, and can count which network connections are currently running.
Using command parameters, the command can display the usage status of all protocols, including TCP protocol, UDP protocol, IP protocol, etc. In addition, you can also select specific protocols and view their specific information, and also display the port numbers of all hosts and the detailed routing information of the current host.
Command format:
netstat [-r] [-s] [-n] [-a]
Parameter meaning:
-r Displays the contents of the local routing table;
-s Displays the usage status of each protocol (including TCP protocol, UDP protocol, IP protocol);
-n Display address and port in digital form;
-a Displays the port numbers of all hosts.
Winipcfg
The Winipcfg command displays the specific configuration information of the IP protocol in the form of a window. The command can display the physical address of the network adapter, the IP address of the host, the subnet mask, the default gateway, etc., and can also view the host name, DNS server, node type and other related information. The physical address of the network adapter is very useful when detecting network errors.
Command format:
winipcfg [/?] [/all]
Parameter meaning:
/all Displays all configuration information about IP addresses;
/batch [file] Write the command result to the specified file;
/renew_ all Retry all network adapters;
/release_all Release all network adapters;
/renew N Reset network adapter N;
/release N Release network adapter N.
The above commands can be run in Microsoft Windows 95 and later operating systems.