Re: [Dnsmasq-discuss] Server Statement with regex possible?

2019-06-02 Thread Stefan Wiederoder
Hello Geert,

I found these URLs while searching for dnsmasq regex support:
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2012q1/005615.html
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2013q2/007124.html
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2018q2/012311.html
https://github.com/lixingcong/dnsmasq-regex

but I don't know if one of those patches made it into mailine - at least
I've found
nothing within the documentation. But maybe this indicates the current
state, no
regex support with the server statement.

bye
,
Stefan

Am Mo., 27. Mai 2019 um 12:48 Uhr schrieb Geert Stappers <
stapp...@hendrikx-itc.nl>:

> On 27-05-2019 09:40, Stefan Wiederoder wrote:
>
> > Hello list,
> > I need to configure dnsmasq to query some zones (approx 700 to be
> > precise) from another DNS server. Is it possible to use regex within
> > the server statement?
> >
> > I saw some mails/patches,
>
> Such as?
>
>
> > but nothing within the documentation.
> >
> > Any example would bei greatly appreciated.
> >
> > I'm using Version 2.76 on rhel7, but i have no problem to compile a
> > newer version.
> >
> >
> > Thanks,
> > Stefan
> >
> >
>
> ___
> 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


Re: [Dnsmasq-discuss] Noisy DHCPv6 DHCPADVERTISE

2019-06-02 Thread Geert Stappers
On Sat, Jun 01, 2019 at 08:02:27PM -0700, Sam Edwards wrote:
> Hello,
> 
> I have dnsmasq set up to provide IPv6 RAs with the SLAAC bit set,
> and also serve select static DHCPv6 leases. Everything is set up and
> working correctly, but because only some devices have a static lease
> set up, and there is no DHCPv6 pool, my logs fill up with entries from
> devices that don't get a lease, reporting that there is no address
> available for them.
> 
> Jun  1 19:46:56 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:02:00:00:01:57:72:f6:40:68:e8:c6:6d:4e:8e:bd:fc:34:65:xx:xx:xx,no 
> addresses available
> Jun  1 19:47:33 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:01:00:01:1d:b7:03:73:3c:07:54:xx:xx:xx,no addresses available
> Jun  1 19:48:12 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:01:00:01:21:4c:7f:01:08:66:98:xx:xx:xx,no addresses available
> Jun  1 19:48:57 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:02:00:00:01:57:72:f6:40:68:e8:c6:6d:4e:8e:bd:fc:34:65:xx:xx:xx,no 
> addresses available
> Jun  1 19:49:24 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:01:00:01:1d:b7:03:73:3c:07:54:xx:xx:xx,no addresses available
> Jun  1 19:50:04 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:01:00:01:21:4c:7f:01:08:66:98:xx:xx:xx,no addresses available
> Jun  1 19:50:57 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:02:00:00:01:57:72:f6:40:68:e8:c6:6d:4e:8e:bd:fc:34:65:xx:xx:xx,no 
> addresses available
> Jun  1 19:51:15 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:01:00:01:1d:b7:03:73:3c:07:54:xx:xx:xx,no addresses available
> Jun  1 19:51:17 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:01:00:01:23:38:5f:28:e0:33:8e:xx:xx:xx,no addresses available
> Jun  1 19:51:54 dnsmasq-dhcp[4798]: DHCPADVERTISE(switch0.5) 
> 00:01:00:01:21:4c:7f:01:08:66:98:xx:xx:xx,no addresses available
> 
> I see in the source, around line 899 of src/rfc3315.c that there is
> code to suppress these messages when dnsmasq is operating strictly in
> stateless IPv6 mode, but that of course doesn't apply to me.
> 
> The question I guess I'm really asking here then, is if the log entry
> that's emitted on line 905 of src/rfc3315.c shouldn't be a log6_quiet
> instead of a log6_packet, or if there's a feeling that this log line
> is important enough to be present at all times.
> 
> Here's the relevant part of my configuration for reference:
> 
> quiet-dhcp
> quiet-dhcp6
> quiet-ra
> enable-ra
> ra-param=*,mtu:tun0,high,60

At http://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html is
 
dhcp-range=[tag:[,tag:],][set:,][,|constructor:][,][,][,]

 ...

 The optional  keyword may be static which tells dnsmasq to enable
 DHCP for the network specified, but not to dynamically allocate IP
 addresses: only hosts which have static addresses given via --dhcp-host
 or from /etc/ethers will be served. A static-only subnet with address
 all zeros may be used as a "catch-all" address to enable replies to all
 Information-request packets on a subnet which is provided with
 stateless DHCPv6, ie --dhcp-range=::,static

> dhcp-range=set:Clients-v6,::,constructor:switch0.5,static,slaac,64,24h

There is no mode 'static,slaac'.  And mode 'static' is most likely
the reason for the reported "no addresses available".

If so we, dnsmasq project, have to discuss this manual page snippet

 A static-only subnet with address all zeros may be used as a "catch-all"
 address to enable replies to all Information-request packets on a subnet
 which is provided with stateless DHCPv6, ie --dhcp-range=::,static

further. Or maybe not, an Information-request is another request
as a request for an address.


> dhcp-option=tag:Clients-v6,option6:dns-server,[::]
> dhcp-option=tag:Clients-v6,option6:domain-search,example.com

And at http://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html is this
 
dhcp-host=[][,id:|*][,set:][,][,][,][,ignore]

Now find ',' or ',ignore' in belows  dhcp-host lines.

> dhcp-host=3c:07:54:xx:xx:xx,set:Clients-v6,[::5],caesar,caesar.example.com
> dhcp-host=id:00:01:00:01:20:69:f8:4b:b8:27:eb:xx:xx:xx,set:Clients-v6,[::7],prince,prince.example.com
> dhcp-host=id:00:03:00:01:00:1f:f3:xx:xx:xx,set:Clients-v6,[::9],kitchen.example.com
> dhcp-host=22:88:fe:xx:xx:xx,set:Clients-v6,[::235],adiutor,adiutor.example.com
> dhcp-host=8e:16:5c:xx:xx:xx,set:Clients-v6,[::91],peel,peel.example.com
> dhcp-host=7e:44:1c:xx:xx:xx,set:Clients-v6,[::126],solium,solium.example.com
> dhcp-host=fa:76:fc:xx:xx:xx,set:Clients-v6,[::222],fenestram,fenestram.example.com
> dhcp-host=id:00:01:00:01:23:f2:35:79:6c:0b:84:xx:xx:xx,set:Clients-v6,[::250],imbrem,imbrem.example.com
 


Regards
Geert Stappers
Looking forward to "Yes, now it works also me" messages.
-- 
Leven en laten leven

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