Instiq
Chapter 5 · Diagnosing Problems·v1.0.0·Updated 7/17/2026·~15 min

What's changed: Initial version

5.3Basic diagnostic commands and interpreting results

Key points

Covers when to use the staple commands—ping for reachability, ipconfig (Windows) / ifconfig and ip (Linux) for local IP settings, tracert/traceroute to trace the path, and nslookup for name resolution—plus correctly interpreting results, such as how a firewall blocking ICMP can make ping fail even though the host is actually reachable.

Against a complaint of "no connection," the first hands-on way to gather facts is the basic diagnostic commands. ping, ipconfig/ifconfig/ip, tracert/traceroute, and nslookup—available on every OS—each check a different layer and viewpoint. What matters is less being able to type the command than how you read the result. In particular, when a firewall blocks specific traffic, a command may display "failure" while the host is in fact reachable—a discrepancy. This section covers when to use each command and the correct interpretation, including such result pitfalls.

5.3.1When to use each staple command

  • ping checks L3 reachability to a target using ICMP. If a reply returns, you also see the round-trip time (RTT). It is the first move to see "does it even reach?" Pinging an IP like ping 8.8.8.8 separates out the effect of name resolution.
  • ipconfig (Windows) / ifconfig and ip (Linux/mac) show your own IP settings (IP address, subnet mask, default gateway, etc.). Use them first to check "do I even have a correct IP?" and "is the gateway set?"
  • tracert (Windows) / traceroute (Linux/mac) trace the path (hops) one by one to a destination. Seeing which router it reaches and where it stops narrows down "where along the way it is broken." nslookup checks whether name resolution (DNS)—host name to IP—works correctly.

Continue reading — free sign-up

You're reading the free preview. Sign up free to read this section in full, plus every chapter (including 4+) and all questions.