Application Layer in the Internet - - PDF document

application layer in the internet
SMART_READER_LITE
LIVE PREVIEW

Application Layer in the Internet - - PDF document

Application Layer in the Internet 15 February, 2001


slide-1
SLIDE 1

1

15 February, 2001 1

Application Layer in the Internet

  • 2

15 February, 2001 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., gaia gaia. .cs cs. .umass umass. .edu edu -

  • 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

slide-2
SLIDE 2

2

3 15 February, 2001 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 15 February, 2001 The Computer Communications Course

DNS: Root Name Servers

slide-3
SLIDE 3

3

5 15 February, 2001 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 15 February, 2001 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

  • shuldig.cs.huji.ac.il

1 2 3 4 5 6

slide-4
SLIDE 4

4

7 15 February, 2001 The Computer Communications Course

DNS example

  • harmony.cs.huji.ac.il

gaia.cs.umass.edu

  • shuldig.cs.huji.ac.il

1 2 3 4 5 6

✂✁☎✄☎✆✞✝✠✟☛✡ ✄✑✂✄☎✡ ☞✍✌ ✎✍ ✒ ✌ ✔✍✌ ✟✑☞ ✌✖✟

dns.cs.umass.edu

✡ ✎ ✄✑✌✖✟☛✒✓✌ ✁ ✡ ✂✄✑✌ ✎✍✠✒✓✌ ✔ ✌✖✟✑☞ ✌✖✟

dns.umass.edu

7 8

8 15 February, 2001 The Computer Communications Course

DNS: iterated 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

  • shuldig.cs.huji.ac.il

1 2 3 4 5 6

✂✁☎✄☎✆✞✝✠✟☛✡ ✄✑✂✄☎✡ ☞✍✌ ✎✍ ✒ ✌ ✔✍✌ ✟✑☞ ✌✖✟

dns.cs.umass.edu

✡ ✎ ✄✑✌✖✟☛✒✓✌ ✁ ✡ ✂✄✑✌ ✎✍✠✒✓✌ ✔ ✌✖✟✑☞ ✌✖✟

dns.umass.edu

7 8

slide-5
SLIDE 5

5

9 15 February, 2001 The Computer Communications Course

Hierarchical Names

✁ ✁
  • 10

15 February, 2001 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)

slide-6
SLIDE 6

6

11 15 February, 2001 The Computer Communications Course

Internet Domain Name Hierarchy

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

12 15 February, 2001 The Computer Communications Course

Name Example

slide-7
SLIDE 7

7

13 15 February, 2001 The Computer Communications Course

Mapping Domain Names to Addresses

✁ ✁
  • 14

15 February, 2001 The Computer Communications Course

DNS: caching and updating records

✁ ✁
slide-8
SLIDE 8

8

15 15 February, 2001 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 authoritative name server for this domain for this domain

(name, ttl, class, type, value)

✁ ✁

Type=A Type=A

  • name

name is hostname is hostname

  • value

value is IP address is IP address

✁ ✁

Type=CNAME Type=CNAME

  • name

name is an alias name for is an alias name for some some

cannonical

cannonical

(the real)

(the real) name name

  • value

value is is cannonical cannonical name name

✁ ✁

Type=MX Type=MX

  • value

value is hostname of is hostname of mailserver mailserver associated with associated with name name

16 15 February, 2001 The Computer Communications Course

DNS protocol, messages

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

✁ ✁

identification: identification: 16 bit id 16 bit id number for query, number for query, repy repy to to query uses same id query uses same id

✁ ✁

flags: flags:

  • error code

error code

  • query or reply

query or reply

  • recursion desired

recursion desired

  • recursion available

recursion available

  • reply is authoritative

reply is authoritative

slide-9
SLIDE 9

9

17 15 February, 2001 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 15 February, 2001 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-10
SLIDE 10

10

19 15 February, 2001 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 15 February, 2001 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

slide-11
SLIDE 11

11

21 15 February, 2001 The Computer Communications Course

Compressed Name Format

  • ✂✁☎✄
✡ ✄✍✔ ✂✁☎✄ ✡ ✄✍✔
  • 1 1 offset

22 15 February, 2001 The Computer Communications Course

DNS Inverse Queries