... 1. 1. Contacts its local DNS server, Contacts its local DNS - - PDF document

1 1 contacts its local dns server contacts its local dns
SMART_READER_LITE
LIVE PREVIEW

... 1. 1. Contacts its local DNS server, Contacts its local DNS - - PDF document


slide-1
SLIDE 1

29 March, 2002 1

Application Layer in the Internet

  • 2

29 March, 2002 The Computer Communications Course

DNS: Domain Name System

People: People: many identifiers: many identifiers:

  • SSN, name, Passport #

SSN, name, Passport # Internet hosts, routers: Internet hosts, routers:

  • IP address (32 bit) - used

IP address (32 bit) - used for addressing for addressing datagrams datagrams

✁ name

name

✂ ✂ , e.g.,

, e.g., harmony. harmony.cs cs. .huji huji.ac. .ac.il il -

  • used by humans

used by humans Q: Q: map between IP addresses map between IP addresses and and name ?

name ?

Domain Name System: Domain Name System:

✄ ✄

distributed database distributed database implemented implemented in hierarchy of many in hierarchy of many name servers name servers

✄ ✄

application-layer protocol application-layer protocol host, host, routers, name servers to routers, name servers to communicate to communicate to resolve resolve names names (address/name translation) (address/name translation)

  • note: core Internet function

note: core Internet function implemented as application- implemented as application- layer protocol layer protocol

  • complexity at network

complexity at network

☎ ☎ s

s

✁ ✁ edge

edge

✂ ✂

3 29 March, 2002 The Computer Communications Course

DNS name servers

✄ ✄

no server has all name-to-IP no server has all name-to-IP address mappings address mappings

Local name servers: Local name servers:

  • each ISP, company has

each ISP, company has local local (default) name server (default) name server

  • host DNS query first goes to

host DNS query first goes to local name server local name server

Authoritative name server: Authoritative name server:

  • for a host: stores that host

for a host: stores that host

☎ ☎ s

s IP address, name IP address, name

  • can perform name/address

can perform name/address translation for that host translation for that host

☎ ☎ s

s name name

Why not centralize DNS? Why not centralize DNS?

✄ ✄

single point of failure single point of failure

✄ ✄

traffic volume traffic volume

✄ ✄

distant centralized database distant centralized database

✄ ✄

maintenance maintenance

doesn doesn

✆ ✆ t

t scale! scale!

4 29 March, 2002 The Computer Communications Course

DNS: Root Name Servers

✄ ✝✟✞✡✠☞☛✟✌✍✝☞☛✟✎✡✏✒✑✔✓✖✕ ✞✗✝✟✌✡✕✗✠✟✌✍✘✙✎ ✚ ✎✡✛✟✜✟✎✢✛✣☛☞✤✍✌✔☛✥✝✟✌✗✠✦✠✟✞✍☛ ✛ ✎ ✚ ✞✢✕ ✜☞✎✖✠✟✌✗✘✙✎ ✄ ✛ ✞✔✞✍☛✥✠☞✌✍✘✙✎ ✚ ✎✡✛✟✜✟✎✡✛✔✧
  • ✝✟✞✡✠☞☛✟✌✍✝☞☛
✚ ✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✌✍☛✔✩ ✜✟✎✒✠✟✌✗✘✙✎ ✚ ✎✡✛✟✜✟✎✢✛✪✩ ✫✬✠✟✌✍✘✙✎ ✘✙✌✍✭✍✭✡✩ ✠☞✮✬✠✟✞✍☛✪✯✔✠✟✞✍✰✙✠
  • ✮✱✎✡☛
✚ ✘✙✌✗✭✔✭✡✩ ✠☞✮
✎✗☛✟★✍✛✱✠ ✚ ✘✙✌✗✭✔✭✡✩ ✠☞✮✪☛✟✞ ✕ ✞✗✝☞✌✡✕✗✠✟✌✍✘✙✎ ✚ ✎✡✛✟✜✟✎✡✛ ✄ ✲✖✏✗✞✗✳☞✎✴✠✥✛ ✞✔✞✍☛✪✠✟✌✍✘✙✎ ✚ ✎✡✛✟✜✟✎✢✛ ✚ ✰✵✞✗✛✔✕ ✏✗✰✙✩ ✏✍✎

5 29 March, 2002 The Computer Communications Course

nsf.gov root root root root purdue.edu co.il huji.ac.il cs.purdue.edu math. huji. ac. il cs. huji. ac. il

...

Domain Name Servers

6 29 March, 2002 The Computer Communications Course

Simple DNS example

Host Host harmony. harmony.cs cs. .huji huji.ac. .ac.il il wants IP address of wants IP address of gaia gaia. .cs cs. .umass umass. .edu edu 1.

  • 1. Contacts its local DNS server,

Contacts its local DNS server, shuldig shuldig. .cs cs. .huji huji.ac. .ac.il il 2. 2. shuldig shuldig. .cs cs. .huji huji.ac. .ac.il il contacts root name server, if contacts root name server, if necessary necessary 3.

  • 3. root name server contacts

root name server contacts authoritative name server, authoritative name server, dns dns. .dmass dmass. .edu edu, , if necessary if necessary

✶ ✷✱✸☞✹ ✷✱✺ ✻☞✼ ✽ ✾❀✿✱❁☞✺ ✻

harmony.cs.huji.ac.il gaia.cs.umass.edu

✶ ❁☞❁✟✻❂✽ ❃✱❄✵✷❀✺ ✷✔✶ ❅ ✷✔✶ ❆ ❇ ❈ ❉ ❊ ❋
■❑❏ ❆ ▲✡■◆▼ ■✟❋ ❍ ■✟❋

