15-441 Computer Networking DNS. Lecture 13: 10-9-012 Naming How do we efficiently locate resources? DNS: name  IP address Service location: description.

Slides:



Advertisements
Similar presentations
1 Server Selection & Content Distribution Networks (slides by Srini Seshan, CS CMU)
Advertisements

Domain Name System. DNS is a client/server protocol which provides Name to IP Address Resolution.
Domain Name System (or Service) (DNS) Computer Networks Computer Networks Term B10.
1 Computer Networks Application layer. 2 Application Layer So far –Socket programming, Network API Today –Application layer functions –Specific applications.
20101 The Application Layer Domain Name System Chapter 7.
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts, routers: –IP address (32 bit) - used for addressing datagrams –“name”, e.g., gaia.cs.umass.edu.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
Application Layer session 1 TELE3118: Network Technologies Week 12: DNS Some slides have been taken from: r Computer Networking: A Top Down Approach.
Domain Name System: DNS
15-744: Computer Networking L-13 Naming. L -13; © Srinivasan Seshan, Naming DNS Service location protocols Assigned reading [MD88] P. Mockapetris.
Chapter 9 Application Layer, DNS
CPSC 441: DNS1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes derived.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
Computer Networking Lecture 13 – DNS. Lecture 13: Outline DNS Design DNS Today.
1 Domain Name System (DNS) Professor Hui Zhang. 2 Hui Zhang Names, Addresses, Mapping  Binding Names to Objects  ARP: mapping between layer 2 address.
CS640: Computer Networks Aditya Akella Lecture 17 Naming and the DNS.
15-744: Computer Networking L-17 DNS and the Web.
Lecture © Lecture 7 DNS Copyright © Seth Goldstein, 2008 Based on slides from previous 441 lectures 1.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
NET0183 Networks and Communications Lecture 25 DNS Domain Name System 8/25/20091 NET0183 Networks and Communications by Dr Andy Brooks.
CS 4396 Computer Networks Lab
1 Domain Name System (DNS). 2 DNS: Domain Name System Internet hosts: – IP address (32 bit) - used for addressing datagrams – “name”, e.g.,
Computer Networking Lecture 13 – DNS Dejian Ye, Liu Xin.
Domain Name System (DNS)
TELE 301 Lecture 11: DNS 1 Overview Last Lecture –Scheduled tasks and log management This Lecture –DNS Next Lecture –Address assignment (DHCP)
Ch-9: NAME SERVICES By Srinivasa R. Gudipati. To be discussed.. Fundamentals of Naming Services Naming Resolution The Domain Name System (DNS) Directory.
Chapter 16 – DNS. DNS Domain Name Service This service allows client machines to resolve computer names (domain names) to IP addresses DNS works at the.
Computer Networks Mozafar Bag-Mohammadi Lecture 5 Naming and the DNS.
CS 471/571 Domain Name Server Slides from Kurose and Ross.
Domain names and IP addresses Resolver and name server DNS Name hierarchy Domain name system Domain names Top-level domains Hierarchy of name servers.
DNS: Domain Name System
1 DNS: Domain Name System People: many identifiers: m SSN, name, Passport # Internet hosts, routers: m IP address (32 bit) - used for addressing datagrams.
Example applications Symbolic names and the Domain Name System (DNS)
Chapter 17 Domain Name System
1 Application Layer Lecture 6 Imran Ahmed University of Management & Technology.
CS640: Computer Networks Aditya Akella Lecture 17 Naming and the DNS.
CSE 524: Lecture 5 Application layer protocols. Where we’re at… ● Internet architecture and history ● Internet protocols in practice ● Application layer.
October 8, 2015 University of Tulsa - Center for Information Security Microsoft Windows 2000 DNS October 8, 2015.
Netprog: DNS and name lookups1 Address Conversion Functions and The Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
15-829A/18-849B/95-811A/19-729A Internet-Scale Sensor Systems: Design and Policy Lecture 9 – Lookup Algorithms (DNS & DHTs)
Internet and Intranet Protocols and Applications Lecture 5 Application Protocols: DNS February 20, 2002 Joseph Conron Computer Science Department New York.
1 Kyung Hee University Chapter 18 Domain Name System.
Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
CPSC 441: DNS 1. DNS: Domain Name System Internet hosts: m IP address (32 bit) - used for addressing datagrams m “name”, e.g., - used by.
EE 122: Lecture 20 (Domain Name Server - DNS) Ion Stoica Nov 15, 2001 (* based on the some on-line slides of J. Kurose & K. Rose and of Raj Jain)
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 19 Domain Name System (DNS)
15-744: Computer Networking L-14 Naming. L -14; © Srinivasan Seshan, Naming DNS Assigned reading [JSBM01] DNS Performance and the Effectiveness.
Lecture 5: Web Continued 2-1. Outline  Network basics:  HTTP protocols  Studies on HTTP performance from different views:  Browser types [NSDI 2014]
Computer Networking Lecture 13 – DNS. Midterm Results Average71.9 Median69.5 Std.Dev.13.9!!! Max97 Min40 Available after class today 10/18/07 Lecture.
1. Internet hosts:  IP address (32 bit) - used for addressing datagrams  “name”, e.g., ww.yahoo.com - used by humans DNS: provides translation between.
TCP/IP Protocol Suite 1 Chapter 17 Upon completion you will be able to: Domain Name System: DNS Understand how the DNS is organized Know the domains in.
COMP 431 Internet Services & Protocols
Networking (Cont’d). Congestion Control l Is achieved by informing nodes along a route that congestion has occurred and asking them to reduce their packet.
Spring 2006 CPE : Application Layer_DNS 1 Special Topics in Computer Engineering Application layer: Domain Name System Some of these Slides are.
15-744: Computer Networking L-17 DNS. This lecture Domain Name System (DNS) Content Delivery Networks (CDN) Extension mechanisms for DNS (EDNS)
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
DNS and the Web David Andersen. DNS ● Purpose: – Map from a human-readable name to a (human- unfriendly) IP address ● Let's look at a bit of history.
Networking Applications
15-744: Computer Networking
Chapter 9: Domain Name Servers
CS 3251: Computer Networking I Nick Feamster Spring 2013
IMPLEMENTING NAME RESOLUTION USING DNS
Mozafar Bag-Mohammadi Lecture 5 Naming and the DNS
Lecture 5 – Applications DNS, Web
DNS: Domain Name System
Domain Name System Refs: Chapter 9 RFC 1034 RFC 1035.
The Application Layer: Sockets, DNS
Computer Networking Lecture 13 – DNS.
Presentation transcript:

