DOC PREVIEW
CMU CS 15441 - Domain Name System (DNS)

This preview shows page 1-2-3-27-28-29 out of 29 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Domain Name System (DNS) Professor Hui ZhangNames, Addresses, MappingDNS: Mapping between Name and AddressObvious Solutions (1)Obvious Solutions (2)Domain Name System GoalsProgrammer’s View of DNSProperties of DNS Host EntriesDNS RecordsDNS Message FormatDNS Design: Hierarchy DefinitionsServers/ResolversRecursive DNS Name ResolutionIterative DNS Name ResolutionTypical ResolutionSlide 16PrefetchingCachingSlide 19Subsequent Lookup ExampleReliabilityTracing Hierarchy (1)Tracing Hierarchy (2)Tracing Hierarchy (3 & 4)Reverse DNS.arpa Name Server HierarchyKey ConceptsDNS (Summary)DNS Header Fields1Domain Name System (DNS)Professor Hui Zhang2Hui ZhangNames, Addresses, MappingBinding Names to ObjectsARP: mapping between layer 2 address and IP addressDHCP: getting a new IP addressHow to implement?3Hui ZhangDNS: Mapping between Name and AddressWhy do we names?How do we efficiently locate resources?DNS: name  IP addressChallengeHow do we scale these to the wide area?4Hui ZhangObvious Solutions (1)Why not centralize DNS?Single point of failureTraffic volumeDistant centralized databaseSingle point of updateDoesn’t scale!5Hui ZhangObvious 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 updates6Hui ZhangDomain Name System GoalsBasically a wide-area distributed databaseScalabilityDecentralized maintenanceRobustnessGlobal scope Names mean the same thing everywhereDon’t needAtomicityStrong consistency7Hui ZhangProgrammer’s View of DNSConceptually, programmers can view the DNS database as a collection of millions of host entry structures:in_addr is a struct consisting of 4-byte IP addressFunctions for retrieving host entries from DNS:gethostbyname: query key is a DNS host name.gethostbyaddr: query key is an IP address./* DNS host entry structure */ struct hostent { char *h_name; /* official domain name of host */ char **h_aliases; /* null-terminated array of domain names */ int h_addrtype; /* host address type (AF_INET) */ int h_length; /* length of an address, in bytes */ char **h_addr_list; /* null-terminated array of in_addr structs */ };8Hui ZhangProperties of DNS Host EntriesDifferent kinds of mappings are possible:Simple case: 1-1 mapping between domain name and IP addr:–kittyhawk.cmcl.cs.cmu.edu maps to 128.2.194.242Multiple domain names maps to the same IP address:–eecs.mit.edu and cs.mit.edu both map to 18.62.1.6Single domain name maps to multiple IP addresses:–aol.com and www.aol.com map to multiple IP addrs.Some valid domain names don’t map to any IP address:–for example: cmcl.cs.cmu.edu9Hui ZhangDNS RecordsRR format: (class, name, value, type, ttl)DB contains tuples called resource records (RRs)Classes = Internet (IN), Chaosnet (CH), etc.Each class defines value associated with typeFOR IN class:Type=Aname is hostnamevalue is IP addressType=NSname is domain (e.g. foo.com)value is name of authoritative name server for this domain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 name10Hui ZhangDNS Message FormatIdentificationNo. of QuestionsNo. of Authority RRsQuestions (variable number of answers)Answers (variable number of resource records)Authority (variable number of resource records)Additional Info (variable number of resource records)FlagsNo. of Answer RRsNo. of Additional RRsName, type fields for a queryRRs in response to queryRecords for authoritative serversAdditional “helpful info that may be used12 bytes11Hui ZhangDNS Design: Hierarchy Definitionsrootedunetorgukcomgwu ucb cmu bumitcsececmcl•Each node in hierarchy stores a list of names that end with same suffix•Suffix = path up tree•E.g., given this tree, where would following be stored:•Fred.com•Fred.edu•Fred.cmu.edu•Fred.cmcl.cs.cmu.edu•Fred.cs.mit.edu12Hui ZhangServers/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Either responsible for some zone or…Local servers–Do lookup of distant host names for local hosts–Typically answer queries about local zone13Hui ZhangRecursive DNS Name ResolutionNonlocal LookupRecursively from root server downwardResults passed upCachingResults stored in caches along each hopCan shortcircuit lookup when cached entry presentedu comcmucskittyhawk128.2.194.242cmclunnamed rootsomeplacewww208.216.181.15RootServer.eduServerCMUServerCMU CSServerLocalServer.comServer1234567891014Hui ZhangIterative DNS Name ResolutionNonlocal LookupAt each step, server returns name of next server downLocal server directly queries each successive serverCachingLocal server builds up cache of intermediate translationsHelps in resolving names xxx.cs.cmu.edu, yy.cmu.edu, and z.eduedu comcmucskittyhawk128.2.194.242cmclunnamed rootsomeplacewww208.216.181.15RootServer.eduServerCMUServerCMU CSServerLocalServer.comServer1249675831015Hui ZhangTypical ResolutionClientLocal DNS serverroot & edu DNS serverns1.cmu.edu DNS serverwww.cs.cmu.eduNS ns1.cmu.eduwww.cs.cmu.eduNS ns1.cs.cmu.eduA www=IPaddrns1.cs.cmu.eduDNSserver16Hui ZhangTypical ResolutionSteps for resolving www.cmu.eduApplication calls gethostbyname() (RESOLVER)Resolver contacts local name server (S1)S1 queries root server (S2) for (www.cmu.edu)S2 returns NS record for cmu.edu (S3)What about A record for S3?–This is what the additional information section is for (PREFETCHING)S1 queries S3 for www.cmu.eduS3 returns A record for www.cmu.eduCan return multiple A records  what does this mean?17Hui ZhangPrefetchingName servers can add additional data to responseTypically used for prefetchingCNAME/MX/NS typically point to another host nameResponses include address of host referred to in “additional section”18Hui ZhangCaching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.


View Full Document

CMU CS 15441 - Domain Name System (DNS)

Documents in this Course
lecture

lecture

34 pages

lecture

lecture

38 pages

lecture

lecture

18 pages

lecture

lecture

28 pages

lecture

lecture

11 pages

Lecture

Lecture

64 pages

lecture

lecture

10 pages

lecture

lecture

19 pages

Lecture 6

Lecture 6

43 pages

Exam

Exam

14 pages

lecture

lecture

38 pages

Debugging

Debugging

23 pages

lecture

lecture

60 pages

review

review

27 pages

lecture

lecture

12 pages

The Web

The Web

28 pages

Lecture

Lecture

40 pages

lecture

lecture

42 pages

lecture

lecture

9 pages

lecture

lecture

10 pages

lecture

lecture

49 pages

lecture

lecture

26 pages

Project

Project

5 pages

lecture

lecture

40 pages

lecture

lecture

9 pages

lecture

lecture

41 pages

lecture

lecture

32 pages

lecture

lecture

36 pages

lecture

lecture

34 pages

lecture

lecture

45 pages

lecture

lecture

26 pages

lecture

lecture

6 pages

lecture

lecture

51 pages

Project

Project

16 pages

lecture

lecture

44 pages

lecture

lecture

13 pages

lecture

lecture

42 pages

lecture

lecture

36 pages

Project

Project

13 pages

Project

Project

33 pages

lecture

lecture

43 pages

lecture

lecture

49 pages

Load more
Download Domain Name System (DNS)
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Domain Name System (DNS) and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Domain Name System (DNS) 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?