Use Sophia to knock out your gen-ed requirements quickly and affordably. Learn more
×

Network Diagnostics

Author: Sophia

what's covered
In this lesson, you will learn how network professionals use diagnostic tools to test whether devices are reachable and to locate where communication problems occur. These tools rely on ICMP, the Internet Control Message Protocol, to exchange short messages that reveal whether a network path is healthy or broken. Specifically, this lesson will cover the following:

Table of Contents

1. ICMP

So far, you have seen how TCP establishes reliable connections between devices using a handshake process. However, what happens when things do not go as planned, such as when you cannot reach a server or a connection fails partway through?

That is where network diagnostic tools such as Internet Control Message Protocol (ICMP), ping, and traceroute come into play. These tools do not carry data like TCP does. Instead, they help you detect and understand problems. Whether you are checking if a device is online or tracing how your data travels, these tools give you visibility into how networks behave when things go right and when they go wrong.

term to know
Internet Control Message Protocol (ICMP) 
A network layer protocol used for sending error messages and diagnostic information, such as “destination unreachable” or “time exceeded.” It supports tools like ping and traceroute to help identify and fix network problems. 

1a. Echo Messages

Imagine you are sending a package across town and it doesn’t arrive promptly at the destination. The delivery service sends you a message that the address is not found or the delivery has been delayed. In networking, ICMP’s job is to generate and deliver such messages.

ICMP is a companion to the Internet Protocol (IP) working alongside it at the Network Layer. While TCP makes sure your data is delivered reliably, IP is responsible for addressing and routing that data. ICMP supports IP by sending messages when things go wrong. For example, if a router cannot forward a packet or if a destination is unreachable, ICMP sends a message back to the sender to report the issue. These messages can be observed using packet sniffing tools.

Echo messages are some of the most common ICMP messages that ICMP sends. They include the following:

  • Echo Request: A device sends this message to ask another device if it is reachable.
  • Echo Reply: If the other device is available, it responds to confirm that it received the request.
These two message types are used by the ping tool, which you will explore in the next section. When you use ping, you send an Echo Request and wait for an Echo Reply.

ICMP can also send other types of error messages. Here are a few examples:

  • If the destination is unreachable, ICMP sends a “destination unreachable” message.
  • If a packet takes too long to reach its destination, ICMP sends a “time exceeded” message to let the sender know the packet expired.
Although ICMP is not responsible for sending actual files or images, it plays an important role in helping devices understand when and why communication fails. It gives your computer the ability to respond to network problems instead of staying in the dark.

Some network devices or firewalls may block ICMP messages to prevent abuse, which can make troubleshooting more difficult. Still, ICMP remains a core part of network diagnostics and an essential part of tools such as ping and traceroute.

terms to know
Echo Request
An ICMP message (Type 8) sent from one device to another to check if the destination is reachable. It is commonly used in the ping command.
Echo Reply
An ICMP message (Type 0) sent in response to an Echo Request, confirming that the destination is active and responding.

1b. Ping

The term ping comes from sonar technology, where a sound pulse is sent out and its echo is measured when it returns. In networking, Ping works the same way. It sends an ICMP Echo Request to a device and waits for an Echo Reply. It’s generally referred to in lowercase because it’s typed in lowercase at a command line interface.

When you run the ping command, your computer sends a small message to another device, such as a server or a router. If that device is online and reachable, it responds. Your computer then measures how long the round trip took. This simple exchange helps you answer an important question: “Can my device reach the destination?”

Here is what ping can tell you:

  • If you receive replies, the device is reachable and responding.
  • If the request times out, the device may be offline, too busy, or blocked by a firewall.
  • If some replies are missing or delayed, the network may be unstable or overloaded.
You can use ping to test a website, a server, or even your local network. For example, if your internet is not working, you can ping your router to see if your computer is connected to the network. You can also ping a public server such as Google’s DNS (8.8.8.8) to check if the issue is with your provider.

EXAMPLE

Let’s use the ping tool to determine whether Google’s DNS (8.8.8.8) is reachable.

For Mac users:
  1. Open Terminal.
    1. Open search by pressing CMD + Spacebar.
    2. Type Terminal and press Return, or find it in Applications > Utilities.
    3. A window with a command line will appear.
  2. Run ping.
    1. Type the command ping 8.8.8.8 and press Return.
    2. Observe the results.
For Windows users:
  1. Open Command Prompt.
    1. Open the Start menu or press the Windows key.
    2. Type cmd in the search bar and press Enter.
  2. Run ping.
    1. Type the command ping 8.8.8.8 and press Enter.
  3. Observe the results.
When you run a ping command, you will see output similar to this:

Pinging 8.8.8.8 with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=40ms TTL=117
Reply from 8.8.8.8: bytes=32 time=40ms TTL=117
Reply from 8.8.8.8: bytes=32 time=43ms TTL=117
Reply from 8.8.8.8: bytes=32 time=41ms TTL=117