Computer Networking DNS

Lecture 13: Naming How do we efficiently locate resources? DNS: name  IP address Service location: description  host Other issues How do we scale these to the wide area? How to choose among similar services?

Lecture 13: Overview DNS Server selection DNS experience/trends Service location

Lecture 13: DNS: Domain Name System People: many identifiers: SSN, name, Passport # Internet hosts, routers: IP address (32 bit) - used for addressing datagrams “name”, e.g., gaia.cs.umass.edu - used by humans Q: Map between IP addresses and name ? Domain Name System: Distributed database implemented in hierarchy of many name servers Application-layer protocol host, routers, name servers to communicate to resolve names (address/name translation) Note: core Internet function implemented as application- layer protocol Complexity at network’s “edge”

Lecture 13: Obvious Solutions (1) Why not centralize DNS? Single point of failure Traffic volume Distant centralized database Doesn’t scale!

Lecture 13: Obvious Solutions (2) Why not use /etc/hosts? Original Name to Address Mapping Flat namespace /etc/hosts SRI kept main copy Downloaded regularly Count of hosts was increasing: machine per domain  machine per user Many more downloads Many more updates

Lecture 13: Domain Name System Goals Basically building a wide area distributed database Scalability Decentralized maintenance Robustness Global scope Names mean the same thing everywhere Don’t need Atomicity Strong consistency

Lecture 13: DNS Design DB contains tuples called resource records (RRs) RR contains name, type, class and application data Classes = Internet (IN), Chaosnet (CH), etc. Each class defines data associated with type, e.g. for IN: A = IP address, NS = name server, CNAME = canonical name (for aliasing), HINFO = CPU/OS info, MX = mail exchange, PTR = domain name = pointer for reverse mapping of address to name

Lecture 13: DNS Design Administrative hierarchy “.” as separator Zone = contiguous section of name space E.g., Complete tree, single node or subtree

Lecture 13: Hierarchical Name Space root edu net org ukcom ca gwu ucb cmu bu mit cs ece cmcl

Lecture 13: DNS Design Zones are created by convincing owner node to create/delegate a subzone Records within zone stored multiple redundant servers Primary/master name server updated manually Secondary/redundant servers updated by zone transfer of name space Zone transfer is a bulk transfer of the “configuration” of a DNS server – uses TCP to ensure reliability Example: CS.CMU.EDU created by CMU.EDU administrators

Lecture 13: DNS Records DNS: distributed db storing resource records (RR) Type=A name is hostname value is IP address Type=NS name is domain (e.g. foo.com) value is IP address of authoritative name server for this domain RR format: (name, value, type, ttl) Type=CNAME name is an alias name for some “canonical” (the real) name value is canonical name Type=MX value is hostname of mailserver associated with name

