[Dnsmasq-discuss] no-dhcp-interface documentation
Simon Kelley
simon at thekelleys.org.uk
Tue Sep 14 20:19:46 BST 2010
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,192.168.8.0,192.168.0.0
>> dhcp-ignore=tag:no-dhcp-here
>>
>> should work, I think.
>
> It didn't really work out. I inserted
>
> dhcp-range=set:no-dhcp-here,192.168.28.0,192.168.31.255
> 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) 192.168.31.131 00:21:91:56:dc:83
> dnsmasq-dhcp: DHCPINFORM(szie-aotk) 192.168.31.146 00:17:a4:43:a5:e1
> dnsmasq-dhcp: DHCPACK(szie-aotk) 192.168.31.146 00:17:a4:43:a5:e1 LAB01PC09
> dnsmasq-dhcp: DHCPREQUEST(szie-aotk) 192.168.31.131 00:21:91:56:dc:83
> dnsmasq-dhcp: DHCPACK(szie-aotk) 192.168.31.131 00:21:91:56:dc:83 dlink-56DC83
> dnsmasq-dhcp: DHCPINFORM(szie-aotk) 192.168.28.228 00:16:76:4c:75:53
> dnsmasq-dhcp: DHCPACK(szie-aotk) 192.168.28.228 00:16:76:4c:75:53 zskiss
> dnsmasq-dhcp: DHCPREQUEST(szie-aotk) 192.168.30.247 00:0f:fe:85:ff:5f
> dnsmasq-dhcp: DHCPACK(szie-aotk) 192.168.30.247 00:0f:fe:85:ff:5f csapo
> dnsmasq-dhcp: DHCPREQUEST(szie-aotk) 192.168.30.247 00:0f:fe:85:ff:5f
> dnsmasq-dhcp: DHCPACK(szie-aotk) 192.168.30.247 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."
log-dhcp shows the set of tags set for each DHCP transaction, which
might be useful for checking.
Cheers,
Simon.
More information about the Dnsmasq-discuss
mailing list