[Dnsmasq-discuss] Random IP address in the pool with dhcp-script?

Benjamin Henrion bh at udev.org
Sat Aug 28 10:18:29 BST 2010

On Fri, Aug 27, 2010 at 11:23 PM, Rance Hall <ranceh at gmail.com> wrote:
> On Thu, Aug 26, 2010 at 7:11 AM, Benjamin Henrion <bh at udev.org> wrote:
>> Hi,
>> I am trying to figure out howto give a different IP address,
>> preferably random, in a pool, by invoking the dhcp-script.
>> Any idea how to do that?
>> Best,
>> --
>> Benjamin Henrion <bhenrion at ffii.org>
> Maybe I'm reading this wrong, but since the original assignment from
> the dhcp pool is reasonably random, and after than dnsmasq works very
> hard to offer the same IP address to the same machine based on mac
> address or hostname or some other network characteristic that is
> configurable.  I'm taking your question to mean is there a way to
> force dnsmasq to give out DIFFERENT IP addresses even if we've
> processed this machine before.
> If this is what you want, then you might need to explain the problem
> you are trying to solve, because generally this is undesired behavior,
> at least it is on the networks I manage.

The way I solved it was the following:

1. Create a series of dnsqmasq config files with a different subnet
2. KIllall dnsmads and start another dnsmasq to loop over them every 120sec
3. Redure the lease time to 2m

A bit hackish, but it works.

Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."

More information about the Dnsmasq-discuss mailing list