[Dnsmasq-discuss] Static IP and hostname

Simon Kelley simon@thekelleys.org.uk
Sat, 2 Apr 2005 09:08:37 +0100 (BST)


> -----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
>

I suspect further IP problems, rather than DHCP problems: the DHCP
discover/offer process works using hardware-level broadcasts, but the next
stage needs IP connectivity. It looks like the DHCP server doesn't know
how to route to the 192.168.1.x network.
I suggest manually configuring the host to 192.168.1.1 and then checking
you can ping the DHCP server. If not, fix the IP/routing configuration
until you can, and then try DHCP again.

HTH

Simon.