For your convenience, here are the steps you followed to start the name server process and troubleshoot its rejection of the forward zone file:
- You are now ready to start the
named
process and have it read the named.boot file. Type /usr/sbin/named
to do this.
- Now that you have started the
named
process, you will want to see how well it is running. Let us consult the log files.
Type the following command: tail /var/log/messages | grep named
. This will search the last 10 lines of the log file for all references to named
.
-
Notice that there is a problem with the corporation.forward.zone file. Specifically,
named
has read the file and thinks that the IN entry for your first DNS server is to be added to the .com domain.
The named
process has rejected the entire forward zone because of this problem. Open the corporation.forward.zone file in vi so you can see why the zone was rejected.
Solution: vi corporation.forward.zone
-
Notice that the IN entry for the first server is not indented; therefore, the IN entry is being read as a KEY. In this instance, the IN entry is being read as a domain name.
For the purpose of this simulation, press the Enter key on your keyboard to add space before the first server’s IN entry.
- You have now solved the problem. Normally, you would press the Esc key plus ZZ to save changes and exit the vi
text editor
.
For the purpose of this simulation, let’s assume you have already done so. Now, issue a kill -HUP
command for the named
process so that it can re-read the named.boot and the zone files.
Remember, the PID is 229. Solution: kill -HUP 229
- Let us check the log file again and make sure everything is running properly. Type
tail /var/log/messages | grep named
again.
-
Notice the entries that inform you the nameserver has reloaded, and that it is ready to receive queries. The server has started successfully, and it has not rejected the corporation.com zone. Now, it is time to test your configuration. First, type
nslookup
.
- Use
ls
to list the zone file you have created. Solution: ls
- You have now received the SOA record from your zone. This record confirms that your DNS server is running. Type
exit
to quit the code>nslookup program.
-
From this evidence, you can confirm that your DNS configuration was successful.
Now that you are confident of your DNS server, you are ready to configure this system’s /etc/resolv.conf file so you can use the server as the name server.
First read /etc/resolv.conf using
cat
.
-
You can see that the first line of this file contains an entry that tells the system which domain it is in.
Without this entry, the system would not know its domain. If you look at the next line, you will see that this file is missing a primary DNS entry.
Open /etc/resolv.conf in vi so you can solve this problem. Be sure to use the full path.
- Specify the IP address of dns.corporation.com next to the nameserver keyword. Remember that the IP address is 192.168.34.10.
- Normally, you would press the Esc key plus ZZ to save your changes and exit vi. For the purpose of this simulation, we will assume you have done this and are ready to complete the troubleshooting phase of your DNS setup. Type
ping -c 4 jacob
to send four packets to jacob
.
- You now have a fully functional DNS server, which is also part of this domain. All that remains for you do is configure the other systems mentioned in the zone files as clients. Nevertheless, you have now accomplished the basic steps for configuring a DNS domain.