dns.umass.edu

❖ ❁✱P ❃ ❖ ✽ ❃✱❄✵✷❀✺ ✷✔✶ ❅ ✷✍✶

shuldig.cs.huji.ac.il

1 2 3 4 5 6

slide-2
SLIDE 2

7 29 March, 2002 The Computer Communications Course

DNS example

  • ✞✔✞✍☛✥✠✟✌✗✘✙✎
✚ ✎✢✛✟✜✟✎✡✛✔✧ ✄ ✘✙✌✱✓✬✠☞✞✍☛✥✯✍✠✟✞✍✰ ✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✌✍☛✔✩ ✜✟✎✒✠✟✌✗✘✙✎ ✚ ✎✡✛✟✜✟✎✢✛ ✄ ✘✙✌✱✓✬✯✍✠✟✞✍✰ ✁ ✂☎✄ ✆✞✝✠✟✡✆☞☛☞✁ ✌✍✄ ✆✎✂✏✌✑✟✒✆ ✓ ✆✞✝✕✔ ✆✖✝ ✗ ✰❑✤✍✞ ☛ ✞ ✝✟✞✡✠☞☛✟✌✍✝☞☛❀☛ ✞✦✫✡✩ ✠✱✏ ✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✌✍☛✔✩ ✜✟✎✒✠✟✌✗✘✙✎ ✚ ✎✡✛✟✜✟✎✢✛ ✶ ✷✱✸☞✹ ✷✱✺ ✻☞✼ ✽ ✾❀✿✱❁☞✺ ✻

harmony.cs.huji.ac.il gaia.cs.umass.edu

✶ ❁☞❁✟✻❂✽ ❃✱❄✵✷❀✺ ✷✔✶ ❅ ✷✔✶ ❖ ❁✱P ❃ ❖ ✽ ❃✱❄✵✷❀✺ ✷✔✶ ❅ ✷✍✶

shuldig.cs.huji.ac.il

1 2 3 4 5 6

❆ ❇ ❈ ❉ ❊ ❋
❆ ❈
■◆❏ ❆ ▲✡■◆▼ ■ ❋ ❍ ■✟❋

dns.cs.umass.edu

❈ ■✟❋ ▲✡■ ✘✱● ❆ ❈ ■◆❏ ❆ ▲✡■◆▼ ■ ❋ ❍ ■✟❋

dns.umass.edu

7 8

8 29 March, 2002 The Computer Communications Course

DNS: Iterative Queries

recursive query: recursive query:

✙ ✙

puts burden of name puts burden of name resolution on contacted resolution on contacted name server name server

✙ ✙

heavy load? heavy load?

iterated query: iterated query:

✙ ✙

contacted server replies contacted server replies with name of server to with name of server to contact contact

✙ ✙ ✚ ✚ I don

I don

✛ ✛ t know this name,

t know this name, but ask this server but ask this server

✜ ✜ ✶ ✷✱✸☞✹ ✷✱✺ ✻☞✼ ✽ ✾❀✿✱❁☞✺ ✻

harmony.cs.huji.ac.il gaia.cs.umass.edu

✶ ❁☞❁✟✻❂✽ ❃✱❄✵✷❀✺ ✷✔✶ ❅ ✷✔✶ ❖ ❁✱P ❃ ❖ ✽ ❃✱❄✵✷❀✺ ✷✔✶ ❅ ✷✍✶

shuldig.cs.huji.ac.il

1 2 3 4 5 6

❆ ❇ ❈ ❉ ❊ ❋
❆ ❈
■◆❏ ❆ ▲✡■◆▼ ■ ❋ ❍ ■✟❋

dns.cs.umass.edu

❈ ■✟❋ ▲✡■ ✘✱● ❆ ❈ ■◆❏ ❆ ▲✡■◆▼ ■ ❋ ❍ ■✟❋

dns.umass.edu

7 8

✼ ✻ ✷✔✶ ❃✟✻ ✷✑✢❀✸☞✹ ✷✔✶ ✣

9 29 March, 2002 The Computer Communications Course

Hierarchical Names

✄ ✤ ✞✦✌✍✝✱✝☞✞✗✘❀✘✙✞✗✏✍✌✔☛✟✎✦✌✖✕ ✌✗✛✟✮✱✎ ✚ ✎✗☛✣✞✔✫ ✠✟✌✗✘✙✎ ✚✖✥ ✌✬✠✟✌✍✘✪✩ ✠☞✮ ✘✙✎✡✝✔✤✍✌✗✠✍✩ ✚ ✘ ✘✣★ ✚ ☛✪✑✍✎✬✏✗✎✡✝✟✎✴✠☞☛☞✛ ✌✡✕ ✩ ✳☞✎✢✏✴✧
  • ✏✍✎
✕ ✎✗✮✱✌✍☛ ✎ ✌✔★✔☛☞✤✍✞✗✛✱✩ ☛ ✓✪✫✱✞✗✛✥✭☞✌✗✛✟☛ ✚ ✞✔✫✦☛☞✤✍✎✖✠✟✌✗✘✙✎ ✚ ✭✱✌✍✝☞✎
  • ✏✴✩
