Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spring 2006CS 3321 Name Service (DNS) Outline Terminology Domain Naming System.

Similar presentations


Presentation on theme: "Spring 2006CS 3321 Name Service (DNS) Outline Terminology Domain Naming System."— Presentation transcript:

1 Spring 2006CS 3321 Name Service (DNS) Outline Terminology Domain Naming System

2 Spring 2006CS 3322 Why A Name Service? Fundamental property of name: identify object Fundamental property of an address: locate object Using name service allows us to decouple these two different functions (though often times naming conventions can help with location, and vice versa) –Name can help locate objects, define membership in a group, specify a role, etc. Differences (related to Internet): –Names more user friendly than IP addresses –Names can have variable length

3 Spring 2006CS 3323 Name Properties Location transparent or location-dependent Flat or hierarchical Global versus local Absolute versus relative

4 Spring 2006CS 3324 Terminology Name space: defines set of possible names –Flat: names not divisible into components –Hierarchical (e.g. Unix file names, Internet domain names) Naming system maintains a collection of bindings of names to values –Value can be anything we want naming system to return when presented with a name Resolution mechanism: a procedure that, when invoked with a name, returns the corresponding value Name server: specific implementation of a resolution mechanism that can be queried via a network

5 Spring 2006CS 3325 In The Beginning… Network Information Center (NIC) maintained a flat table of name-to-address bindings (called hosts.txt ) To add host to Internet, email NIC with new name/address pair, which NIC manually added to table Modified table was mailed to every site every few days; sysadmins installed hosts.txt on every host

6 Spring 2006CS 3326 Domain Name System (DNS) Went online in mid 1980s Hierarchical name space –Names processed from right to left (though humans read them from left to right) with periods as field separators –Ex. cleopatra.richmond.edu

7 Spring 2006CS 3327 Domain Name System (DNS) Distributed database of domain name bindings –Each site (university department, campus, company, etc.) maintains its own part of database, along with a server –Mapping is not necessarily host name to address Apps presented with host names query DNS to find address –Accessed through a resolver, which in Unix is primarily reached via gethostbyname() and gethostbyaddress() –resolver opens UDP connection to pass name service packets (IP address of server(s) in /etc/resolve.conf) –resolver is not part of TCP implementation (or kernel)

8 Spring 2006CS 3328 Example Name server Mail program User TCP IP 2 cs.princeton.edu 192.12.69.5 3 user @ cs.princeton.edu 1 192.12.69.5 4 5

9 Spring 2006CS 3329 DNS Implementation Partition hierarchy into zones educom princeton … mit csee ux01ux04 physics cisco … yahoonasa … nsfarpa … navyacm … ieee govmilorgnetukfr Zones correspond to administrative authority (NIC gets top) –Each zone implemented by two or more name servers Primary: get its info from disk files Secondary: get their info from the primary (called a zone-transfer)

10 Spring 2006CS 33210 DNS Implementation (cont.) DNS is really a hierarchy of name servers, rather than hierarchy of domains Servers respond either with info requested or with IP address of another name server All primary servers must know IP addresses of all root servers Root name server Princeton name server Cisco name server CS name server EE name server … …

11 Spring 2006CS 33211 Resource Records Each name server maintains a collection of resource records (Name, Value, Type, Class, TTL) Name/Value: not necessarily host names to IP addresses Type: tells how value should be interpreted –A: Value is an IP address (gives the name-to-address mapping) –NS: Value gives domain name for host running name server that knows how to resolve names within specified domain. –CNAME: Value gives canonical name for a particular host; used to define aliases (e.g. indirection for web server). –MX: Value gives domain name for host running mail server that accepts messages for specified domain. Class: allow other entities to define types (Internet class is IN) TTL: how long the resource record is valid (when TTL expires, this record must be removed from cache)

12 Spring 2006CS 33212 Root Server (princeton.edu, cit.princeton.edu, NS, IN) (cit.princeton.edu, 128.196.128.233, A, IN) (cisco.com, thumper.cisco.com, NS, IN) (thumper.ciscoe.com, 128.96.32.20, A, IN) …

13 Spring 2006CS 33213 Princeton Server (cs.princeton.edu, optima.cs.princeton.edu, NS, IN) (optima.cs.princeton.edu, 192.12.69.5, A, IN) (ee.princeton.edu, helios.ee.princeton.edu, NS, IN) (helios.ee.princeton.edu, 128.196.28.166, A, IN) (jupiter.physics.princeton.edu, 128.196.4.1, A, IN) (saturn.physics.princeton.edu, 128.196.4.2, A, IN) (mars.physics.princeton.edu, 128.196.4.3, A, IN) (venus.physics.princeton.edu, 128.196.4.4, A, IN)

14 Spring 2006CS 33214 CS Server (cs.princeton.edu, optima.cs.princeton.edu, MX, IN) (cheltenham.cs.princeton.edu, 192.12.69.60, A, IN) (che.cs.princeton.edu, cheltenham.cs.princeton.edu, CNAME, IN) (optima.cs.princeton.edu, 192.12.69.5, A, IN) (www.cs.princeton.edu, optima.cs.princeton.edu, CNAME, IN) (baskerville.cs.princeton.edu, 192.12.69.35, A, IN) (bas.cs.princeton.edu, baskerville.cs.princeton.edu, CNAME, IN)

15 Spring 2006CS 33215 Name Resolution Client sends request to a root server for cleopatra.mathcs.richmond.edu Root server returns the best info it has, which includes all information relating to richmond.edu (which should contain the name and address of a richmond.edu name server) Client queries richmond.edu name server, which returns name and address of mathcs.richmond.edu name server Client queries mathcs.richmond.edu name server and gets IP address of cleopatra.mathcs.richmond.edu

16 Spring 2006CS 33216 How It Really Works Client queries local name server, and name server goes through resolution process on client’s behalf –Hosts must be configured with address of local name server –Only local name server needs to know addresses of root server(s) –Local server sees all DNS responses, and can thus cache these (removing record when TTL expires) Partial names (e.g. cleopatra ): client program is configured with local domain and appends this to incomplete names before query

17 Spring 2006CS 33217 Example Root name server Princeton name server CS name server Local name server Client 1 cicada.cs.princeton.edu 192.12.69.60 8 cicada.cs.princeton.edu princeton.edu, 128.196.128.233 cicada.cs.princeton.edu cicada.cs.princeton.edu, 192.12.69.60 cicada.cs.princeton.edu cs.princeton.edu, 192.12.69.5 2 3 4 5 6 7


Download ppt "Spring 2006CS 3321 Name Service (DNS) Outline Terminology Domain Naming System."

Similar presentations


Ads by Google