A ticket arrives: "the internet is down." The tempting move is to start at the physical layer, checking the cable, the switch port, the firewall rule. Most of the time that is the longest route to the answer.

The faster way is to split the problem into two halves and test each half once.

Half one: can packets leave and return?

ping -c 3 1.1.1.1 

This sends traffic to an IP address, so it involves no name lookup at all. If replies come back, the client has an address, a default gateway and a working route out. If it times out, stop looking at DNS. Check the gateway with ip route, then the link itself.

Half two: can names be resolved?

ping -c 3 example.com 

Same destination class, but now the client has to turn a name into an address first. If the IP ping worked and this one fails with "unknown host" or "temporary failure in name resolution," you have your answer in under a minute. The network is fine. Name resolution is broken.

Which resolver is at fault?

dig example.com dig @1.1.1.1 example.com 

The first query goes to whatever resolver the machine was configured with. The second asks a public resolver directly. If the second answers and the first does not, the configured resolver is the problem. Look at /etc/resolv.conf or run resolvectl status to see which server the client is using and where it came from. A DHCP option pointing at a server that is gone is a common cause.

If both fail, the problem is more likely the domain itself or something blocking port 53.

One trap with dig

dig talks to DNS and nothing else. Applications go through the system's lookup order, which includes /etc/hosts. Run this too:

getent hosts example.com 

If dig returns an address and getent does not, or returns a different one, a hosts entry or the order in /etc/nsswitch.conf is changing the result. That mismatch causes a surprising number of "works in the terminal, fails in the app" reports.

Why this order

Each test removes half of the possible causes. After ping by IP, you know whether to look at the path or at names. After the dig comparison, you know whether it is the client's resolver or the wider DNS. You have asked three questions and touched nothing.

Where to practise

Reading about this is easy and applying it under ticket pressure is harder. The Network Troubleshooting Casebook is a book of 40 real-world cases. Each one gives you a ticket, Cisco and Linux output, the root cause and a full answer key, across 716 pages plus lab files. Try each case before you open the key.

If the underlying pieces still feel loose, the Networking Fundamentals learning path on Codelivly covers addressing, protocols and how traffic moves, in five rooms. For a single reference on DNS, DHCP, TCP/IP and subnetting, the computer networking book is aimed at beginners preparing for Network+ and CCNA.