Testing the Servers

Now that we've completed configuring the master and slave, let's check that they are working OK. The main tools we'll use for doing this are ping and nslookup. Nslookup ignores the settings defined in the name service switch file (/etc/nsswitch.conf) and uses DNS to perform any lookups. This will be fine for checking that the underlying files are set up correctly.

We need to make sure that we can resolve external names (assuming we are connected to the Internet at this point), hosts connected to the local network, the “localhost” entry, and all the above using reverse lookups. Once we are happy this is working, we'll use ping to do some “general” checks. This will use the switch file and therefore confirm that it's also set up correctly and actually using DNS.

First, we'll try to look up a host on the local network. One thing to point out is that we may see some responses that don't quite seem right. These are the “nonauthoritative answer” type responses. This means that the first time we made the request we received an “authoritative” answer back from the remote name server, which was then cached by our local one. Any subsequent requests will be answered by our local server, which, as the error suggests, is only authoritative for our own domain:

helium# nslookup
Default Server:  antimony.solarisbootcamp.com
Address:  192.168.44.51

> xenon
Server:  antimony.solarisbootcamp.com
Address:  192.168.44.51

Name:    xenon.solarisbootcamp.com
Address:  192.168.44.54

> cesium
Server:  antimony.solarisbootcamp.com
Address:  192.168.44.51
Name:    cesium.solarisbootcamp.com
Address:  192.168.44.55

Good. That worked OK, so let's try an external host name:

> www.sun.com
Server:  antimony.solarisbootcamp.com
Address:  158.43.128.72

Non-authoritative answer:
Name:    www.sun.com
Address:  192.18.97.241

Now, let's look for something that will test the reverse files—in other words, an IP address:

> 192.168.44.53
Server:  antimony.solarisbootcamp.com
Address:  192.168.44.51

Name:    iodine.solarisbootcamp.com
Address:  192.168.44.53

Lastly, we'll check that we can see the “localhost” entry using both the forward and reverse files:

> localhost
Server:  antimony.solarisbootcamp.com
Address:  192.168.44.51

Name:    localhost.solarisbootcamp.com
Address:  127.0.0.1
> 127.0.0.1
Server:  antimony.solarisbootcamp.com
Address:  192.168.44.51

Name:    localhost.solarisbootcamp.com
Address:  127.0.0.1

Next, we can switch to the slave server using the command below and try a set of similar tests to prove that it is working OK:

> server 192.168.44.52
Default Server:  tellurium.solarisbootcamp.com
Address:  192.168.44.52

> <run the above tests again>

Good. Both forward and reverse lookups are working OK. We've only run through a few sample checks here; in practice you may want to check the system a little more thoroughly. For example, you could retrieve all the records about a machine using the set type=any command.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset