DOC PREVIEW
Berkeley COMPSCI 268 - Lecture Notes

This preview shows page 1-2-14-15-29-30 out of 30 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 30 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 30 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 30 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 30 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 30 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 30 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 30 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1 CS 268: Computer Networking L-18 DNS and the Web 2 DNS and the Web • DNS • CDNs • Readings • DNS Performance and the Effectiveness of Caching • Development of the Domain Name System2 3 Naming • How do we efficiently locate resources? • DNS: name  IP address • Service location: description  host • Other issues • How do we scale these to the wide area? • How to choose among similar services? 4 Overview • DNS • Server Selection and CDNs3 5 Obvious Solutions (1) Why not centralize DNS? • Single point of failure • Traffic volume • Distant centralized database • Single point of update • Doesn’t scale! 6 Obvious 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 updates4 7 Domain Name System Goals • Basically building a wide area distributed database • Scalability • Decentralized maintenance • Robustness • Global scope • Names mean the same thing everywhere • Don’t need • Atomicity • Strong consistency 8 DNS Records RR 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 type FOR 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 name5 9 DNS Design: Hierarchy Definitions root edu net org uk com gwu cmu berkeley bu mit cs eecs • 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.berkeley.edu • Fred.cs.berkeley.edu • Fred.cs.mit.edu 10 DNS Design: Zone Definitions root edu net org uk com ca gwu cmu ucb bu mit cs eecs radlab Single node Subtree Complete Tree • Zone = contiguous section of name space • E.g., Complete tree, single node or subtree • A zone has an associated set of name servers6 11 DNS Design: Cont. • Zones are created by convincing owner node to create/delegate a subzone • Records within zone stored multiple redundant name servers • Primary/master name server updated manually • Secondary/redundant servers updated by zone transfer of name space • Zone transfer is a bulk transfer of the “configuration” of a DNS server – uses TCP to ensure reliability • Example: • CS.Berkeley.EDU created by Berkeley.EDU administrators 12 Servers/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 zone7 13 DNS: Root Name Servers • Responsible for “root” zone • Approx. dozen root name servers worldwide • Currently {a-m}.root-servers.net • Local name servers contact root servers when they cannot resolve a name • Configured with well-known root servers 14 DNS Message Format Identification No. of Questions No. of Authority RRs Questions (variable number of answers) Answers (variable number of resource records) Authority (variable number of resource records) Additional Info (variable number of resource records) Flags No. of Answer RRs No. of Additional RRs Name, type fields for a query RRs in response to query Records for authoritative servers Additional “helpful info that may be used 12 bytes8 15 DNS Header Fields • Identification • Used to match up request/response • Flags • 1-bit to mark query or response • 1-bit to mark authoritative or not • 1-bit to request recursive resolution • 1-bit to indicate support for recursive resolution 16 Typical Resolution Client Local DNS server root & edu DNS server ns1.berkeley.edu DNS server www.cs.berkeley.edu NS ns1.berkeley.edu www.cs.berkeley.edu NS ns1.cs.berkeley.edu A www=IPaddr ns1.cs.berkeley.edu DNS server9 17 Typical Resolution • Steps for resolving www.berkeley.edu • Application calls gethostbyname() (RESOLVER) • Resolver contacts local name server (S1) • S1 queries root server (S2) for (www.berkeley.edu) • S2 returns NS record for berkeley.edu (S3) • What about A record for S3? • This is what the additional information section is for (PREFETCHING) • S1 queries S3 for www.berkeley.edu • S3 returns A record for www.berkeley.edu • Can return multiple A records  what does this mean? 18 Lookup Methods Recursive query: • Server goes out and searches for more info (recursive) • Only returns final answer or “not found” Iterative query: • Server responds with as much as it knows (iterative) • “I don’t know this name, but ask this server” Workload impact on choice? • Local server typically does recursive • Root/distant server does iterative requesting host surf.eurecom.fr gaia.cs.umass.edu root name server local name server dns.eurecom.fr 1 2 3 4 5 6 authoritative name server dns.cs.umass.edu intermediate name server dns.umass.edu 7 8 iterated query10 19 Workload and Caching • What workload do you expect for different servers/names? • Why might this be a problem? How can we solve this problem? • 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. misspellings, search strings in resolv.conf • Cached data periodically times out • Lifetime (TTL) of data controlled by owner of data • TTL passed with every record 20 Typical Resolution Client Local DNS server root & edu DNS server ns1.berkeley.edu DNS


View Full Document

Berkeley COMPSCI 268 - Lecture Notes

Documents in this Course
Lecture 8

Lecture 8

33 pages

L-17 P2P

L-17 P2P

50 pages

Multicast

Multicast

54 pages

Load more
Download Lecture Notes
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 Lecture Notes 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 Lecture Notes 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?