[Dnsmasq-discuss] Config file behaviour - change/bug/feature - comments
Simon Kelley
simon at thekelleys.org.uk
Fri Mar 29 17:34:38 GMT 2013
On 29/03/13 15:37, Kevin Darbyshire-Bryant wrote:
> <snip>
>>> Ahh, but there's the rub, the first instance of dhcp-option=br0,.......
>>> is generated automatically by the router software and cannot be changed,
>>> it's why we need to be able to override it.
>>
>> Ok. will have to think harder about this, in that case.
>>
> Sorry!
>>> But I'm now concerned about your previous email where I think interfaces
>>> have been removed. Is it no longer possible to define dhcp range &
>>> options on an interface by interface basis?
>>
>> No. The interface:<interface> thing in dhcp-range is/was something
>> else. If you were not using that specific syntax, then there's no
>> problem.
>>
>> Cheers,
>>
>> Simon.
>
> Looking at what Tomato produces in its dnsmasq.conf files for dhcp-range
> I'm not convinced it's ever been correct. Following truncated example
> of what it used to produce for just a single interface:
>
> interface=br0
> dhcp-range=br0,192.168.235.21,192.168.235.254,255.255.255.0,720m
> dhcp-option=br0,3,192.168.235.1
> dhcp-option=br0,44,192.168.235.1
> dhcp-host=00:A0:DE:88:51:B0,192.168.235.7
> <snip>
> dhcp-lease-max=255
> dhcp-authoritative
> interface=ppp4,ppp5,ppp6,ppp7,ppp8,ppp9
> no-dhcp-interface=ppp4,ppp5,ppp6,ppp7,ppp8,ppp9
> <blah blah blah>
>
> Now if I understand it correctly, the intention was to provide the
> dhcp-range for a specific interface, but the syntax is wrong AND the
> int: option no longer exists since 2.63. So I think the following is
> more correct (and is what my presently tweaked test version of Tomato is
> producing)
The stuff removed in 2.63 is a red herring. You've never used it (nobody
did) and it's not relevant to this.
>
> interface=br0
> dhcp-range=set:br0,192.168.235.21,192.168.235.254,255.255.255.0,720m
> dhcp-option=br0,3,192.168.235.1
> dhcp-option=br0,44,192.168.235.1
> dhcp-host=00:A0:DE:88:51:B0,192.168.235.7
> <snip>
> dhcp-lease-max=255
> dhcp-authoritative
> interface=ppp4,ppp5,ppp6,ppp7,ppp8,ppp9
> no-dhcp-interface=ppp4,ppp5,ppp6,ppp7,ppp8,ppp9
> <blah blah blah>
>
> This at least sets a tag per interface/dhcp-range which can then be
> applied to later attributes (eg dhcp-options) on a per
> interface/dhcp-range basis.
>
> Have I understood things correctly?
Nearly. There's another change in the configuration file that's
relevant: the scrappy and inconsistent syntax around tags got changed so
that everywhere
set:<tagname>
sets a tag, and
tag:<tagname>
tests that tag.
The old syntax is still supported, but if you're doing it properly, you
should use the new one, so that your dhcp-options should be
dhcp-option=tag:br0,3,1.2.34
and so on.
Secondly,
dhcp-range=set:br0,192.168.235.21,192.168.235.254,255.255.255.0,720m
is OK, except that you don't need "set:br0" at all. You get a tag set
with the name of the interface for free.
Tip: if you add
log-dhcp
to the configuration, one of things logged is the list of set tags. You
also get told exactly what options are being sent, which would be useful
information in this case.
>
> Many thanks for your time and support on this.
>
No problem.
Cheers,
Simon.
> Kevin
>
>
More information about the Dnsmasq-discuss
mailing list