[Dnsmasq-discuss] Using a variable in the address option in dnsmasq.conf

2018-02-19 Thread Steve Lloyd
Is it possilbe to set a variable and then use it as follows?  or is there a
way to set and use a variable in the conf file for address entries?

myip=10.0.1.6
address=/2o7.net/$myip
address=/2mdm.net/$myip

instead of
address=/2o7.net/10.0.1.6
address=/2mdm.net/10.0.1.6
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] Can dnsmasq capture DHCP traffic and update its leases table?

2018-02-19 Thread Andrew Stuart
I need a leases table that is as up to date as possible for my local network.

I do not however have any access the the DHCP server on the network to get its 
leases table.

I’m wondering if there is a way to configure dnsmasq so that it records all 
broadcast dhcp traffic that it sees, and updates it leases table.

That way I will have a local copy of the leases table that has been built up by 
watching DHCP traffic.

Is that possible with dnsmasq? If yes, how?  If not, can anyone suggest a 
lightweight alternative way to do that without resorting to something 
heavyweight like networking monitoring with wireshark?

thanks

Andrew
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] --synth-domain enhancement

2018-02-19 Thread Geert Stappers
On Mon, Feb 19, 2018 at 10:41:01AM +0100, Dominik DL6ER wrote:
> On 16.02.2018 16:01, Simon Kelley wrote:
> > To clarify, the serial numbers in
> > the names correspond to the addresses in the range supplied. If you use
> > a subnet to specify the range, for instance 192.168.202.0/24, then yes
> > dyn-1 will be 192.168.202.0, but if you use start,end to specify the
> > range, then the start address becomes dyn-1
> That's exactly why I think zero-indexed would be better, as dyn-50 would
> then also correspond to 192.168.202.50. For custom ranges (not starting
> from zweo) I have no preference, but the logic should obviously be the
> same as for the full /24 network.

Here another +1   for starting at 0.

So
|  --synth-domain=gently.org.uk,192.168.202.50,192.168.202.70,dyn-* 
   
would in /etc/hosts format
192.168.202.50dyn-0.gently.ork.uk
192.168.202.51dyn-1.gently.ork.uk
192.168.202.52dyn-2.gently.ork.uk

And indeed, on networks where network address ends on zero,
there it will be
192.0.2.0 string0
192.0.2.1 string1
192.0.2.2 string2
192.0.2.3 string3


Another thing, "rollover"
192.0.2.9   string9
192.0.2.10  string10

Should it be  "%03d", so
192.0.2.8   string008
192.0.2.9   string009
192.0.2.10  string010
#
192.0.2.99  string099
192.0.2.100 string100
192.0.2.101 string101


Groeten
Geert Stappers
-- 
Leven en laten leven

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] --synth-domain enhancement

2018-02-19 Thread Dominik DL6ER
On 16.02.2018 16:01, Simon Kelley wrote:
> To clarify, the serial numbers in
> the names correspond to the addresses in the range supplied. If you use
> a subnet to specify the range, for instance 192.168.202.0/24, then yes
> dyn-1 will be 192.168.202.0, but if you use start,end to specify the
> range, then the start address becomes dyn-1
That's exactly why I think zero-indexed would be better, as dyn-50 would
then also correspond to 192.168.202.50. For custom ranges (not starting
from zweo) I have no preference, but the logic should obviously be the
same as for the full /24 network.

Best regards,
Dominik


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] --synth-domain enhancement

2018-02-19 Thread Andy Hawkins
Hi,

In article <11034711-6140-1e7c-5eeb-ad951fee2...@thekelleys.org.uk>,
   Simon Kelley wrote:
> My second example gives exactly that. To clarify, the serial numbers in
> the names correspond to the addresses in the range supplied. If you use
> a subnet to specify the range, for instance 192.168.202.0/24, then yes
> dyn-1 will be 192.168.202.0, but if you use start,end to specify the
> range, then the start address becomes dyn-1, so for
>
>  --synth-domain=gently.org.uk,192.168.202.50,192.168.202.70,dyn-*
>
> 192.168.202.50 is dyn-1

Ah, apologies, I hadn't realised that. In that case then, this sounds
perfect to meet my needs.

> (or maybe dyn-0. Do we want this one-based or zero-based? Having a
> choice is NOT an option)

I think I'd want dyn-1 personally, but don't feel particularly strongly
about it either way to be honest.

Thanks.

Andy


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss