[Dnsmasq-discuss] Setting dnsmasq to serve multiple subnets

Will Dennis wdennis at nec-labs.com
Thu Apr 28 16:20:12 UTC 2022


Hi all,

I currently have dnsmasq set up and working well for the LAN that the dnsmasq server is on (for our purposes, say 192.168.0.0/24.) Config is like this currently:

domain-needed
bogus-priv
strict-order
no-hosts
dhcp-authoritative
dhcp-leasefile=/var/lib/misc/dnsmasq.leases
domain=mycompany.com
dhcp-range=192.168.0.20,192.168.0.59,1h
dhcp-option=option:router,192.168.0.1

Now, I have now set up a router (layer-3 switch) that has interfaces to multiple other networks off of it, all having a /28 network mask. It has been set to be a DHCP relay (“ip helper”) pointing DHCP requests from these new networks to the dnsmasq server. I cannot seem to find a “howto” on how to configure dnsmasq to serve multiple dhcp pools/associated options so it can be the single DHCP/DNS server for these multiple new networks. In my reading of the man pages, I *think* I’d have to do something like this in my config to enable this:

domain-needed
bogus-priv
strict-order
no-hosts
dhcp-authoritative
dhcp-leasefile=/var/lib/misc/dnsmasq.leases
domain=nec-labs.com
dhcp-range=192.168.0.20,192.168.0.59,1h
dhcp-option=option:router,192.168.0.1
dhcp-range=set:vlan10,192.168.1.1,192.168.1.13,255.255.255.240,1h
dhcp-option=tag:vlan10,option:router,192.168.1.14
[…]

Am I correct in this? And, I don’t need to tag the original pool/options, do I?

Thanks,
Will

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20220428/1b763ddd/attachment.htm>


More information about the Dnsmasq-discuss mailing list