Understanding and understanding the following commands will help you quickly detect network faults, saving time and improving efficiency.
Ping
Ping is a useful tool for testing network connectivity and packet sending and receiving conditions.
Common commands. Ping sends a send-back request packet to the target host (address), and requests the target host to reply after receiving the request to determine the network response time and whether the host is connected to the target host (address.
If Ping fails, you can predict that the fault may occur in the following aspects: network cable failure, incorrect network adapter configuration, and incorrect IP address. If the Ping is successful and the network is still unavailable, the problem may be caused by the software configuration of the network system. If the Ping is successful, only a physical path connecting the local host to the target host can be guaranteed.
Command Format:
Ping the IP address or host name [-T] [-A] [-N count] [-l size]
Parameter description:
-T continuously sends data to the target host;
-A displays the network address of the target host in the IP address format;
-N count: the number of Ping attempts. The Count parameter specifies the number of Ping attempts;
-L size indicates the size of the data packet sent to the target host.
For example, if your machine cannot access the Internet, you must first check whether the local area network is faulty. If the IP address of the proxy server on the LAN is 202.160.1, you can run the ping 202.160.1 command to check whether the local host is connected to the proxy server. For example, the common command to test whether the local Nic is correctly installed is Ping 127.0.0.1.
Tracert
The tracert command is used to display the path through which data packets arrive at the target host and the time when data packets arrive at each node. The command function is similar to the ping command, but the information obtained is much more detailed than the ping command. It displays all the paths of data packets, the IP addresses of nodes, and the time spent. This command is applicable to large networks.
Command Format:
Tracert IP address or host name [-D] [-H maximumhops] [-J host_list] [-W timeout]
Parameter description:
-D does not parse the name of the target host;
-H maximum_hops specifies the maximum number of hops that can be found for the target address;
-J host_list: Release the source route based on 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 the detailed transfer path information between your computer and the target host www.cce.com.cn, you can enter tracert www.cce.com.cn in MS-DOS mode.
If we add some parameters after the tracert command, we can also detect other more detailed information. For example, we can use the-D parameter to specify the path information of the host when the program tracks the host, the domain name of the target host is also resolved.
Netstat
The netstat command helps the network administrator understand the overall network usage. It displays the details of the currently active network connection, such as network connection, route table, and network interface information. It can calculate which network connections are currently running.
Using command parameters, the command can display the usage status of all protocols, including TCP, UDP, and IP. In addition, you can select a specific protocol and view its specific information, the port numbers of all hosts and Detailed Routing Information of the current host are displayed.
Command Format:
Netstat [-R] [-S] [-N] [-A]
Parameter description:
-R: displays the content of the local route table;
-S: displays the usage status of each Protocol (including TCP, UDP, and IP );
-N: the address and port are displayed in a digital table;
-A: displays the port numbers of all hosts.
Winipcfg
The winipcfg command displays the specific configuration information of the IP protocol in a window. The command displays the physical address of the network adapter, the IP address of the host, the subnet mask, and the default gateway, you can also view the host name, DNS server, node type, and other information. The physical address of the network adapter is useful when detecting network errors.
Command Format:
Winipcfg [/?] [/All]
Parameter description:
/All: displays all IP address configurations;
/Batch writes command results 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.
You can run the preceding commands in Microsoft Windows 95 and later operating systems.
Note: after the "> C:/test.txt" command is added to the end of the command, the system will directly import the result after the command is executed to the target file.