31.3 Introduction to the Domain Name System

   

31.3 Introduction to the Domain Name System

A domain name system consists of three major parts that interact with each other in the name resolution process. These are as follows .

  • A tree-like hierarchical name space is used when assigning names to hosts. A domain name is used as a common name for a set of hosts (not necessarily on the same network). A complete host name is a combination of host name and domain name. This is called a fully qualified domain name (FQDN). The different parts of an FQDN are separated by the dot character. For example, the FQDN for a host myhp in domain boota.com is myhp.boota.com .

  • One or more name servers used to resolve a host name to its IP address and vice versa.

  • Resolver library functions used by an application program to request host name resolution. These resolver functions determine which name resolution service is being used ( /etc/hosts , NIS, or DNS) and then use this service to resolve a name. The gethostbyname() function is used to map a host name to an IP address, while the gethostbyaddr() function is used to map an IP address to a host name.

The name space and name server components of the domain name system are discussed in more detail in the following part of the chapter.

Name Space

A name space is a tree-like structure starting with top-level domain names as shown in Figure 31-2. The top-level domain names in this figure are edu , com , and org . The name of a domain is written from bottom to top. Each level of the tree is separated by a dot character while writing the domain name boota.com .

Figure 31-2. Domain name system hierarchy.

graphics/31fig02.gif

Many hosts are included in a domain name. In Figure 31-2, three hosts with names myhp , hp0 , and hp23 are shown in domain boota.com . Each of these hosts has a fully qualified domain name where the domain name is appended to the host name using a dot character. The fully qualified domain name for host hp23 is hp23.boota.com .

If you are connecting your network to the Internet, you have to register your domain name with any of the domain name registrars on the Internet. A list of domain name registrars can be found at the http://www.internic.net Web site. If you don't want to connect your network to any public network, you can use a domain name of your own choice.

RELATIVE AND ABSOLUTE NAMES

Resolver keeps a record of the local domain names in the /etc/resolv.conf file. If you try to resolve a host name without specifying a domain name, the resolver automatically appends the local domain name to the host name before resolving it. For example, if you try to resolve host name myhp and this host lies in domain boota.com , the resolver will resolve myhp.boota.com when using DNS. This method is called relative host name resolution. However, if you put a dot at the end of the name, the resolver takes this name as an absolute name and does not append the domain name to it. It then tries to resolve it using DNS.

REVERSE NAME LOOKUP

The reverse name lookup is used when you have an IP address and want to map it to a host name. This is often required for authentication purposes on the server side. The incoming connection requests contain the IP address of a client. The server has to resolve this IP address to map it to a host name to verify whether the host is allowed to establish a connection. The in-addr.arpa name space is used for reverse host name resolution. Here, IP addresses are written in reverse order followed by keyword in-addr.arpa . You will see an example of this name space in the reverse name resolution configuration file later in this chapter.

Name Server

Three types of name servers are used on the Internet. Each of these name servers is used in a particular situation. Primary and secondary name servers have data base resources that are used to resolve local host names. The caching server doesn't have any record of local hosts and is used to resolve host names with the help of other name servers.

NAME SERVER ZONES

A zone is a part of a domain name. A primary domain name server has the authority of a domain. It can then divide the domain into zones and delegate authority of these zones to other name servers. This means that an administrator of a domain can add or remove hosts in the zone of its authority. A delegated name server has authority over the delegated zone and is able to add, remove, or modify hosts in the zone.

PRIMARY NAME SERVER

A primary name server maintains data about hosts in the domain and pointers to delegated servers responsible for zones inside the domain. It is the primary point of contact for resolving host names in its domain. A primary server can create subdomains delegated to other servers.

SECONDARY NAME SERVER

The secondary server is used as a backup server in case a primary server fails. It takes its data from the primary server and synchronizes them with the primary server after defined intervals of time.

CACHING NAME SERVER

It does not have local data files. It is used only to look up host names and distribute load in large networks where several clients are resolving host names.


   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net