Project

General

Profile

Actions

Bug #3518

closed

Sometimes DHCP hostname registration does not work for a newly registered host

Added by Florent Thiery almost 12 years ago. Updated over 10 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
DNS Forwarder
Target version:
-
Start date:
03/13/2014
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
Affected Architecture:

Description

Even if the setup works most of the time (i.e. hosts register their hostname through DHCP, which can then be resolved with hostname.domain.com), sometimes it fails to work (a dig @routerip fails).

Failed resolve:

host myhost
Host myhost not found: 3(NXDOMAIN)

By watching the systems logs (resolver), normally when a new host registers, you can see "dnsmasq73263: read /etc/hosts - 220 addresses", but when it fails nothing happens anymore. I checked that /var/dhcpd/var/db/dhcpd.leases contains the new lease, but not the /etc/hosts nor /var/etc/hosts.

I am guessing that for an unknown reason, the HUP signal (by dhcpd ?) is not being sent properly. I don't see anything obvious in the logs.

My current workaround is to create a cron job, which triggers a dnsmasq dhcp hostfile refresh, by sending a HUP signal every minute. Not nice but seems to work.

1    *    *    *    *    root    /bin/pkill -HUP -f dnsmasq

Our setup is quite standard i guess (SOHO type), with a 192.168.1-100 reserved range (for static & static dhcp), 100-254 range available for dhcp, and some static DNS overrides defined in the DNS forwarder.

Settings:
  • DHCP server enabled
  • DNS Forwarder enabled, with the following subfeatures:
    • Register DHCP leases in DNS forwarder
    • Register DHCP static mappings in DNS forwarder
Actions

Also available in: Atom PDF