Lecture 13: DNS Design Host name to address section Top-level domains  edu, gov, ca, us, etc. Sub-domains = subtrees Human readable name = leaf  root path

Lecture 13: Hierarchical Name Space barracuda.cmcl.cs.cmu.edu root edu net org ukcom ca gwu ucb cmu bu mit cs ece cmcl barracuda

Lecture 13: Servers/Resolvers Each host has a resolver Typically a library that applications can link to Local name servers hand-configured (e.g. /etc/resolv.conf) Name servers Typically responsible for some zone Local servers Do lookup of distant host names for local hosts Typically answer queries about local zone

Lecture 13: DNS: Root Name Servers Responsible for “root” zone Approx. dozen root name servers worldwide Currently {a-m}.root- servers.net Local name servers contact root servers when they cannot resolve a name Configured with well- known root servers

Lecture 13: DNS Message Format Identification No. of Questions No. of Authority RRs Questions (variable number of answers) Answers (variable number of resource records) Authority (variable number of resource records) Additional Info (variable number of resource records Flags No. of Answer RRs No. of Additional RRs Name, type fields for a query RRs in response to query Records for authoritative servers Additional “helpful info that may be used 12 bytes

Lecture 13: DNS Header Fields Identification Used to match up request/response Flags 1-bit to mark query or response 1-bit to mark authoritative or not 1-bit to request recursive resolution 1-bit to indicate support for recursive resolution

Lecture 13: Caching DNS responses are cached Quick response for repeated translations Other queries may reuse some parts of lookup NS records for domains DNS negative queries are cached Don’t have to repeat past mistakes E.g. misspellings, search strings in resolv.conf Cached data periodically times out Lifetime (TTL) of data controlled by owner of data TTL passed with every record

Lecture 13: Lookup Methods Iterative Server responds with as much as it knows (iterative) Recursive Server goes out and searches for more info (recursive) Only returns final answer or “not found” Impact on caching? workload? Local server typically does recursive Root/distant server does iterative

Lecture 13: DNS: Iterated Queries Recursive query: Puts burden of name resolution on contacted name server Heavy load? Iterative query: Contacted server replies with name of server to contact “I don’t know this name, but ask this server” requesting host surf.eurecom.fr gaia.cs.umass.edu root name server local name server dns.eurecom.fr authoritative name server dns.cs.umass.edu intermediate name server dns.umass.edu 7 8 iterated query

Lecture 13: Typical Resolution Steps for resolving Application calls gethostbyname() Resolver contacts local name server (S 1 ) S 1 queries root server (S 2 ) for ( S 2 returns NS record for cmu.edu (S 3 ) What about A record for S 3 ? This is what the additional information section is for S 1 queries S 3 for S 3 returns A record for Can return multiple A records  what does this mean?

Lecture 13: DNS Lookup Example Client Local DNS server root & edu DNS server cmu.edu DNS server NS cmu.edu NS cs.cmu.edu www=IPaddr cs.cmu.edu DNS server

Lecture 13: Subsequent Lookup Example Client Local DNS server root & edu DNS server cmu.edu DNS server cs.cmu.edu DNS server ftp.cs.cmu.edu ftp=IPaddr ftp.cs.cmu.edu

Lecture 13: Reliability DNS servers are replicated Name service available if  one replica is up Queries can be load balanced between replicas UDP used for queries Need reliability  Why not TCP? Try alternate servers on timeout Exponential backoff when retrying same server Same identifier for all queries Don’t care which server responds

Lecture 13: Reverse Name Lookup ? Lookup in-addr.arpa Why is the address reversed? Happens to be and mammoth.cmcl.cs.cmu.edu  what will reverse lookup return? Both? Should only return primary name

Lecture 13: Prefetching Name servers can add addition data on any response Typically used for prefetching CNAME/MX/NS typically point to another host name Responses include address of host referred to in “additional section”

Lecture 13: Mail Addresses MX records point to mail exchanger for a name E.g. mail.acm.org is MX for acm.org Addition of MX record type proved to be a challenge How to get mail programs to lookup MX record for mail delivery? Needed critical mass of such mailers

Lecture 13: Overview DNS Server selection DNS experience/trends Service location

Lecture 13: Server Selection Service is replicated in many places in network Which server? Lowest load  to balance load on servers Best performance  to improve client performance Based on Geography? RTT? Throughput? Load? Any alive node  to provide fault tolerance How do direct clients to a particular server? As part of routing  anycast, cluster load balancing As part of application  HTTP redirect As part of naming  DNS

Lecture 13: Routing Based Anycast Give service a single IP address Each node implementing service advertises route to address Packets get routed routed from client to “closest” service node Closest is defined by routing metrics May not mirror performance/application needs What about the stability of routes?

Lecture 13: Routing Based Cluster load balancing Router in front of cluster of nodes directs packets to server Must be done on connection by connection basis – why? Forces router to keep per connection state How to choose server Easiest to decide based on arrival of first packet in exchange Primarily based on local load Can be based on later packets (e.g. HTTP Get request) but makes system more complex

Lecture 13: Application Based HTTP support simple way to indicate that Web page has moved Server gets Get request from client Decides which server is best suited for particular client and object Returns HTTP redirect to that server Can make informed application specific decision May introduce additional overhead  multiple connection setup, name lookups, etc. While good solution in general HTTP Redirect has some design flaws – especially with current browsers

Lecture 13: Naming Based Client does name lookup for service Name server chooses appropriate server address A-record returned is “best” one for the client What information can name server base decision on? Server load/location  must be collected Information in the name lookup request Name service client  typically the local name server for client

Lecture 13: Naming Based Round-robin Randomly choose replica Avoid hot-spots [Semi-]static metrics Geography Route metrics How well would these work?

Lecture 13: Naming Based Predicted application performance How to predict? Only have limited info at name resolution Multiple techniques Static metrics to get coarse grain answer Current performance among smaller group

Lecture 13: Overview DNS Server selection DNS experience/trends Service location

Lecture 13: DNS Experience One of the greatest challenges seemed to be getting good name server implementations Developers were typically happy with “good enough” implementation Challenging, large scale, wide area distributed system Like routing, but easier to have broken implementations that work

Lecture 13: DNS Experience Common bugs Looped NS/CNAME record handling Poor static configuration (root server list) Lack of exponential backoff No centralized caching per site Each machine runs own caching local server Why is this a problem? How many hosts do we need to share cache?  recent studies suggest hosts Solution Monitor for misbehaving name servers?

Lecture 13: Trends DNS is used for server selection more and more Blame Bruce Maggs for this What are reasonable DNS TTLs for this type of use Typically want to adapt to load changes Low TTL for A-records  what about NS records? How does this affect caching? What does the first and subsequent lookup do?

Lecture 13: Recent Measurements Hit rate for DNS = 80% Is this good or bad? Most Internet traffic is Web What does a typical page look like?  average of 4-5 imbedded objects  needs 4-5 transfers This alone accounts for 80% hit rate! Lower TTLs for A records does not affect performance DNS performance really relies more on NS-record caching

Lecture 13: Root Zone Generic Top Level Domains (gTLD) =.com,.net,.org, etc… Country Code Top Level Domain (ccTLD) =.us,.ca,.fi,.uk, etc… Root server ({a-m}.root-servers.net) also used to cover gTLD domains Load on root servers was growing quickly! Moving.com,.net,.org off root servers was clearly necessary to reduce load  done Aug 2000

Lecture 13: New gTLDs.info  general info.biz  businesses.aero  air-transport industry.coop  business cooperatives.name  individuals.pro  accountants, lawyers, and physicians.museum  museums Only new one actives so far =.info,.biz

Lecture 13: New Registrars Network Solutions (NSI) used to handle all registrations, root servers, etc… Clearly not the democratic way Large number of registrars that can create new domains  However NSI still handle root servers

Lecture 13: Overview DNS Server selection DNS experience/trends Service location

Lecture 13: Service Location What if you want to lookup services with more expressive descriptions than DNS names E.g. please find me printers in cs.cmu.edu instead of laserjet1.cs.cmu.edu What do descriptions look like? How is the searching done? How will it be used? Search for particular service? Browse available services? Composing multiple services into new service?

Lecture 13: Service Descriptions Typically done as hierarchical value- attribute pairs Type = printer  memory = 32MB, lang = PCL Location = CMU  building = WeH Hierarchy based on attributes or attributes- values? E.g. Country  state or country=USA  state=PA and country=Canada  province=BC? Can be done in something like XML

Lecture 13: Service Discovery (Multicast) Services listen on well known discovery group address Client multicasts query to discovery group Services unicast replies to client Tradeoffs Not very scalable  effectively broadcast search Requires no dedicated infrastructure or bootstrap Easily adapts to availability/changes Can scope request by multicast scoping and by information in request

Lecture 13: Service Discovery (Directory Based) Services register with central directory agent Soft state  registrations must be refreshed or the expire Clients send query to central directory  replies with list of matches Tradeoffs How do you find the central directory service? Typically using multicast based discovery! SLP also allows directory to do periodic advertisements Need dedicated infrastructure

Lecture 13: Other Issues Dynamic attributes Many queries may be based on attributes such as load, queue length E.g., print to the printer with shortest queue Security Don’t want others to serve/change queries Also, don’t want others to know about existence of services Srini’s home SLP server is advertising the $50,000 MP3 stereo system (come steal me!)