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:

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

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.
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.
DNS. 2 DNS: Domain Name System DNS services Hostname to IP address translation Host aliasing – Canonical and alias names Mail server aliasing Load distribution.
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.
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)
DNS. 2 DNS: Domain Name System DNS services Hostname to IP address translation Host aliasing – Canonical and alias names Mail server aliasing Load distribution.
Internet and Intranet Protocols and Applications Lecture 5 Application Protocols: DNS February 20, 2002 Joseph Conron Computer Science Department New York.
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]
Lecture 7: Domain Name Service (DNS) Reading: Section 9.1 ? CMSC 23300/33300 Computer Networks
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)
FTP, SMTP and DNS 2: Application Layer.
Naming in Networking Jennifer Rexford COS 316 Guest Lecture.
Presentation transcript:

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: Mike Wawrzoniak

2 Update on Assignment #1 Extending the deadline –Was due Wednesday March 1 at 9pm –Now due Monday March 6 at 9pm Performance –Good to have an efficient implementation –But not necessary to optimize every last bit Help session on the assignment –Last half hour of today’s class –Led by Mike Wawrzoniak questions to the course mailing list

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

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

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

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

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

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

9 DNS Root Servers 13 root servers (see 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 17 other locations) I Autonomica, Stockholm (plus 3 other locations) K RIPE London (also Amsterdam, Frankfurt) m WIDE Tokyo A Verisign, Dulles, VA C Cogent, Herndon, VA (also Los Angeles) D U Maryland College Park, MD G US DoD Vienna, VA H ARL Aberdeen, MD J Verisign, ( 11 locations)

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

11 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

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

13 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 Example Host at cis.poly.edu wants IP address for gaia.cs.umass.edu

14 Recursive vs. Iterative Queries Recursive query –Ask server to get answer for you –E.g., request 1 and response 8 Iterative query –Ask server who to ask next –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

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

16 Negative Caching Remember things that don’t work –Misspellings like and –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

17 DNS Resource Records DNS: distributed db storing resource records (RR) 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) Type=A – name is hostname – value is IP address Type=CNAME – name is alias name for some “canonical” (the real) name is really servereast.backup2.ibm.com – value is canonical name Type=MX – value is name of mailserver associated with name

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

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

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

21 Playing With Dig on UNIX Dig program –Allows querying of DNS system –Use flags to find name server (NS) –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.

22 DNS and the Web

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

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

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

26 Web Server Replicas Popular Web sites can be easily overloaded –Web site often runs on multiple server machines Internet

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

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

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

30 Conclusions Domain Name System –Distributed, hierarchical database –Distributed collection of servers –Caching to improve performance Reading for this week –Sections 9.1 and Rest of this class –Mike Wawrzoniak on Assignment #1 Next class: Internet Control Protocols –Address Resolution Protocol (ARP) –Dynamic Host Configuration Protocol (DHCP) –Internet Control Message Protocol (ICMP)