On 15/02/18 17:12, Andy Hawkins wrote:
> Hi,
> 
> In article <774c6255-31dd-a6f3-d208-11aa41b9c...@thekelleys.org.uk>,
>            Simon Kelley<si...@thekelleys.org.uk> wrote:
>> It could be done: just requires even more scary string-mangling in
>> src/domain.c and inventing a way to configure it.
>>
>> I prosose something like
>>
>>  --synth-domain=thekelleys.org.uk,192.168.0.0/24,internal-*
>>
>> where the final * in the prefix generates "counting mode" so that
>>
>> 192.168.0.0 becomes internal-0,thekelleys.org.uk
>>
>> A range rather than a subnet is already allowed, so your example becomes
>>
>>
>>  --synth-domain=gently.org.uk,192.168.202.50,192.168.202.70,dyn-*
>>
>>
>> Anyone got a better idea?
> 
> That sounds good to me. The only thing missing is the 'arithmetic' bit on
> the generated host name / IP address.
> 
> In your example above, I would want (for example)
> 
> 192.168.202.50 - dyn-1
> 192.168.202.51 - dyn-2
> 
> etc.
> 
> This is possible in bind using the syntax I posted earlier, but isn't (yet)
> in dnsmasq.

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

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

Cheers,

Simon.

> 
> It's hardly the end of the world if I have to manually enter each one
> though, so I wouldn't push for this change too much if it turned out to be
> particularly difficult or generate any strong objections.
> 
> Andy
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 


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

Reply via email to