A system administrator is investigating a network performance issue where connections to an external server are occasionally timing out. The local server's network configuration appears correct, and local network pings are successful. The administrator wants to identify where packets are being dropped or delayed along the route to the external server. Which command would be most effective for this task?
- A`ping -c 100 <external_ip>` to check packet loss to the destination.
- B`traceroute <external_ip>` to visualize the path and identify latency/drops at each hop.
- C`ip link show` to check the status of network interfaces.
- D`netstat -rn` to view the routing table for the server.
Show answer & explanationAnswer & explanation
Correct answer: B. `traceroute <external_ip>` to visualize the path and identify latency/drops at each hop.
`traceroute` (or `tracepath`) is specifically designed to map the path that packets take to a destination, hop by hop. By showing the latency to each router and indicating timeouts at specific hops, it can pinpoint exactly where packets are being dropped or experiencing significant delays, which is crucial for diagnosing intermittent connectivity issues to external servers.
Why the other options are wrong
- A. `ping` will show overall packet loss to the destination, but not *where* along the route the loss is occurring, which is needed to identify the point of failure.
- C. `ip link show` verifies local interface status, which is too localized for diagnosing issues with external network paths.
- D. `netstat -rn` shows the routing table, which is good for confirming local routing, but doesn't diagnose issues *beyond* the local network or pinpoint where packets are dropped on an external path.
traceroute for Path Analysis
`traceroute` (or `tracepath`) is a network diagnostic tool used to display the route (path) and measure transit delays of packets across an IP network. It identifies each hop (router) along the path and can help pinpoint where connectivity issues, such as packet loss or high latency, occur.
- Maps the network path to a destination.
- Shows latency to each 'hop' (router).
- Essential for diagnosing intermediate network issues.
Memory trick: TRACEROUTE shows the trail of packet's travail.