✚ ☛☞✛✔✩ ✑✗★✔☛ ✎✖✛ ✎ ✚ ✭☞✞✡✠ ✚ ✩ ✑✴✩ ✕ ✩ ☛ ✓✪✫✱✞✗✛❀☛☞✤✔✎✒✠✟✌✗✘❂✎✖✘✙✌✗✭✔✭✡✩ ✠☞✮ ✄ ✦✢✠❀✌✦✤✴✩ ✎✢✛ ✌✍✛☞✝✱✤✴✩ ✝☞✌✡✕ ✚ ✝✱✤✍✎✡✘✙✎✬☛☞✤✍✎✖✠✟✌✗✘✙✎ ✚ ✭✱✌✍✝☞✎✒✩ ✚ ✧ ✌✑✝★✄ ✁ ✄ ✁ ✩✞✂✏✆☞☛ ✌✍☛✣☛☞✤✍✎ ☛ ✞✗✭✬✕ ✎✡✜✟✎✴✕ ✥ ✌✗✠✱✏ ✌✍★✱☛☞✤✍✞✗✛✔✩ ☛✟✓✪✫✱✞✗✛✥✠✟✌✗✘❂✎ ✚ ✩ ✠ ✚ ★✗✑✡✏✴✩ ✜✗✩ ✚ ✩ ✞✡✠ ✚ ✩ ✚ ✭✱✌ ✚✱✚ ✎✡✏✬☛ ✞ ✏✍✎ ✚ ✩ ✮✡✠✟✌✔☛ ✎✡✏ ✌✍✮✱✎✢✠☞☛ ✚✖✪ ✄ ✫❂★✱☛✱✤✔✞✗✛✔✩ ☛✟✓ ✘✙✌✱✓✬✑✍✎ ✫✔★✔✛✟☛☞✤✍✎✡✛ ✚ ★✍✑✡✏✴✩ ✜✍✩ ✏✗✎✡✏ ✌✔☛✣✎✍✌✍✝✔✤✒✕ ✎✗✜✟✎ ✕ ✪ ✬ ✎✍✎✡✭ ✚ ★✍✑✡✏✴✩ ✜✍✩ ✏ ✩ ✠☞✮✦☛☞✤✍✎✒✠✟✌✍✘✙✎ ✚ ✭✱✌✍✝☞✎✬★✍✠☞☛✍✩ ✕✱✎✍✌✍✝✔✤ ✚ ★✗✑✗✏✴✩ ✜✍✩ ✚ ✩ ✞✡✠ ✩ ✚✥✚ ✘✙✌✡✕ ✕ ✎✢✠✟✞✍★✔✮✗✤ ☛ ✞✬✑✍✎✖✘✙✌✗✠✟✌✔✮✔✎✍✌✗✑✴✕ ✎ ✪

10 29 March, 2002 The Computer Communications Course

Top-level Internet Domains

Domain Name Meaning com

Commercial organizations

edu

Educational institutions

gov

US government institutions

mil

Military groups

net

Major network support centers

  • rg

Organizations other than those above

int

International organizations

<Country code>

Each country (geographical scheme)

11 29 March, 2002 The Computer Communications Course

Internet Domain Name Hierarchy

com edu gov il sun mit cc cs ecn nsf ac huji cs

12 29 March, 2002 The Computer Communications Course

Name Example

