[Dnsmasq-discuss] question about subnets and interface aliases

Simon Kelley simon at thekelleys.org.uk
Wed Feb 27 09:28:28 GMT 2008

Gerrit Kühn wrote:
> Hi folks,
> I have a private network here ( which I have separated
> in 8 subnets (, and so on). I want to
> run dnsmasq to serve as dns and dhcp server, but only on one machine.
> As the separation of the subnets is purely of logical nature and not 
> physical (everything on the same switched network), I have configured
> this machine with the primary IP address and put IP
> aliases for all other subnets ( and so on) on that
> interface. The free dhcp IP-range for unknown hosts is in the first
> subnet (, all others shall be fixed-host entries
> which are identified via their MAC addresses.
> Now I see the following behaviour: dhcp-addresses are delivered from
> the free segment to unknown hosts as designed. However, fixed-host
> entries only work if they come from the first subnet
> ( If I have dhcp-host entries for any other subnet,
> they are completely ignored and the requesting hosts gets an IP from
> the free range for unknown hosts instead.
> Is my setup completely screwed up and something one should not do, or
> does anyone here have an idea how to get things right? I'm using
> FreeBSD 7-stable and dnsmasq 2.40 (if that matters).

It does matter, specifically the FreeBSD bit. On Linux, the above
arrangement will work, (or at least can be made to work). The code for
determining the IP parameters of an interface on *BSD knows nothing
about aliases, so it can't work.

> Any hint is appreciated.

If you are, or can find, a FreeBSD networking guru who can upgrade the
code in src/bpf.c I'm happy to take a patch.....



More information about the Dnsmasq-discuss mailing list