Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ch25 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.

Similar presentations


Presentation on theme: "Ch25 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007."— Presentation transcript:

1 Ch25 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

2 Introduction There are several applications in the application layer of the Internet model that follow the client/server paradigm. The client/server programs can be divided into two categories:  Application that directly used by the user, such as e- mail,  Application that support other application programs. The Domain Name System (DNS) is a supporting program that is used by other programs such as e-mail. Ameera Almasoud2 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007

3 Example of using the DNS service Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 20073

4 Host File When the Internet was small, mapping was done by using a host file. The host file had only two columns: name and address. Every host could store the host file on its disk and update it periodically from a master host file. When a program or a user wanted to map a name to an address, the host consulted the host file and found the mapping. it is impossible to have one single host file to relate every address with a name.  The host file would be too large to store in every host.  it would be impossible to update all the host files every time there was a change. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 20074

5 Host File One solution would be to store the entire host file in a single computer and allow access to this centralized information to every computer that needs mapping.  But this would create a huge amount of traffic on the Internet. The solution is to divide this huge amount of information into smaller parts and store each part on a different computer.  the host that needs mapping can contact the closest computer holding the needed information. This method is used by the Domain Name System (DNS). Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 20075

6 NAME SPACE To be unambiguous, the names assigned to machines must be carefully selected from a name space with complete control over the binding between the names and IP addresses. To be unambiguous, the names assigned to machines must be carefully selected from a name space with complete control over the binding between the names and IP addresses. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 20076

7 The name is an unstructured sequence of characters. Disadvantage: it must be centrally controlled to avoid duplication. Therefore, it can not be used in large systems such as the Internet. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 20077 NAME SPACE Flat Narne Space

8 The name is structured and consists of many parts.  The first part can define the nature of the organization,  the second part can define the name of an organization,  the third part can define departments in the organization, and so on. The authority to assign and control the name spaces can be decentralized. A central authority can assign the part of the name that defines the nature of the organization and the name of the organization. The responsibility of the rest of the name can be given to the organization itself. Ex: suffixes /prefixes it is efficiently used in large systems such as the Internet. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 20078 NAME SPACE Hierarchical Narne Space

9 DOMAIN NAME SPACE To have a hierarchical name space, a domain name space was designed. To have a hierarchical name space, a domain name space was designed. In this design the names are defined in an inverted-tree structure with the root at the top. In this design the names are defined in an inverted-tree structure with the root at the top. The tree can have only 128 levels: level 0 (root) to level 127. The tree can have only 128 levels: level 0 (root) to level 127. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 20079

10 Domain name space Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200710

11 Each node in the tree has a label The label is a string of maximum length of 63 characters Children of a node should have different labels The label of the root is a null string Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200711 DOMAIN NAME SPACE Label

12 Each node in the tree has a domain name. A full domain name is a sequence of labels separated by dots (.). The domain names are always read from the node up to the root. The last label is the label of the root (null). Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200712 DOMAIN NAME SPACE Domain Name

13 Domain names and labels Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200713

14 Fully Qualified Domain Name(FQDN). : If a label is terminated by a null string. It contains all labels, from the most specific to the most general, that uniquely define the name of the host. Ex: challenger.ate.tbda.edu. Partially Qualified Domain Name(PQDN) : If a label is not terminated by a null string. name A PQDN starts from a node, but it does not reach the root. It is used when the name to be resolved belongs to the same site as the client. Ex: challenger Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200714 DOMAIN NAME SPACE Domain Name

15 FQDN and PQDN Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200715

16 A domain is a subtree of the domain name space. The name of the domain is the domain name of the node at the top of the subtree. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200716 DOMAIN NAME SPACE Domain

17 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200717 DOMAIN NAME SPACE Domain

18 DISTRIBUTION OF NAME SPACE The information contained in the domain name space must be stored. The information contained in the domain name space must be stored. However, it is very inefficient and also unreliable to have just one computer store such a huge amount of information. However, it is very inefficient and also unreliable to have just one computer store such a huge amount of information. In this section, we discuss the distribution of the domain name space. In this section, we discuss the distribution of the domain name space. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200718