✫ ✘✙✌✍✝✔✤✢✩ ✠✟✎✒✠✟✌✍✘✙✎✡✏ ✫ ✘✙✌✍✝✔✤✢✩ ✠✟✎✒✠✟✌✍✘✙✎✡✏ ✭ ✌✏✝✠✟✡✩✞✂✯✮ ✭ ✌✏✝✠✟✡✩✞✂✯✮ ✩ ✠✥☛☞✤✔✎✎✰✕✱✳✲ ✎✢✭☞✌✗✛ ☛✱✘✙✎✢✠☞☛✣✌✔☛✵✴✒✶✸✷✍✦✖✤✔✌ ✚ ✩ ✠✥☛☞✤✔✎✎✰✕✱✳✲ ✎✢✭☞✌✗✛ ☛✱✘✙✎✢✠☞☛✣✌✔☛✵✴✒✶✸✷✍✦✖✤✔✌ ✚ ☛☞✤✍✎ ✞✔✫✱✫✡✩ ✝✗✩ ✌✢✕✔✏✍✞✗✘✙✌✢✩ ✠✦✠✟✌✍✘✙✎ ☛☞✤✍✎ ✞✔✫✱✫✡✩ ✝✗✩ ✌✢✕✔✏✍✞✗✘✙✌✢✩ ✠✦✠✟✌✍✘✙✎ ✤✍✌✍✛☞✘✙✞✡✠✟✓ ✪ ✤✍✌✍✛☞✘✙✞✡✠✟✓ ✪ ✝ ✚ ✝ ✚ ✪ ✪ ✤✗★✠✹☞✩ ✤✗★✠✹☞✩ ✪ ✌✍✝ ✪ ✪ ✌✍✝ ✪ ✩ ✕ ✩ ✕ ✄ ✄ ✤◆✤✍✎✬✘✙✌✗✝✱✤✴✩ ✠✟✎✒✠✟✌✗✘✙✎ ✰✵✌ ✚ ✌✗✭✔✭✍✛ ✞✍✜✟✎✡✏ ✌✡✠✱✏✬✛ ✎✗✮✢✩ ✚ ☛ ✎✢✛ ✎✡✏✒✑✔✓✦☛✱✤✔✎ ✤◆✤✍✎✬✘✙✌✗✝✱✤✴✩ ✠✟✎✒✠✟✌✗✘✙✎ ✰✵✌ ✚ ✌✗✭✔✭✍✛ ✞✍✜✟✎✡✏ ✌✡✠✱✏✬✛ ✎✗✮✢✩ ✚ ☛ ✎✢✛ ✎✡✏✒✑✔✓✦☛✱✤✔✎ ✕ ✞✗✝☞✌✡✕✗✠✟✎✗☛✟✰✵✞✡✛☞✯✪✘✙✌✡✠✟✌✔✮✔✎✡✛✪✩ ✠❀☛☞✤✍✎✎✰✕✱✳✲ ✎✡✭✱✌✍✛✟☛☞✘✙✎✢✠☞☛ ✪ ✕ ✞✗✝☞✌✡✕✗✠✟✎✗☛✟✰✵✞✡✛☞✯✪✘✙✌✡✠✟✌✔✮✔✎✡✛✪✩ ✠❀☛☞✤✍✎✎✰✕✱✳✲ ✎✡✭✱✌✍✛✟☛☞✘✙✎✢✠☞☛ ✪ ✄ ✄ ✤◆✤✍✎✬✏✗✎✡✭✱✌✍✛✟☛☞✘✙✎✢✠☞☛✥✘✙✌✗✠✟✌✍✮✱✎✡✛✥✤✔✌✗✏✬✭✍✛ ✎✗✜✍✩ ✞✍★ ✚ ✕ ✓✪✞✡✑✗☛ ✌✡✩ ✠✟✎✡✏ ✤◆✤✍✎✬✏✗✎✡✭✱✌✍✛✟☛☞✘✙✎✢✠☞☛✥✘✙✌✗✠✟✌✍✮✱✎✡✛✥✤✔✌✗✏✬✭✍✛ ✎✗✜✍✩ ✞✍★ ✚ ✕ ✓✪✞✡✑✗☛ ✌✡✩ ✠✟✎✡✏ ✌✍★✱☛✱✤✔✞✗✛✔✩ ☛✟✓✪✫✱✞✗✛✣☛☞✤✍✎ ✌✍★✱☛✱✤✔✞✗✛✔✩ ☛✟✓✪✫✱✞✗✛✣☛☞✤✍✎ ✚ ★✗✑✗✏✍✞✗✘✙✌✢✩ ✠ ✚ ★✗✑✗✏✍✞✗✘✙✌✢✩ ✠ ✝ ✚ ✝ ✚ ✪ ✪ ✤✗★✠✹☞✩ ✤✗★✠✹☞✩ ✪ ✌✍✝ ✪ ✪ ✌✍✝ ✪ ✩ ✕ ✩ ✕ ✫✍✛ ✞✗✘ ✌✦★✍✠✍✩ ✜✟✎✡✛ ✚ ✩ ☛ ✓ ✫✍✛ ✞✗✘ ✌✦★✍✠✍✩ ✜✟✎✡✛ ✚ ✩ ☛ ✓ ✠✟✎✡☛✟✰✵✞✗✛✱✯❀✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✓ ✠✟✎✡☛✟✰✵✞✗✛✱✯❀✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✓ ✄ ✄ ✤◆✤✍✎✺✴✡✶✸✷✍✦✒✠✟✎✗☛✟✰✵✞✗✛✱✯❀✌✍★✱☛✱✤✔✞✗✛✔✩ ☛✟✓ ✤✔✌✗✏ ✞✡✑✍☛ ✌✢✩ ✠✟✎✢✏✬✭✱✎✡✛☞✘✪✩ ✚✱✚ ✩ ✞✡✠✥☛ ✞ ✤◆✤✍✎✺✴✡✶✸✷✍✦✒✠✟✎✗☛✟✰✵✞✗✛✱✯❀✌✍★✱☛✱✤✔✞✗✛✔✩ ☛✟✓ ✤✔✌✗✏ ✞✡✑✍☛ ✌✢✩ ✠✟✎✢✏✬✭✱✎✡✛☞✘✪✩ ✚✱✚ ✩ ✞✡✠✥☛ ✞ ✘✙✌✗✠✟✌✍✮✱✎✬☛☞✤✍✎ ✘✙✌✗✠✟✌✍✮✱✎✬☛☞✤✍✎ ✚ ★✍✑✡✏✍✞✗✘✙✌✡✩ ✠ ✚ ★✍✑✡✏✍✞✗✘✙✌✡✩ ✠ ✤✗★✏✹☞✩ ✤✗★✏✹☞✩ ✪ ✌✗✝ ✪ ✪ ✌✗✝ ✪ ✩ ✕ ✩ ✕ ✫✍✛ ✞✗✘ ☛☞✤✍✎✻✦ ✚ ✛ ✌✱✎✴✕ ✩☞✌✗✝✟✌✗✏✍✎✡✘✪✩ ✝ ✫✍✛ ✞✗✘ ☛☞✤✍✎✻✦ ✚ ✛ ✌✱✎✴✕ ✩☞✌✗✝✟✌✗✏✍✎✡✘✪✩ ✝ ✠✟✎✗☛☞✰✵✞✗✛☞✯✥✌✔★✔☛☞✤✔✞✡✛✱✩ ☛ ✓ ✥ ✰❑✤✍✞ ✤✍✌✍✏✖✭✱✎✡✛☞✘✪✩ ✚✱✚ ✩ ✞✡✠✥☛ ✞ ✘✙✌✡✠✟✌✔✮✱✎ ✠✟✎✗☛☞✰✵✞✗✛☞✯✥✌✔★✔☛☞✤✔✞✡✛✱✩ ☛ ✓ ✥ ✰❑✤✍✞ ✤✍✌✍✏✖✭✱✎✡✛☞✘✪✩ ✚✱✚ ✩ ✞✡✠✥☛ ✞ ✘✙✌✡✠✟✌✔✮✱✎ ✌✗✝ ✪ ✌✗✝ ✪ ✩ ✕ ✩ ✕ ✫✍✛ ✞✗✘ ✫✍✛ ✞✗✘ ☛☞✤✍✎✻✦✢✠☞☛ ✎✡✛✱✠✟✎✗☛✣✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✓ ✪ ☛☞✤✍✎✻✦✢✠☞☛ ✎✡✛✱✠✟✎✗☛✣✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✓ ✪
slide-3
SLIDE 3