Ping statistics for 8.8.8.8:
     Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
     Minimum = 40ms, Maximum = 43ms, Average = 41ms

Here is what each part tells you:

  • Reply from 8.8.8.8 means the destination responded.
  • bytes=32 shows the size of the ICMP Echo Request and Reply.
  • time=40ms is the round-trip time, or how long it took for the message to go to the destination and back.
  • TTL=117 stands for Time To Live, which is a value that decreases with each router the message passes through. TTL gives a sense of how far the packet traveled.
Below that, you see a summary:

  • Packets sent and received show whether anything was lost in transit.
  • 0% loss means every request received a reply.
  • Minimum, maximum, and average times help measure network stability. A small range means the connection is steady.

Ping is most useful when something is not working and you want to know whether the problem is with your device, your network, or the destination. If all requests time out, the destination may be down, unreachable, or blocking ICMP.

Ping is a helpful starting point when you want to know if a device is reachable, but it only shows part of the picture. It does not tell you how many packets were actually sent, if any were delayed, or whether replies were missing. You also cannot see which IP addresses were involved without looking behind the scenes.

To really understand how ICMP Echo Requests and Replies behave on a network, it helps to examine the traffic using a tool that can capture and summarize it.

EXAMPLE

The screenshot below shows a packet capture summary of ICMP traffic collected on a network. Each row represents an ICMP conversation between two devices. By examining the source and destination addresses, along with the packet counts, network administrators can determine whether devices successfully exchanged Echo Requests and Echo Replies. Network traffic summary showing ICMP communication between devices. Each row represents an ICMP conversation between two devices. By examining the Source IP, Destination IP, and packet counts, we can determine whether the devices successfully exchanged ICMP messages. Let's start with the first two rows:
  • 10.67.5.1 → 10.67.5.6
  • 10.67.5.6 → 10.67.5.1
Both rows use the ICMP protocol and show 8 packets sent and 8 packets received. This indicates that Echo Requests and Echo Replies were exchanged successfully between the two devices. A similar pattern appears in rows 3 and 4:
  • 10.67.5.1 → 8.8.8.8
  • 8.8.8.8 → 10.67.5.1
Again, the packet counts match, showing that every Echo Request received an Echo Reply. This indicates successful communication with Google's public DNS server. Rows 5 through 8 show additional successful ICMP conversations involving:
  • 1.1.1.1
  • 192.168.1.1
In each case, the number of packets sent matches the number of packets received, indicating that the devices responded successfully. Now examine the last two rows:
  • 10.67.5.1 → 10.67.5.50
  • 10.67.5.1 → 172.16.20.10
These rows show 1 packet sent but 0 packets received. This means an Echo Request was sent, but no Echo Reply was returned. The destination may be offline, unreachable, or configured to block ICMP traffic. By comparing packet counts, network administrators can quickly determine whether devices are responding to ICMP requests. Matching sent and received counts generally indicate successful communication, while missing replies may point to connectivity problems or security restrictions.
try it
Examine the ICMP traffic summary shown in the screenshot: File:66470-tryit115.png Answer the following questions.
1. How many ICMP conversations show successful communication? How do you know?
There are 10 successful ICMP conversations. Rows 1–6 and 9–12 show successful communication because the number of packets received matches the number of packets sent. This indicates that Echo Requests received Echo Replies.
2. Which device appears to be sending most of the Echo Requests?
The device 192.168.100.138 appears to be sending most of the Echo Requests because it is listed as the source IP in many of the conversations.
3. Which conversations appear unsuccessful? How do you know?
The conversations between 192.168.100.138 and 10.10.10.10 and between 192.168.100.138 and 172.16.5.5 appear unsuccessful. In both cases, packets were sent but no packets were received. This suggests that no Echo Reply was returned.
4. Which devices responded successfully to ICMP requests from 192.168.100.138?
The devices 4.2.2.1, 8.8.8.8, 1.1.1.1, 192.168.1.1, and 203.0.113.10 all responded successfully because the packet counts show replies were received.
5. In your own words, explain the difference between an Echo Request and an Echo Reply. Use examples from the screenshot to support your answer.
An Echo Request is a message sent to determine whether another device is reachable. An Echo Reply is the response that confirms the device received the request and is reachable. For example, 192.168.100.138 successfully exchanged Echo Requests and Echo Replies with 8.8.8.8 and 1.1.1.1. However, no replies were received from 10.10.10.10 or 172.16.5.5.

The packet counts shown in the screenshot provide evidence of whether an ICMP conversation succeeded or failed. Matching sent and received values indicate successful communication, while missing replies may signal connectivity problems, blocked traffic, or unavailable devices.

