[Dnsmasq-discuss] dnsmasq on an IPv4 /32 interface

Paul Gear paul-dnsmasq at gear.email
Mon Sep 21 20:32:56 BST 2020


Hi all,

I've been trying to solve the same problem described in this blog post:
https://blog.fhrnet.eu/2020/03/07/dhcp-server-on-a-32-subnet/

In a nutshell, the situation is a VM host which performs routing and
firewalling for all its guests, providing an isolated IPv4 /32 (and in
my case an IPv6 /64 or /128 as well) to each VM guest, and using
interface routes on the host to direct traffic to each guest, without
wasting IPv4 addresses on /31 or /30 point-to-point links.

The post claims that the configuration noted (a single /32 allocated to
the host which is configured on every client-facing interface) is only
possible at present with ISC DHCP.  I've tested a number of different
configurations of dnsmasq, and this seems to be correct.  I'm hoping
someone experienced in the dnsmasq code base can confirm or deny this.

Assuming this is currently a limitation, I'd like to work on adding
support to dnsmasq for this scenario.  I'm not experienced with the code
base (although I've read some of the relevant portions and believe it
should be possible), so I'm hoping also for some guidance on whether
this functionality would be accepted into the code base, and if so, how
it might appear in the configuration.

My initial thought was that there wouldn't need to be any explicit
configuration; rather, if a DHCP request is received on an interface
with a /32 mask (or perhaps on an interface with a non-unique address on
the host), the usual restrictions around interface matching would be
relaxed, and an address would be given out either from the
statically-defined hosts, or from a pool which doesn't match any
interface on the host.  When giving out IPv6 addresses, my thought was
that things would mostly work the same if a DHCPv6 request was received
on an interface with only link-local addressing configured.

Thanks in advance - I hope all this makes sense and look forward to
discussing it further with you.

Regards,
Paul





More information about the Dnsmasq-discuss mailing list