Discussion:
[Dnsmasq-discuss] Can dnsmasq assign IP addresses on a subnet without an interface?
Parke
2016-09-29 07:12:37 UTC
Permalink
Hi,

The dnsmasq manpage says:

"Addresses allocated like this [via dhcp-host] are not constrained to be in
the range given by the --dhcp-range option, but they must be in the same
subnet as some valid dhcp-range."

Unfortunately, the manpage does not appear to specify what exactly a "valid
dhcp-range" is. In order to be "valid", does a dhcp-range require an
(active) network interface on the same subnet as the range?

My situation is as follows:

I am running two logical IP subnets on a single four port home wireless
router. This works fine.

The logical subnets are:
192.168.0.0
192.168.2.0

dnsmasq is running on a Raspberry Pi with eth0 of 192.168.0.1. I have
configured two dhcp-ranges, one on each subnet.

My goal is for dnsmasq to assign the IP address of 192.168.2.3 to a client
based upon that client's MAC address. This IP address is on the other
subnet from the Pi.

However, dnsmasq is instead assigning an IP address from the dhcp-range on
192.168.0.0.

If I run "ifconfig eth0:1 192.168.2.1", then the Pi has active interfaces
on both logical subnets, and then dnsmasq will assign 192.168.2.3 to the
client. However, I would like this assignment to happen even when the Pi
does not have an interface on 192.168.2.0.

It appears I am running dnsmasq version 2.62-3+deb7u3.

The below thread may discuss a similar issue:
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2010q3/004412.html

Thanks in advance for any advice or suggestions.

Cheers,

Parke

Loading...