CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Domain Name System Steve Ko Computer Sciences and Engineering University at Buffalo.

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.
Translating Addresses Reading: Section 4.1 and 9.1 COS 461: Computer Networks Spring 2009 (MW 1:30-2:50 in COS 105) Michael Freedman
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 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.
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.
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Domain Name System Steve Ko Computer Sciences and Engineering University at Buffalo.
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.
Discovery Mike Freedman COS 461: Computer Networks
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)
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Domain Name System Steve Ko Computer Sciences and Engineering University at Buffalo.
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.
Discovery Mike Freedman COS 461: Computer Networks Lectures: MW 10-10:50am in Architecture N101
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,
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)
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.
CSE 486/586 Distributed Systems Case Study: Facebook Photo Stores
Naming in Networking Jennifer Rexford COS 316 Guest Lecture.
Presentation transcript:

CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Domain Name System Steve Ko Computer Sciences and Engineering University at Buffalo

CSE 486/586, Spring 2013 Last Time Two multicast algorithms for total ordering –Sequencer –ISIS Multicast for causal ordering –Uses vector timestamps 2

CSE 486/586, Spring 2013 Review: Causally Ordered Multicast Each process keeps a vector clock. –Each counter represents the number of messages received from each of the other processes. When multicasting a message, the sender process increments its own counter and attaches its vector clock. Upon receiving a multicast message, the receiver process waits until it can preserve causal ordering: –It has delivered all the messages from the sender. –It has delivered all the messages that the sender had delivered before the multicast message. 3

CSE 486/586, Spring 2013 Review: Causal Ordering The number of group-g messages from process j that have been seen at process i so far 4

CSE 486/586, Spring 2013 Example: Causal Ordering Multicast P1 P2 P3 Physical Time (1,1,0) Reject: Accept 0,0,0 1,0,0 1,1,0 1,0,0 Buffer, missing P1(1) 1,1,0 Accept: 1,0,0 Accept Buffered message 1,1,0 (1,0,0) (1,1,0) Accept 5

CSE 486/586, Spring 2013 Today’s Question How do we organize the nodes in a distributed system? Up to the 90’s –Prevalent architecture: client-server (or master-slave) –Unequal responsibilities Now –Emerged architecture: peer-to-peer –Equal responsibilities Studying an example client-server: DNS (today) Studying peer-to-peer as a paradigm (not just as a file-sharing application) –Learn the techniques and principles 6

CSE 486/586, Spring 2013 Separating Names and IP Addresses Names are easier (for us!) to remember – vs IP 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 7

