A few common network commands

Source: Internet
Author: User

Understanding and mastering the following commands will help you detect network failures more quickly, saving you time and efficiency.

Ping

Ping is a useful tool for testing network connectivity and information packet sending and receiving, and is the most
Commonly used commands. Ping sends a loopback request packet to the target host (address), asking the target host to reply after receiving the request, thus determining the response time of the network and whether the machine is connected to the target host (address).

If the ping is unsuccessful, you can predict that the failure occurs in the following areas: Network cable failure, improper configuration of the adapter, incorrect IP address. If the ping is successful and the network is still unavailable, then the problem is likely to be that in the software configuration of the network system, ping success can only ensure that there is a connected physical path between the computer and the target host.

Command format:

Ping IP address or host name [-T] [-a] [-N count] [l size]

Parameter meaning:

-T keeps sending data to the target host;

-A displays the network address of the target host in the IP address format;

-N count specifies how many times you want to ping, specified by count.

-L size Specifies the size of the packet to be sent to the target host.

For example, when your machine does not have access to the Internet, first you want to confirm that it is a local area network failure. Assuming that the local area network's proxy server IP address is 202.168.0.1, you can use the ping 202.168.0.1 command to see if this computer is connected to a proxy server. Another example, the test of the correct installation of the local network card is a common command is ping 127.0.0.1.

Tracert

The tracert command displays the path through which the packet reaches the target host and displays the time it took to reach each node. The command function is similar to ping, but it gets more detailed information than the ping command, which shows all the paths the packet takes, the IP of the node, and the time it takes. This command is more appropriate 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 hops to search to the destination address;

-j Host_list releases the source route according to the address in the host list;

-W timeout Specifies the time-out interval, and the default time unit for the program is milliseconds.

For example, you want to know the detailed transmission 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 to the tracert command, we can also detect other, more detailed information, such as using parameter-D, to specify that the program is tracking the host's path information while also resolving the domain name of the target host.

Netstat

The netstat command helps network administrators understand the overall use of the network. It displays the details of the network connection that is currently active, such as displaying network connections, routing tables, and network interface information, which can be used to count the total network connections currently running.

Command parameters enable commands to display the use status of all protocols, including TCP protocols, UDP protocols, IP protocols, and so on, as well as selecting specific protocols and viewing their specific information, as well as displaying the port number of all hosts and the detailed routing information for the current host.

Command format:

netstat [-R] [-S] [-n] [-a]

Parameter meaning:

-R Displays the contents of the native routing table;

-S shows the use status of each protocol (including TCP protocol, UDP protocol, IP protocol);

-N displays addresses and ports in a numeric form;

-a displays the port number of all hosts.

Winipcfg

The winipcfg command displays the specific configuration information for the IP protocol as a window, which displays the physical address of the network adapter, the IP address of the host, the subnet mask, the default gateway, and so on, as well as viewing the host name, DNS server, node type, and so on. The physical address of the network adapter is useful when detecting network errors.

Command format:

Winipcfg [/?] [/ALL]

Parameter meaning:

/ALL Displays all the configuration information about the IP address;

/batch [File] Writes the result of the command to the specified file;

/renew_ All retry all network adapters;

/release_all release all network adapters;

/renew n Reset network adapter n;

/release N Frees network adapter N.

You can run the above command in Microsoft's Windows 95 and its later operating systems.

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.