CompTIA Linux+ (XK0-006)TroubleshootingEasy

A system administrator needs to troubleshoot a network connectivity issue on a Linux server. They suspect that packets might be dropped or misrouted along the path to a remote host (`remote.example.com`). Which command would best allow them to trace the network path and identify specific hops where latency increases or packets are lost?

  1. A`ip route get remote.example.com`
  2. B`ping -c 5 remote.example.com`
  3. C`netstat -r`
  4. D`traceroute remote.example.com`
Show answer & explanation

Correct answer: D. `traceroute remote.example.com`

`traceroute` is specifically designed to display the route (path) that packets take to reach a network host and to measure transit delays of packets across an IP network. It identifies each hop (router) along the path and shows the round-trip time for packets to reach that hop, making it ideal for pinpointing where latency or loss occurs.

Why the other options are wrong

  • A. `ip route get` shows the routing entry that would be used to reach the destination, not the actual path taken or hop-by-hop latency.
  • B. `ping` tests end-to-end connectivity and latency but does not show the path or individual hop performance.
  • C. `netstat -r` displays the kernel routing table, similar to `ip route`, but does not trace the path or show latency to individual hops.

traceroute

The `traceroute` command displays the route and measures packet transit delays across an IP network. It identifies all intermediate routers (hops) between the source and destination.

  • Uses UDP packets (or ICMP, depending on implementation/options) with increasing TTL values.
  • Each hop responds with an ICMP 'Time Exceeded' message or the destination with 'Port Unreachable'.
  • Shows IP addresses and often hostnames of intermediate routers, along with round-trip times.

Memory trick: To 'trace' the 'route', use `traceroute`.

More Troubleshooting questions