1 / 33

3. Naming

3. Naming. Naming in DS Name resolution The implementation of a name space Case study: The Domain Name System (DNS). Learning Objectives. To understand the naming in DS To gain a good understanding of naming space and name resolution To study general methods in implementing a name space

Download Presentation

3. Naming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3. Naming • Naming in DS • Name resolution • The implementation of a name space • Case study: The Domain Name System (DNS) 1

  2. Learning Objectives • To understand the naming in DS • To gain a good understanding of naming space and name resolution • To study general methods in implementing a name space • To examine and study the Internet Domain Name System (DNS), one of the largest distributed naming services. 2

  3. Introduction to Naming • Names are used to share resources, to uniquely identify entities, to refer to locations in computer systems. • An important issue with naming is that a name can be resolved to the entity it refers to. Name resolution allows a process to access the named entity. • To resolve names, it is necessary to implement a naming system. • The different between naming in DSs and non-DSs lies in the way naming systems are implemented. In a DS, the implementation of a naming system is itself often distributed across multiple machines. • Two major issues in designing naming systems in DS: efficiency and scalability. 3

  4. Names, Identities, and Addresses • A name in a DS is a string of bits or characters that is used to refer to an entity. • An entity in a DS can be practically anything, such as resources (e.g., hosts, printers, disks, files etc), processes, users, mailboxes, newsgroups, Web pages, messages, network connections etc. • Entities can be operated on. To operate on an entity, it is necessary to access it through an access point which is a special kind of entity, and whose name is called address (simply called address of that entity). • An entity can offer more than one access points, and may change its access points in the course of time. 4

  5. Names, Identities, and Addresses • In a DS, a name for an entity that is independent from its (called location- independent) addresses is often much easier and more flexible to use (why?). • An identifier is a name that has the following properties: * An identifier refers to at most one entity; * Each entity is referred to by at most one identifier; * An identifier always refers to the same entity (never reused). • By using identifiers, it becomes possible to unambiguously refer to an entity. • In many computer systems, addresses and identifiers are represented in the form of bit strings (machine-readable), such as IP addresses and memory addresses etc. 5

  6. Human-Friendly Name and Name Space • Another type of name is that it is tailored to be used by humans, referred as human-friendly names which are generally represented as character strings (e.g., host name – gateway.cs.cityu.edu.hk). • Names in a DS are organized as name space. It can be represented as a labeled, directed graph with two types of nodes, each node (as an entity) has an identifier: * leaf node (no outgoing edges): represents a named entity and generally stores information on the represented entity such as its address, its state, e.g., in the case of file systems, it may contain the complete file it is representing. 6

  7. Name Space * directory node (with some outgoing edges): each outgoing edge is labeled with a name. The node stores a table, called directory table, in which each outgoing edge is represented as a pair (edge label, node identifier). • For simplicity, many naming systems have only one root (no incoming edge). • Each path in a naming graph can be referred to by the path name, the sequences of labels corresponding to the edges in that path: N:<lable-1, lable-2, …, label –n>. If the first node N in the path is root, it is called absolute path name; otherwise it is called relative path name. • Such a naming space is often used in hierarchical naming system. 7

  8. Name Spaces • A general naming graph with a single root node. root:<lable-1, lable-2, …, label –n> = /label-1/label-2/…/label-n 8

  9. Name Resolution • Given a path name in a name space, it should be possible to look up any information stored in the node referred to by that name. The process of looking up a name is called name resolution. • Consider a path name N:<lable-1, lable-2, …, label –n>, resolution of this name starts at node N in the naming graph, where the name label-1 is looked up in the directory table, and it returns the identifier of the node to which label-1 refers. Resolution then continues at the identified node by looking up the name label-2 in its directory table, and so on, until the last node referred to by label-n, by returning the content of that node. • Knowing how and where to start name resolution is generally referred to as a closure mechanism. 9

  10. The Implementation of a Name Space • A naming service is implemented by name servers. In large DSs with many entities it is necessary to distribute the implementation of a name space over multiple name servers. • To efficiently implement a name space for a large-scale, possibly worldwide, DS, it is usually organized hierarchically and may be partitioned into logical layers: * global layer: formed by the highest-level nodes, e.g., root and other directory nodes logically close to the root. The directory tables in these nodes are rarely changed. * administrational layer: formed by the directory nodes managed within single organization. The nodes in this layer are relatively stable although less stable than those in global layers. 10

  11. The Implementation of a Name Space * managerial layer: formed by the nodes that may change regularly, e.g., nodes representing hosts in the LAN. The nodes in this layer are also maintained by end users of a DS. • The distribution of a name space across multiple name servers affects the implementation of name resolution. • Iterative name resolution: The root name server contacts the other name servers iteratively to resolve the name. • Recursive name resolution: The root name server contacts the other name servers recursively to resolve the name. 11

  12. Name Space Distribution (1) • An example partitioning of the DNS name space, including Internet-accessible files, into three layers. 12

  13. Name Space Distribution (2) • A comparison between name servers for implementing nodes from a large-scale name space partitioned into a global layer, as an administrational layer, and a managerial layer. 13

  14. Implementation of Name Resolution • Example: Assume that a absolute name root:<n1, n2> is to be resolved, A name server NS0 communicates with other name servers on behalf of a client (see the next slide). * iterative name resolution: The name server NS1 that NS0 contacts can resolve only the label n1, for which it returns the associated name server NS2; NS0 then contacts NS2 to resolve n2, to finally resolve the name. * recursive name resolution: The NS0 requests NS1 to resolve <n1, n2>; and NS1 then asks NS2 to resolve <n2>, and the result obtained in NS2 is returned to NS1, which is in turn returned to NS0. • Question: What are the main advantages and drawbacks of the above two methods, respectively (see slide in Page 16)? 14

  15. NS1 NS1 2 2 4 3 1 1 NS0 NS0 client client 3 5 4 NS2 NS2 Iterative Recursive A name server NS0 communicates with other name servers on behalf of a client Iterative name resolution and recursive name resolution 15

  16. Implementation of Name Resolution • The comparison between recursive and iterative name resolution with respect to communication costs. 16

  17. Case Study: Domain Name System (DNS) • DNS name tree • DNS server • Resolving a name • Improving DNS performance • Other types of DNS entry 17

  18. Case Study: Domain Name System (DNS) • One of the largest distributed naming service is the Internet Domain Name System (DNS). It is primarily used for looking up host addresses (IP addresses) and mail servers. • Every machine (or rather, network interface) on the Internet is assigned a unique IP address. To communicate with a particular machine, one needs to supply the IP address of that machine. • However, IP address, even in dot decimal representation, may not be easy to memorize. It is useful to refer to machine on the Internet with a textual name which carries some meaningful structural information. 18

  19. DNS Name Tree • The Internet domain name system (DNS) is a hierarchical naming system. A name tree is used: 19

  20. DNS Name Tree • The leaves of the tree represent domain names of the hosts. For example: cschlee.cityu.edu.hk refers to the machine cschlee on the cityu.edu.hk domain. • The hierarchical architecture is intended as it greatly reduces the complexity of name management. The Internet central authority only specifies the top level (com, edu,…, uk, hk, …). • For example, the hk domain is given to the Hong Kong Internet organization responsible. City University then has the authority to assign any domain name with cityu.edu.hk as suffix. 20

  21. DNS Server • A DNS server provides domain name mapping service to its clients. When sent a service request to map a domain name of a machine, it replies with the IP address of the machine. • Because of the size of Internet, multiple DNS servers will be used. The DNS name tree is partitioned into non-overlapping parts called zones. • Each zone is covered by a primary DNS server which holds the authoritative mapping information for that zone. A zone may have one or more secondary DNS severs (for reliability purposes) which get their mapping information from the primary server. • The following slide shows an example of the partitioning. 21

  22. DNS Server 22

  23. DNS Server • There are more than one way to partition a domain into zones. The following slide shows an example. • The root server for the top level domain com does not know about the names of all the machines in foobar.com, but it knows how to get to the DNS server that would know a DNS name for a machine in foobar.com. • Each DNS server has links to a root server and at least those servers that are subparts of the hierarchy. For example, in Figure (a) in the next slide the server for foobar.com knows the server for candy.foobar.com. If the server is asked to resolve a name of the formxyz.candy.foobar.com, it can be referred to the DNS server for candy.foobar.com. 23

  24. DNS Server 24

  25. Resolving a Namein DNS • Each machine on the Internet has a piece of software for resolving names. It is often known as name resolver. • A resolver is configured with the IP address of a local DNS server. When called, it packages a request to that DNS server. When the DNS server returns the result, the resolver relays the result back to the caller. • A resolver on a host always requests recursive resolution when it send request to a DNS server. A DNS server, when acting as a client to another DNS server, it may, or may not request recursive resolution, (it may request iterative resolution). 25

  26. Improving DNS performance • DNS service performance can be improved by two primary means: replication and caching, which are based on: * physical locality: Machines in a domain is more likely to communicate with each other than with "remote" machines; * time locality: When a machine refers a name, it is likely that it will refer the same name again in the near future. • Replication: Each root server is replicated. There are many copies of the root sever in the world. A local DNS server is initialized with a list of root servers "closest" to it. The local server monitors the response performance and tune to the closest. • Caching: Recent name resolution results are cached. 26

  27. Other Types of DNS entry • The mapping of domain name to IP address is achieved through A (address) type entry in the DNS database: aaa.xyz.com A 146.204.18.21 86400 The above entry specifies a mapping from aaa.xyz.com to 146.204.18.21. The number 86400 represents the time-to-live field (The period the entry is valid). • A DNS database entry can have other than address type (A type) entries (these are for name to address mapping). For example, A MX type (Mail Exchange) entry is used to map computer name found in an e-mail address to an IP address. e-mail software sends request of MX type to a DNS server. 27

  28. The DNS Name Space • The most important types of resource records forming the contents of nodes in the DNS name space. 28

  29. Summary • Names are used to refer to entities. There are essentially three types of names: address, identifier, and human-friendly names. • Names are organized in a name space. It can be represented by a naming graph, often rooted acyclic direct graph. • An entity can be referred to by a path name in naming graph. Name resolution is the process of traversing the graph by looking up the components of a path name, one at a time. • A large-scale naming graph is implemented by distributing its nodes across multiple name servers. When resolving a path name by such a traversing, name resolution continues at a next name server as soon as a node is reached implemented by that server. 29

  30. Summary (DNS) • In the Domain Name System (DNS), each machine is assigned a name which is unique across the Internet. DNS name space has a tree structure. The administrator for each node has authority to assign names in the subtrees of that node. • The hierarchical structure of DNS name usually reflects the structure of certain organization or relationship. • The mapping between DNS names to IP addresses are done by an Internet system service, which is provided by a (distributed) set of DNS servers. • A DNS zone is serviced by a primary DNS server which is the source (and authoritative) information for the name-to-address mapping of names in the zone. 30

  31. Summary (DNS) • A client machine (resolver) requests address resolution from a DNS server (called default DNS server for the client machine) which is close to the client (usually on the same network as the client is on). • A DNS server may appeal to an another DNS server to resolve a name, which does not appear in its own mapping database or its cache. The process used can be iterative or recursive resolution. • Replication and caching can be used to improve DNS server performance. 31

  32. Tutorial Q1. Give an example of where an address of an entity E needs to be further resolved into another address to actually access E. Q2. Would you consider a URL such as http://www.acme.org/index.html to be location independent? What about http://www.acme.nl/index.html? Q3. Outline an efficient implementation of globally unique identifiers. Q4. How does caching helps to improve the performance and availability of a name service? Why caching is feasible in name service? 32

  33. Tutorial Q5. Given the absolute path name root:<nl, vu, cs, ftp, pub, globe, index.txt>, using a URL notation, it corresponds to ftp://ftp.cs.vu.nl/pub/globe/index.txt The name resolution for it is to first obtain the address of FTP server ftp.cs.vu.nl, then contact the FTP server to resolve and transfer the file /pub/globe/index.txt. Show how to use iterative and recursive name resolution, respectively, for the name resolution for the FTP server. Q6. Discuss the main advantages and drawbacks of using recursive name resolution (compared to iterative method). 33

More Related