13 29 March, 2002 The Computer Communications Course

Mapping Domain Names to Addresses

✄ ✤◆✤✍✎✬✝✗✕ ✩ ✎✢✠☞☛ ✚ ✞✔✫✔☛✟✰✵✌✍✛ ✎✁ ✂✏✌✏✟✡✆✻✝✠✆ ✓ ✩✄✂ ✔ ✆✞✝ ❑★ ✚ ✎ ✚ ✞✡✠✟✎ ✞✗✛❀✘✙✞✗✛ ✎✒✠✟✌✍✘✙✎ ✚ ✎✢✛ ✜☞✎✡✛ ✚ ✰❑✤✍✎✢✠✥☛☞✛ ✌✗✠ ✚ ✕ ✌✍☛✔✩ ✠☞✮✥✌✬✠✟✌✗✘✙✎ ✪ ✄ ✲ ✞✗✘✙✌✡✩ ✠ ✚ ✎✢✛✟✜✟✎✡✛ ✚ ✌✗✛ ✎✦✞✗✛✟✮✔✌✗✠✍✩ ✳✱✎✢✏✒✩ ✠✣✌✦☛☞✛ ✎✍✎ ✚ ☛☞✛✟★✍✝☞☛✟★✍✛ ✎✬☛☞✤✔✌✍☛ ✝✟✞✗✛☞✛ ✎ ✚ ✭✱✞✡✠✱✏ ✚ ☛ ✞ ☛☞✤✔✎✒✠✟✌✗✘✪✩ ✠☞✮ ✤✴✩ ✎✡✛ ✌✗✛✟✝✔✤✔✓ ✪ ✄ ✤◆✤✍✎✬✛ ✞✔✞✍☛ ✚ ✎✡✛✟✜✟✎✢✛ ✚ ✛ ✎✡✝☞✞✍✮✗✠✍✩ ✳✱✎✬☛☞✤✍✎ ☛✟✞✗✭☎✟✕ ✎✗✜☞✎✴✕✔✏✗✞✗✘✙✌✡✩ ✠ ✚ ✌✡✠✱✏✖✯✍✠✟✞✍✰ ✰❑✤✴✩ ✝✔✤ ✚ ✎✡✛✟✜✟✎✡✛✥✛ ✎ ✚ ✞✢✕ ✜✟✎ ✚ ✎✍✌✗✝✱✤✬✏✍✞✡✘❂✌✢✩ ✠ ✄ ✫❂☛✣☛☞✤✍✎✒✠✟✎✄✆✡☛✦✕ ✎✡✜✟✎✴✕ ✥ ✌ ✚ ✎✗☛✣✞✔✫ ✠✟✌✗✘✙✎ ✚ ✎✢✛✟✜✟✎✡✛ ✚ ✎✗✌✍✝✔✤✬✭✔✛ ✞✍✜✍✩ ✏✍✎ ✌✗✠ ✚ ✰✵✎✢✛ ✚ ✫✱✞✗✛✙✞✡✠✟✎✬☛ ✞✗✭✝✟✕ ✎✗✜✟✎ ✕✔✏✍✞✡✘❂✌✢✩ ✠✟✞ ✎ ✪ ✮ ✪ ✎✡✏✗★✝✠ ✪ ✫ ✚ ✎✡✛✟✜✟✎✡✛✙✌✍☛✣☛✱✤✢✩ ✚ ✕ ✎✡✜✟✎✴✕✗✯✔✠☞✞✍✰ ✚ ✰❑✤✴✩ ✝✔✤ ✚ ✎✢✛ ✜✟✎✢✛ ✚ ✝☞✌✗✠✥✛ ✎ ✚ ✞✢✕ ✜✟✎✍✎✗✌✍✝✱✤ ✞✔✫✪☛☞✤✍✎ ✚ ★✍✑✡✏✍✞✗✘✙✌✢✩ ✠ ✚ ★✍✠✔✏✍✎✡✛✪✩ ☛ ✚ ✏✍✞✗✘✙✌✢✩ ✠ ✄ ✫❂☛✣☛☞✤✍✎✬☛☞✤✴✩ ✛☞✏ ✕ ✎✗✜✟✎ ✕ ✥ ✠✟✌✗✘✙✎ ✚ ✎✡✛✟✜✟✎✡✛ ✚ ✭✍✛ ✞✍✜✍✩ ✏✍✎ ✌✗✠ ✚ ✰✵✎✢✛ ✚ ✫✱✞✗✛ ✚ ★✗✑✡✏✍✞✗✘✙✌✡✩ ✠ ✚ ✞ ✎ ✪ ✮ ✪ ✘✪✩ ☛ ✪ ✎✡✏✗★✝✠

14 29 March, 2002 The Computer Communications Course

DNS: caching and updating records

✄ ✞✡✠✱✝✟✎✁✞ ✌✡✠✟✓✝✠❑✠✟✌✍✘✙✎ ✚ ✎✡✛✟✜✟✎✢✛✪✕ ✎✍✌✗✛✱✠ ✚ ✘✙✌✗✭✔✭✡✩ ✠☞✮ ✥ ✩ ☛ ✡ ✌ ✡ ✭ ✆ ✓ ✘✙✌✍✭✍✭✗✩ ✠☞✮
  • ✝✟✌✗✝✱✤✍✎
✎✢✠☞☛☞✛✔✩ ✎ ✚ ☛✔✩ ✘✙✎✍✞✍★✔☛☛✞ ✏✴✩ ✚ ✌✗✭✔✭✱✎✍✌✗✛☞✠✴✌✔✫✔☛ ✎✡✛ ✚ ✞✗✘✙✎✬☛✔✩ ✘✙✎
  • ✌✗✠❀✌✔★✔☛☞✤✍✞✗✛✔✩
☛ ✌✍☛✔✩ ✜✟✎✖✛ ✎✡✭✱✞✗✛✟☛✙✌✢✕ ✰✵✌✱✓ ✚ ✩ ✠✱✝✗✕ ★✍✏✍✎ ✚ ✤ ✤✍✌✦✜✟✌✡✕ ★✱✎ ✄ ✚ ✎✡✛✟✜✟✎✢✛ ✚ ✛ ✎✡✭✱✞✗✛✟☛❀✝☞✌✍✝✱✤✍✎✡✏ ✩ ✠✟✫✱✞✦☛ ✞✬✝✍✕ ✩ ✎✢✠☞☛ ✚☞✥ ✑✗★✱☛✥✘✙✌✍✛✱✯ ✩ ☛✙✌ ✚ ✠✟✞✡✠❀✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✌✍☛✔✩ ✜✟✎ ✥ ✌✡✠✱✏ ✮✢✩ ✜✟✎✬☛☞✤✍✎✖✏✍✞✗✘✙✌✡✩ ✠✪✠✟✌✗✘✙✎✦✞✍✫ ☛☞✤✍✎ ✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✌✍☛✔✩ ✜✟✎ ✚ ✎✢✛ ✜✟✎✢✛ ✄ ★✍✭✔✏✗✌✔☛ ✎✏✎✍✠✟✞✍☛✔✩ ✫✱✓ ✘✙✎✡✝✔✤✔✌✡✠✍✩ ✚ ✘ ✚ ★✍✠✱✏✗✎✡✛❀✏✗✎ ✚ ✩ ✮✡✠✪✑✍✓✵✦✒✑★✤✔✓
  • ✓✖✰✖✕✘✗
✙✏✚
  • ✤✗☛✟☛☞✭✡✧
✎✛✎✔✰◆✰◆✰ ✪ ✩ ✎✡☛ ✫ ✪ ✞✗✛✟✮☎✎✍✤✍☛☞✘✪✕ ✪ ✝✔✤✔✌✗✛ ☛✟✎✡✛ ✚ ✎✔✏✢✠ ✚ ✩ ✠✱✏✏ ✝✱✤✍✌✍✛✟☛ ✎✢✛ ✪ ✤✗☛☞✘✪✕

15 29 March, 2002 The Computer Communications Course

DNS Records

DNS: DNS: distributed data base storing resource records distributed data base storing resource records (RR) (RR)

✄ ✄

Type=NS Type=NS

  • name

name is domain (e.g. is domain (e.g. foo foo.com) .com)

  • value

value is IP address of is IP address of authoritative name server for authoritative name server for this domain this domain

✍ ✫✔✞✗✛✟✘✙✌✍☛✔✧ (name, ttl, class, type, value)

Type=A name is hostname value is IP address Type=CNAME name is an alias name for some “cannonical” (the real) name value is cannonical name Type=MX value is hostname of mailserver associated with name

16 29 March, 2002 The Computer Communications Course

DNS Protocol, Messages

DNS protocol : DNS protocol : query query and and reply reply messages, both with same messages, both with same message format message format

message header identification: 16 bit id number for query, reply to query uses same id flags: error code query or reply recursion desired recursion available reply is authoritative

17 29 March, 2002 The Computer Communications Course

DNS Message Header Flags

QR AA TC RD RA OPCODE Z RCODE 16 bits QR: query(0) or response (1) OPCODE : 0 standard query 1 inverse query 2 server status request AA: authoritative answer TC: message was truncated RD: recursion desired RA: recursion available Z: not used. Must be zero RCODE: response code 0 no error 1 format error 2 server failure 3 name error

18 29 March, 2002 The Computer Communications Course

DNS Message Body

identification flags Number of question RRs Number of answer RRs Number of authority RRs Number of additional RRs

Question Section Answer Section Authority Section Additional Info Section

32 bits

✜ ✌✗✘✙✎ ✥ ☛✟✓✍✭✱✎ ✫✡✩ ✎ ✕ ✏ ✚ ✫✔✞✗✛✙✌✣✢✱★✱✎✡✛ ✓ ✍ ✚ ✩ ✠✪✛ ✎✢✭☞✞✡✠ ✚ ✎ ☛ ✞✤✢✱★✱✎✡✛ ✓ ✛ ✎✡✝☞✞✗✛✟✏ ✚ ✫✱✞✗✛ ✌✔★✔☛☞✤✍✞✗✛✔✩ ☛ ✌✍☛✔✩ ✜✟✎ ✚ ✎✢✛✟✜✟✎✡✛ ✚ ✌✍✏✢✏✴✩ ☛✍✩ ✞✡✠✟✌✢✕✛✥ ✤✍✎✴✕ ✭☞✫✔★✡✕ ✦ ✩ ✠☞✫✱✞✦☛☞✤✍✌✔☛✥✘✙✌✱✓✬✑✍✎✬★ ✚ ✎✡✏
slide-4
SLIDE 4

