0

I've done some research on dnsmasq and its ability to DHCP several subnets, but it sadly only seems to work when there are multiple interfaces as shown in the configuration below:

interface=eth0
interface=eth1
interface=eth2
dhcp-range=192.168.0.100,192.168.0.200
dhcp-range=192.168.1.100,192.168.1.200
dhcp-range=192.168.2.100,192.168.2.200

However, I have not been able to see the possibility to have one interface, let's say eth0 to service multiple subnets, something along these lines:

interface=eth0
dhcp-range=192.168.0.100,192.168.2.200

Is this possible? If not by dnsmasq config, is there a work-around?

Thanks!

another
  • 105
  • 5
user5740843
  • 123
  • 2
  • 6

1 Answers1

1

I believe this link answers your question:

http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2010q3/004415.html

Specifically:

At first glance, what you're doing doesn't make any sense. You have two subnets on one interface, which is fine, but the only thing that defines which subnet a machine is on is its IP address, and DHCP allocates that address. Before the address is allocated, all that's known about a machine is that it's on a particular physical network, there's no way to pin it down to a subnet.

parkamark
  • 1,128
  • 7
  • 11