CSE 486/586, Spring 2013 Two Kinds of Identifiers Host name (e.g., –Mnemonic name appreciated by humans –Provides little (if any) information about location –Hierarchical, variable # of alpha-numeric characters IP address (e.g., ) –Numerical address appreciated by routers –Related to host’s current location in the topology –Hierarchical name space of 32 bits 8

CSE 486/586, Spring 2013 Hierarchical Assignment Processes Host name: –Domain: registrar for each top-level domain (e.g.,.edu) –Host name: local administrator assigns to each host IP addresses: –Prefixes: ICANN, regional Internet registries, and ISPs –Hosts: static configuration, or dynamic using DHCP 9

CSE 486/586, Spring 2013 Domain Name System (DNS) Proposed in 1983 by Paul Mockapetris 10

CSE 486/586, Spring 2013 Overview: Domain Name System A client-server architecture –The server-side is still distributed for scalability. –But the servers are still a hierarchy of clients and servers 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 DNS software components –DNS resolvers –DNS servers DNS queries –Iterative queries –Recursive queries DNS caching based on time-to-live (TTL) 11

CSE 486/586, Spring 2013 Strawman Solution #1: 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 12

CSE 486/586, Spring 2013 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 13 Need a distributed, hierarchical collection of servers

CSE 486/586, Spring 2013 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 14

CSE 486/586, Spring 2013 DNS Root Servers 13 root servers (see Labeled A through M 15 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 (+ 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)

CSE 486/586, Spring 2013 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 16

CSE 486/586, Spring 2013 Distributed Hierarchical Database 17 comeduorgac uk zw arpa unnamed root bar westeast foomy ac cam usr in- addr generic domainscountry domains my.east.bar.eduusr.cam.ac.uk /24

CSE 486/586, Spring 2013 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 18

CSE 486/586, Spring 2013 CSE 486/586 Administrivia Please start PA2 if you haven’t. PA1 grades will be out over the coming weekend. AWS codes are distributed on UBLearns. –Will post setup instructions. Practice problem set 1 & midterm example posted on the course website. Moving the midterm from Friday (3/8) to Wednesday (3/6)? Come talk to me! 19

CSE 486/586, Spring 2013 Example Host at cis.poly.edu wants IP address for gaia.cs.umass.edu 20 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

CSE 486/586, Spring 2013 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 21 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

CSE 486/586, Spring 2013 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 22

CSE 486/586, Spring 2013 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 23

CSE 486/586, Spring 2013 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 24 RR format: (name, value, type, ttl) Type=A –name is hostname –value is IP address Type=CNAME –name is alias for some “canonical” (the real) name: is really srveast.backup2.ibm.com –value is canonical name Type=MX –value is name of mailserver associated with name

CSE 486/586, Spring 2013 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 25

CSE 486/586, Spring 2013 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 Play with “dig” on UNIX 26

CSE 486/586, Spring 2013 $ dig nytimes.com ANY ; QUESTION SECTION: ;nytimes.com.INANY ;; ANSWER SECTION: nytimes.com.267INMX100 NYTIMES.COM.S7A1.PSMTP.com. nytimes.com.267INMX200 NYTIMES.COM.S7A2.PSMTP.com. nytimes.com.267INA nytimes.com.267INA nytimes.com.267INTXT "v=spf1 mx ptr ip4: /24 include:alerts.wallst.com include:authsmtp.com ~all" nytimes.com.267INSOAns1t.nytimes.com. root.ns1t.nytimes.com nytimes.com.267INNSnydns2.about.com. nytimes.com.267INNSns1t.nytimes.com. nytimes.com.267INNSnydns1.about.com. ;; AUTHORITY SECTION: nytimes.com.267INNSnydns1.about.com. nytimes.com.267INNSns1t.nytimes.com. nytimes.com.267INNSnydns2.about.com. ;; ADDITIONAL SECTION: nydns1.about.com.86207INA nydns2.about.com.86207INA

CSE 486/586, Spring $ dig nytimes.com ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 13, ADDITIONAL: 14 ;; QUESTION SECTION: ;nytimes.com.INA ;; AUTHORITY SECTION: com INNSK.GTLD-SERVERS.NET. com INNSE.GTLD-SERVERS.NET. com INNSD.GTLD-SERVERS.NET. com INNSI.GTLD-SERVERS.NET. com INNSC.GTLD-SERVERS.NET. ;; ADDITIONAL SECTION: A.GTLD-SERVERS.NET INA A.GTLD-SERVERS.NET INAAAA2001:503:a83e::2:30 B.GTLD-SERVERS.NET INA B.GTLD-SERVERS.NET INAAAA2001:503:231d::2:30 C.GTLD-SERVERS.NET INA D.GTLD-SERVERS.NET INA E.GTLD-SERVERS.NET INA ;; Query time: 76 msec ;; SERVER: #53( ) ;; WHEN: Mon Feb 23 11:24: ;; MSG SIZE rcvd: 501

CSE 486/586, Spring $ dig nytimes.com ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;nytimes.com.INA ;; AUTHORITY SECTION: nytimes.com INNSns1t.nytimes.com. nytimes.com INNSnydns1.about.com. nytimes.com INNSnydns2.about.com. ;; ADDITIONAL SECTION: ns1t.nytimes.com INA nydns1.about.com INA nydns2.about.com INA ;; Query time: 103 msec ;; SERVER: #53( ) ;; WHEN: Mon Feb 23 11:24: ;; MSG SIZE rcvd: 144

CSE 486/586, Spring $ dig nytimes.com ANY ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: ;; flags: qr aa; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 1 ;; QUESTION SECTION: ;nytimes.com.INANY ;; ANSWER SECTION: nytimes.com. 300INSOAns1t.nytimes.com. root.ns1t.nytimes.com nytimes.com. 300INMX200 NYTIMES.COM.S7A2.PSMTP.com. nytimes.com. 300INMX100 NYTIMES.COM.S7A1.PSMTP.com. nytimes.com. 300INNSns1t.nytimes.com. nytimes.com. 300INNSnydns1.about.com. nytimes.com. 300INNSnydns2.about.com. nytimes.com. 300INA nytimes.com. 300INA nytimes.com. 300INA nytimes.com. 300INTXT"v=spf1 mx ptr ip4: /24 include:alerts.wallst.com include:authsmtp.com ~all" ;; ADDITIONAL SECTION: ns1t.nytimes.com.300INA ;; Query time: 10 msec ;; SERVER: #53( ) ;; WHEN: Mon Feb 23 11:25: ;; MSG SIZE rcvd: 454

CSE 486/586, Spring 2013 Content Distribution Networks (CDNs) Content providers are CDN customers Content replication CDN company installs thousands of servers throughout Internet –I n large datacenters –Or, close to users CDN replicates customers’ content When provider updates content, CDN updates servers origin server in North America CDN distribution node CDN server in S. America CDN server in Europe CDN server in Asia 31

CSE 486/586, Spring 2013 Content Distribution Networks Replicate content on many servers Challenges –How to replicate content –Where to replicate content –How to find replicated content –How to choose among replicas –How to direct clients towards a replica 32

CSE 486/586, Spring 2013 Server Selection Which server? –Lowest load: to balance load on servers –Best performance: to improve client performance »Based on what? Location? RTT? Throughput? Load? –Any alive node: to provide fault tolerance How to direct clients to a particular server? –As part of routing: anycast, cluster load balancer –As part of application: HTTP redirect –As part of naming: DNS 33

CSE 486/586, Spring 2013 HTTP How Akamai Works End-user cnn.com (content provider) DNS root server 12 Nearby Akamai cluster GET index. html 34 m/foo.jpg HTTP Akamai cluster Akamai global DNS server Akamai regional DNS server

CSE 486/586, Spring 2013 HTTP How Akamai Works End-user cnn.com (content provider) DNS root server 12 Nearby Akamai cluster 35 DNS lookup cache.cnn.com Akamai cluster 3 4 ALIAS: g.akamai.net Akamai global DNS server Akamai regional DNS server

CSE 486/586, Spring 2013 HTTP How Akamai Works End-user cnn.com (content provider) DNS root server 12 Akamai global DNS server Akamai regional DNS server Nearby Akamai cluster 36 Akamai cluster ALIAS a73.g.akamai.net DNS lookup g.akamai.net

CSE 486/586, Spring 2013 HTTP How Akamai Works End-user cnn.com (content provider) DNS root server 12 Akamai global DNS server Akamai regional DNS server Nearby Akamai cluster 37 Akamai cluster DNS a73.g.akamai.net Address

CSE 486/586, Spring 2013 HTTP How Akamai Works End-user cnn.com (content provider) DNS root server 12 Akamai global DNS server Akamai regional DNS server Nearby Akamai cluster 38 Akamai cluster GET /foo.jpg Host: cache.cnn.com

CSE 486/586, Spring 2013 HTTP How Akamai Works End-user cnn.com (content provider) DNS root server 12 Akamai global DNS server Akamai regional DNS server Nearby Akamai cluster 39 Akamai cluster GET /foo.jpg Host: cache.cnn.com GET foo.jpg

CSE 486/586, Spring 2013 HTTP How Akamai Works End-user cnn.com (content provider) DNS root server 12 Akamai global DNS server Akamai regional DNS server Nearby Akamai cluster 40 Akamai cluster

CSE 486/586, Spring 2013 Summary DNS as an example client-server architecture Why? –Names are easier (for us!) to remember –IP addresses can change underneath –Name could map to multiple IP addresses –Map to different addresses in different places –Multiple names for the same address Properties of DNS –Distributed over a collection of DNS servers Hierarchy of DNS servers –Root servers, top-level domain (TLD) servers, authoritative DNS servers 41

CSE 486/586, Spring Acknowledgements These slides contain material developed and copyrighted by Indranil Gupta (UIUC), Michael Freedman (Princeton), and Jennifer Rexford (Princeton).