[Dnsmasq-discuss] Some clients get wrong IP

Simon Kelley simon at thekelleys.org.uk
Tue Dec 20 17:59:48 GMT 2011


On 20/12/11 17:46, Claes Parflo wrote:
> Thanks. So if I understand you correctly. If I want to add a camera
> fresh from the manufacturer it wouldn't be a problem. Since it
> doesn't exist in any lease file it should get the MAC bonded IP as
> specified? If I want to test than I have to edit dnsmasq.leases to
> get it correct immidiately.

The problem you are seeing is that an IP address is still in use by a
previous lease: that's not affected by the MAC address at all.

If  a camera with <MAC1> has 192.168.0.9 and you then configure dnsmasq
to give 192.168.0.9 to a  second camera with <mac2> it will still fail
even of <mac2> has never been seen before, unless the lease fro
192.68.0.9 to <mac1>  has expired or been removed.

> 
> By the way, after the 20m lease expired I use for testing purposes
> the IP was automatically correct in leases file…
> 

You can make the leases for just some host very short, by giving
lease-time in dhcp-host lines. That might help. There's also a little
utility called dhcp_release in contrib/wrt in the dnsmasq tarball. If
you're testing lots of cameras it might be work using that in the test
harness to dump one set of leases before starting on the next batch.


Cheers,



Simon.



More information about the Dnsmasq-discuss mailing list