How DNS Actually Works: A Live Ping & Nslookup Demo

Type a domain into your browser and it just works — but your computer has no idea where google.com actually lives until DNS tells it. This quick lab demo shows that translation happening live, using two everyday command-line tools: ping and nslookup.

The demo

Running ping google.com shows replies coming back from an IP address like 142.250.137.101 — not from a name. That’s because before any traffic can be sent, the domain name has to be resolved to an IP address first.

Running nslookup google.com makes that resolution step visible. Instead of just pinging, nslookup queries a DNS server directly and returns every IP address currently associated with that name — in this case, a whole list of addresses like 142.250.137.100, 142.250.137.102, 142.250.137.138, and several more.

Why does Google return so many IPs?

Large services don’t run on a single server. DNS load-balancing means a single domain name can map to dozens of IP addresses spread across data centers worldwide, so traffic gets distributed and no single server becomes a bottleneck or single point of failure.

Troubleshooting tip

If nslookup comes back with no result, the problem usually isn’t the website — it’s your DNS settings. Check which DNS server your machine is pointed at (shown as “Server” in the nslookup output) and try switching to a public resolver like 1.1.1.1 or 8.8.8.8 to see if resolution starts working again.

Nslookup Demo


Comments

One response to “How DNS Actually Works: A Live Ping & Nslookup Demo”

  1. Excellent

Leave a Reply