CSS 432 Domain Name System Textbook 9 3
CSS 432 Domain Name System Textbook 9. 3. 1 Instructor: Joe Mc. Carthy (based on Prof. Fukuda’s slides) CSS 432: Applications 1
DNS Name Service Name • Variable length and mnemonic • Location independent n Name Server Value • System-provided fixed value • Location dependent Basic concepts: ¨ Name n space: set of possible names identifiers ¨ Bindings: n association of names with values E. g. , programming language variable bindings ¨ Resolution: provides the value(s) of a name CSS 432: Applications 2
DNS Name Service Name • Variable length and mnemonic • Location independent n Name Server Hosts cheltenham. cs. princeton. edu 192. 12. 69. 17 n 192. 12. 69. 17 80: 23: A 8: 33: 5 B: 9 F Files /usr/llp/tmp/foo n Value • System-provided fixed value • Location dependent (server, inode) Users Larry Peterson llp@cs. princeton. edu (UID + host IP) CSS 432: Applications 3
DNS Name Service n Unix system calls struct hostent h = gethostbyname( const char *hostname ); ¨ *(struct in_addr *)*h->h_addr_list; // returns IP list ¨ CSS 432: Applications 4
DNS Domain Name System n Hierarchy edu washington… mit bothell cs com gov cisco … yahoo nasa …nsf mil org arpa …navy acm …ieee net uk fr u uw 1 -320 -00 medusa homer goodall n Name uw 1 -320 -00. bothell. washington. edu (Currently, uw 1 -320 -00. uwb. edu) CSS 432: Applications 5
DNS Name Servers n administrative unit Partition hierarchy into zones edu washington… mit bothell cs com gov cisco … yahoo nasa …nsf mil org arpa …navy acm …ieee uk fr u uw 1 -320 -00 medusa homer goodall n net Root name server Each zone implemented by two or more name servers washington name server bothell name server CSS 432: Applications … … Cisco name server cs name server 6
Resource Records n DNS Each name server maintains a collection of resource records (Name, Value, Type, Class, TTL) n n Name/Value: not necessarily host names to IP addresses Type A: Value is an IP address ¨ NS: Value is the corresponding Name Server’s name ¨ CNAME: Value is a Canonical NAME (alias) ¨ MX: Value is the domain name of this host’s Mail e. Xchange server ¨ n n Class: IN (Internet class) TTL: how long the resource record is valid CSS 432: Applications 7
DNS Name Resolution n Client ¨ Initialized with its local name server’s address ¨ appends its domain name (e. g. , cs. princeton. edu) to a given host name (e. g. , penguins) before a submission n Local name server ¨ needs to know root at only one place (not each host). ¨ caches recent responses from remote servers. CSS 432: Applications 8
Name Resolution via dig n n dig @server name type Find a root name server ¨ dig edu ns n n n edu a. gtld-server. net NS IN a. gtld-server. net 192. 5. 6. 30 A IN Find uwb. edu’s name servers ¨ dig @192. 5. 6. 30 uwb. edu ns n n n DNS uwb. edu, dns 2. uwb. edu NS IN uwb. edu, dns 4. uwb. edu NS IN dns 2. uwb. edu 69. 91. 206. 28 A dns 4. uwb. edu 69. 91. 206. 29 A Find mercury. uwb. edu ¨ dig @69. 91. 206. 28 metis. uwb. edu A n metis. uwb. edu 69. 91. 206. 17 A CSS 432: Applications 9
- Slides: 9