[Dnsmasq-discuss] DHCP packet received on <interface> which has no address

Albert ARIBAUD albert.aribaud at free.fr
Thu Aug 25 10:55:32 BST 2016


Le Thu, 25 Aug 2016 11:52:41 +0300
Andrew Shadura <andrew.shadura at collabora.co.uk> a écrit:

> Hello,
> We've run into an issue: in our configuration, there are many
> interfaces, some of them are being served by dnsmasq-dhcp, some of
> them use run dhcp client themselves.

Not sure I'm getting this right, but I assume you mean on some
interfaces the host running your dnsmasq is DHCP server, and on some it
is DHCP client.

> Interfaces come and go, so it's
> not always possible to use bind-interfaces.

This seems to imply that dnsmasq should serve (at least some) of these
dynamic interfaces. If all dynamic interfaces should be served, then
AFAIU bind-dynamic is what you need. Otherwise, you need some ad hoc
means discriminate beweeen 'client' and 'server' dynamic interfaces.

Also, you haven't said how these interfaces come and go. Are they
virtual interfaces? VLANs? taps? bridges? etc.

> Sometimes dnsmasq-dhcp
> reacts to the DHCP packets coming from the interfaces it's not
> supposed to work with, and as they hasn't been configured yet dnsmasq
> complains.

Again, I'm interpreting here, but I'll assume you mean that on some
(dynamic?) interfaces where the host is supposed to be a client,
its dnsmasq actually does answer DHCP requests. I would understand how
this happens if you already use bind-dynamic, otherwise I don't see how
this is possible.

> Having looked at the code, I see the warning is issued when
> dnsmasq-dhcp has detected the interface hasn't got an address, before
> it checks the interface name or exclusion lists. That doesn't seem
> right to me, but I haven't come up with a reasonable patch yet.
> Could that please be fixed?

I beliveve it is perfectly right that dnsmasq can only serve IPs to a
network segment it knows the IP subnet of, and that knowledge comes
from the interface to that segment having an IP itself.

So the problem comes from dnsmasq listening on an up but unconfigured

So either dnsmasq should listen on this interface, and then it is wrong
that this interface has no IP, or dnsmasq should not listen on this
interface, and it was a mistake to let it.

Or dnsmasq is receiving requests on an interface which should not
present them but does because of your local (virtual, vlan, tap,
bridge...) interface setup.

Of course, without more info on your setup, I might be wrong, and
possible am. So can you please elaborate on your host's networking

> Thanks.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Signature digitale OpenPGP
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20160825/91d57fbb/attachment-0001.sig>

More information about the Dnsmasq-discuss mailing list