[Dnsmasq-discuss] DHCP for Multiple Subnets

Robert Sweetnam lists at fsck.eu
Wed May 29 10:42:09 BST 2013


Hello,

I have been implementing dnsmasq on one host to serve multiple subnets. So far I have DNS configured and it is working perfectly. However for DHCP I am having difficulty in assigning a scope for each subnet.

There are 3 subnets that I am trying to configure it for. However the host I have Dnsmasq running on only has one NIC. 

My dnsmasq has an IP address of 192.168.14.12 and my intention is to have it serve DHCP for subnets 192.168.13.0, .14.0 and .15.0

The gateway for each of these is .254 so basically I'm wondering if for example a DHCP request comes from 192.168.13.254 it should acknowledge with an offer of an IP address in the 13.0 subnet.

>From looking through the documentation and other configuration examples I understand tagging might be of assistance. However I'm not quite sure how this works. I've gotten as far as this and I'm unsure what to do next:

dhcp-range=set:snet13,192.168.13.100,192.168.13.250,12h
dhcp-range=set:snet14,192.168.14.100,192.168.14.250,12h
dhcp-range=set:snet15,192.168.15.50,192.168.15.100,12h

Is what I am trying to achieve actually possible or is it necessary for each subnet to have its own interface?

Many thanks in advance,
Robert



More information about the Dnsmasq-discuss mailing list