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

2010-08-28 Thread Benjamin Henrion
On Fri, Aug 27, 2010 at 11:23 PM, Rance Hall ran...@gmail.com wrote:
 On Thu, Aug 26, 2010 at 7:11 AM, Benjamin Henrion b...@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.



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

2010-08-28 Thread SamLT
On Sat, Aug 28, 2010 at 11:18:29AM +0200, Benjamin Henrion wrote:
 On Fri, Aug 27, 2010 at 11:23 PM, Rance Hall ran...@gmail.com wrote:
  On Thu, Aug 26, 2010 at 7:11 AM, Benjamin Henrion b...@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.
 

This totally explains what you were trying to do, thanks for helping us helping
you...




 --
 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.
 
 ___
 Dnsmasq-discuss mailing list
 Dnsmasq-discuss@lists.thekelleys.org.uk
 http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss



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

2010-08-27 Thread Simon Kelley
Benjamin Henrion 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?
 

It's not possible: information flows fomr dnsmasq to the dhcp-script,
but not the other way. In fact the address is allocated long before the
script is run.

The addresses allocated by dnsmasq are fairly random anyway. If you
can describe in more detail exactly what you are trying to achieve, we
can probably make suggestions.


Cheers,

Simon.



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

2010-08-27 Thread Rance Hall
On Thu, Aug 26, 2010 at 7:11 AM, Benjamin Henrion b...@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.

Rance