Page 128 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 128
Network Operating Systems-I
notes The most essential tool for testing DNS is the ping command. If you can ping a Web server using
its IP address but not it’s domain name, you have a DNS problem. If you can ping a server using
its domain name you’ll notice that the server’s IP address is also displayed. Verifying that this is
the correct IP address will verify that DNS is working properly. Another thing ping can tell you
is if you’re pinging an actual server or an alias. Using the MIT example again, you may type in
ping www.mit.edu
but the response will be something like
Pinging DANDELION-PATCH.mit.edu
One more common tool for testing DNS is nslookup (name server lookup) and it’s available on
Linux systems and NT-class Windows systems (NT-WS, 2000 Pro). As you saw earlier in this
page this command will show you what name server your PC is using to resolve names, as well
as return hostname and address information on the server that’s specified as the target of the
command. However, it also has an interactive mode that increase its usefulness. If you simply
type in:
nslookup
and you’ll get a > prompt. There are some statements that you can enter at his prompt. One
helpful one is when you want your system to send queries to a different, other than the default,
name server. At the prompt type in the ‘server’ command followed by the IP address of the DNS
server to use:
server 192.168.10.10
Then you just type in the domain name you want information on at the prompt. You’ll see in the
answer that the name server being queried has changed to the one you specified. Type ‘exit’ at
the prompt when you’re done. Another similar tool on Linux systems is the dig command. You
can specify the alternate DNS server to use on the command line:
dig 192.168.10.10 mit.edu any
The any parameter tells it to return information on all record types. Check the man pages for dig
and nslookup for more information.
If you wish to make sure that BIND isn’t having a problem with your zone files, you can check
the syslog after you boot the system (which is when BIND starts up and reads the zone files). At
a shell prompt just type in:
nano /var/log/syslog
and look near the bottom of the file. You’ll see messages when BIND was started. Ensure to see if
any of them refer to any errors that were encountered. If it didn’t have a problem with the zone
file you’ll see it referenced along with:
loaded serial 1
indicating that it has set the serial number (version) to 1.
6.1.6 a simple Dns server
As stated earlier, the most widely used DNS application is called BIND and installing it is simply
a matter of entering the command:
apt-get install bind9
Congratulations! You now have a easy DNS server. Now just change the DNS server settings
in the TCP/IP configuration files on the workstations on your LAN so that they start using this
server as their preferred DNS server. You can use your ISP’s DNS server(s) as alternate servers
122 LoveLy professionaL university