[Dnsmasq-discuss] Simplest working "shared-network" configuration?

john doe johndoe65534 at mail.com
Sun Jul 11 17:13:32 UTC 2021


On 7/11/2021 11:06 AM, Paul Gear via Dnsmasq-discuss wrote:
> On 10/7/21 9:52 pm, Geert Stappers via Dnsmasq-discuss wrote:
>> On Sat, Jul 10, 2021 at 05:57:40PM +1000, Paul Gear wrote:
>>> On 10/7/21 5:13 pm, john doe wrote:
>>>> On 7/10/2021 7:58 AM, Paul Gear wrote:
>>>>> Hi all,
>>>>>
>>>>> It's been a while since I originally posted about this, and I've
>>>>> done a
>>>>> lot of experimenting without landing on a working setup.
>>>>>
>>>>> I'm trying to get a very simple test case working, where I have a
>>>>> number
>>>>> of vnet interfaces, all configured with the link-local address
>>>>> 169.254.0.1/16, and have dnsmasq allocate the leases out of a
>>>>> different
>>>>> range (in this case, I'm using a portion of the documentation prefix,
>>>>> 203.0.113.0/29).  Here's my configuration:
>>>>>
>>>>> pid-file=/var/lib/dnsmasq-vnet/dnsmasq-vnet.pid
>>>>> bind-dynamic
>>>>> interface=vnet*
>>>>> log-dhcp
>>>>> no-hosts
>>>>> dhcp-range=203.0.113.0, 255.255.255.248, 1d
>>>> From (1):
>>>>
>>>> " this dhcp-range MUST include the netmask."
>>>>
>>>> Unless I'm missing something, I don't see a subnet mask being
>>>> specified.
>>>>
>>>>
>>>> 1)  https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
>>>
>>> Hi John,
>>>
>>> Unless I'm missing something 255.255.255.248 is a netmask, and dnsmasq
>>> doesn't appear to support CIDR notation in dhcp-range
>>> specifications.  At
>>> least, when I attempt to use /29 instead, it fails to start, saying:
>>>
>>> dnsmasq: bad dhcp-range at line 41 of /var/lib/dnsmasq-vnet/dnsmasq.conf
>> Snippet dnsmasq manual page
>>
>> --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-addr>[,<end-addr>|<mode>][,<netmask>[,<broadcast>]][,<lease
>> time>]
>>
>> So
>>>>> dhcp-range=203.0.113.0, 255.255.255.248, 1d
>> should be something like
>> } } } dhcp-range=203.0.113.0, 203.0.113.7,255.255.255.248, 1d
>>
>>
>> Back to
>>>> From (1):
>>>>
>>>> " this dhcp-range MUST include the netmask."
>>>>
>>>> Unless I'm missing something, I don't see a subnet mask being
>>>> specified.
>>>>
>>>>
>>>> 1)  https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
>>>>
>> If so, the
>> --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-addr>[,<end-addr>|<mode>][,<netmask>[,<broadcast>]][,<lease
>> time>]
>> should be
>> --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-addr>[,<end-addr>|<mode>],<netmask>[,<broadcast>][,<lease
>> time>]
>> or even
>> --dhcp-range=[tag:<tag>[,tag:<tag>],][set:<tag>,]<start-addr>,<end-addr>|<mode>,<netmask>[,<broadcast>][,<lease
>> time>]
>
> Hi John & Geert,
>
> So bottom line is that end-addr is not optional when netmask is
> specified, even though a literal reading of the current man page
> suggests that it is.  I'll try to get a documentation patch together(is
> here the right place to post it?) when I'm done.
>

I can see where you got confused, an explanation on how to interpret the
'[],|' would go a long way.

Patch submition via e-mail looks to be the prefered way for accepting
contributions (The maintainer (Simon Kelley) might say otherwise though).

--
John Doe



More information about the Dnsmasq-discuss mailing list