19 29 March, 2002 The Computer Communications Course

DNS Message Format

  • The Question Section Format

QUERY DOMAIN NAME QUERY TYPE QUERY CLASS

  • The Answer Section Format

RESOURCE DOMAIN NAME TYPE CLASS TIME TO LIVE RESOURCE DATA DATA LENGTH

20 29 March, 2002 The Computer Communications Course

Domain Name Format

✫ ✏✍✞✗✘✙✌✢✩ ✠✦✠✟✌✍✘✙✎✖✝✟✞✡✠ ✚ ✩ ✚ ☛ ✚ ✞✔✫ ✚ ✎✏✢✔★☞✎✴✠✱✝✟✎ ✞✔✫ ✚ ★✗✑✢✠✟✌✍✘✙✎ ✚
✌✁✖✆✒✂ ✓
✎✡✭✱✌✗✛ ✌✍☛ ✎✡✏✒✑✔✓✬✏✍✞✍☛ ✚ ✧ ✭ ✌✏✝✠✟✡✩✞✂✯✮✄✂ ✡ ✓ ✂ ✭✆☎ ✝ ✁ ✂ ✌ ✡ ✂ ✁ ✂ ✦✢✠❀✌✦✘✙✎ ✚☞✚ ✌✔✮✔✎ ✥ ✏✍✞✗✘✙✌✡✩ ✠✪✠✟✌✗✘✙✎ ✚ ✌✗✛ ✎ ✚ ☛✟✞✗✛ ✎✢✏ ✌ ✚ ✌ ✚ ✎✏✢✱★✱✎✴✠✱✝✟✎ ✞✔✫✬✕ ✌✗✑✔✎ ✕ ✚✞✪ ✑✗✌✗✝✱✤✒✕ ✌✡✑✔✎ ✕✍✑✍✎✗✮✡✩ ✠ ✚ ✰✙✩ ☛☞✤✦✌✖✕ ✎✴✠☞✮✔☛☞✤✦✞✗✝✱☛ ✎✗☛ ✪✟✞ ✎✢✛ ✞✖✕ ✎✴✠☞✮✔☛☞✤✦✞✗✝✱☛ ✎✗☛✥✘✙✌✍✛✱✯ ✚ ☛☞✤✍✎ ✎✢✠✱✏ ✞✔✫✪☛☞✤✍✎✒✠✟✌✍✘✙✎ ✪

0 0 length 7 a h r m

  • n

y 2 c s i 4 h u j 2 a c 2 i l

8 bits

21 29 March, 2002 The Computer Communications Course

Compressed Name Format

✲ ✞✗✘✙✌✡✩ ✠ ✚ ✎✢✛✟✜✟✎✡✛ ✚ ✘✙✌✔✓ ✛ ✎✗☛✟★✍✛✱✠✥✘✣★✡✕ ☛✔✩ ✭✗✕ ✎ ✌✡✠ ✚ ✰✵✎✡✛ ✚ ✩ ✠✥☛☞✤✔✎ ✚ ✌✗✘✙✎ ✘✙✎ ✚☞✚ ✌✍✮✱✎ ✥ ☛☞✤✗★ ✚✖✥☞✚ ★☞✫✱✫✡✩ ✆✗✎ ✚ ✞✔✫✦☛☞✤✔✎✖✏✍✞✗✘✙✌✢✩ ✠✪✘✙✌✱✓✪✞✍✜✟✎✢✛✔✕ ✌✍✭ ✪ ✤ ✞✬✝✟✞✡✠ ✚ ✎✢✛ ✜✟✎ ✚ ✭✱✌✍✝☞✎ ✥ ✌✬✠✟✌✍✘✙✎ ✚ ✎✡✛✟✜✟✎✡✛✥✝✟✞✗✘❀✭✱✎ ✚☞✚ ✘✙✎ ✚☞✚ ✌✍✮✱✎ ✚ ✑✔✓ ✚ ☛ ✞✗✛✔✩ ✠☞✮ ✞✡✠✍✕ ✓✪✞✡✠☞✎✬✝☞✞✗✭☞✓✦✞✔✫✥✎✍✌✗✝✱✤✬✏✗✞✗✘✙✌✡✩ ✠✦✠✟✌✍✘✙✎ ✪ ✦✢✠✥☛☞✤✢✩ ✚❀✚ ✝✔✤✔✎✢✘✙✎ ✥ ✌✗✠❀✎✢✠☞☛✔✩ ✛ ✎✖✏✍✞✗✘✙✌✢✩ ✠✦✠✟✌✍✘✙✎ ✞✗✛✙✌✖✕ ✩ ✚ ☛✙✞✔✫✖✕ ✌✡✑✔✎✴✕ ✚ ✌✍☛✣☛☞✤✍✎ ✎✢✠✱✏ ✞✔✫✪✌ ✏✍✞✗✘✙✌✡✩ ✠✪✠✟✌✗✘❂✎ ✩ ✚ ✛ ✎✡✭✡✕ ✌✗✝✟✎✡✏✬✰✙✩ ☛☞✤✦✌ ✧ ✩✖✁ ✂✍✄ ✆✞✝ ☛ ✞✪✌ ✭✍✛✔✩ ✞✗✛ ✞✗✝✱✝✱★✍✛ ✌✡✠✱✝✟✎ ✞✔✫✦☛☞✤✔✎ ✚ ✌✗✘✙✎✖✠✟✌✗✘✙✎ ✪ ✠☛✡✌☞
▼ ✩✎✍✏✍ ✓ ✆✸✄ ✚ ✭✱✎✡✝✗✩ ✫✡✩ ✎ ✚ ✌✗✠❀✞✔✫✱✫ ✚ ✎✗☛ ✫✍✛ ✞✗✘ ☛☞✤✍✎ ✚ ☛ ✌✍✛✟☛✣✞✔✫✪☛✱✤✔✎✖✘✙✎ ✚☞✚ ✌✍✮✱✎

