Understand basic network test commands to easily cope with network faults

Source: Internet
Author: User
Tags nslookup nslookup command

As a common Internet user, sudden network faults have a headache. They not only affect our use, but also cause unnecessary losses, therefore, simply understanding the basic network test commands is also a good thing for us, saving time and improving work efficiency. Today, I would like to list some of the most common network failure test commands for your reference.

Currently, the most common network test commands are as follows: Ping Tracert Netstat IPconfig Nslookup.

Ping

Ping is the most commonly used command to test network faults. It is a tool to test the network connection status and the sending and receiving status of information packets. It is mainly used to send a data packet to the target host, and requires the target host to give a response when receiving the data packet to determine the network response time and whether the local host is interconnected with the target host.

If the Ping command fails, the problem may be caused by a network cable failure, incorrect network adapter configuration, or 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.

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.

Tracert

The Tracert command can display the path through which data packets arrive at the target host and the time when data packets arrive at each node. The command obtains more detailed information than the Ping command. It displays all the paths of the data packet, the IP address of the node, and the time spent.

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.

Netstat

Netstat is a doscommand and a very useful tool for monitoring TCP/IP networks. It can be used to understand the overall usage of the network. It can display the route table, the actual network connection, and the status information of each network interface device. It is generally used to check the network connection of each port on the local machine. 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.

TCP/IP allows the datagram to cause error data or fault type errors. However, if the cumulative number of errors is large, we recommend that you use Netstat to check the cause. Netstat is still very useful in this regard.

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.

Ipconfig

Ipconfig is a common command for debugging computer networks. Generally, you can use it to display the IP addresses, subnet masks, and default gateways of network adapters in your computer. The necessary information is a necessary element for us to eliminate network faults. However, this is only the use of Ipconfig without parameters, and its use with parameters is also good in network applications.

Overview of parameters (you can also enter Ipconfig/? in DOS mode /? Query parameters)

Ipconfig/all: displays the TCP/IP configuration details of the local machine;

Ipconfig/release: The DHCP Client manually releases the IP address;

Ipconfig/renew: The DHCP Client refresh the request to the server manually;

Ipconfig/flushdns: clears the local DNS cache content;

Ipconfig/displaydns: displays the local DNS content;

Ipconfig/registerdns: the DNS Client manually registers with the server;

Ipconfig/showclassid: displays DHCP type information of the network adapter;

Ipconfig/setclassid: Set the DHCP category of the network adapter.

Demo

Nslookup

The Nslookup command is used to determine whether the Domain Name System (DNS) is available and displays information about the domain name system. You can use this command to view the IP address of the website.

Command Format:

nslookup [-SubCommand ...] [{ComputerToFind| [-Server]}]

Usage:

Enter nslookup in the doscommand line and press Enter. The identifier changes to>, type the Domain Name of the website, and press enter to display the corresponding IP address of the domain name.

Demo

Summary:

The above are some common commands that can be used to eliminate simple network faults in the future. This not only saves time, but also effectively improves efficiency. Today, I will give a brief introduction to these five commands. There are still a lot to learn and study in the Network Test commands. If you are interested, you can find more information in some forums.

  1. Resolve problems in the centralized Test System of softswitch network user faults
  2. Instance profiling: Four built-in network testing tools

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.