Chapter 08 of 17
Troubleshoot the network in layers
Separate interface, routing, DNS, transport, TLS, and application failures.
The mental model.
An IP address identifies an interface at the network layer. A route selects where traffic goes, often through a default gateway. DNS translates names to records. A port identifies a transport endpoint, and a listening socket must exist before clients can connect.
Start with ip addr and ip route, then test name resolution with dig. Inspect listeners with ss -lnt and test application behavior with curl -I. A failed ping does not prove a host is down because ICMP may be blocked.
Connection refused often means no listener or an active rejection. A timeout may indicate a dropped packet, route failure, or overloaded endpoint. A DNS error occurs before a connection to the application; changing HTTP settings will not fix it.
Firewalls control traffic, not whether an application is healthy. Before changing remote firewall rules, explicitly allow the management connection and keep a recovery console available. TLS failures can involve trust, hostname, validity dates, or clock errors.
Read it. Predict it. Try it.
Before running these commands, predict what each line will change or print. Launch a quest below to open the simulated terminal.
ip addr
ip route
dig example.com
ss -lnt
curl -I https://example.comThis sequence investigates local configuration, routing, resolution, listeners, then HTTP. Browser results are fixtures; repeat the workflow in a real VM to observe actual packets and errors.
Check your understanding
Explain the why.
Put it into practice.
Complete the exercises, then try the Boss Challenge without hints. Each quest checks its own objectives. You can revisit this chapter at any time.
Make the learning stick.
Close the explanation and describe the main idea in your own words. Change a filename or input and predict the outcome. Tomorrow, repeat a quest without hints. Then apply it in a disposable real Linux environment.
Open the real-system labs →