/
CS 352 Name Resolution Lecture 4 CS 352 Name Resolution Lecture 4

CS 352 Name Resolution Lecture 4 - PowerPoint Presentation

roxanne
roxanne . @roxanne
Follow
27 views
Uploaded On 2024-02-09

CS 352 Name Resolution Lecture 4 - PPT Presentation

httpwwwcsrutgersedusn624352F22 Srinivas Narayana 1 Review of concepts Propagation Transmission Queueing Bandwidth Application process User space Kernel space Socket Clientserver architecture ID: 1045633

server dns query rutgers dns server rutgers query domain address umass serverdns message protocol type root format www parameters

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "CS 352 Name Resolution Lecture 4" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1. CS 352Name ResolutionLecture 4http://www.cs.rutgers.edu/~sn624/352-F22Srinivas Narayana1

2. Review of conceptsPropagationTransmissionQueueingBandwidthApplication processUser spaceKernel spaceSocketClient-server architecturePeer to peer architectureIPAportAIPBportBconnect(IPB, portB)send(data)bind(IPB, portB)listen()accept()recv(data)SocketOS network stack layersOS network stack layersInternetConnection 4-tupleApplication processgethostbyname()DNS: turn human-readable addresses into IP addresses.

3. Key idea: Implement a server that looks up a table.Will this scale?Every new (changed) host needs to be (re)entered in this tablePerformance: can the server serve billions of Internet users?Failure: what if the server or the database crashes?Security: What if someone “takes over” this server?3DOMAIN NAMEIP ADDRESSspotify.com98.138.253.109cs.rutgers.edu128.6.4.2www.google.com74.125.225.243www.princeton.edu128.112.132.86QUERY cs.rutgers.eduRESPONSE 128.6.4.2<Client IP, CPort, DNS server IP, 53> <DNS server, 53, Client IP, Cport> Simple DNS

4. 4Root DNS Serverscom DNS serversorg DNS serversedu DNS serversrutgers.eduDNS serversumass.eduDNS serversgoogle.comDNS serversamazon.comDNS serverswnyc.orgDNS serverscs.rutgers.edu DNS serverRFC 1034Distributed and hierarchical databaseTop-level domain (TLD) serversAuthoritative name serverHierarchyReplication

5. DNS ProtocolClient-server applicationClient connects to (known) port 53 on server For now, assume DNS server IP knownTwo types of messagesQueriesResponsesType of Query (OPCODE)Standard query (0x0)e.g., Request IP address for a given domain nameUpdates (0x5)Provide a binding of IP address to domain nameEach type has a common message format that follows the header5

6. 6DNS protocol : query and reply messages, both with same message formatMessage headerQR = 0 for Query, 1 for responseOpcode= 0 standardidentification: 16 bit # for query, reply to query uses same #flags:Authoritative answerrecursion desired recursion availablereply is authoritativeQROpcodeDNS protocol: Message format

7. 7Name, type fields for a queryResource records in response to queryrecords forauthoritative serversInformation about nameserveradditional “helpful”info that may be usedQROPCODEDNS protocol: Message format

8. 8DNS Protocol: ActionsWhen client wants to know an IP address for a host nameClient sends a DNS query to the “local” name server in its networkIf name server contains the mapping, it returns the IP address to the clientOtherwise, the name server forwards the request to the root name serverThe request works its way down the DNS hierarchy until it reaches a name server with a mapping for the requested name

9. 9requesting hostcs.rutgers.edugaia.cs.umass.eduroot DNS serverlocal DNS serverdns.rutgers.edu123456umass.edu DNS serverdns.umass.edu78.edu DNS serverHost at cs.rutgers.edu wants IP address for gaia.cs.umass.eduLocal DNS serverRoot DNS serverTLD DNS serverAuthoritative DNS serverExample

10. 10requesting hostcs.rutgers.edugaia.cs.umass.eduroot DNS serverlocal DNS serverdns.rutgers.edu123456umass.edu DNS serverdns.umass.edu78.edu DNS serverIterative queryContacted server replies with name of server to contact“I don’t know this name, but ask this other server”Queries are iterative from POV of the local DNS serverQuery type

11. 11requesting hostcs.rutgers.edugaia.cs.umass.eduroot DNS serverlocal DNS serverdns.rutgers.edu12456umass.edu DNS serverdns.umass.edu78.edu DNS server3Query typeRecursive query:Puts burden of name resolution on the contacted (e.g., root) name serverQuery to root DNS server is recursive from POV of localProblem: think about load on the root DNS server. Must it answer every DNS query?

12. 12Once (any) name server learns a name to IP address mapping, it caches the mappingCache entries timeout (disappear) after some timeTLD servers typically cached in local name serversIn practice, root name servers aren’t visited often!Caching is pervasive in DNSDNS caching

13. DNS in actiondig <domain-name>dig +trace <domain-name>dig @<dns-server> <domain-name>Don’t just watch; try it!

14. 14Bootstrapping DNSHow does a host contact the name server if all it has is the domain name and no (name server) IP address? IP address of at least 1 nameserver (usually, a local resolver) must be known a priori The name server may be bootstrapped “statically”, e.g.,File /etc/resolv.conf in unixStart -> settings-> control panel-> network ->TCP/IP -> properties in windows … or with another protocol!DHCP: Dynamic Host Configuration Protocol (more on this later)

15. DNS may seem “basic”, low level, but …

16. DNS Resource Records

17. DNS is a distributed databaseDNS stores resource records (RRs)(Incomplete) message format for each resource record (RR):Class, type, name, value, TTLYou can read all the gory details of the message format at https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml

18. 18DNS recordsType=NSname is domain (e.g. foo.com)value is hostname of authoritative name server for this domainType=Aname is hostnamevalue is IPv4 addressType=CNAMEname is alias name for some “canonical” (the real) name e.g., www.ibm.com is really servereast.backup2.ibm.comvalue is canonical nameType=MXvalue is name of mailserver associated with nameType=AAAAname is hostnamevalue is IPv6 addressMore complete info at https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml

19. DNS record example19NAMEDesign.cs.rutgers.eduTYPEACLASSINTTL1 day(86400)ADDRESS192.26.92.30NAMECs.rutgers.eduTYPENSCLASSINTTL1 day(86400)NSDNAMENs-lcsr.rutgers.eduRRs in responseto queryrecords forauthoritative serversInformation about nameserverDNS serves as a general repository of information for the Internet!

20. DNS record typesdig –t <type> <domain-name>

21. 21Hostname to IP address translation via a global network of serversEmbodies several scaling principlesPartition through a hierarchy to silo query loadReplication to scale out at each level of hierarchyCaching to reduce query loadOnce you have a reliable DB, can implement many useful things on top! Example 1: Scaling large web services, e.g., google search, by redirecting different clients to different servers (IP addresses)Reliability, load balancing, performance optimizationExample 2: Associating certificates, keys (security info) with domain nameshttps://www.rfc-editor.org/rfc/rfc8162.htmlhttps://datatracker.ietf.org/doc/draft-ietf-dnsop-svcb-https/00/Summary of DNS