Presentation is loading. Please wait.

Presentation is loading. Please wait.

McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 25 (Data Communication & Networking Book): Domain Name System (DNS) 1.

Similar presentations


Presentation on theme: "McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 25 (Data Communication & Networking Book): Domain Name System (DNS) 1."— Presentation transcript:

1 McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 25 (Data Communication & Networking Book): Domain Name System (DNS) 1

2 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 2 The application layer is responsible for providing services to the user. The application layer enables the user, whether human or software, to access the network. It provides user interfaces and support for services such as electronic mail, file access and transfer, access to system resources, surfing the world wide web (www), and network management. In this part, we briefly discuss some applications that are designed as a client/server pair in the Internet. The client sends a request for a service to the server; the server responds to the client. Application Layer

3 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 3 Example: using the DNS service

4 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 4 The DNS is a supporting program that is used by other programs, such as email. IP address identifies the connection of a host to the Internet. People prefer names instead of IP. Host file: maps name and address; stored in local disk; Any program can consult the host file. With large number of users, it is not possible to have all the host name mappings in a single file. Divide this huge amount of information into small parts and store each part on a different computer  DNS. The DNS Service

5 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-1 NAME SPACE  Names must be unique like IP addresses.  A name space that maps each address to a unique name can be organized as: flat or hierarchical Flat Name Space Hierarchical Name Space Topics discussed in this section:Topics discussed in this section: 5

6 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 6 Flat name space A name is assigned to an address Name is a sequence of characters without structure Due to central control for ambiguity, this is not possible to be used on huge networks like the Internet Hierarchical Name space Each name is made of several parts 1 st part is nature of organization, 2 nd part is name, … Central authority takes control of 1 st and 2 nd parts only No need to worry of internal names or host names Ex. ccse.Kfu.edu.sa & ccse.kfupm.edu.sa The Name Space

7 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-2 DOMAIN NAME SPACE  Names are defined in an inverted-tree structure with the root at the top.  Can have 128 levels: level 0 (root) to level 127. Label Domain Name Domain Topics discussed in this section:Topics discussed in this section: 7

8 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 8 Domain Name Space Label: Each node in the tree has a label, which is a string with a maximum of 63 characters. Root label is a null string (empty string). Children of a node have different labels.

9 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 9 Domain Names and Labels Full domain name is a sequence of labels separated by dots. Domain names are always read from the node up to the root. Last label is the label of root (null). So, full domain name always ends in a null label [means dot].

10 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 10 FQDN and PQDN Fully Qualified Domain Name (FQDN) Label is terminated by a null string. Contains the full name of a host. Partially Qualified Domain Name (PQDN) Not terminated by a null string. PQDN starts from a node, but it does not reach the root. Used when the name to be resolved belongs to the same site as the client. Resolver supplies the missing part called the suffix to create a FQDN.

11 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 11 Domains Domain: Sub-tree of the domain name space. Name of the domain is the domain name of the node at the top of the sub-tree. Example: The top of the kfu.edu domain is a node named kfu.edu A domain can be divided into sub-domains.

12 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-3 DISTRIBUTION OF NAME SPACE  If information is stored in one machine, the requests will overload the machine. Hierarchy of Name Servers Zone Root Server Primary and Secondary Servers Topics discussed in this section:Topics discussed in this section: 12

13 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 13 Distribution of Name Space Hierarchy of name servers Distribute among DNS servers. Let root stand alone and create as many domains (subtrees) as there are first-level nodes. Each server can be responsible (authoritative) for either a large or a small domain.

14 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 14 Hierarchy of Name Servers

15 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 15 Zones and Domains Zone What a server is responsible for or has authority over is called zone. If a server accepts responsibility for a domain and does not divide the domain into smaller domains, the domain and the zone refer to the same thing. Server makes a database called a zone file and keeps all the information for every node under the domain. If a sever has sub-domains, information about nodes in sub- domains are stored in servers at lower levels, with the original server keeping some sort of reference to these lower-level servers. But responsibility is still with the original server.

16 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 16 A root server: is a server whose zone consists of the whole tree. It does not store any information about domains but delegates its authority to other servers, Keeping reference to other servers. Primary server: A primary server loads all information from the disk file, for which it is an authority; Responsible for creating, maintaining, and updating the zone file. Secondary server: loads all information from the primary server; Neither creates nor updates the zone files; create redundancy. ROOT SERVER

17 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 17 A primary server loads all information from the disk file; the secondary server loads all information from the primary server. When the secondary downloads information from the primary, it is called zone transfer. Note Primary and Secondary Servers

18 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-4 DNS IN THE INTERNET  DNS is a protocol that can be used in different platforms. In the Internet, the domain name space (tree) is divided into three different sections: generic domains, country domains, and the inverse domain. Generic Domains Country Domains Inverse Domain Topics discussed in this section:Topics discussed in this section: 18

19 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 19 DNS in the Internet Generic Domains Registered hosts according to their generic behaviour. Each node in the tree defines a domain, which is an index to the domain name space database. First level in the generic domain section allows 14 possible labels.

20 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 20 Generic Domains

21 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 21 Table 25.1 Generic Domain Labels

