[Dnsmasq-discuss] no-dhcp-interface documentation

Ferenc Wagner wferi at niif.hu
Wed Sep 15 14:32:32 BST 2010

Simon Kelley <simon at thekelleys.org.uk> writes:

> Ferenc Wagner wrote:
>> Simon Kelley <simon at thekelleys.org.uk> writes:
>>> Ferenc Wagner wrote:
>>>> Now I firewalled the DHCP traffic coming from the segment I want to
>>>> provide only TFTP on to suppress the "no address range available for
>>>> DHCP request" messages.  Is there a better way to achieve this?
>>> dhcp-range=set:no-dhcp-here,,
>>> dhcp-ignore=tag:no-dhcp-here
>>> should work, I think.
>> It didn't really work out.  I inserted
>> dhcp-range=set:no-dhcp-here,,
>> dhcp-ignore=tag:no-dhcp-here
>> into my config and dnsmasq started to hand out leases:
>> dnsmasq-dhcp: DHCPDISCOVER(szie-aotk) 00:21:91:56:dc:83 
>> dnsmasq-dhcp: DHCPOFFER(szie-aotk) 00:21:91:56:dc:83 
>> dnsmasq-dhcp: DHCPINFORM(szie-aotk) 00:17:a4:43:a5:e1 
>> dnsmasq-dhcp: DHCPACK(szie-aotk) 00:17:a4:43:a5:e1 LAB01PC09
>> dnsmasq-dhcp: DHCPREQUEST(szie-aotk) 00:21:91:56:dc:83 
>> dnsmasq-dhcp: DHCPACK(szie-aotk) 00:21:91:56:dc:83 dlink-56DC83
>> dnsmasq-dhcp: DHCPINFORM(szie-aotk) 00:16:76:4c:75:53 
>> dnsmasq-dhcp: DHCPACK(szie-aotk) 00:16:76:4c:75:53 zskiss
>> dnsmasq-dhcp: DHCPREQUEST(szie-aotk) 00:0f:fe:85:ff:5f 
>> dnsmasq-dhcp: DHCPACK(szie-aotk) 00:0f:fe:85:ff:5f csapo
>> dnsmasq-dhcp: DHCPREQUEST(szie-aotk) 00:0f:fe:85:ff:5f 
>> dnsmasq-dhcp: DHCPACK(szie-aotk) 00:0f:fe:85:ff:5f csapo
>> However, isn't the interface name always present as a tag?  I mean, the
>> above range corresponds to
>> interface=szie-aotk
>> in my config (and in the reality), so something like
>> dhcp-ignore=tag:szie-aotk
>> could possibly work instead?  I didn't find the documentation about the
>> implicit tagging by the interface name, maybe I only dreamt it?
> You didn't dream it. From the NOTES section of the man page:
> "The tag system works as follows: For each DHCP request, dnsmasq
> collects a set of valid tags from active configuration lines which
> include set:<tag>, including one from the dhcp-range used to allocate
> the address, one from any matching dhcp-host (and "known" if a dhcp-host
> matches) The tag "bootp" is set for BOOTP requests, and  a  tag whose
> name is the name of the interface on which the request arrived is also set."

Great, thank for the pointer!

> log-dhcp shows the set of tags set for each DHCP transaction, which
> might be useful for checking.

Actually, log-dhcp logs nothing without a dhcp-range, likewise,
dhcp-ignore does nothing either.  But this combination works:


where szie-aotk is the network interface with the above subnet.  Now
dnsmasq logs:

dnsmasq-dhcp: 3265728412 available DHCP range: --
dnsmasq-dhcp: 3265728412 client provides name: Mailer-Demon
dnsmasq-dhcp: 3265728412 vendor class: MSFT 5.0
dnsmasq-dhcp: 3265728412 DHCPINFORM(szie-aotk) 00:07:e9:f5:fa:48 ignored

Turns out these are *broadcast* DHCPREQUEST packets (not discoveries),
which I find strange, although the vendor class ensures there's nothing
to be surprised of. :)

More information about the Dnsmasq-discuss mailing list