Changes

Jump to: navigation, search

OPS535-L2

1,679 bytes added, 02:35, 19 September 2016
Running and testing the DNS server
** named-checkzone can be used to check for type or syntax errors in your zone files.
Please check out the man page for details.
== Verify that your DNS server is running ==
* use the "ss" command or the netstat command - what information should you look for?
== Test the correctness of your DNS server's responses ==
* use the nslookup DNS client command line utility to query your DNS server for SOA, NS, A, and PTR resource records.
For example, if an authoritative DNS server with IP address 192.168.99,53 has the cp.net zone file:
<pre>
$TTL 300
@ IN SOA pri.cp.net. root.cp.net. (
20151111 ; serial
1h ; refresh
15m ; retry
3d ; expire
10m) ; minimum
IN NS pri.cp.net.
pri IN A 192.168.99.53
www IN A 192.168.99.80
mail IN A 192.168.99.25
co IN A 192.168.99.153
rns IN A 192.168.99.253
</pre>
* To query the SOA record using the nslookup command "nslookup -query=SOA cp.net 192.168.99.53" will yield the following result:
<pre>
[root@pri named]# nslookup -query=SOA cp.net 192.168.99.53
Server: 192.168.99.53
Address: 192.168.99.53#53
 
cp.net
origin = pri.cp.net
mail addr = root.cp.net
serial = 20151111
refresh = 3600
retry = 900
expire = 259200
minimum = 600
 
</pre>
 
* To query the NS record using the nslookup command "nslookup -query=NS cp.net 192.168.99.53" will yield the following result:
<pre>
[root@pri named]# nslookup -query=NS cp.net 192.168.99.53
Server: 192.168.99.53
Address: 192.168.99.53#53
 
cp.net nameserver = pri.cp.net.
</pre>
 
* To query the A record for mail.cp.net using the nslookup command "nslookup -query=A mail.cp.net. 192.168.99.53" will yeild the following result:
<pre>
[root@pri named]# nslookup -query=A mail.cp.net 192.168.99.53
Server: 192.168.99.53
Address: 192.168.99.53#53
 
Name: mail.cp.net
Address: 192.168.99.25
</pre>
1,760
edits

Navigation menu