When troubleshooting TCP/IP problems on your network, chances are that the first tool you head for is the Ping utility, which sends four ICMP (Internet Control Message Protocol) echo packets to a remote computer and then listens for the replies. You can then take the information generated by the Ping utility and use it to move on to the Tracert utility, which traces a packet to a remote computer, showing how many hops the packet requires to reach the host and how long each hop takes. The Tracert utility also displays the FQDN (Fully Qualified Domain Name) and IP address of each gateway along the route to the remote computer.
While using the results generated by these two utilities will provide you with a good view of the problem, there’s an even better way to get all this information, and more, by using a little-known command called PathPing, which was introduced in Windows 2000 and is available in Windows XP. As you can surmise from its name, PathPing is basically a hybrid of the Tracert and Ping utilities bundled together into one troubleshooting tool. However, PathPing is more powerful than either of its predecessors because it generates a very detailed statistical report that can better determine the cause of the network problem.
In this Daily Drill Down, I’ll explain in detail how the PathPing utility works. I’ll then show you how to streamline the use of PathPing by moving it out of the “command line only” category and giving it a GUI front end with Windows Script Host and a VBScript that I’ve made available as a download.
The PathPing utility
PathPing works by sending Echo Request packets to a target IP address over a period of time. It then calculates the results based on packets returned from each hop in the route. By providing you with information on both timings and packet losses for each hop, PathPing allows you to quickly determine exactly where the slowdowns or failures are occurring on the route that you’re testing. Figure A shows the results obtained from issuing the command:
C:\PathPing –n www.thewinwiz.com
|The PathPing utility display statistics that can help you troubleshoot TCP/IP connectivity problems.|
Let’s take a look at the results. As you can see, the PathPing utility begins by listing the route that it is going to test. It then displays a message stating that it’s computing the statistics. The amount of time that it takes to do so will vary depending on the number of hops.
Once the computations are complete, PathPing displays the results. When you look closely, you can see that the This Node/Link Lost/Sent = Pct and Address columns show that the link between 220.127.116.11 and 18.104.22.168 is dropping one percent of the packets. You’ll also notice that the routers at hops 2 and 4 are dropping packets addressed to them, but that these losses aren’t affecting the forwarding path. These loss rates, which are represented by the pipe symbol (|) in the Address column, suggest that link congestion is causing the loss of packets being forwarded along the path. The loss rates displayed for routers, which are represented by actual IP addresses, indicate that the CPUs or local packet buffers of those routers are probably overloaded.
Windows XP’s PathPing utility provides you with 12 parameters you can use to modify the way the utility does its job. However, it’s important to note that the documentation for the PathPing utility included in the Help and Support Center lists only eight of these parameters. The online help, which you can display on the command line by typing PathPing /?, lists all 12 parameters.
The script overview
The script that automates the PathPing utility is written in VBScript and runs natively in Windows XP via the Windows Script Host. To do its job, the script uses a Wizard format, which is orchestrated by a Windows Script File. Each page in the wizard is generated by the DialogBox function, which is encapsulated in the FDialogBox.vbs script, and a series of HTML files. There are 12 HTML files, one to prompt you for each of the PathPing utility’s parameters.
You can download the entire package as a compressed Zip file. Once you download the Zip file, you can extract it into any folder you want. Keep in mind that all 14 files listed below must be in the same folder in order for the PathPing Wizard to run correctly.
Running the script
To launch the script, just double-click on the PathPingWiz.wsf file. When you do, you’ll see the first page in the PathPing Wizard, shown in Figure B, which prompts you to enter the address of the destination you want to test the route. You can enter the destination as an IP address or as a host name.
The next page prompts you to enter an alternate source, as shown in Figure C. By default, the PathPing utility tests the entire route from the system on which you launch the command to the destination. However, there may be an occasion when you want to narrow down your troubleshooting expedition to test the route between two specific routers. In that case, you would enter an alternate source.
Clicking Next brings you to the page shown in Figure D, which prompts you to specify whether you want PathPing to resolve IP addresses to host names. While resolving host names is PathPing’s default option and can be helpful in some situations, in most cases it’s not really necessary. By opting to bypass this step, you can reduce the amount of work that PathPing must do and increase the speed with which you receive the results. Besides, if you really want to identify the host name of an intermediate device, you can use either Ping or Nslookup along with the IP address.
|Resolving IP addresses to host names takes extra time.|
The next page, shown in Figure E, allows you to specify whether you want to change the maximum number of hops, or router links, that the PathPing utility will search as it makes its way to the destination. The default maximum limit is 30 hops. Changing this value can help you to zero in on the exact number of hops it takes to get from the source to the destination.
The next page, shown in Figure F, lets you choose the Loose Source Route option and specify exactly which route you want to test on the way to the destination. You must enter these intermediate stops as IP addresses.
|Using the Loose Source Route option allows you to specify an exact route that you want to test.|
When you click Next, you’ll see the page shown in Figure G, which allows you to specify an alternate period of time to wait between consecutive pings. Doing so is a useful stress test. The default setting is to wait 250 milliseconds between each ping.
|You can change the rate at which PathPing pings all nodes along the route.|
The page shown in Figure H lets you specify that an alternate number of Echo Request messages, or packets, be sent to each router in the path. Doing so is a useful stress test. The default setting is 100 Echo Request messages.
|You can change the number of Echo Request messages sent to each router in the path.|
When you get to the page shown in Figure I, you can alter the amount of time to wait for each reply. If you suspect that a particular router is running slowly or is extremely busy, you can give it more time to reply.
If you want to investigate whether the devices along the route are configured for layer-2 priority, the page shown in Figure J allows you to configure the PathPing utility to attach layer-2 priority tags to each Echo Request packet.
Some devices along the route may have the ability to reserve a certain amount of bandwidth for streaming specific types of data, such as multimedia, via Resource Reservation Setup Protocol (RSVP). The next two pages, shown in Figure K, allow you to check the route for RSVP capable devices and then check each device respectively.
Finally, you can configure the PathPing utility to specifically use either IP version 4 or IP version 6 for the test (Figure L). This can be helpful if you happen to be experimenting with the IPv6 prerelease code that is supplied with Windows XP.
|The PathPing utility can test specific versions of the Internet Protocol.|
Once you click Next, you’ll see a Command Prompt window, and the PathPing Wizard will launch the utility along with any parameters you’ve opted to use.