6.7 Network diagnostics utilities: ping, tracert, traceroute and mtr

Banner Imagine that your computer is a car, and the Internet is a huge highway. Sometimes there are “traffic jams”, “pits” or “closed areas” on this highway. How to find out where exactly the problem arose? There are special tools for this, which will be discussed later.

Network diagnostics in Windows

Ping testing

What is Ping?

Ping is like a “Can You hear me?” signal in the world of computer networks. This command:

  • Checks if a remote computer or server is “alive.”
  • Measures response time (communication speed).
  • Shows possible data packet losses.
When to use Ping?

If You suspect that:

  • A website is not working.
  • Internet connection is unstable.
  • There are problems with a specific server.
How to launch the Ping utility?
  1. Through command prompt (cmd.exe):
    • Press Win+R.
    • Enter cmd or cmd.exe and press Enter.

Command Prompt

  1. Through PowerShell:
    • Press Win+X.
    • Select Windows PowerShell or Windows Terminal. PowerShell

Basic Parameters in Windows

  • -n: number of requests.
  • -l: packet size.
  • -t: continuous mode.
  • -w: timeout.

Usage Examples

Check Google.
  1. ping google.com
Check with 10 requests.
  1. ping -n 10 google.com
Check with large packet.
  1. ping -l 1000 google.com
Continuous check.
  1. ping -t google.com
Example: successful ping check to google.com domain.

Pings

Example: failed ping check to IP 172.172.172.172.

Pings

What the results mean:

  • 0% loss – Everything’s great, no packet loss.
  • 25% - 50% loss – There are connection stability issues.
  • 100% loss – The server is either completely inaccessible or blocked.

Routing with Tracert

What is Tracert?

Tracert is like GPS for network packets. It:

  • Shows the complete path from Your computer to the target server.
  • Identifies each intermediate node (computer/router).
  • Measures transit time at each stage.
When to use Tracert?

If You want to understand:

  • Why the internet is working slowly.
  • At what stage delays occur.
  • Where there might be a routing problem.
How to launch the Tracert utility?
  1. Through command prompt (cmd.exe):
    • Press Win+R.
    • Enter cmd or cmd.exe and press Enter.

Command Prompt

  1. Through PowerShell:
    • Press Win+X.
    • Select Windows PowerShell or Windows Terminal. PowerShell

Basic Parameters in Windows

  • -d: without DNS resolution.
  • -h: maximum number of hops.
  • -w: timeout for each node.

Usage Examples

Trace to Google.
  1. tracert google.com
Trace without DNS resolving.
  1. tracert -d google.com
Example: successful trace check to google.com domain.

Pings

Example: failed trace check to IP 100.100.100.100.

What the results mean:

  • Each line is a “hop” to the server.
  • * - packet was lost or didn’t receive a response.
  • Lower numbers on the right indicate better speed.

Monitoring via MTR

What is MTR (WinMTR)?

MTR (My Traceroute) is the “Swiss Army knife” of network diagnostics. It combines the capabilities of Ping and Tracert, but goes much deeper.

Unique WinMTR features:

  • Continuous route monitoring.
  • Loss statistics at each node.
  • Dynamic statistics updates.
  • Graphical results presentation.

Installation in Windows

  1. Download WinMTR.
  2. Extract the archive.
  3. Run the version You need (32 or 64-bit).
WinMTR utility interface.

Network diagnostics in Linux/MacOS

Connection test (Ping)

What is Ping in Linux?

Ping is a system utility for checking network connectivity that:

  • Sends ICMP packets.
  • Determines host availability.
  • Evaluates connection quality.
How to launch the Ping utility?
  1. Through terminal:

    • Press Ctrl+Alt+T.
    • Or launch terminal emulator from menu.
  2. Through console:

    • Switch to text mode Ctrl+Alt+F1.

Basic Parameters in Linux

  • -c: number of packets.
  • -i: interval between packets.
  • -s: packet size.
  • -W: timeout.
  • Ctrl+C: combination to stop checking.

Usage Examples

Basic check.
  1. ping google.com
5 packets with 2-second interval.
  1. ping -c 5 -i 2 google.com
Large packet.
  1. ping -s 1000 google.com
Example: successful ping check to google.com domain.

Pings

Traceroute

What is Traceroute?

Traceroute is a utility for tracing packet routes that:

  • Shows the path to the target node.
  • Determines delays along the route.
  • Helps diagnose network problems.
How to launch the Traceroute utility?
  1. Through terminal:

    • Press Ctrl+Alt+T.
    • Or launch terminal emulator from menu.
  2. Through console:

    • Switch to text mode Ctrl+Alt+F1.

Basic Parameters in Linux

  • -n: without DNS names.
  • -m: maximum number of hops.
  • -w: timeout.
  • -I: ICMP mode.

Usage Examples

Basic tracing.
  1. traceroute google.com
Without DNS resolving.
  1. traceroute -n google.com
Maximum 15 hops.
  1. traceroute -m 15 google.com
Example: successful trace check to google.com domain.

Pings

MTR Utility

What is MTR?

MTR is a powerful diagnostic tool that provides advanced diagnostics capabilities:

  • Combines ping and traceroute.
  • Provides detailed network statistics.
  • Works in interactive mode.
Basic MTR Controls:

After launching mtr <address> (for example, mtr google.com), You’ll see an interactive interface. Here are the main control keys:

Basic commands:

  • Q — quit the utility.
  • H — show help.
  • R — reset current statistics (update data).
  • C — clear screen and start collecting statistics anew.
  • P — toggle packet loss display mode (show only lost packets, ignoring others).

Display modes:

  • D — toggle between detailed and simplified output.
  • N — enable/disable IP address to domain name conversion.
  • B — change basic display mode (reverse packet count).

Sorting:

  • L — sort by packet Loss.
  • R — sort by average Response Time (RTT).
  • S — sort by current response time.
  • J — change sorting algorithm (manual or automatic).

Additional options:

  • ? — display a brief list of all hotkeys.

Installation in Linux

For Ubuntu/Debian.
  1. sudo apt-get install mtr
For CentOS/RHEL.
  1. sudo yum install mtr

Basic Launch Parameters

  • -r: run utility in report mode (without interactive interface). After test completion, summary statistics will be displayed.
  • -c <number>: specify number of requests (number of polling cycles).
  • -i <interval>: set interval between requests (in seconds, default is 1 second).
  • -s <size>: set packet size (in bytes).
  • -p: use only ICMP protocol (ping).
  • -u: use UDP for route testing.
  • -T: use TCP connection (useful for port testing).
  • -n: don’t convert IP addresses to domain names (disable DNS resolution).
  • -b: show both incoming and outgoing traffic.
  • -4: use only IPv4.
  • -6: use only IPv6.

Usage Example

Basic mode.
  1. mtr google.com
Report mode.
  1. mtr -r google.com
Example: checking google.com website using MTR.

MTR MTR2