Comment 8 for bug 1664748

Revision history for this message
Mike Pontillo (mpontillo) wrote :

After further investigation, this is also invalid for MAAS.

The root cause of this issue is: two separate interfaces requesting an address from the same DHCP server cannot be supported. (At least, not without some serious sysctl hacking at a minimum, but I'm not even sure about that.)

If you have a wired and a wireless NIC running alongside NetworkManager, NetworkManager will kindly ensure that the metric of your wireless interface is higher than for your wired interface.

When the DHCP client goes to renew the lease in question, it will send out the renewal on the interface it is currently bound to. (the wireless interface) So far so good.

Now the DHCP server will receive the DHCP renewal request, and then create a unicast UDP reply packet. This packet will be addressed to the wireless interface. So the DHCP server will need to ARP for the currently-leased IP address on the wireless interface. So far so good. The ARP request will be sent to the MAC owner of the lease, since that's what should be cached for that IP address. So far so good.

Your laptop (happily, or so it thinks, sitting on both the wireless and wired networks) receives an ARP request on the wireless owned-MAC. So far so good.

Your laptop, in sending its ARP reply, wants to be sure that the requester has the best possible interface to communicate with said IP address on. "Oh, hey", the kernel says to itself, "it says here in my table that wired0 is a better interface than wlan0 to communicate with 10.0.0.3 on". So it constructs an ARP reply to the DHCP server, effectively saying "hey, wait, I have better information about 10.0.0.46. You should talk to it on wired0. Then we won't have to worry about that stupid unreliable radio, OK? OK."

So the DHCP server dutifully processes the ARP reply and blasts the lease renewal ACK to... wired0. Which promptly drops it after saying to itself "I didn't ask for that IP address; go away".

So the poor wireless interface is a third-wheel in all this, thinking that the server hates it or the network must have dropped its packets. Until lease renewal comes along, the IP address goes away, the route goes away, and the initial (broadcast-based) discover/offer/request/ack cycle works just fine, giving it a short-lived glimmer of hope.

QED.