Basic network inspection tools
Start with observations, not changes
Network inspection means collecting evidence about a device and its connections. A good first question is whether the interface has the expected address and whether a route exists. Use the following Linux and Windows commands as platform-specific syntax references. They are illustrative only; no commands were executed for this lesson. Local inspection does not intentionally send probes, but ping, traceroute and DNS lookup can send traffic. Use those only inside an approved isolated lab with known endpoints. Never publish real configuration or network output.
Linux: addresses, routes and sockets
On a Linux host with iproute2, ip -br addr gives a compact interface/address view; ip route show displays routes and ip route get asks the kernel how it would route to a destination. ss -lnt lists listening TCP sockets numerically. Older net-tools installations offer ifconfig -a, netstat -rn and netstat -lnt; they may not be installed and their flags are not interchangeable with Windows or BSD. Read interface state, prefix, selected interface and next hop. The following is syntax only, not a command sequence to execute against the paper addresses.
ip -br addrip route showip route get 198.51.100.10ss -lntifconfig -anetstat -rnnetstat -lntWindows: comparable questions, different commands
In Windows Command Prompt, ipconfig /all shows adapter configuration including addresses, gateways and DNS information; route print lists routes and netstat -ano displays connections and listening ports, numeric addresses and process IDs. Inspect the adapter used by the lab, not unrelated VPNs or virtual adapters. A listing is a snapshot, not proof of packets crossing a firewall. Do not use release/renew, route add or other state-changing commands in this lesson.
ipconfig /allroute printnetstat -anoEcho, path and name resolution
For a lab-only destination, Linux iputils ping -c 3 and Windows ping -n 3 limit echo requests to three. Linux traceroute -n avoids name lookups, and Windows tracert -d does the same; the default Linux traceroute method commonly uses UDP whereas Windows tracert uses ICMP echo. A missing hop reply does not establish that forwarding stopped. getent ahostsv4 on glibc Linux uses the configured system name-service mechanism; nslookup queries DNS and need not agree with an application that uses other resolution sources. The name server.lab.invalid is fictional; a lab DNS fixture would have to provide its record. Do not send these paper examples to public resolvers or hosts.
Linux (syntax only):ping -c 3 198.51.100.10traceroute -n 198.51.100.10getent ahostsv4 server.lab.invalidWindows (syntax only):ping -n 3 198.51.100.10tracert -d 198.51.100.10nslookup server.lab.invalidRead a small fictional snapshot
The following normalized record is invented for the lesson, not exact terminal output. A has a connected route and a default gateway; B has a socket bound only to its loopback address. Even if A can ping B, that binding does not accept a connection to B’s Ethernet address on port 8080. First verify the intended bind address on B and its policy; a different network route would not fix a loopback-only binding. Practice: choose the appropriate local tool if the symptom is an unexpected gateway or a missing TCP listener.
A: eth0 UP 192.0.2.10/27A route: 192.0.2.0/27 dev eth0A route: default via 192.0.2.1B TCP listener: 127.0.0.1:8080Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Basic network inspection tools — knowledge check
Interpret a fictional network and select evidence-based checks.
Which Linux iproute2 command shows the selected route for a specific destination?
Which Windows command shows the IP routing table?
A server listens only on 127.0.0.1:8080. Which evidence is most relevant?
One intermediate traceroute hop does not reply, but a later hop does. What is justified?
Why can getent and nslookup produce different results?