Configuring DNS   «Prev  Next»

Prepare Zone Files

For your convenience, here are the steps you followed to prepare the zone files:
  1. You are in the /home/user1 directory on a system named dns. The system’s IP address is You are going to establish this server as a primary DNS server. You have already copied the file to /home/user1. Open the file in the vi text editor.
  2. You need to create an A entry for a host named sandi. The system is a Windows NT Workstation on an Intel platform. Place the entry immediately after the james entry. For the purpose of this simulation, just press the Enter key on your keyboard and we will add a blank line after the james entry, with IN already in place. Remember that IN refers to Internet and is the only entry you will ever see in this position.
  3. Enter the KEY, TYPE, and VALUE for this A entry. Here is the information you’ll need: the host is named sandi. It is on the 192.168. 34.0 subnet. Its IP address is We won’t be simulating vi, so For the purpose of this simulation, type the KEY, then use the Tab key on your keyboard to go to the fields for the TYPE and VALUE. Press the Enter key on your keyboard when you have entered all three.
    Solution: sandi IN A
  4. You need only put a space after each part of the entry. Some administrators use a tab entry after each field for readability, but such tabs are not required. Next, let’s enter the HINFO information for sandi.
  5. The HINFO record you created begins with white space. Remember that an initial KEY of white space means that the KEY from the preceding record is repeated. Therefore, this HINFO record also applies to sandi. Now enter the appropriate TYPE and VALUE for this record. This entry should note the platform (Intel), as well the operating system (NT) of sandi. First type the TYPE entry, then enter the items for the VALUE entry. Don’t forget to enclose the platform and operating system names in quotation marks.
    Solution: HINFO “Intel” “NT”
  6. At this point, you could enter additional A entries, or you could create CNAME or MX entries. But let's continue. Suppose you have saved the file and closed vi. You have also copied the file and placed in your current directory (user1). Open this file in vi.
  7. Now you need to enter the proper PTR record for the host named sandi. Press the Enter key and we'll add the line for this information with the IN entry already in place.
  8. Enter the proper PTR record for the host named sandi. The host IP address First enter the host number as the KEY entry. Then enter the record type. Finally, enter the VALUE entry. Remember that the VALUE is the result of the lookup. Don’t forget the period at the end of the VALUE.
    Solution: 35 IN PTR
  9. You have finished editing the file, so let’s assume you saved the file and closed vi. Now, using the cp command, copy the file to the proper directory so that named can read it.
    Solution: cp /var/named
  10. Copy the file to the proper directory.
    Solution: cp /var/named
  11. Change to the /var/named directory.
  12. List the files in the /var/named directory using the ls –l command.
  13. Notice that the loopback and root cache files are already in this directory. If they were not in this directory, you would have to create the loopback file and obtain the cache file, then copy each to this directory.