Lecture 7: Domain Name Service (DNS) Reading: Section 9.1 ? CMSC 23300/33300 Computer Networks

Slides:



Advertisements
Similar presentations
Domain Name System (DNS) Name resolution for both small and large networks Host names IP Addresses Like a phone book, but stores more information Older.
Advertisements

DNS – Domain Name system Converting domain names to IP addresses since 1983.
Domain Name System (or Service) (DNS) Computer Networks Computer Networks Term B10.
1 EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Domain Name System (or Service) (DNS) Computer Networks Computer Networks Spring 2012 Spring 2012.
EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
2: Application Layer1 FTP, SMTP and DNS. 2: Application Layer2 FTP: separate control, data connections r FTP client contacts FTP server at port 21, specifying.
1 Domain Name System (DNS) Reading: Section 9.1 COS 461: Computer Networks Spring 2006 (MW 1:30-2:50 in Friend 109) Jennifer Rexford Teaching Assistant:
EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
1 Translating Addresses Reading: Section 4.1 and 9.1 COS 461: Computer Networks Spring 2007 (MW 1:30-2:50 in Friend 004) Jennifer Rexford Teaching Assistant:
1 Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2007 (MW 1:30-2:50 in Friend 004) Ioannis Avramopoulos Instructor:
1 Translating Addresses Reading: Section 4.1 and 9.1 COS 461: Computer Networks Spring 2008 (MW 1:30-2:50 in COS 105) Jennifer Rexford Teaching Assistants:
Naming Jennifer Rexford Advanced Computer Networks Tuesdays/Thursdays 1:30pm-2:50pm.
CPSC 441: DNS1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes derived.
Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks Domain.
Name Resolution and DNS. Domain names and IP addresses r People prefer to use easy-to-remember names instead of IP addresses r Domain names are alphanumeric.
Chapter 2 Application Layer
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.,
Domain Name System (DNS)
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 10 Omar Meqdadi Department of Computer Science and Software Engineering University.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
1 EE 122: Domain Name System Ion Stoica TAs: Junda Liu, DK Moon, David Zats (Materials with thanks to Vern Paxson,
CS 471/571 Domain Name Server Slides from Kurose and Ross.
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 2: Application.
DNS: Domain Name System
Review: –Which protocol is used to move messages around in the Internet? –Describe how a message is moved from the sender’s UA to the receiver’s.
1 DNS: Domain Name System People: many identifiers: m SSN, name, Passport # Internet hosts, routers: m IP address (32 bit) - used for addressing datagrams.
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
DNS: Domain Name System People: many identifiers: – SSN, name, Passport # Internet hosts, routers: – IP address (32 bit) - used for addressing datagrams.
Lecture 6: Video Streaming 2-1. Outline  Network basics:  HTTP protocols  Studies on HTTP performance from different views:  Browser types [NSDI 2014]
25.1 Chapter 25 Domain Name System Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Naming and the DNS. Names and Addresses  Names are identifiers for objects/services (high level)  Addresses are locators for objects/services (low level)
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.
CS 3830 Day 10 Introduction 1-1. Announcements r Quiz #2 this Friday r Program 2 posted yesterday 2: Application Layer 2.
Discovery Jennifer Rexford COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
Lecture 5: Web Continued 2-1. Outline  Network basics:  HTTP protocols  Studies on HTTP performance from different views:  Browser types [NSDI 2014]
Spring 2015© CS 438 Staff1 DNS. Host Names vs. IP addresses Host names  Mnemonic name appreciated by humans  Variable length, full alphabet of characters.
1 EEC-484/584 Computer Networks Lecture 5 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer Networking book.
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
1. Internet hosts:  IP address (32 bit) - used for addressing datagrams  “name”, e.g., ww.yahoo.com - used by humans DNS: provides translation between.
Application Layer, 2.5 DNS 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.
CSEN 404 Application Layer II Amr El Mougy Lamia Al Badrawy.
Spring 2006 CPE : Application Layer_DNS 1 Special Topics in Computer Engineering Application layer: Domain Name System Some of these Slides are.
@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.
@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.
CSE 486/586 Distributed Systems Web Content Distribution---1 DNS & CDN
Introduction to Networks
Session 6 INST 346 Technologies, Infrastructure and Architecture
Chapter 9: Domain Name Servers
Domain Name System (DNS)
Chapter 7: Application layer
Cookies, Web Cache & DNS Dr. Adil Yousif.
Domain Name System (DNS)
EEC-484/584 Computer Networks
DNS: Domain Name System
Domain Name System (DNS)
The Application Layer: Sockets, DNS
FTP, SMTP and DNS 2: Application Layer.
Naming in Networking Jennifer Rexford COS 316 Guest Lecture.
Presentation transcript:

Lecture 7: Domain Name Service (DNS) Reading: Section 9.1 ? CMSC 23300/33300 Computer Networks

2 Goals of Today’s Lecture l Computer science concepts underlying DNS u Indirection: names in place of addresses u Hierarchy: in names, addresses, and servers u Caching: of mappings from names to/from addresses l Inner workings of DNS u DNS resolvers and servers u Iterative and recursive queries u TTL-based caching l Web and DNS u Influence of DNS queries on Web performance u Server selection and load balancing

3 Host Names vs. IP addresses l Host names u Mnemonic name appreciated by humans u Variable length, alpha-numeric characters u Provide little (if any) information about location u Examples: and ftp.eurocom.fr l IP addresses u Numerical address appreciated by routers u Fixed length, binary number u Hierarchical, related to host location u Examples: and

4 Separating Naming and Addressing l Names are easier to remember u vs l Addresses can change underneath u Move to u E.g., renumbering when changing providers l Name could map to multiple IP addresses u to multiple replicas of the Web site l Map to different addresses in different places u Address of a nearby copy of the Web site u E.g., to reduce latency, or return different content l Multiple names for the same address u E.g., aliases like ee.mit.edu and cs.mit.edu

5 Strawman Solution: Local File l Original name to address mapping u Flat namespace u /etc/hosts u SRI kept main copy u Downloaded regularly l Count of hosts was increasing: moving from a machine per domain to machine per user u Many more downloads u Many more updates

6 Strawman Solution #2: Central Server l Central server u One place where all mappings are stored u All queries go to the central server l Many practical problems u Single point of failure u High traffic volume u Distant centralized database u Single point of update u Does not scale Need a distributed, hierarchical collection of servers

7 Domain Name System (DNS) l Properties of DNS u Hierarchical name space divided into zones u Distributed over a collection of DNS servers l Hierarchy of DNS servers u Root servers u Top-level domain (TLD) servers u Authoritative DNS servers l Performing the translations u Local DNS servers u Resolver software

8 DNS Root Servers l 13 root servers (see l Labeled A through M B USC-ISI Marina del Rey, CA L ICANN Los Angeles, CA E NASA Mt View, CA F Internet Software C. Palo Alto, CA (and 36 other locations) I Autonomica, Stockholm (plus 28 other locations) K RIPE (17 locations) M WIDE Tokyo (also Seoul, Paris) A Verisign, Dulles, VA C Cogent, Herndon, VA (also Los Angeles, Chicago, NYC) D U Maryland College Park, MD G US DoD Vienna, VA H ARL Aberdeen, MD J Verisign (17 locations)

9 TLD and Authoritative DNS Servers l Top-level domain (TLD) servers u Generic domains (e.g., com, org, edu) u Country domains (e.g., uk, fr, ca, jp) u Typically managed professionally l Network Solutions maintains servers for “com” l Educause maintains servers for “edu” l Authoritative DNS servers u Provide public records for hosts at an organization u For the organization’s servers (e.g., Web and mail) u Can be maintained locally or by a service provider

10 Distributed Hierarchical Database comeduorgac uk zw arpa unnamed root bar westeast foomy ac cam usr in- addr generic domainscountry domains my.east.bar.edu usr.cam.ac.uk /24

11 Using DNS l Local DNS server (“default name server”) u Usually near the end hosts who use it u Local hosts configured with local server (e.g., /etc/resolv.conf) or learn the server via DHCP l Client application u Extract server name (e.g., from the URL) u Do gethostbyname() to trigger resolver code l Server application u Extract client IP address from socket u Optional gethostbyaddr() to translate into name

12 requesting host cis.poly.edu gaia.cs.umass.edu root DNS server local DNS server dns.poly.edu authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server (for edu) Example Host at cis.poly.edu wants IP address for gaia.cs.umass.edu

13 Recursive vs. Iterative Queries l Recursive query u Ask server to get answer for you u E.g., request 1 and response 8 l Iterative query u Ask server who to ask next u E.g., all other request- response pairs requesting host cis.poly.edu root DNS server local DNS server dns.poly.edu authoritative DNS server dns.cs.umass.edu 7 8 TLD DNS server

14 DNS Caching l Performing all these queries take time u And all this before the actual communication takes place u E.g., 1-second latency before starting Web download l Caching can substantially reduce overhead u The top-level servers very rarely change u Popular sites (e.g., visited often u Local DNS server often has the information cached l How DNS caching works u DNS servers cache responses to queries u Responses include a “time to live” (TTL) field u Server deletes the cached entry after TTL expires

15 Negative Caching l Remember things that don’t work u Misspellings like & u These can take a long time to fail the first time u Good to remember that they don’t work u … so the failure takes less time the next time around

16 DNS Resource Records DNS: distributed database storing resource records (RR) l Type=NS  name is domain (e.g. foo.com)  value is hostname of authoritative name server for this domain RR format: (name, value, type, ttl) l Type=A  name is hostname  value is IP address l Type=CNAME  name is alias name for some “canonical” (the real) name is really servereast.backup2.ibm.com  value is canonical name l Type=MX  value is name of mailserver associated with name

17 DNS Protocol DNS protocol: query and reply messages, both with same message format Message header: l Identification: 16 bit # for query, reply to query uses same # l Flags: u Query or reply u Recursion desired u Recursion available u Reply is authoritative

18 Reliability l DNS servers are replicated u Name service available if at least one replica is up u Queries can be load balanced between replicas l UDP used for queries u Need reliability: must implement this on top of UDP l Try alternate servers on timeout u Exponential backoff when retrying same server l Same identifier for all queries u Don’t care which server responds

19 Inserting Resource Records into DNS l Example: just created startup “FooBar” l Register foobar.com at Network Solutions u Provide registrar with names and IP addresses of your authoritative name server (primary and secondary) u Registrar inserts two RRs into the com TLD server: l (foobar.com, dns1.foobar.com, NS) l (dns1.foobar.com, , A) l Put in authoritative server dns1.foobar.com u Type A record for u Type MX record for foobar.com

20 Playing With DIG on UNIX l DIG (domain information grouper) program u Allows querying of DNS system u Use flags to find name server (NS) u Disable recursion so that operates one step at a time unix> dig NS ;; AUTHORITY SECTION: edu. 2D IN NS L3.NSTLD.COM. edu. 2D IN NS D3.NSTLD.COM. edu. 2D IN NS A3.NSTLD.COM. edu. 2D IN NS E3.NSTLD.COM. edu. 2D IN NS C3.NSTLD.COM. edu. 2D IN NS G3.NSTLD.COM. edu. 2D IN NS M3.NSTLD.COM. edu. 2D IN NS H3.NSTLD.COM.

DNS and the Web

22 DNS Query in Web Download l User types or clicks on a URL u E.g., l Browser extracts the site name u E.g., l Browser calls gethostbyname() to learn IP address u Triggers resolver code to query the local DNS server l Eventually, the resolver gets a reply u Resolver returns the IP address to the browser l Then, the browser contacts the Web server u Creates and connects socket, and sends HTTP request

23 Multiple DNS Queries l Often a Web page has embedded objects u E.g., HTML file with embedded images l Each embedded object has its own URL u … and potentially lives on a different Web server u E.g., l Browser downloads embedded objects u Usually done automatically, unless configured otherwise u Requires learning the address for

24 When are DNS Queries Unnecessary? l Browser is configured to use a proxy u E.g., browser sends all HTTP requests through a proxy u Then, the proxy takes care of issuing the DNS request l Requested Web resource is locally cached u E.g., cache has u No need to fetch the resource, so no need to query l Browser recently queried for this host name u E.g., user recently visited u So, the browser already called gethostbyname() u … and may be locally caching the resulting IP address

25 Web Server Replicas l Popular Web sites can be easily overloaded u Web site often runs on multiple server machines Internet

26 Directing Web Clients to Replicas l Simple approach: different names u www1.cnn.com, www2.cnn.com, www3.cnn.com u But, this requires users to select specific replicas l More elegant approach: different IP addresses u Single name (e.g., multiple addresses u E.g., , , , … l Authoritative DNS server returns many addresses u And the local DNS server selects one address u Authoritative server may vary the order of addresses

27 Clever Load Balancing Schemes l Selecting the “best” IP address to return u Based on server performance u Based on geographic proximity u Based on network load u … l Example policies u Round-robin scheduling to balance server load u U.S. queries get one address, Europe another u Tracking the current load on each of the replicas

28 Challenge: What About DNS Caching? l Problem: DNS caching u What if performance properties change? u Web clients still learning old “best” Web server u … until the cached information expires l Solution: Small Time-to-Live values u Setting artificially small TTL values u … so replicas picked based on fresh information l Disadvantages: abuse of DNS? u Many more DNS request/response messages u Longer latency in initiating the Web requests

29 Summary l Domain Name System u Distributed, hierarchical database u Distributed collection of servers u Caching to improve performance l Next class: Internet Control Protocols ( ) u Address Resolution Protocol (ARP) u Dynamic Host Configuration Protocol (DHCP) u (Internet Control Message Protocol—ICMP—Lect. 2)