[Dnsmasq-discuss] How to configure 2 different nets: 1 guestnet, 1 "known-host net"?

richardvoigt at gmail.com richardvoigt at gmail.com
Tue Feb 16 13:44:30 GMT 2010


On Tue, Feb 16, 2010 at 6:10 AM, Lars Rohwedder <L.Rohwedder at mocotec.de> wrote:
> Simon Kelley schrieb:
>> Lars Rohwedder wrote:
>>>> You need a dhcp-range for the the "known hosts" net too
>>>>
>>>> dhcp-range=192.168.8.0,static
>>>>
>>>> should do the trick.
>>> Thanks, that works fine! :-)
>>>
>>> Perhaps the man-page or example-config should mention this use case
>>> explicitly, because it is a quite common setup, I think.
>>
>> It's in the man page:
>>
>> "The end address may be replaced by the keyword 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."
>
> Yes, it is written there, but I didn't find it there because I didn't
> know that such lines are _necessary_ and not optional.
>
> So skipped this chapter because I thought the dynamic IP range and the
> hard-coded addresses are enough. :-(

I think it's this line, which appears in the dhcp-host description,
that is somewhat confusing:

"--dhcp-host=lap,192.168.0.199 tells dnsmasq to always allocate the
machine lap the IP address 192.168.0.199. Addresses allocated like
this are not constrained to be in the range given by the --dhcp-range
option, but they must be on the network being served by the DHCP
server."

Specifically, some clarification to "must be on the network being
served by the dnsmasq server" to maybe mention that whether a
dhcp-range matches depends on netmask and that the "static" dhcp-range
is often used in this case.

>
>> I'll add an example too.
>
> Good idea! Thank you, in the name of all the guys who are enlighted by
> such a short example. :-)
>
> Lars R.
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>



More information about the Dnsmasq-discuss mailing list