ubuntu:bind:test_bind9
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ubuntu:bind:test_bind9 [2020/12/09 16:18] – peter | ubuntu:bind:test_bind9 [2020/12/09 16:23] (current) – peter | ||
---|---|---|---|
Line 62: | Line 62: | ||
;; Query time: 1 msec | ;; Query time: 1 msec | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== ping ===== | ||
+ | |||
+ | To demonstrate how applications make use of DNS to resolve a host name use the ping utility to send an ICMP echo request: | ||
+ | |||
+ | <code bash> | ||
+ | ping example.com | ||
+ | </ | ||
+ | |||
+ | This tests if the nameserver can resolve the name ns.example.com to an IP Address. The command output should resemble: | ||
+ | |||
+ | <code bash> | ||
+ | PING ns.example.com (192.168.1.10) 56(84) bytes of data. | ||
+ | 64 bytes from 192.168.1.10: | ||
+ | 64 bytes from 192.168.1.10: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== named-checkzone ===== | ||
+ | |||
+ | A great way to test your zone files is by using the **named-checkzone** utility installed with the bind9 package. | ||
+ | |||
+ | This utility allows you to make sure the configuration is correct before restarting BIND9 and making the changes live. | ||
+ | |||
+ | To test our example Forward zone file enter the following from a command prompt: | ||
+ | |||
+ | <code bash> | ||
+ | named-checkzone example.com / | ||
+ | </ | ||
+ | |||
+ | If everything is configured correctly you should see output similar to: | ||
+ | |||
+ | <code bash> | ||
+ | zone example.com/ | ||
+ | OK | ||
+ | </ | ||
+ | |||
+ | Similarly, to test the Reverse zone file enter the following: | ||
+ | |||
+ | <code bash> | ||
+ | named-checkzone 1.168.192.in-addr.arpa / | ||
+ | </ | ||
+ | |||
+ | The output should be similar to: | ||
+ | |||
+ | <code bash> | ||
+ | zone 1.168.192.in-addr.arpa/ | ||
+ | OK | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
ubuntu/bind/test_bind9.1607530737.txt.gz · Last modified: 2020/12/09 16:18 by peter