Using underscores in DNS hostname in Bind (named) 1

Underscores are not valid characters in hostnames.

If you have configured your DHCP server to register hostnames in DDNS, following issue may occur: some windows hostnames may contain “_” in their names.
If you do so, following error will be logged by bind:
zone bad owner name (check-names)

and in logs from isc dhcpd, you will see:
Unable to add forward map from to timed out

Although underscores in hostnames are “illegal” (according to RFC 952, and RFC 1123, also RFC about SRV records should be taken into account) they are complying to name restrictions for windows hostname.

Underscores have special use in DNS. Although, if you need to use underscores for your hostnames (i.e. hosts that are using your DHCP might use underscores), you may disable checks in bind.

Simply put to your zone clause in bind following statement:

[cc lang=”whitespace”]
check-names ignore;

You can also use warn instead ignore.

See documentation of BIND zone clause.

 check-names ( fail | warn | ignore );

One comment on “Using underscores in DNS hostname in Bind (named)

  1. Pingback: DNS Service not Start in RHEL 6.4 64 bit

Leave a Reply