Domain Name System (DNS) and Content Delivery Networks (CDNs)

dns and cdns n.w
1 / 59
Embed
Share

Explore the fundamentals of DNS and CDNs in computer networks, covering topics such as domain organization, address conversion protocols, the importance of domain names, and the process of translating domain names to IP addresses. Discover the challenges and complexities involved in navigating, caching, and processing domain names for efficient communication in network protocols.

  • DNS
  • CDNs
  • Computer Networks
  • Domain Name System
  • Address Conversion

Uploaded on | 2 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. DNS and CDNs 14-740: Fundamentals of Computer Networks (Spring 2018) Credit: Bill Nace, 14-740, Fall 2017 Material from Computer Networking: A Top Down Approach, 6thedition. J.F. Kurose and K.W. Ross

  2. Overheard among Kesden and his students Student: I looked everywhere: The slides, notes, textbook, readings, Wikipedia, Google, and the whiteboard near your office I didn t find the answer to the homework question anywhere. Kesden: Yeah. I know. Hint: Think about it. Chat with your peers. Chat with the TAs. Chat with Kesden. Homework is like trivia/boardgame night. : A great way to meet people and chat! 14-740: Spring 2018

  3. Last lecture Application level protocols Ignore details of transport and below Included example of how abstraction sometimes is incomplete HTTP Request / Response messages Parallel, Persistent, Pipelining Caching 14-740: Spring 2018 3

  4. traceroute Overview DNS: Domain Name System The Protocol Organization of domains, zones, nameservers Content Distribution Networks 14-740: Spring 2018 4

  5. Address Conversion Protocols often have their own address mechanism URL, Domain Names, Ports, IP, MAC, ... Designed w/requirements of that protocol Conversion needed when communication traverses protocols (layer boundaries) 14-740: Spring 2018 5

  6. A Need for Domain Names? The venerable Dr Amend (Foxtrot) saith... 14-740: Spring 2018 6

  7. Characteristics of a Name Human readable String, often variable length Format is important: [Title][f_initial][l_name] Generally not unique Perhaps unique in a particular area Siblings don t have same first name Computers have trouble with names Hard to process and store 14-740: Spring 2018 7

  8. Translating a Domain Name Application sends a request to a DNS server Who answers with an IP address Complications: Navigation Caching 14-740: Spring 2018 8

  9. Where is www.cmuj.jp ? 60.43.157.130

  10. traceroute Overview DNS: Domain Name System The Protocol Organization of domains, zones, nameservers Content Distribution Networks 14-740: Spring 2018 10

  11. What is DNS? A directory1service for the Internet Translates ( maps ) names to IP addresses plus some other services A distributed database Implemented in a hierarchy of name servers Name servers are distributed globally Maintained / administered by different organizations An application-layer protocol Allows host to query the database and handle replies 1 Pedantic Warning: I use the term directory very loosely in this context. True directory services are related, but different. 14-740: Spring 2018 11

  12. DNS History DNS created in early 1980s IETF process RFC 1034, 1035 Documented in Mockapetris88 DNS has grown since then How many pages is original RFC? 53 pages How many subsequent RFCs are there? 219 (see list at statdns.com/rfc/ ) 14-740: Spring 2018 13

  13. DNS Services Host name to IP address translation Mapping www.ini.cmu.edu 128.2.131.60 Host aliasing Mapping between alias and canonical hostnames Canonical: real, difficult to remember www-cmu-prod-vip.andrew.cmu.edu (try it!) Alias: shorter, easier to remember www.cmu.edu 14-740: Spring 2018 14

  14. DNS Services (2) Mail server aliasing Similar to host aliasing, but for mail servers you@andrew.cmu.edu alias of andrew-mx-0[1-6].andrew.cmu.edu you@cmu.edu alias of cmu-mx-0[1-4].andrew.cmu.edu Try it! 14-740: Spring 2018 15

  15. DNS Services (3) Load distribution across replicated servers A name can map to multiple hosts thus multiple addresses DNS server returns all addresses but rotates ordering ex: for mx3.aplace.edu, one of a group of 4 servers 1st request returns address for: mx3, mx4, mx1, mx2 2nd request returns: mx4, mx1, mx2, mx3 Why a list? Why not just return first address? 14-740: Spring 2018 16

  16. traceroute Overview DNS: Domain Name System The Protocol Organization of domains, zones, nameservers Content Distribution Networks 14-740: Spring 2018 17

  17. DNS Protocol Simple query and reply mechanism Runs over UDP on port 53 as recommended by RFC 1035 Exception: zone transfer (records of entire zone) TCP for reliable delivery Exception: Answers longer than 512 bytes TCP for bulk data transfer 14-740: Spring 2018 18

  18. UDP? Why UDP? Shouldn t this be a reliable protocol? DNS is not real-time audio or video! DNS client handles retransmission Try other servers before repeating same query to same server TCP set-up takes longer Query and reply are very short (payload is limited to 512 bytes) so overhead is excessive 14-740: Spring 2018 20

  19. Protocol Query and reply messages Both use the same message format Data being queried is in a form known as Resource Record (RR) 14-740: Spring 2018 21

  20. Resource Records Each server stores some resource records (RRs) Each RR is a 5-tuple: (Name, Value, Type, Class, TTL) Name: Owner name, depends on type Value: Value associated with name Type: Denotes type of RR Class: Almost always IN (Internet) TTL: Cache timeout value, 32-bits, in seconds a zero value means do not cache Size limits 63 bytes for labels (parts of domain name separated by dots) 255 bytes for names 14-740: Spring 2018 22

  21. Types A = Address (AAAA for IPv6 address) Name = hostname, e.g. pi.ece.cmu.edu Value = IP address, e.g. 31.41.59.26 NS = Nameserver Name = domain, e.g. cmu.edu Value = hostname of an authoritative name server, e.g. dns.cmu.edu 14-740: Spring 2018 23

  22. Types (2) CNAME = Canonical Name Name = alias hostname, e.g. www.cmu.edu Value = canonical (real) hostname, e.g. www-cmu-prod-vip.andrew.cmu.edu MX = Mail Exchange Name = alias hostname, e.g. cmu.edu Value = hostname of a mail server, e.g. cmu-mx-03.andrew.cmu.edu 14-740: Spring 2018 24

  23. Types (3) There are 32 other types defined for a variety of uses Research project: Look up the SINK type 14-740: Spring 2018 25

  24. Message Format Message Header (12 bytes) Identification: 16 bit number Reply uses same id as query Flags (1 bit each) query or reply recursion desired recursion available reply is authoritative ... and others 4 Bytes identification flags number of questions number of answer RRs number of authority RRs number of additional RRs questions (variable number of questions) answers (variable number of RRs) authority (variable number of RRs) additional information (variable number of RRs)

  25. Message Format 4 Bytes Message Payload (no more than 500 bytes) Sequence of name, type fields for a query RRs in response to a query RRs for authoritative servers Additional helpful information identification flags number of questions number of answer RRs number of authority RRs number of additional RRs questions (variable number of questions) answers (variable number of RRs) authority (variable number of RRs) additional information (variable number of RRs)

  26. What if your DNS server doesn t know the answer? Where is www.cmuj.jp ? I don t know. Ask .jp nameserver

  27. Navigation How a client traverses nameservers in search of an answer is called navigation Iterative Navigation Client asks a series of NS Each NS responds with a pointer to another NS with more info Client eventually asks the authoritative server Answer Client NS2 ? ? NS2 NS0 ? NS1 ? Local NS NS0 NS1

  28. Server controlled navigation Server may take over navigation job from client Reduces response bandwidth Results can be cached in a manner useful to other clients Some domains limit access to DNS for security reasons Two forms Non-recursive: server iterates Recursive: Each NS takes over the job, sends results Client Answer NS2 ? ? Answer NS2 ? Local NS NS0 NS1 NS1 ? Client NS2 ? Answer Answer ? Answer Answer Local NS NS0 NS1 ? ?

  29. Caching Once (any) name server learns mapping, it caches mapping Cache entries timeout (disappear) after some time Controlled by the TTL of that RR Default TTL is 2 days TLD servers typically cached in local name servers Thus root name servers not often visited 14-740: Spring 2018 31

  30. traceroute Overview DNS: Domain Name System The Protocol Organization of domains, zones, nameservers Content Distribution Networks 14-740: Spring 2018 32

  31. Distributed, Hierarchical Design Why not a central server? (RFC-811) Single point of failure If the only DNS server crashes, the entire Internet dies Immense traffic volume Needs to handle all query requests for entire world Location? Close to some, far from others Maintenance Nightmare to get records updated Doesn t scale! 14-740: Spring 2018 33

  32. Domain Name Types ICANN registers TLDs, manages IANA Registrars assign within TLD Verisign: .com Educause: .edu Japan Registry Services: .jp ISO 3166-1 lists country codes Not the same as name server hierarchy!

  33. Domain Namespace Hierarchical structure Written in a dot-separated form, from specific to general ignoring the root

  34. Name Server Hierarchy Types of DNS name servers Root Top-level domain (TLD) Authoritative Local

  35. Mapping name to server Administrative authority doesn t always match namespace hierarchy Some organizations want to maintain their own name server Others don t ex: CMU s CS dept wants to run their own name server. Drama doesn t, but still wants drama.cmu.edu name 14-740: Spring 2018 37

  36. Zones Namespace hierarchy is partitioned into subtrees called zones Each zone corresponds to authority over that portion of the namespace Also represents the unit of implementation -- the nameserver Authority is delegated from parent to child Parent: CMU child: CS 14-740: Spring 2018 38

  37. Zones

  38. Zones An organization should be able to have its own domain, even though it lacks resources to support DNS One nameserver can also support many zones (think hosting company) Zone owner must: Maintain zone data Run redundant nameservers 14-740: Spring 2018 40

  39. Zones Nameservers

  40. Root Nameservers 13 root servers (labeled A through M) Each server is actually a cluster of replicated servers (i.e. C server has 8 sites) 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) k RIPE London (also Amsterdam, Frankfurt) i Autonomica, Stockholm (plus 3 other locations) m WIDE Tokyo e NASA Mt View, CA f Internet Software C. Palo Alto, CA (and 17 other locations) b USC-ISI Marina del Rey, CA l ICANN Los Angeles, CA

  41. Globally Distributed Map courtesy of www.root-servers.org. Data as of 7 Sep 13

  42. Root Servers Job Root nameserver knows TLD nameservers and their IP addresses Q: How do I get to www.library.cmu.edu? A: I don t exactly know, but you should ask the .edu TLD server at: l3.nstld.com, 192.41.162.32 d2.nstld.com, 192.31.80.32 and others 14-740: Spring 2018 44

  43. Root servers dont know much One small zonefile Contains names and IP addresses of authoritative DNS servers for each TLD Small (2.3MB as of 15 Sep 2017) Changes infrequently (every couple of days) 14-740: Spring 2018 45

  44. K Root Name Server Operated by RIPE NW Coordination Center k.root-servers.org London, Amsterdam, Athens, Brisbane, Tokyo, Delhi etc How many queries per second do you think a root server receives? 14-740: Spring 2018 47

  45. TLD Name Servers Top-level domain (TLD) servers Responsible for gTLDs com, org, net, edu, ... and ccTLDs uk, fr, ca, jp ... Versign maintains servers for com TLD EDUCAUSE for edu TLD 14-740: Spring 2018 48

  46. TLD NSs Job Knows the authoritative (or intermediate) name servers of its domain and their IP addresses Q: How do I get to www.library.cmu.edu? A: I don t exactly know, but you can ask the name server for cmu.edu, at one of these places: t-ns1.net.cmu.edu, 128.2.4.14 cabbage.srv.cs.cmu.edu, 128.2.194.121 And others Note this is not the authoritative NS for the library 14-740: Spring 2018 49

  47. Authoritative NS Organization s DNS servers Provides authoritative hostname to IP mappings for organization s servers (e.g., Web and mail) Authoritative: Actually knows the answer Can be maintained by organization or service provider 14-740: Spring 2018 50

  48. Authoritative NSs Job Q: How do I get to www.library.cmu.edu? A: I know! libsearch-vip.andrew.cmu.edu 128.2.42.76 Authoritative!

  49. Local Name Server Does not strictly belong to hierarchy Each ISP (residential ISP, company, university, etc) has one Also called default name server or resolver When a host makes a DNS query, query is sent to its local DNS server Acts as a proxy, forwards query into hierarchy 14-740: Spring 2018 52

  50. traceroute Overview DNS: Domain Name System The Protocol Organization of domains, zones, nameservers Content Distribution Networks 14-740: Spring 2018 53

Related


More Related Content