term to know
ping
A diagnostic tool that uses ICMP Echo Requests and Echo Replies to test whether another device is reachable and to measure how long it takes for a message to travel to that device and back.


2. Traceroute

While ping tells you whether a destination is reachable, traceroute shows you the path your data takes to get there. It reveals each device your packet passes through along the way, including routers and gateways. This is especially helpful when something is slow or not working, and you want to know where the problem is happening.

Traceroute works by sending a series of packets with increasing “Time to Live” (TTL) values. TTL is a number that limits how many steps, or hops, a packet can take through the network. The first packet is allowed to travel only one hop, the next is allowed two, and so on. Each time a packet expires, the router that discards it sends back an ICMP Time Exceeded message. Traceroute collects these replies and builds a list of all the points along the route.

The result is like a travel log for your data. You can see how far your packet gets before reaching its destination and where delays or failures occur.

A normal traceroute shows a list of IP addresses or hostnames, each representing a device in the path. Alongside each hop, you will see one or more response times measured in milliseconds.

  • If a hop replies quickly, that part of the network is healthy.
  • If a hop takes a long time, it may be overloaded or distant.
  • If a hop shows an asterisk (*), it did not respond. This is common for some routers that block ICMP messages.
You can use traceroute to troubleshoot problems such as slow loading times or broken connections. For example, if you cannot reach a website and the trace fails halfway, the issue might be with a router outside your local network.

EXAMPLE

Using traceroute, you can observe the path from a computer to a public server. If you would like to try it, you can follow these directions.

For Windows users:

  1. Open Command Prompt by searching for “cmd.”
  2. Type tracert google.com and press Enter.
For Mac or Linux users:

  1. Open Terminal.
  2. Type traceroute google.com and press Enter.
The screenshot shows an example of a completed traceroute to Google.com from a Windows computer.

Traceroute command output showing multiple hops to google.com (142.250.190.142), with some requests timed out before reaching the destination. 

Looking at the image, you can observe the following:

  • Hop 1 shows all asterisks (*), meaning the local router or firewall didn’t respond. This is common and not a problem.
  • Hop 2 is the first visible router, with response times of 38–45 ms.
  • Hop 3 includes a hostname (e.g., zayo.com), showing the packet entered an ISP network.
  • Hops 4–5 timed out, likely due to ICMP being blocked. This is normal if the trace continues.
  • Hop 6 shows a Google hostname (1e100.net), indicating entry into Google’s network.
  • Hops 7–14 continue through Google’s infrastructure, with consistent times under 70 ms.
  • Hop 15 is the final destination, google.com (142.250.190.142), with stable times and a successful trace.
This traceroute reveals the following:

  • The destination is reachable.
  • Most routers along the path responded, showing the full route.
  • Some routers did not reply, but this did not prevent the connection.
  • Response times are consistent, with no major delays or signs of congestion.

Protocols such as TCP and ICMP leave behind clues about whether communication is working as expected. Packet captures preserve those clues by recording the traffic sent and received across a network. By examining packet capture summaries, network administrators can identify successful handshakes, Echo Requests and Replies, missing responses, and other communication patterns. This deeper view confirms what tools such as ping and traceroute suggest and helps pinpoint the source of network problems.

terms to know
traceroute
A network diagnostic tool that maps the path packets take to a destination by sending packets with increasing TTL values and receiving ICMP “time exceeded” messages from each router along the way.
Hop
A single step that a packet takes as it moves from one device (usually a router) to the next across a network. Traceroute measures each hop along the path to the destination.
ICMP Time Exceeded
A message sent by a router when a packet’s TTL reaches zero, used by traceroute to reveal the router’s presence along the path.

summary
In this lesson, you explored ICMP, the protocol that provides essential feedback about whether devices can communicate across a network. You used ping to send Echo Messages and measure whether a destination was reachable and how long responses took. You analyzed packet capture summaries to identify successful and unsuccessful ICMP exchanges. You then learned to use traceroute, which traces the path packets take through routers and gateways, revealing where delays or failures occur. Together, these tools allow you to test connectivity and pinpoint problems, giving you practical skills for troubleshooting real-world networks.

Source: THIS TUTORIAL WAS AUTHORED BY SOPHIA LEARNING. PLEASE SEE OUR TERMS OF USE.

Terms to Know
Hop

A single step that a packet takes as it moves from one device (usually a router) to the next across a network. Traceroute measures each hop along the path to the destination.

ICMP Time Exceeded

A message sent by a router when a packet’s TTL reaches zero, used by traceroute to reveal the router’s presence along the path.

ping

A diagnostic tool that uses ICMP Echo Requests and Echo Replies to test whether another device is reachable and to measure how long it takes for a message to travel to that device and back.

traceroute

A network diagnostic tool that maps the path packets take to a destination by sending packets with increasing TTL values and receiving ICMP “time exceeded” messages from each router along the way.