<p>Dan, that works on wireless networks. On wired networks the ARP technique determines *which* of the valid leases you should attempt to restore. So on a wired network you:<br>
1. ARP the known DHCP server IPs to discover the subnet.<br>
2. ARP the IP from the valid lease on that subnet to avoid collision.<br>
3. Restore the ifconfig from the still valid lease.<br>
4. Renew the lease.</p>
<p>This should be pretty sane and gives large speedups to resuming on wired (which people with docks do a lot).</p>
<p>Nathaniel</p>
<div class="gmail_quote">On Jul 30, 2011 6:45 PM, "Dan Williams" <<a href="mailto:dcbw@redhat.com">dcbw@redhat.com</a>> wrote:<br type="attribution">> On Sat, 2011-07-30 at 11:46 -0400, Genes MailLists wrote:<br>
>> On 07/30/2011 10:37 AM, Lennart Poettering wrote:<br>>> > On Sat, 30.07.11 10:31, Genes MailLists (<a href="mailto:lists@sapience.com">lists@sapience.com</a>) wrote:<br>>> > <br>>> >>>> <a href="http://cafbit.com/entry/rapid_dhcp_or_how_do">http://cafbit.com/entry/rapid_dhcp_or_how_do</a><br>
>> >>><br>>> <br>>> > <br>>> > IIRC connman (i.e. NM's competition) can do the ARP magic, too.<br>>> > <br>>> > Lennart<br>>> > <br>>> <br>>> <br>
>> Seems like a pretty reasonable thing to do - surely better than just<br>>> waiting for a timeout to decide if the server is not there ... are you<br>>> aware of any gotcha's ?<br>> <br>> NM already keeps DHCP information around based on the network you're<br>
> connecting to, so we don't need to ARP a bunch of servers just to<br>> determine whether the DHCP server we wanted is still there. dhclient is<br>> smart enough to attempt to reclaim the lease if it's not already<br>
> expired. Note that the Mac attempts to ARP a number of different DHCP<br>> servers (192.168.2.1, 192.168.4.1, 192.168.1.1) which would be pointless<br>> with NetworkManager, because it's extremely unlikely that the DHCP<br>
> server on your wifi network has changed; NM would simply know that the<br>> last DHCP server used *on that wifi network* was 192.168.1.1 and not<br>> bother to try talking to other ones like Mac OS X appears to do.<br>
> <br>> NM could use the same method of ARPing multiple DHCP servers that Mac OS<br>> X does, but it wouldn't provide much additional benefit, if any, at<br>> least on WiFi networks. It could be used on wired networks to (a)<br>
> determine which wired network you're connected to, and (b) do rapid<br>> DHCP. Again, NM already knows what DHCP server and what lease was last<br>> used on the specific wifi network you just connected to, and it won't<br>
> bother doing a DISCOVER, it'll just jump to RENEW if your lease is still<br>> valid.<br>> <br>> What's unique about the method described there is that the Mac<br>> configures the interface with the same IP address it previously had if<br>
> the lease is still valid, while NetworkManager waits for the DHCP server<br>> confirm the lease. So we could presumptuously configure the interface<br>> with the previous address from the lease and then only tear it down if<br>
> the DHCP server fails or rejects the renewal.<br>> <br>> Of course, none of this helps if your DHCP leases are short, but it<br>> certainly helps if you put your laptop to sleep a lot and wake it up in<br>> the same location.<br>
> <br>> Dan<br>> <br>> -- <br>> devel mailing list<br>> <a href="mailto:devel@lists.fedoraproject.org">devel@lists.fedoraproject.org</a><br>> <a href="https://admin.fedoraproject.org/mailman/listinfo/devel">https://admin.fedoraproject.org/mailman/listinfo/devel</a><br>
</div>