DNS 101 - What it is and how it works

28
DNS 101: What it is, how it works

description

DNS 101 - What it is and how it works provides a great explanation of what DNS, or Domain Name System is and how it works.

Transcript of DNS 101 - What it is and how it works

Page 1: DNS 101 - What it is and how it works

DNS 101:What it is, how it works

Page 2: DNS 101 - What it is and how it works

What is it?

DNS = Domain Name SystemOne large distributed database: The DNS

Client/Server system with:Name Servers - contain information about some segments of the database

Resolvers - create queries and send them across the network to a name server

Page 3: DNS 101 - What it is and how it works

A Brief History ofDNS and BIND

Late 60’s: US DoD Advanced Research Projects Agency creates ARPAnet

Updates sent to SRI-NIC; HOSTS.TXT published twice a week.

Early 80’s: TCP/IP added to BSD, and ARPAnet growth explodes

1984, Paul Mockapetris releases RFCs 882 and 883 (later superseded by 1034 and 1035); JEEVES released

1985, Berkeley releases first version of BIND, written by Kevin Dunlap

1993, BIND 4.9 is released by DEC, managed by Paul Vixie, assisted by others; 1994, BIND 4.9.2 is released by Vixie Enterprises; 1995, BIND 4.9.3 released by ISC

Page 4: DNS 101 - What it is and how it works

The DNS Tree StructureThe Distributed Database

Page 5: DNS 101 - What it is and how it works

Who Manages What?Delegation of Authority

Page 6: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Your PC Asks:

•Q: Where is www.cira.ca?

Page 7: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Office-mail asks:

•Q: Where is www.cira.ca?

•A: I don’t know, but I can tell you who knows about .ca.•ca01.cira.ca

Page 8: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Office-mail asks:

•Q: Where is www.cira.ca?

•A: I don’t know, but I can tell you who knows about .ca.•ca01.cira.ca•192.228.21.9

Page 9: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Office-mail asks:

•Q: Where is www.cira.ca?

•A: I don’t know, but I can tell you who knows about cira.ca.•ns01.cira.ca•192.228.22.70

Page 10: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Office-mail asks:

•Q: Where is www.cira.ca?

•A: It’s at 192.228.23.21

Page 11: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•A: www.cira.ca is at 192.228.23.21

Page 12: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Your PC Asks:

•Q: Where is www.microsoft.ca?

Page 13: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Office-mail asks:

•Q: Where is www.microsoft.ca?

•A: I don’t know, but I can tell you who knows about .ca.•ca01.cira.ca•192.228.21.9

Page 14: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Office-mail asks:

•Q: Where is www.microsoft.ca?

•A: I don’t know, but I can tell you who knows about microsoft.ca.•ns4.msft.net

Page 15: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Office-mail asks:

•Q: Where is ns4.msft.net?

•A: I don’t know, but I can tell you who knows about .net.•a.gtld-servers.net

Page 16: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Office-mail asks:

•Q: Where is ns4.msft.net?

•A: I don’t know, but I can tell you who knows about msft.net.•ns4.msft.net•207.46.66.75

Page 17: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Office-mail asks:

•Q: Where is www.microsoft.ca?

•A: www.microsoft.ca is an alias for microsoft.ca. microsoft.ca has two IP addresses: 207.46.130.108 and 207.46.250.119.

Page 18: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•A: www.microsoft.ca is an alias for microsoft.ca. microsoft.ca has two IP addresses: 207.46.130.108 and 207.46.250.119.

Page 19: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

www.smallbusiness.ca hosted by hostingco.ca

hostingco.ca puts their customer domains on separate name servers from their own domain

Page 20: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Q: Where is www.smallbusiness.ca?

•A: I don’t know, but I can tell you who knows about smallbusiness.ca.•ns3.hostingco.ca

Page 21: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Q: Where is ns3.hostingco.ca?

•A: I don’t know, but I can tell you who knows about hostingco.ca•ns1.hostingco.ca•192.0.2.10

Page 22: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Q: Where is ns3.hostingco.ca?

•A: ns3.hostingco.ca is at 192.0.2.8

Page 23: DNS 101 - What it is and how it works

How does it work?Anatomy of a DNS Lookup

•Q: Where is www.smallbusiness.ca?

•A: It’s at 192.0.2.81.

Page 24: DNS 101 - What it is and how it works

What if Something Breaks?Data Replication and Authority

Page 25: DNS 101 - What it is and how it works

What if Something Breaks?Dot-ca Data Replication

Page 26: DNS 101 - What it is and how it works

What Can The Data Say?Record Types

Address Records (A) -- www.cira.ca is at 192.228.23.21

Pointer Records (PTR) -- 192.228.23.21 is the address for www.cira.ca

Name Server Records (NS) -- ns01.cira.ca is a nameserver for cira.ca

Mail Exchanger Records (MX) -- mail.cira.ca handles mail for cira.ca

Canonical Name (CNAME) -- www.cira.ca is an alias for cira.ca (cira.ca is the canonical name of www.cira.ca)

Page 27: DNS 101 - What it is and how it works

What Does it Look Like?Sample .ca Zone Data

•microsoft.ca. IN NS ns1.msft.net.• IN NS ns2.msft.net.• IN NS ns3.msft.net.• IN NS ns4.msft.net.• IN NS ns5.msft.net.

•webnames.ca. IN NS relay.cdnnet.ca.• IN NS ns1.cs.ubc.ca.• IN NS blackwidow.webnames.ca.

•cira.ca. IN NS ns01.cira.ca.• IN NS ns02.cira.ca.• IN NS ns03.cira.ca.

•relay.cdnnet.ca. IN A 192.73.5.1•blackwidow.webnames.ca. IN A 207.232.123.229

•ns01.cira.ca. IN A 192.228.22.70•ns02.cira.ca. IN A 192.228.22.71•ns03.cira.ca. IN A 192.228.30.8

Page 28: DNS 101 - What it is and how it works