Is this a use for something like the ISC dhcpd shared-network configuration.
In the dnsmasq case, we could have something like shared-network=<interface>,<address/prefix-length> or shared-network=<interface-address>,<address/prefix-length> In the first case dnsmasq would behave _as_if_ the specified interface carried the address and netmask specified. In the second case, it would behave as if the interface which carries interface-address also carried the address and netmask specified. If I've understood correctly, you'd just need a shared-network declaration for each of your /24s. For the avoidance of doubt, this is NOT currently implemented on dnsmasq, but it has been on the "desirable" list in my head for some time. Simon. On 12/03/2019 11:56, Peter Lieven wrote: > Hi, > > we run several thousand virtual gateways which are used to assign /32 > allocations to Virtual Servers via DHCP. > > > This so far runs pretty well except for one hack that we had to make and > that I would like to avoid. > > We assign the /32 networks out of /24 blocks that we reserved for this > purpose. However, dnsmasq only > assigns IP addresses via an interface if the network is configured on > that interface. We had to add some > more specific routes on the gateways to make a 2 hosts that receive a > /32 out of the same /24 see each > other if they are on different gateways. In fact I would like to > configure only one common virtual address > on the vserver facing interface lets say 10.255.255.255/32. > > What I would like to need is an option to either make dnsmasq assign > addresses out of an dhcp-range even > if the network is not configured on the dhcp interface or an option > where dnsmasq runs in a mode where it > > does not require dhcp-range options, but only works using dhcp-host > entries and replies if gets a request > > for a static mac address entry. > > > My config looks basically like this: > > [virtual gw1] > > dhcp-range=set:virtualgw,10.0.0.2,10.0.0.254,infinite,static > > dhcp-host=52:54:00:00:00:01,10.0.0.2,vserver1 > > dhcp-option=tag:virtualgw,1,255.255.255.255 > dhcp-option=tag:virtualgw,3,10.255.255.255 > dhcp-option=tag:virtualgw,28,255.255.255.255 > > dhcp-option=tag:virtualgw,121,10.255.255.255/32,0.0.0.0,0.0.0.0/0,10.255.255.255 > > > > [virtual gw2] > > dhcp-range=set:virtualgw,10.0.0.2,10.0.0.254,infinite,static > > dhcp-host=52:54:00:00:00:02,10.0.0.3,vserver1 > > dhcp-option=tag:virtualgw,1,255.255.255.255 > dhcp-option=tag:virtualgw,3,10.255.255.255 > dhcp-option=tag:virtualgw,28,255.255.255.255 > > dhcp-option=tag:virtualgw,121,10.255.255.255/32,0.0.0.0,0.0.0.0/0,10.255.255.255 > > > > To make dnsmasq deliver addresses out of 10.0.0.0/24 I have to configure > 10.0.0.1/24 > > on the DHCP interface. To ensure reachability between 10.0.0.2 and > 10.0.0.3 I have > > configured static routes 10.0.0.0/25 and 10.0.0.128/25 towards the > default gw. > > The configuration of 10.0.0.1/24 on the DHCP interface and the static > routes is what I would like to avoid. > > > Thanks for your feedback, > > Peter > > > > > _______________________________________________ > Dnsmasq-discuss mailing list > Dnsmasqemail@example.com > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > _______________________________________________ Dnsmasq-discuss mailing list Dnsmasqfirstname.lastname@example.org http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss