[Dnsmasq-discuss] dnsmasq dynamic DNS?

Simon Kelley simon at thekelleys.org.uk
Tue Sep 22 07:44:15 BST 2009

Ross Boylan wrote:
> dnsmasq seems to be handing out IPs and domains OK, but querying it does
> not return the newly registered machine.  Is this supposed to work?  If
> so, how can I diagnose and fix it?
> I'm running 2.45-1+lenny1 on a Debian amd64 system.  It is running on a
> real machine, but serving a vde2 network running kvm virtual machines
> (also Debian Lenny).
> dnsmasq does return IPs of public systems.  It seems to be what is
> listening:
> tcp        0      0    *               LISTEN      1456/dnsmasq
> tcp        0      0 *               LISTEN      4020/rpc.statd
> tcp6       0      0 :::53                   :::*                    LISTEN      1456/dnsmasq
> udp        0      0    *                           1456/dnsmasq
> udp        0      0  *                           4456/avahi-daemon:
> udp6       0      0 :::53                   :::*                                1456/dnsmasq
> udp6       0      0 :::5353                 :::*                                4456/avahi-daemon:
> udp6       0      0 :::38532                :::*                                4456/avahi-daemon:
> (from netstat on the host system).
> I'm using dig to query the server, from both the host and virtual
> machine. The queries are both forward and reverse.  The VM says its FQDN
> is vm-lenny06BCU.kvm.lan (could that particular name be a problem
> because it is long or has a dash?).  It's at  So
> dig vm-lenny06BCU.kvm.lan
> dig vm-lenny06BCU (from the VM only; kvm.lan is not the host machine's
> natural domain)
> dig -x
> Also dig @ from the host, dig @ from VM (since
> resolv.conf seems to say that is where to find the server).
> I'd appreciate being cc'd.
> Thanks.
> Ross Boylan

Two things to check:

1) Add log-queries to /etc/dnsmasq.conf and restart it. You should be 
able to see test queries in the syslog. That confirms that the DNS 
replies are coming from where you think they are.

2) Look at /var/lib/misc/dnsmasq.leases. The line for your VM should 
have its name. If there's only an asterix in the name field, then the 
DHCP client in the VM is not supplying a name when it asks for a DHCP 
lease. A quick re-configuration in /etc/dhclient.conf should fix that.



More information about the Dnsmasq-discuss mailing list