[Dnsmasq-discuss] Cannot setup DHCP

Simon Kelley simon@thekelleys.org.uk
Wed, 01 Dec 2004 16:39:44 +0000

>    Hi, folks!
> I have dnsmasq-2.18 on my linux box with 2 network intefaces:
> eth0 = and eth1 = public IP.
> /etc/dnsmasq.conf is like following
> (I skip comments, blank lines and default values):
>     bind-interfaces
>     interface lo
>     interface eth0
>     expand-hosts
>     dhcp-range=,,12h
>     read-ethers  # really exists and accepted by dnsmasq
>     dhcp-option=42,  # NTP server = dnsmasq host
> Dnsmasq starts and acts as DNS-service successfully,
> also listens on UDP port 67, _but_! does nothing
> as DHCP-service: "dhcpcd -T eth0" sleeps until timeout.
> Periodically dnsmasq puts to syslog following message:
> "dnsmasq: no address range available for DHCP request via eth0".
> I don't understand this error, because
> is completely owned by
> Well, can somebody explain me: what's wrong here?
> WBR, Ilya

Carefully check the configuration of eth0, both the netmask and 
broadcast address. Dnsmasq uses that information when looking for a 
valid DHCP range, and if (for instance) you had set the netmask to, then you would see the behaviour you are describing.

It's possible to override the netmask and broadcast addresses by 
including them in the dhcp-range, like so:


Are you using a DHCP relay? If so then including the netmask in the 
dhcp-range is mandatory for networks connected via the DHCP relay.