ServerGuide DNS: ping is not a lookup test and data in sample zonefile wrong for given example

Bug #339910 reported by Marc Luethi
2
Affects Status Importance Assigned to Milestone
Ubuntu Documentation
Fix Released
Undecided
Adam Sommer

Bug Description

Hi all!

https://help.ubuntu.com/8.10/serverguide/C/dns-troubleshooting.html

suggests that:

------------------------------
ping

Once a host has been configured to use the new nameserver one of the simplest tests is the ping utility. From a terminal prompt enter:

ping example.com

This tests if the nameserver can resolve the name example.com to an IP Address. The command output should resemble:

PING example.com (192.168.1.10) 56(84) bytes of data.
64 bytes from ns (192.168.1.10): icmp_seq=1 ttl=64 time=0.800 ms
64 bytes from ns (192.168.1.10): icmp_seq=2 ttl=64 time=0.813 ms
------------------------------

This section has errors in two aspects:

A.
Using "ping" to test hostname resolution is the wrong approach. Ping is a tool that tests if you can get an "ICMP echo request" message to a host and receive an "ICMP echo" message back. Nothing more.

If someone for some reason happens to have a weird configuration in /etc/nsswitch.conf, a completely different name resolution mechanism might return an unuseable or even false (either positive or negative) answer. I suggest moving the "ping" section to come after the "dig" section and rephrasing it to read "now let's demonstrate how applications make use of DNS to resolve a host name".

B.
The example zone data for example.com, given in (https://help.ubuntu.com/8.10/serverguide/C/dns-configuration.html), the page before this one, will not enable resolution of the "example.com" name:

-----------------------
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ns.example.com. root.example.com. (
                              1 ; Serial
                         604800 ; Refresh
                          86400 ; Retry
                        2419200 ; Expire
                         604800 ) ; Negative Cache TTL
;
@ IN NS ns.example.com.
@ IN A 192.168.1.10
ns IN A 192.168.1.10
------------------------

There is no IN A record for example.com. "ping example.com" will return "ping: unknown host example.com". The ping test should either be for ns.example.com, or the sample zone file should include the IN A record for example.com.

However, I suggest not to include the IN A record for example.com, as it can be quite confusing for a novice user that what looks like an "upper level" domain name (and is therefore not a "host" or "computer") can have an IP address. The "ping test" (if included at all, see A.) should test for ns.example.com instead of example.com.

regards

Marc

Related branches

Marc Luethi (netztier)
description: updated
Revision history for this message
Adam Sommer (asommer) wrote :

Thank your for reporting this bug and helping to make Ubuntu better. I've added your changes to revision 220. Great stuff, thanks again for reporting those errors.

Changed in ubuntu-doc:
assignee: nobody → asommer
status: New → Fix Committed
Revision history for this message
Matthew East (mdke) wrote :

This bug was fixed in the package ubuntu-docs - 9.04.4

Changed in ubuntu-doc:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.