[Dnsmasq-discuss] Noisy DHCPv6 DHCPADVERTISE

Geert Stappers stappers at stappers.nl
Sun Jun 2 08:57:03 BST 2019


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>[,tag:<tag>],][set:<tag>,]<start-IPv6addr>[,<end-IPv6addr>|constructor:<interface>][,<mode>][,<prefix-len>][,<lease time>]

 ...

 The optional <mode> 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=[<hwaddr>][,id:<client_id>|*][,set:<tag>][,<ipaddr>][,<hostname>][,<lease_time>][,ignore]

Now find ',<lease_time>' 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



More information about the Dnsmasq-discuss mailing list