Domain Name System (DNS) is a key Internet service, one that enables us to use easy-to-remember names for websites and servers on the Internet, even though TCP/IP requires numeric IP addresses for data transfers. Network Information Service (NIS) is another useful service for local networks to share configuration files, such as users, groups, and passwords. Red Hat Linux comes with everything needed to run the servers and clients for DNS and NIS. This chapter describes how to use DNS and NIS in Red Hat Linux.

By reading this chapter, you learn the following:

  • DNS is a distributed database that holds information about hostnames, IP addresses, and mail routing. Internet applications use DNS to convert hostnames, such as into IP addresses.

  • DNS is documented in RFCs 1034 and 1035. Many other RFCs document various updates and extensions to DNS.

  • All hosts on the Internet use DNS. Each host needs a name server it can query to resolve hostnames into IP addresses. Typically, the ISP provides the name servers. The IP addresses of the name servers are listed in the /etc/resolv.conf file.

  • Red Hat Linux comes with the Berkeley Internet Domain (BIND) system, a well-known implementation of DNS.

  • To set up a name server, you have to prepare the /etc/named.conf configuration files and zone files referenced in that configuration file. The zone files are usually stored in the /var/named directory.

  • Red Hat Linux comes with the configuration files for a caching name server that loads the addresses of a few authoritative servers for the root domain and gets all its data by caching responses to queries resolved by contacting other name servers. This chapter walks you through the process of setting up the caching name server and explains the configuration files the server uses.

  • You can easily extend the caching name server to a primary name server for your domain by adding a master zone to the /etc/named.conf file and preparing the appropriate zone files.

  • You can use BIND utilities such as dig and host interactively query the DNS database interactively.

  • NIS was developed by Sun Microsystems as a way of sharing configuration files among a number of computers in a local area network. The password file and group information files are typically shared by using NIS. This enables users to log in by using the same user name and password on all computers in the local network.

  • NIS clients have to define their NIS domain (a name for all the computers an NIS server serves); set up the NIS configuration file /etc/yp.conf; and run the ypbind daemon. All NIS client applications access the NIS server through the local ypbind process.

  • To set up a master NIS server, you have to create the NIS maps-the NIS databases-by running /usr/lib/yp/ypinit; set up the configuration file /etc/ ypserv.conf, and start the NIS server, ypserv.

  • You can test the NIS server by running NIS client applications, such as ypwhich, yppoll, ypcat, and ypmatch.

  • If you want users to be able to set or change NIS passwords by using the yppasswd command, you must also run the rpc.yppasswdd daemon on the master NIS server.