22 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 22 Country Domains Country domain section follows the same format as the generic domains but uses two-character country abbreviations. Second level labels can be organizational or more specific, national designations.

23 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 23 Country Domains

24 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 24 Inverse Domain Inverse domain is used to map an address to a name. If a server requests a service from clients and the server has a list of authorized clients [IP addresses], then it needs inverse mapping. Inverse or pointer query. Hierarchical: Netid part is at higher level than the subnetid part. 132.34.45.121  121.45.34.132.in-addr.arpa Use the nslookup command to map an IP address to a name

25 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-5 RESOLUTION  Mapping a name to an address or an address to a name is called name-address resolution. Resolver Mapping Names to Addresses Mapping Addresses to Names Recursive Resolution Caching Topics discussed in this section:Topics discussed in this section: 25

26 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 26 Name-Address Resolution Resolver A host that needs to map an address to a name or a name to an address calls a DNS client named a resolver. Resolver contacts the closest DNS server for mapping. If the server has the info, it replies; otherwise, it either refers to the resolver to other servers or asks other servers to provide the information. After the resolver receives the mapping, it interprets the response to see if it a real resolution or an error and finally delivers the result to the process that requested it. Mapping names to addresses Resolver gives a domain name to the server and asks for the corresponding address. The server checks the generic domains or the country domains to find the mapping.

27 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 27 Mapping addresses to names Client can send an IP address to a server to be mapped to a domain name. DNS uses inverse domain. Recursive Resolution Resolver can ask for a recursive answer from a name server Resolver expects the server to supply the final answer. If server is the authority, it checks its database and replies. If server is not the authority, it sends the request to another server (the parent usually) and waits for the response. If the parent is the authority, it responds; otherwise, it sends the query to yet another server. When the query is finally resolved, the response travels back until it finally reaches the requesting client. Name-Address Resolution

28 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 28 Recursive Resolution

29 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 29 Iterative Resolution If server is authority, it sends the answer. If server is not authority, it returns the IP address of the server that it thinks can resolve the query. The client is responsible for repeating the query to this second server. This process is called iterative resolution because the client repeats the same query to multiple servers.

30 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 30 Caching Reduction of search time would increase efficiency. DNS handles this with a mechanism called caching. Response is stored in the server’s cache memory before sending it to the client. If another client ask for the same mapping, the cache memory can be referred to give an answer. Response is marked as Unauthoritative (cache) Caching speeds up resolution, but can provide an outdated mapping. Time to live (TTL): time in seconds [provided by authoritative server] for which the receiving server can cache the information. DNS requires that each server keep a TTL counter for each mapping it caches.

31 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-6 DNS MESSAGES  Two types of messages  Query: header and question records  Response: Header, question records, answer records, authoritative records, and additional records. Header Topics discussed in this section:Topics discussed in this section: 31

32 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 32 DNS Messages Header: Query and response types have same format with some fields set to zero for the query messages. 12 bytes Identification : used by the client to match the response with query. Flags: Type of msg, type of answers requested, type of desired resolution [recursive or iterative], and so on. Number of question records: the number of queries in the question section of the message Number of answer records : the number of answer records in the answer section of the response message. Number of authoritative records: the number of authoritative records in the authoritative section of a response message Number of additional records: the number additional records in the additional section of a response message

33 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 33 Query and Response Messages

34 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 34 Header Format

35 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-7 TYPES OF RECORDS  As we saw in Section 25.6, two types of records are used in DNS. The question records and the resource records. Question Record Resource Record Topics discussed in this section:Topics discussed in this section: 35

36 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 36 Question Records This record is used by the client to get information from a server. This contains the domain name. Resource Records Each domain name (each node on the tree) is associated with a record called resource record The server database consists of resource records Resource records are also what is returned by the server to the client. TYPES OF RECORDS

37 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-8 REGISTRARS 37 How new domains are added? Registrar: A commercial entity accredited by ICANN A registrar first verifies that the requested domain name is unique and then enters it into the DNS database What is information is required? Name of its server IP address of its server A fee is charged Example: a new commercial organization named wonderful with a server named ws and IP address 200.200.200.2 needs to give the following information to one of the registrars:Domain name: ws.wonderful.com IP address: 200.200.200.2

38 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-9 DYNAMIC DOMAIN NAME SYSTEM (DDNS) 38 In DNS, when there is a change, such as adding a new host, removing a host, or changing an IP address, the change must be made to the DNS master file. Requires lot of manual updating. DDNS [Dynamic DNS]: When a binding between a name and address is determined, the information is sent, usually by DHCP to a primary DNS server. Primary server updates the zone. Secondary servers are notified actively or passively. Actively: Primary servers sends a message to secondary server about changes in the zone. Passively: Secondary servers periodically check for any changes. In either case, once notified about change, the secondary server requests for zone transfer.

39 McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 25-10 ENCAPSULATION 39 DNS can use the services of UDP or TCP, using the well-known port 53. UDP: If response msg < 512 bytes If size is unknown If size increases, the server truncates the msg and resolver now opens a TCP connection and repeats the request to get a full response from the server. TCP: If response msg > 512 bytes Zone transfer


Download ppt "McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Network Protocols Chapter 25 (Data Communication & Networking Book): Domain Name System (DNS) 1."

Similar presentations


Ads by Google