[Dnsmasq-discuss] Static IP and hostname

Donnie Berkholz spyderous@gentoo.org
Fri, 01 Apr 2005 12:48:47 -0800


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Simon Kelley wrote:
| What is the address and netmask of the interface on the dnsmasq-running
| machine which connects to the 192.168.... network? My guess is that the
| netmask is 255.255.255.0, which would be conventional.
| If so, then your dhcp-range is saying "hand out statically configured
| addresses on the network 192.168.0.0-192.168.0.255". But your static
| addresses are on the 192.168.1.1 network, so dnsmasq can't hand out those.
| You don't have any dynamic address range configured for that network
| either, so dnsmasq is out of possible addresses, hence the message.
| The solution is to change the addresses in the dhcp-host lines to be on
| the 192.168.0.x network, or widen the netmask so that 192.168.1.x network
| comes in the same network as 192.168.0.x

I tried changing the netmask to 255.255.254.0 on somebody else's
suggestion on IRC, which seems to almost work but still doesn't. The log
shows:

Apr  1 12:14:50 master dnsmasq[24724]: DHCPDISCOVER(eth0) <hw address>
Apr  1 12:14:50 master dnsmasq[24724]: DHCPOFFER(eth0) 192.168.1.1 <hw
address>

And the client hangs while trying to get an IP.

I've got:
dhcp-range=192.168.0.0,static,255.255.254.0
dhcp-host=<hw addr>,node01,192.168.1.1

This also doesn't work:
dhcp-range=192.168.0.0,192.168.0.255,255.255.254.0

But if I just prevent static assignment by changing the netmask to
255.255.255.0, it works:
dhcp-range=192.168.0.0,192.168.0.255,255.255.255.0

This doesn't work, because it hangs when attempting to assign the static
address:
dhcp-range=192.168.0.0,192.168.1.255,255.255.254.0

This does work, simply avoiding the static range:
dhcp-range=192.168.0.0,192.168.0.255,255.255.255.0
dhcp-range=192.168.1.10,192.168.1.255,255.255.255.0

Any ideas?

Thanks,
Donnie
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCTbOvXVaO67S1rtsRAjryAJ4p2sWcnv6oh85nffzN2j3GMS5bAQCgkCb6
OXzTchbjri9+B1TKyLcVTKE=
=iX5S
-----END PGP SIGNATURE-----