[Dnsmasq-discuss] Cannot setup DHCP

Roy Marples uberlord@gentoo.org
Wed, 01 Dec 2004 16:57:27 +0000

Content-Type: text/plain; charset=iso-8859-5
Content-Transfer-Encoding: quoted-printable

On Wed, 2004-12-01 at 16:39 +0000, Simon Kelley wrote:
> =B8=DB=EC=EF =B5=D2=E1=D5=D5=D2 wrote:
> >    Hi, folks!
> > I have dnsmasq-2.18 on my linux box with 2 network intefaces:
> > eth0 =3D and eth1 =3D 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=3D192.168.0.50,,12h
> >     read-ethers  # really exists and accepted by dnsmasq
> >     dhcp-option=3D42,  # NTP server =3D dnsmasq host
> >=20
> > 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".
> >=20
> > I don't understand this error, because
> > is completely owned by
> > Well, can somebody explain me: what's wrong here?
> >=20
> > WBR, Ilya
> >=20
> Carefully check the configuration of eth0, both the netmask and=20
> broadcast address. Dnsmasq uses that information when looking for a=20
> valid DHCP range, and if (for instance) you had set the netmask to=20
>, then you would see the behaviour you are describing.
> It's possible to override the netmask and broadcast addresses by=20
> including them in the dhcp-range, like so:
> dhcp-range=3D192.168.0.50,,,,12h
> Are you using a DHCP relay? If so then including the netmask in the=20
> dhcp-range is mandatory for networks connected via the DHCP relay.
> Cheers,
> Simon.

I've seen this behaviour too with dhcpcd, but cannot get to the bottom
of it. I think it's dhcpcd's fault

If an entry exists for the host in dnsmasq.leases, then dhcpcd gets it's
address just fine and everything is dandy. If there is not an entry,
then dhcpcd times out - but still gets its information and an entry
appears in dnsmasq.leases

Other dhcp clients (dhclient, pump, udhcpc) do not have this problem
with dnsmasq. I was hoping to test dhcpcd against another dhcp server
before reporting this myself though.


Roy Marples <uberlord@gentoo.org>
Gentoo Linux Developer

Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.2.6 (GNU/Linux)