[Dnsmasq-discuss] Multiple dnsmasq instances binding to same interfaces?
Neil.Jerram at metaswitch.com
Thu Nov 27 12:20:51 GMT 2014
Does anyone know offhand what the detailed semantics are for multiple
dnsmasq instances trying to bind to and receive DHCP packets from the
My reason for asking is that I'm running a test with two dnsmasq
instances, both of which are instructed to bind to all TAP interfaces
(--interface=tap* --bind-dynamic). Each instance is intended to provide
DHCP for a subset of those TAP interfaces, and each subset is specified
by putting the expected MAC and IP addresses for that subset in the host
file that that dnsmasq instance will read.
(This is in the context of an OpenStack compute host, where each TAP
interfaces connects through to a VM.)
The strange thing is that this test reliably works - in the sense of
each TAP interface getting its correct IP address - whereas I would
expect it sometimes to fail because of an incoming DHCP request
sometimes being delivered to the wrong dnsmasq instance.
Dnsmasq uses SO_REUSEPORT, which I think means that multiple instances
can successfully bind to the same interface. However, I believe the
per-packet semantic for SO_REUSEPORT is that a particular incoming
packet will only be delivered to one of the bindings.
So, I don't understand how things are currently working! Can anyone
throw any light on this?
More information about the Dnsmasq-discuss