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