On 23/01/18 09:25, Andy Hawkins wrote: > Hi, > > I'm contemplating a move from bind and isc-dhcpd to dnamasq. > > One of the features of bind that I take advantage of in my domain is > generating sequences of DNS entries using a single line. For example, in my > zone file I have: > > $GENERATE 50-70 dyn-${-50} IN A 192.168.202.$ > > This will generate the following DNS entries: > > dyn-0.gently.org.uk on address 192.168.202.50 > dyn-1.gently.org.uk on address 192.168.202.51 > > ... > > dyn-19.gently.org.uk on address 192.168.202.69 > dyn-20.gently.org.uk on address 192.168.202.70 > > I realise that dnsmasq has the 'synth-domain' option, but the names > generated by this are a little ugly. Is there any chance an enhancement > could be made to so something similar to the facilities available in bind? >
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? Cheers, Simon. _______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss