On 4/28/22 09:20, Will Dennis wrote:

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:


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?



Here is what I have in my config for multiple subnets and directing various services.  I am running dnsmasq on a seperate host in the lan subnet.  I tag even the default lan for clarity.


# Subnet specific delarations
dhcp-range=lan,192.168.101.100,192.168.101.200,96h
dhcp-range=IOT,192.168.102.100,192.168.102.200,96h
dhcp-range=guest,192.168.103.100,192.168.103.200,72h
dhcp-range=camera,192.168.104.100,192.168.104.200,72h

# Define router
dhcp-option=tag:lan,option:router,192.168.101.1
dhcp-option=tag:IOT,option:router,192.168.102.1
dhcp-option=tag:guest,option:router,192.168.103.1
dhcp-option=tag:camera,option:router,192.168.104.1

# Define DNS servers (DNSmasq server - also DHCP)
dhcp-option=option:dns-server,192.168.101.2

# Define NTP servers
dhcp-option=tag:lan,option:ntp-server,192.168.101.1
dhcp-option=tag:IOT,option:ntp-server,192.168.102.1
dhcp-option=tag:guest,option:ntp-server,192.168.103.1
dhcp-option=tag:camera,option:ntp-server,192.168.104.1


# Common definitions
dhcp-option=option:netmask,255.255.255.0
dhcp-option=15,"mydomain" # Domain name
dhcp-option=101,America/Denver



_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss

Reply via email to