Networking Tutorials

How DNS Works: The Internet's Phone Book Explained

DNS (Domain Name System) translates human names like google.com into IP addresses computers can route to. When you type a name, your device asks a chain of DNS servers — resolver, root, TLD, then the authoritative server — until it gets the IP, usually in milliseconds.

The DNS resolution steps

  1. Your device checks its local cache; if missing, it asks the configured recursive resolver (often your ISP or 8.8.8.8).
  2. The resolver asks a root server, which points to the TLD server (.com).
  3. The TLD server points to the domain's authoritative server.
  4. The authoritative server returns the IP; the resolver caches it and hands it back.

Common DNS record types

RecordPurpose
AName → IPv4 address
AAAAName → IPv6 address
CNAMEAlias to another name
MXMail server for the domain
PTRReverse: IP → name

Frequently asked questions

What does DNS do?

DNS translates domain names (like example.com) into IP addresses so devices can locate and connect to each other.

What is the difference between an A record and a CNAME?

An A record maps a name directly to an IPv4 address; a CNAME maps a name to another name (an alias), which then resolves to an address.

What port does DNS use?

DNS uses port 53 — UDP for most lookups, and TCP for larger responses such as zone transfers.

VS
Vipul Sir — Lead Instructor, Attila Technologies20+ years in Cisco networking. Teaching CCNA, CCNP, CCIE & CyberOps in Ahmedabad since 2004.

Want hands-on training?

Learn this on real Cisco lab devices with placement support at Attila Technologies, Ahmedabad.

Start your networking career with Attila Technologies

Hands-on Cisco training, real lab devices and placement support in Ahmedabad.