Search

Pathping command tool

Pathping is another great command tool available in Windows Operating Systems for network path tracing and troubleshooting. Pathping that works similar to ping and traceroute/tracert, but provides advanced result output. Please note that pathping command tool is only available on Windows. Similar tool in Linux is mtr.

I strongly recommend you to visit following lessons before reading further.

Ping command can test the network connectivity between source and destination. Traceroute/tracert command can trace the path an IPv4 datagram travels from source and destination. But pathping command can do the both, can test network latency and also packet loss between hops from source and destination.

Pathping provides information related with network latency between hops while an IPv4 datagram travel between source and a destination. Network latency is a measure of how much time it takes for an IPv4 datagram to travel from between source to destination. Lowest latency close to zero is preferred. Network latency is measured by RTT (Round-trip Time), that is by measuring the time taken by an IPv4 datagram to reach to a destination and back to source.

Pathping does its work initially similar to traceroute/tracert in tracing the path between source and destination. When you run pathping command tool, first pathping will first path tracing results similar to traceroute/tracert. Then pathping command tool will start calculating network latency related calculations. Pathping calculates network latency by sending and receiving ICMP Echo Request and Echo Reply messages between each hop along the route from source to the destination.

One drawback about pathping is about the time it takes to perform the calculation. Depending on the number of hops between the source and the destination it may take minutes to display the command output.

How pathping works

As explained above, initially pathping does a path tracing similar to traceroute/tracert command. Please visit Traceroute/tracert command tool lesson to learn how traceroute/tracert works. Here we are going to use the same topology used in Traceroute/tracert command tool lesson to learn pathping command tool. Please refer below image.

pathping-topology.gif

Open command prompt by typing cmd in Windows search box and then clicking the result. To run pathping command in Windows Operating Systems, type pathping in command prompt with destination IPv4 address as shown below.

run-pathping-commad.jpg

Pathping tool will now perform a path tracing using TTL (Time-to-Live) value in IPv4 header, ICMP Echo Request and Echo Reply messages and ICMP Time Exceeded messages as explained in Traceroute/tracert command tool lesson. Following are the path tracing ICMP Echo Request and Echo Reply and ICMP Time Exceeded messages sent and received by pathping command.

pathping-path-tracing-icmp-packets.jpg

The pathping command will display result of path tracing as shown in below image.

pathping-path-tracing-output.jpg

Now the pathping tool running at the source computer has got all the IPv4 addresses of the interfaces of routers facing the source computer up to the destination computer. Pathping tool can start computing the network latency using ICMP Echo Request and Echo Reply messages. Pathping command will be busy for some time generating, sending, receiving and then analysing the statistics of the ICMP packets. The wait time depends on number of hops between source and destination and latency.

pathping-computation-packets.jpg

As you can from above Wireshark screenshot, pathping start sending ICMP Echo Request and Echo Reply messages to all the IPv4 addresses it got from path tracing up to the destination computer. Again and again, it will be repeated for 100 times, by default, for computing packet lost and network latency computation. Please refer source and destination IPv4 addresses in above Wireshark capture image and then cross check with the topology diagram to get a clear picture. Pathping then will display the final result, after the computation as shown below.

pathping-final-output.jpg

You can see the Hop column showing the hop number, RTT column showing the round-trip time, Source to Here Lost/Sent = Pct showing packet lost up to that hop, This Node/Link, Lost/Sent = Pct showing the packet lost per links and finally Address column showing the links.

Packet losses at any link may indicate an issue in the network at the corresponding link.

Related Tutorials
Introduction to TCP/IP, Features of TCP/IP, TCP/IP History, What is RFC (Request for Comments)
Seven Layers of OSI Model and functions of seven layers of OSI model
Five layered TCP/IP model
Network Layer (Layer 3)
TCP/IP Data Encapsulation and Decapsulation
Datalink Layer (Layer 2)
Ethernet Frame Format
What is MAC address or Layer 2 address or physical address
IPv4 Protocol, IPv4 header and fields of IPv4 header
IPv4 addresses, IPv4 Address Classes, IPv4 Address Classifications
What is Subnet Mask
What is network address
Limited broadcast address
Directed broadcast address
What is limited broadcast in IPv4 and how limited broadcast works
What is directed broadcast in IPv4 and how directed broadcast works
What is default gateway
What are private IP addresses - RFC 1918 private addresses
APIPA Addresses (Automatic Private IP Addresses)
What is loopback address in IPv4
What is localhost
Class A networks and Class A IP addresses
Class B networks and Class B IP addresses
Class C networks and Class C IP addresses
Class D multicast IP addresses
Subnetting - Part 1
Subnetting - Part 2
Subnetting - Part 3
Subnetting - Part 4
Subnetting - Part 5
Subnetting - Part 6
Variable Length Subnet Masking, VLSM, IP V4 Subnetting, subnetting tutorials, IP study guides, IP documentation, IP tutorials
Supernetting, IP Supernetting, IP Supernetting tutorial, How to Supernet, Supernetting Guide, Supernetting Concepts
How to find out the Network Address and Broadcast Address of a subnetted IPv4 address
Address Resolution Protocol Tutorial, How ARP work, ARP Message Format
Internet Control Message Protocol, ICMP, How ICMP Work, ICMP Header, ICMP Message Header
ICMP message types
ICMP Echo Request and Echo Reply messages
ICMP Destination Unreachable messages
ICMP Source Quench messages
ICMP Router Advertisement messages
ICMP Router Solicitation messages
ICMP Time Exceeded messages
ICMP Parameter Problem messages
ICMP Timestamp Request and Timestamp Reply messages
ICMP Photuris messages
Ping command tool
Ping command options
How to show remote computer name in ping command output
How to ping continuously
How to specify the number of packets sent in ping command
How to specify the size of data to send in ping command
What is Ping of death (PoD) network attack
Traceroute/tracert command tool
Tracert command options
Pathping command options
Difference between ping, traceroute/tracert and pathping