name service domain name system dns
play

Name service Domain Name System (DNS) Name : identifier Need a - PowerPoint PPT Presentation

Name service Domain Name System (DNS) Name : identifier Need a system: Name IP address computers, services, remote objects, files, users, When the size of Internet was small, . a host file: two columns. a


  1. Name service Domain Name System (DNS) � Name : identifier � Need a system: Name �� IP address � computers, services, remote objects, files, users, � When the size of Internet was small, … …. � a host file: two columns. � a fundamental component in distributed systems � Every host store one copy and update it � helps communication and resource sharing. periodically from a master host file. • URL-form name to access a specific web page. � Impossible for today’s Internet • The resources shared among several processes have consistent name used by these processes. � One simple solution: server • Users can communicate with each other by their email addresses. � Disadvantages: inefficient; unreliable. � Another way: attributes � Another solution: distribution & replication. � Name service � client/server group model � stores a collection of bindings between name � Names are unique and attributes. � Two ways to organize name space � Major operation: resolve a name � General requirement: handle an arbitrary � Flat: a name is a sequence of characters without number of names and serve an arbitrary number structure of organizations; a long lifetime; high • cannot be used in a large system such as the Internet. availability; fault isolation; tolerance of mistrust � Name space: collection of all valid names. 1 2 1

  2. DNS in the Internet Domain Name System (DNS) � DNS can be used in different platforms. � Hierarchy: each name is composed of several parts. � generic domains • called domain name space � com: commercial organizations • each organization can choose the prefix name for its � edu: universities and other educational institutions host independently. � gov: US governmental agencies � In domain name space, names are defined in � mil:US military organizations an inverted-tree structure. � net: major network support centers � org: organizations not mentioned above � Each node in the tree has a label, and a � int: international organizations domain name. � country domains � Label is a string with a maximum of 63 � ca: Canada; us: United States; … … characters. � Use their own domains to distinguish their organizations, � Root label is an empty string except USA. i.e. co.uk, ac.uk � inverse domain � Children of a node have different labels � map an address to a name � Domain name is a sequence of labels from the � Example: a server has a list of authorized clients, but only current node up to the root, separated by dots. IP address from packet. � Fully Qualified Domain Name (FQDN): a • the server may ask its resolver to send a query to the DNS complete domain name server and ask for a mapping of address to name. • inverse query (or pointer query) � Partially Qualified Domain Name (PQDN): a • “inverse-IP.in-addr.arpa” domain name is ended at some node except the 3 4 root 2

  3. DNS queries Domain Name System (DNS) � Host name resolution � Distribution of name space � DNS servers: organized in the same way as the hierarchy � Get IP addresses from host names of names. � Looking up e-mail host � Each server contains part of the naming database – data for the local domain. � Reverse resolution � Also, each server records the domain names and � Name server replies only if the IP address is in addresses of other servers. its own domain. � DNS data are divided into zones, and each DNS � Others in the textbook server is responsible for zero or more zones. � Zones vs. domains � Each zone must be hold by at least two servers. URL http://www.cdk3.net:80/WebExamples/earth.html � A master file for a zone (zone file): entered by system administrator. DNS lookup � Root server: Resource ID (IP number, port number, pathname) � a server whose domain consists of the whole tree. 138.37.88.61 80 WebExamples/earth.html � no detailed information, just maintains references to ARP lookup lower-level servers. (Ethernet) Network address � Currently, there are more than 13 root servers distributed file 2:60:8c:2:b0:5a all around the world, each covering the whole domain name space. Socket Web server 5 6 3

  4. Domain Name System (DNS) Domain Name System (DNS) � Primary servers � Name-Address Resolution � Process calls a DNS client, called a resolver � Read zone data directly from a local master file � The resolver accesses the closest DNS server with a � creating, maintaining, and updating the zone file mapping request. � Secondary servers � Either server replies with the information, or tells the resolver that other servers have this information. � Download zone data from other servers � the resolver delivers the result to the request process. (primary or other secondary) � Most of requests are “Mapping Names to � Communicate periodically with the primary Addresses” server to check the match � Mapping Addresses to Names: DNS client (resolver) � Both of them are authorities for the zone reverses the IP address, and appends it with “.in-addr.arpa.” to they serve: redundancy create a domain name. � Two approaches � Zone transfer: secondary server � primary � Recursive resolution : the resolver expects the server to server supply the final answer � A server can be primary server for a � Iterative Resolution specific zone, and a secondary server for • it returns to the client the IP address of the server that it thinks can resolve the query. another zone. • The client is responsible to repeat the query to this second server. 7 8 4

  5. DNS Messages Domain Name System (DNS) � The header is 12 bytes � Caching technique in DNS � Identification: 16-bit, match the response (used by client) � recursive resolution � Flags: 16-bit � Store the mapping before send it to client • QR (query/response): 1-bit, defines the type of � One problem: cache some mapping for a long time. So the message client receives an out-of-date mapping. • OpCode: 4-bit, defines type of query or response (0: � two simple techniques: “time-to-live” (TTL) standard, 1: inverse, etc.) • AA (authoritative answer): 1-bit, used in caching � Original server binds a mapping with a TTL value. technique (1: original server) • It defines the time in seconds that the other servers • TC (truncated): 1-bit , 1 means the response was can cache the mapping information. more than 512 bytes and reduced to 512. � Receiving server sets a TTL for each mapping in its • RD (recursion desired): 1-bit , 1 means the client cache. desires a recursive answer. (set in query message, � DNS Messages repeated in response message) • RA (recursion available): 1-bit , 1 means that a � Two types: query and response recursive response is available. (set in the response � A query message consists of a header and the question message) records • Reserved : 3-bit, “000” � A response message consists of a header, question • rCode : 4-bit, error code in the response (only original records, answer records, authority records , and server can set it) additional records . � Number of question records: 16-bit � Number of answer records: 16-bit, all 0s in query message � Number of authority records: 16-bit, all 0s in query � Number of additional records: 16-bit, all 0s in query 9 1 0 5

  6. DNS Messages: types of records Time � Question Record � important information in distributed systems. � Used by client to get information from a server � Precise time: ‘e-commerce’ transaction; authentication protocols; Check if the call message is a duplicated � Query name : domain name, variable-length field message and check if the call message is valid, in Sun � Query type : 16-bit, i.e., 1: 32-bit IPv4 address, 28: An RPC message, … IPv6 address, … � the order of events is important: e-mail � Query class : 16-bit, defines specific protocol using DNS, � Situation in distributed systems i.e., 1: Internet; 2: CSNET network; … � Resource Record � no global clock in distributed systems � Each computer has its own internal clock, and each clock � Domain name has its own physical properties. � Domain type � clock drift rate : difference between a computer clock and � Domain class the perfect reference clock � Time-to-live: 32-bit, number of seconds � Two approaches to correct � Resource data length: 16-bit • Time server, Cristian in 1989 � Resource data: • logical clock • answer to the query in answer section; � Synchronizing physical clocks • domain name of server in authoriy section � External synchronization : clock-draft-rate is bounded • Additional information (IP address) in additional section by some constant. • Time server: Cristian’s method, the Network Time Protocol � Internal synchronization : the difference between any two computer clocks is bounded by some constant. • Master/slaves: the Berkeley’s algorithm 1 1 1 2 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend