How DNS Works

Kyle Rankin

Systems Architect

QuinStreet Inc.

Author of Knoppix Hacks, Ubuntu Hacks, and The Official Ubuntu Server Book


http://greenfly.org/talks/misc/how_dns_works.html

Agenda

Not On Agenda

Host Files: Why DNS was created

In the olden days... (1970s)

Host Files: Why DNS was created

DNS is born (1984)

DNS Today

Root Nameservers

Top Level Domains (TLDs)

Common DNS Setup

External or Internal (or both):

Walk through: Setup

What happens between typing in www.greenfly.net in a browser and getting back 216.246.127.101?

The Setup:

Walk through: OS to ISP

  1. User to web browser: www.greenfly.net?
  2. web browser to OS: www.greenfly.net?
  3. OS: Hmm not in my hosts file or cache, must ask the nameserver
  4. OS to ns1.someisp.com: www.greenfly.net?
  5. ns1.someisp.com: Not in my records, I better ask a root nameserver

Walk through: ISP to world

  1. ns1.someisp.com to root: www.greenfly.net?
  2. root to ns1.someisp.com: I don't know, ask a net nameserver. Here are their addresses...
  3. ns1.someisp.com to net: www.greenfly.net?
  4. net to ns1.someisp.com: No clue, but ns1.greenfly.net and ns2.greenfly.net know about it. Here are their addresses...
  5. ns1.someisp.com to ns2.greenfly.net: www.greenfly.net?
  6. ns2.greenfly.net to ns1.someisp.com: 216.246.127.101
  7. ns1.someisp.com to OS: 216.246.127.101
  8. OS to browser: 216.246.127.101

DNS Caching and TTL

DNS load balacing and failover

Common DNS record types

rDNS: The Internet's caller ID

Fun Exercise

How to take down the Internet

  1. Take out all 13 root DNS servers
  2. There is no second step!
  3. How this works...

Questions?

Some Useful Resources on DNS