For your convenience, here are the steps you followed to prepare the zone files:
- You are in the /home/user1 directory on a system named dns. The system’s IP address is 192.168.34.10. You are going to establish this server as a primary DNS server. You have already copied the corporation.forward.zone file to /home/user1. Open the file in the vi text editor.
- 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.
- 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 192.168.34.35. 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.
sandi IN A 192.168.34.35
- 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.
- 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.
HINFO “Intel” “NT”
- 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 corporation.reverse.zone file and placed in your current directory (user1).
Open this file in
- 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.
- Enter the proper PTR record for the host named sandi. The host IP address 192.168.34.35. 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.
35 IN PTR sandi.corporation.com.
- You have finished editing the file, so let’s assume you saved the file and closed vi. Now, using the
cp command, copy the corporation.forward.zone file to the proper directory so that named can read it.
cp corporation.forward.zone /var/named
- Copy the corporation.reverse.zone file to the proper directory.
cp corporation.reverse.zone /var/named
- Change to the /var/named directory.
- List the files in the /var/named directory using the
ls –l command.
- 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.