Phill Edwards wrote:
I've been using dnsmasq ages and I love it. However, I've always had 1
problem which I really want to fix now. The problem is that I have a
DHCP client PC which I want to be allocated the same IP address
whenever it logs on based on its MAC address. So I have this in
/etc/dnsmasq.conf:

### PME - Always allocate XXX a fixed IP
dhcp-host=00:0E:61:2E:0B:90,192.168.0.20

But whenever this machine connects it gets allocated a different IP
address (it actually gets 192.168.0.185) . I don't understand why this
is because I thought this was the syntax. Can anyone advise what the
trick is to get this working?

Also, when I do make a change, do I have to do something (as well as
restarting dnsmasq) to "flush" the current settings. Delete the
/var/lib/misc/dnsmasq.leases file, for example?


The most likely explanation is that 192.168.0.20 is leased to another MAC address, possibly as an infinte lease. Check /var/lib/misc/dnsmasq.leases.

If that's the problem, you don't have to flush the whole leasefile, but do the folowing:

stop dnsmasq
edit the leasefile
start dnsmasq.

If you just edit the leasefile when dnsmasq is running, it will overwrite your changes.

HTH

Simon.

Reply via email to