19 The solution to these problems is to distribute the information among many computers called DNS servers. we let the root stand alone and create as many domains (subtrees) as there are first-level nodes. # DNS allows domains to be divided further into smaller domains(subdomains). It is inefficient and unreliable to store the information of the domain name space on a single computer:  It is inefficient because responding to all requests from one computer imposes a heavy load on the system  It is unreliable because a failure in the computer makes all data inaccessible Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200719 DISTRIBUTION OF NAME SPACE DISTRIBUTION OF NAME SPACE Hierarchy of Name Servers

20 Hierarchy of name servers Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200720

21 Since the complete domain name hierarchy cannot be stored on a single server, it is divided among many servers. What a server is responsible for or has authority over is called a zone. We can define a zone as a contiguous part of the entire tree. 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. The server makes a database called a zone file and keeps all the information for every node under that domain. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200721 DISTRIBUTION OF NAME SPACE DISTRIBUTION OF NAME SPACE Zone

22 Zones and domains Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200722

23 A root server is a server whose zone consists of the whole tree. A root server usually does not store any information about domains but delegates its authority to other servers. There are several root servers, each covering the whole domain name space. The servers are distributed all around the world. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200723 DISTRIBUTION OF NAME SPACE DISTRIBUTION OF NAME SPACE Root Server

24 A primary server stores a file about the zone for which it is an authority on its local disk A primary server is responsible for creating, maintaining, and updating the zone file A secondary server downloads information from another server (primary or secondary) on its local disk: this is called zone transfer A secondary server is NOT responsible for creating, maintaining or updating the zone file Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200724 DISTRIBUTION OF NAME SPACE DISTRIBUTION OF NAME SPACE Primary and Secondary Servers

25 If updating is required, it is performed by the primary server, then sent to the secondary server The aim of assigning a secondary server is to create data redundancy so that it can serve clients in case of failure of the primary server A server can be primary for a zone and secondary for another server; therefore, it is important to state the zone to which a primary/secondary server refers Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200725 DISTRIBUTION OF NAME SPACE DISTRIBUTION OF NAME SPACE Primary and Secondary Servers

26 DNS IN THE INTERNET DNS is a protocol that can be used in different platforms. 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: In the Internet, the domain name space (tree) is divided into three different sections:  generic domains  country domains  the inverse domain Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200726

27 DNS IN THE INTERNET Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200727

28 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200728 DNS IN THE INTERNET DNS IN THE INTERNET Generic domains

29 Generic domain labels Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200729

30 These use two-character country abbreviations Examples are:  sa (Saudi Arabia)  eg (Egypt)  uk (UnitedKingdom)  fr (France)  us (United States), etc… Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200730 DNS IN THE INTERNET DNS IN THE INTERNET Country Domains

31 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200731 DNS IN THE INTERNET DNS IN THE INTERNET Country Domains

32 These are used to map an IP address to a name When a server receives a request, the first thing it performs is to check if the sending client is an authorized one:  The resolver sends a query to the DNS server with the client name  The DNS server finds the corresponding IP address  The extracted IP address is resent back to the resolver, then to the server  The server checks if the received IP is on the list of its authorized clients Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200732 DNS IN THE INTERNET DNS IN THE INTERNET Inverse Domains

33 This type of query is called inverse query or pointer query The first and second node in a pointer query are always arpa and in-addr The DNS servers that handle the pointer query are hierarchical:  The highest level is the network id (netid) part  The lower level is the subnet id part  The lowest level is the host id part Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200733 DNS IN THE INTERNET DNS IN THE INTERNET Inverse Domains

34 IP= netid.hostid  132.34.45.121  Class B Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200734 DNS IN THE INTERNET DNS IN THE INTERNET Inverse Domains

35 RESOLUTION Mapping a name to an address or an address to a name is called name-address resolution. Mapping a name to an address or an address to a name is called name-address resolution. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200735

36 Client/server application that resides on DNS clients Any host that requires to map an IP address to a URL name or vice versa calls a resolver The resolver accesses the closest DNS server with the mapping request If the server has the required information, it provides them to the resolver If the server does not have the required information, it acts in one of the following ways:  The server refers the resolver to another DNS server.  The server asks another server for the required information, and provides it to the resolver. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200736 RESOLUTION Resolver

37 Most of the time, the resolver gives a domain name to the server and asks for the corresponding address. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200737 RESOLUTION Mapping Names to Addresses

38 A client can send an IP address to a server to be mapped to a domain name. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200738 RESOLUTION Mapping Addresses to Names

39 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200739 RESOLUTION Recursive Resolution

40 When a resolver sends a mapping request to a name server, it expects the answer from the same server If the server is the authority for the domain name, it responds immediately to the resolver Otherwise, the server sends the mapping request to the parent server This procedure is repeated recursively until an answer is found The answer follows the same way back through the servers until it reaches the resolver Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200740 RESOLUTION Recursive Resolution

41 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200741 RESOLUTION Iterative Resolution

42 If the client does not ask for a recursive answer, the mapping can be done iteratively.  If the server is an authority for the name, it sends the answer.  If it is not, it returns (to the client) the IP address of the server that it thinks can resolve the query. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200742 RESOLUTION Iterative Resolution

43 This is a mechanism that aims to reduce the search time a DNS server needs to look for a name (or address) in its database. Therefore, when a new request arrives to the server, it checks its cache first. If the required information are stored in the cache, the server responds to the request immediately If not, it sends the request to another server as explained before When a server asks another server for the information, it stores it in its cache memory before sending it to the client In case the required information is found in the cache, the server marks the response as “unauthoritative”. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200743 RESOLUTION Caching

44 Time-to-Live (TTL) counter, in seconds, is used to overcome this problem The server keeps a TTL with each entry in its cache When TTL reaches zero, the corresponding entry is marked Invalid When a request is made to an invalid entry, the server considers it “missing”, and a request is sent to the authoritative server. If a server caches a mapping for a long time, it may send an outdated mapping to the client Another technique is to search the cache periodically and purge (kill) all entries with expired TTL. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200744 RESOLUTION Caching

45 DNS MESSAGES DNS has two types of messages: query and response. DNS has two types of messages: query and response. Both types have the same format. Both types have the same format. The query message consists of a header and question records; The query message consists of a header and question records; the response message consists of a header, question records, answer records, authoritative records, and additional records. the response message consists of a header, question records, answer records, authoritative records, and additional records. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200745

46 Query and response messages Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200746

47 Header format Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200747

48 TYPES OF RECORDS There are two types of records are used in DNS. There are two types of records are used in DNS.  The question records are used in the question section of the query and response messages.  The resource records are used in the answer, authoritative, and additional information sections of the response message. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200748

49 REGISTRARS How are new domains added to DNS? How are new domains added to DNS?  New domains are added to the Internet through registrars  A registrar verifies that the requested domain name is unique, then enters it into the DNS database for a fee. Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200749

50 DYNAMIC DOMAIN NAME SYSTEM (DDNS) Changes made in the domain include adding a new host,removing a host, or changing the IP address of a host In DNS, any made change should be reflected in the DNS master file In a huge environment such as the Internet, such updates in the DNS master file should be automatically reflected When a change is made, the information is sent to the primary DNS server which, in turn, updates the zone Primary servers may update secondary servers actively. Another mechanism, the secondary servers check periodically for any updates in the primary server: this is called passive update Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200750

51 ENCAPSULATION DNS may use either UDP or TCP  UDP is used when the size of the response message is less than 512 bytes because most UDP packages have a 512- byte packet size limit.  If the size of the response message is more than 512 bytes, a TCP connection is used. In both cases, the well-know port number of the server is 53 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 200751


Download ppt "Ch25 Ameera Almasoud 1 Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007."

Similar presentations


Ads by Google