1 1 offset

22 29 March, 2002 The Computer Communications Course

DNS Inverse Queries

✱✵✞✗✘✙✎✗☛✔✩ ✘✙✎ ✚ ✩ ☛✦✩ ✚ ★ ✚ ✎✗✫✔★✡✕✱☛ ✞✦✞✡✑✍☛✟✌✡✩ ✠✪✏✍✞✗✘✙✌✢✩ ✠✦✠✟✌✍✘✙✎✬✮✡✩ ✜✟✎✢✠✡✦✄✑❀✌✍✏✡✏✢✛ ✎ ✚☞✚ ✧ ✒☛✓✄✔ ✂ ✕✎✖✄✂ ✒✗✓ ✕✄✂ ✒ ✒✙✘ ✚ ✭ ✌✏✝✠✟✡✩✞✂✯✮✄✂ ✡ ✓ ✂ ✭✆☎ ✝ ✁ ✂ ✌ ✡ ✂ ✁ ✂ ✤◆✤✴✩ ✚ ✩ ✚ ✁ ✂✍✔ ✆✖✝ ✓ ✆✜✛ ☎ ✆✞✝ ✮ ☛ ✓✗✭☞✎ ✪ ✤◆✤✍✎ ✦✢✠☞☛✟✎✡✛✱✠✟✎✗☛❀★ ✚ ✎ ✚❀✚ ✭✱✎✢✝✍✩ ✌✢✕✔✏✗✞✗✘✙✌✡✩ ✠❀☛ ✞ ✚ ★✍✭✍✭☞✞✗✛✟☛✦✩ ✠☞✜✟✎✢✛ ✚ ✎✤✢✔★✱✎✡✛✔✩ ✎ ✚ ✧ ✦ ✜
  • ✫✡✲
  • ✑✑✫
✲ ✞✗✘✙✌✡✩ ✠✪✠✟✌✗✘✙✎ ✚ ✩ ✠✥☛☞✤✔✎✻✦ ✜
  • ✫✡✲
  • ✑✑✫
✏✍✞✗✘✙✌✢✩ ✠✪✤✔✌✍✜✟✎✬★✔✭✪☛✟✞✪✫✱✞✍★✍✛✪✕ ✌✡✑✔✎ ✕ ✚ ✩ ✠❀✌✍✏✢✏✴✩ ☛✍✩ ✞✡✠✥☛ ✞✦☛☞✤✍✎✻✦ ✜
  • ✫✒✲
  • ✑✑✫
✚ ★☞✫✔✫✡✩ ✆ ✪ ✑✗✌✍✝✔✤✒✕ ✌✗✑✍✎✴✕✍✛ ✎✡✭✍✛ ✎ ✚ ✎✢✠☞☛ ✚ ✞✡✠✟✎ ✞✗✝☞☛✟✎✗☛✣✞✔✫✥✌✗✠✡✦✄✑❀✌✗✏✡✏✡✛ ✎ ✚☞✚✖✥ ✌✗✠✱✏ ✩ ✚ ✎✏✆✢✭✍✛ ✎ ✚☞✚ ✎✡✏ ✌ ✚ ✌ ✝✱✤✍✌✍✛ ✌✍✝✱☛ ✎✡✛ ✚ ☛☞✛✔✩ ✠☞✮✪✫✱✞✗✛✙✌ ✏✍✎✢✝✍✩ ✘✙✌✢✕✱✜☞✌✡✕ ★✱✎ ✩ ✠✥☛☞✤✔✎✖✛ ✌✗✠☞✮✔✎✣✢
  • ✕✎✤✥✤
✪ ✲ ✌✔☛✟✌✥✫✱✞✡✛ ✦✄✑❀✌✍✏✢✏✡✛ ✎ ✚☞✚ ✗ ✙ ✕ ✪ ✚✦✤ ✪ ✗ ✙✒✚ ✪ ✗ ✗ ✩ ✚ ✕ ✞✗✝✟✌✍☛ ✎✡✏ ✌✔☛✥✏✍✞✗✘✙✌✢✩ ✠✦✠✟✌✍✘✙✎ ✗ ✗ ✪ ✗ ✙✒✚ ✪ ✚✦✤ ✪ ✗ ✙ ✕ ✪ ✦ ✜
  • ✫✒✲
  • ✑✑✫
✧ ✿☞✷✪✶ ✷✱❅ ✷✔✶ ✺ ❃ ❖ ❃ ❖ ❖ ❁✏★✢✺✪✩ ❁☞✽ ✷✔✺◆✻ ❁✬✫✱✷✡✢✱✷ ❖ ✷☞✾☞❃✟✻ ✷✏✢✙★✴✿✗✼ P ✿✣❃✱✶ ✷❀✷☛✭✔❃✱P ✻ ❖ ✣✣❁☞✽ ✷ ✽ ✷✱✻ ★✢❁✔✶ ✮❂❁☛✯❂❃✠✢✑✢✍✶ ✷✱✺ ✺❑✺ ✰✟❃✱P ✷✟✱