[Dnsmasq-discuss] Cannot setup DHCP
Wed, 01 Dec 2004 16:57:27 +0000
Content-Type: text/plain; charset=iso-8859-5
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 192.168.0.10/24 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,192.168.0.150,12h
> > read-ethers # really exists and accepted by dnsmasq
> > dhcp-option=3D42,0.0.0.0 # NTP server =3D 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 192.168.0.50-150
> > is completely owned by 192.168.0.10/24.
> > Well, can somebody explain me: what's wrong here?
> > WBR, Ilya
> 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
> 255.255.255.128, 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:
> 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.
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 <email@example.com>
Gentoo Linux Developer
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
-----END PGP SIGNATURE-----