Several TCP/IP diagnostic tools in Windows)

Source: Internet
Author: User
Tags uppercase letter
We may encounter such a problem when preparing the computer's network connection. Using some network diagnostic tools provided by the Windows operating system, we can often find the crux of the problem to solve the problem. This article describes several practical network test commands in detail:

I. ARP-display and modify the physical address translation table of an Ethernet IP address or a licensing Ring
ARP (Address Resolution Protocol) is used to display or modify the physical address translation table of an Ethernet IP address or a ring. The ARP command can be used to view the current content in the ARP cache of the local computer or another computer. You can manually enter a static physical IP address pair for the NIC, this operation can also be performed on common hosts such as the default gateway and local server, which helps reduce the amount of information on the network. According to the default settings, items in the ARP high-speed cache are dynamic. ARP automatically adds a project whenever a datagram from a specified location is sent and the current project does not exist in the cache. Once the cached items are input, they begin to become invalid. Common command options are as follows:
ARP-A [-N [if_addr]-D inet_addr-s inet_addr. The parameters have the following meanings:
-A: Query TCP/IP to display the current ARP entry. If inet_addr is specified, only the IP address and physical address of the specified computer are displayed.
-N: displays ARP entries on the network interface specified by if_addr.
-D: Delete the items specified by inet_addr.
-S: Add an entry to the ARP cache to associate the IP address inet_addr with the physical address ether_addr.

2. Ping --- verify the connection to the remote computer
You may be most familiar with this command. When you cannot connect to a network address, you may first think of pinging the address. It is used to determine whether the local host can successfully exchange (send and receive) data packets with another host. Based on the returned information, we can infer whether the TCP/IP parameter is set correctly, and whether the operation is normal and the network is smooth. The Ping Command can perform the following operations: ① send the ICMP (Internet Control Message Protocol) ECHO packet to the computer and listen for echo response packets to verify the connection with one or more remote computers. ② Each sent packet can wait at most one second. ③ Print the number of transmitted and received packets. Note that successful ping does not necessarily mean that the TCP/IP configuration is correct. You may need to perform a large number of packets exchange between the local host and the remote host, make sure that the TCP/IP configuration is correct. 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 current host to the target host is guaranteed.
Each received packet is verified based on the transmitted message. By default, four echo data packets that contain 32-byte ICMP (inter-network control packet protocol) data (consisting of letters and a repeating uppercase letter sequence) are transmitted. Ping can display the time between sending a return request and returning a return response in milliseconds. If the response time is short, the datagram does not have to pass through too many routers or network connections. Ping also displays the TTL value. You can use the TTL value to estimate the number of routers that the data packet has passed. You can use ping to test the computer name and computer ip address. If the IP address has been verified but the computer name does not exist, you may encounter a name resolution problem. In this case, make sure that the computer name being queried is in the local host file or in the DNS database. The Ping result output is shown as follows:
C: \> Ping www.163.net
Pinging www.163.net [202.108.20.203] with 32 bytes of data:
Reply from 202.108.255.203: bytes = 32 time = 110 ms TTL = 246
Reply from 202.108.255.203: bytes = 32 time = 100 ms TTL = 246
Reply from 202.108.255.203: bytes = 32 time = 100 ms TTL = 246
Reply from 202.108.255.203: bytes = 32 time = 101 Ms TTL = 246
Ping statistics for 202.108.255.203:
Packets: Sent = 4, stored ED = 4, lost = 0 (0% loss ),
Approximate round trip times in Milli-seconds:
Minimum = 100 ms, maximum = 110 ms, average = 102 Ms
So how can we save the above Ping results? You only need to add "> [path] * after the ping command line. TXT (the test results of the following tracert and pathping commands can also be used), such as: Ping www.163.net> C: \ WINDOWS \ temp \ ping.txt. After ping, Save the result as a ping.txt text file and use NotePad to read it. The following are the Parameter options for common ping commands:
Ping the IP address-T continuously performs Resolution on the IP address until it is interrupted by the user with Ctrl + C.
Ping IP address-A resolves the IP address to the computer name.
Ping IP address-n run the ping command for a specific number of times.

3. tracert --- determine the route to the target IP Address
This Program The function is to determine the path of the data packet to the target host, display the list of relay nodes and the arrival time of the data packet. You can also use the-D parameter to determine whether to parse the host name.
The diagnostic utility sends an Internet Control Message Protocol (ICMP) ECHO packet containing different TTL values to the target to determine the route used to reach the target. To reduce the TTL value by at least 1 before the data packet is forwarded, each vro on the path is required. Therefore, TTL is a valid hop count. When the TTL on the data packet reaches 0, the router should send the "ICMP timeout" message back to the source system. Tracert first sends an ECHO packet whose TTL is 1, and increases TTL by 1 in each subsequent sending process until the target response or TTL reaches the maximum value to determine the route. The route determines the route by checking the ICMP timeout message sent back by the Intermediate router. However, some routers quietly upload data packets that contain the expired TTL value, but tracert does not. The following shows the tracert result output, from which we can see that the author's machine reaches the 163 website through a total of TEN routes:
C: \> tracert www.163.net
Tracing Route to www.163.net [202.108.20.203] over a maximum of 30 hops:
1 140 MS 110 MS 201 MS pppb15.bdptt.he.cn [202.99.168.143]
...............
9 110 MS 111 MS 100 MS 202.106.3.26
10 110 MS 250 MS 110 MS 202.108.20.203
Trace complete.

Iv. pathping --- display the degree of router and packet loss
The route tracing command combines the Ping and tracert commands to provide additional information that neither of the two commands can provide. After a period of time, the pathping Command sends data packets to each router that passes through the final target location, and then counts the data packets returned from each hop. Because pathping shows the degree of data packet loss of all specified routers and links, you can determine the router or link that causes network problems accordingly.
Note that pathping can be used to determine the vro on the path. Then, the command periodically detects these routers based on the specified interval and generates statistical results based on the returned values of each router. To avoid network congestion, set the interval to a little longer. In addition, try to eliminate the impact of sudden packet loss. Do not send detection (PING) signals frequently. In addition, the T and R parameters are case sensitive and must be uppercase. The following shows the pathping result output.
C: \> pathping www.163.net
Racing route to www.163.net [202.108.20.203] over a maximum of 30 hops:
0 celeron333 [61.159.17.185]
1 pppb15.bdptt.he.cn [202.99.168.143]
............
10 202.108.0000203
Computing statistics for 250 seconds...
Source to here this node/Link
Hop RTT lost/sent = pct address
0 celeron333 [61.159.17.185]
6 192 MS 0/100 = 0% 0/100 = 0% 202.97.37.1
0/100 = 0% |
.....................
Trace complete.
The above information shows that when the pathping is running, the routing information is displayed first. The path is the same as the result displayed by the tracert command. The pathping command then displays a busy message that takes about 1.5 minutes to run (the specific time depends on the number of hops). During this time, pathping collects information from links between all previously listed routers and routers. The test results are displayed at the end of this period. In the preceding instance report, the link between this node/link lost/sent = pct and address columns shows no data packet loss between the link of hop 5 (202.97.38.73) and hop 6 (202.97.37.1. Sometimes, even though data packets are lost on the routers between hops, the lost data packets do not necessarily affect the forwarding path. The Link (marked with | in the address column) packet loss rate shown in the table indicates the packet loss caused by link congestion on the path. The packet loss rate of the route (identified by its IP address) shown in the table indicates that the CPU or local data packet buffer of the router may be overloaded.

V. winipcfg and ipconfig --- display the configuration information of the host TCP/IP protocol
Among them, winipcfg uses window graphics window display specific information, applicable to Win9x/winme system; ipconfig for MS-DOS work mode, applicable to Win9x/winme/Win2000/winnt system. The displayed information includes 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 information such: host Name, DNS server, and node type. The physical address of the network adapter is useful when detecting network errors. This information is generally used to check whether the manually configured TCP/IP settings are correct. However, if the LAN of the computer uses the Dynamic Host Configuration Protocol (DHCP), the information displayed by this program is more practical, it allows you to determine the value configured by DHCP. In this case, ipconfig/winipcfg can check whether your computer has successfully rented an IP address.
For ipconfig, its common options are as follows:
Ipconfig/All: When the all option is used, ipconfig displays the configured and used additional information (such as IP addresses) for the DNS and WINS servers ), and displays the physical address (MAC) built in the local Nic ). If the IP address is rented from the DHCP server, ipconfig displays the IP address of the DHCP server and the expected expiration date of the lease address.
Ipconfig/Renew: Update DHCP configuration parameters. This option is only available on the system that runs the DHCP client service.
Ipconfig/release: publish the current DHCP configuration. This option disables TCP/IP on the local system and is only available on the DHCP client. To specify the adapter name, you can press

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.