CSS432: Applications 1 CSS432 Domain Name System Textbook Instructor: Joe McCarthy (based on Prof. Fukuda’s slides)
CSS432: Applications 2 Name Service DNS Basic concepts: Name space: set of possible names identifiers Bindings: association of names with values E.g., programming language variable bindings Resolution: provides the value(s) of a name Name Server Name Variable length and mnemonic Location independent Value System-provided fixed value Location dependent
CSS432: Applications 3 Name Service Hosts cheltenham.cs.princeton.edu :23:A8:33:5B:9F Files /usr/llp/tmp/foo (server, inode) Users Larry Peterson (UID + host IP) Name Server Name Variable length and mnemonic Location independent Value System-provided fixed value Location dependent DNS
CSS432: Applications 4 Unix system calls struct hostent h = gethostbyname( const char *hostname ); *(struct in_addr *)*h->h_addr_list; // returns IP list DNS Name Service
CSS432: Applications 5 Hierarchy Name uw bothell.washington.edu (Currently, uw uwb.edu) educom washington … mit ucs uw medusa bothell cisco … yahoonasa … nsfarpa … navyacm … ieee govmilorgnetukfr homergoodall DNS Domain Name System
CSS432: Applications 6 Name Servers Partition hierarchy into zones Root name server washington name server Cisco name server bothell name server cs name server … … Each zone implemented by two or more name servers educom washington … mit ucs uw medusa bothell cisco … yahoonasa … nsfarpa … navyacm … ieee govmilorgnetukfr homergoodall administrative unit DNS
CSS432: Applications 7 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 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 eXchange server Class: IN (Internet class) TTL: how long the resource record is valid DNS
CSS432: Applications 8 Name Resolution 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 Local name server needs to know root at only one place (not each host). caches recent responses from remote servers. DNS
CSS432: Applications 9 name type Find a root name server dig edu ns edu a.gtld-server.net NS IN a.gtld-server.net A IN Find uwb.edu’s name servers uwb.edu ns uwb.edu, dns2.uwb.edu NS IN uwb.edu, dns4.uwb.edu NS IN dns2.uwb.edu A dns4.uwb.edu A Find mercury.uwb.edu metis.uwb.edu A metis.uwb.edu A DNS Name Resolution via dig