Announcements Enough folks would be inconvenienced that we won t be closing either of the Monday or Tuesday sections Reminder Homework 1 due this Friday before class DNS Domain Name System EE 122 Intro to Communication Networks Fall 2007 WF 4 5 30 in Cory 277 Vern Paxson TAs Lisa Fowler Daniel Killebrew Jorge Ortiz http inst eecs berkeley edu ee122 Materials with thanks to Jennifer Rexford Ion Stoica and colleagues at Princeton and UC Berkeley 1 2 Goals of Today s Lecture Host Names vs IP addresses Concepts principles underlying the Domain Name System DNS Host names Mnemonic name appreciated by humans Variable length full alphabet of characters Provide little if any information about location Examples www cnn com and bbc co uk Indirection names in place of addresses Hierarchy in names addresses and servers Caching of mappings from names to from addresses Inner workings of DNS IP addresses DNS resolvers and servers Iterative and recursive queries TTL based caching Use of the dig utility Numerical address appreciated by routers Fixed length binary number Hierarchical related to host location Examples 64 236 16 20 and 212 58 224 131 Security analysis 3 4 Scalable Name Address Mappings Separating Naming and Addressing Names are easier to remember Originally per host file www cnn com vs 64 236 16 20 Flat namespace etc hosts what is this on your computer today SRI Menlo Park kept master copy Downloaded regularly Addresses can change underneath Move www cnn com to 4 125 91 21 E g renumbering when changing providers Name could map to multiple IP addresses Single server doesn t scale www cnn com to multiple 8 replicas of the Web site Enables Traffic implosion lookups updates Single point of failure Amazing politics o Load balancing o Reducing latency by picking nearby servers o Tailoring content based on requester s location identity Multiple names for the same address E g aliases like www cnn com and cnn com 5 Need a distributed hierarchical collection of servers 6 1 Domain Name System DNS Distributed Hierarchical Database unnamed root Properties of DNS Hierarchical name space divided into zones Zones distributed over collection of DNS servers com edu org generic domains Hierarchy of DNS servers bar Root hardwired into other servers Top level domain TLD servers Authoritative DNS servers west foo Performing the translations ac Top Level Domains TLDs east zw arpa inaddr ac cam my usr my east bar edu Local DNS servers Resolver software uk country domains usr cam ac uk 7 DNS Root 8 DNS Root Servers Located in Virginia USA 13 root servers see http www root servers org Labeled A through M How do we make the root scale Does this scale Verisign Dulles VA A Verisign Dulles VA C Cogent Herndon VA D U Maryland College Park MD G US DoD Vienna VA K RIPE London H ARL Aberdeen MD I Autonomica Stockholm J Verisign E NASA Mt View CA F Internet Software Consortium Palo Alto CA M WIDE Tokyo B USC ISI Marina del Rey CA L ICANN Los Angeles CA 9 DNS Root Servers TLD and Authoritative DNS Servers Top level domain TLD servers 13 root servers see http www root servers org Labeled A through M Replication via any casting localized routing for addresses E NASA Mt View CA F Internet Software Consortium Palo Alto CA and 37 other locations 10 A Verisign Dulles VA C Cogent Herndon VA also Los Angeles NY Chicago D U Maryland College Park MD G US DoD Vienna VA K RIPE London plus 16 other locations H ARL Aberdeen MD I Autonomica Stockholm J Verisign 21 locations plus 29 other locations Generic domains e g com org edu Country domains e g uk fr cn jp Special domains e g arpa Typically managed professionally o Network Solutions maintains servers for com o Educause maintains servers for edu M WIDE Tokyo plus Seoul Paris San Francisco B USC ISI Marina del Rey CA L ICANN Los Angeles CA 11 Authoritative DNS servers Provide public records for hosts at an organization o Private records may differ though not part of original design s intent For the organization s servers e g Web and mail Can be maintained locally or by a service provider 12 2 Using DNS Example Local DNS server default name server root DNS server Usually near the endhosts that use it Local hosts configured with local server e g etc resolv conf or learn server via DHCP Host at cis poly edu wants IP address for gaia cs umass edu 2 3 4 local DNS server Client application 5 dns poly edu Extract server name e g from the URL Do gethostbyname to trigger resolver code 1 8 Server application Extract client IP address from socket Optional gethostbyaddr to translate into name 13 Ask server to get answer for you E g request 1 and response 8 Iterative query 4 Ask server who to ask next E g all other request response pairs dns poly edu TLD DNS server requesting host gaia cs umass edu 14 12 34 56 78 Idea reverse the quads 78 56 34 12 6 7 8 cis poly edu But quad notation has most sig hierarchy element on left while www cnn com has it on the right 5 1 authoritative DNS server dns cs umass edu Addresses already have natural quad hierarchy 3 local DNS server 6 How do we go the other direction from an IP address to the corresponding hostname root DNS server 2 requesting host 7 Reverse Mapping Address Host Recursive vs Iterative Queries Recursive query TLD DNS server and look that up in the DNS authoritative DNS server dns cs umass edu cis poly edu Under what TLD Convention in addr arpa So lookup is for 78 56 34 12 in addr arpa 15 Distributed Hierarchical Database DNS Caching unnamed root com edu org generic domains bar ac uk Performing all these queries takes time zw arpa country domains ac inaddr west east cam 12 foo my usr 34 my east bar edu 16 And all this before actual communication takes place E g 1 second latency before starting Web download Caching can greatly reduce overhead The top level servers very rarely change Popular sites e g www cnn com visited often Local DNS server often has the information cached How DNS caching works usr cam ac uk 56 17 12 34 56 0 24 DNS servers cache responses to queries Responses include a time to live TTL field Server deletes cached entry after TTL expires 18 3 Negative Caching DNS Resource Records DNS distributed DB storing resource records RR RR format name Remember things that don t work Misspellings like www cnn comm and www cnnn com These can take a long time to fail the first time Good to remember that they don t work so the failure takes less time the next time around Type A value type ttl Type CNAME name is hostname value is IP address
View Full Document