Linked by Thom Holwerda on Wed 13th Jul 2011 14:09 UTC
Internet & Networking "One of life's minor annoyances is having to wait on my devices to connect to the network after I wake them from sleep. All too often, I'll open the lid on my EeePC netbook, enter a web address, and get the dreaded 'This webpage is not available' message because the machine is still working on connecting to my Wi-Fi network. On some occasions, I have to twiddle my thumbs for as long as 10-15 seconds before the network is ready to be used. The frustrating thing is that I know it doesn't have to be this way. I know this because I have a Mac. When I open the lid of my MacBook Pro, it connects to the network nearly instantaneously. In fact, no matter how fast I am, the network comes up before I can even try to load a web page. My curiosity got the better of me, and I set out to investigate how Macs are able to connect to the network so quickly, and how the network connect time in other operating systems could be improved." Yes, I'd love to have Windows and Linux reconnect as fast as Macs do. Alas, "Method to quickly reconnect to a wireless or wired network", as well as its completely different "Method to quickly reconnect to a wireless or wired network on a mobile device" are probably patented, so Windows and Linux can't reconnect too fast out of fear of violating a software patent. In case you haven't noticed: I'm joking. Sort of.
Thread beginning with comment 480800
To read all comments associated with this story, please click here.
Race Conditions
by Brendan on Wed 13th Jul 2011 22:03 UTC
Brendan
Member since:
2005-11-16

Hi,

Is there potential race condition/s in MacBook Pro's network initialisation?

As far as I know, until the "DHCP ACK" is received the old lease could expire at exactly the wrong time (e.g. immediately after the last "ARP reply unicast" is received by the client) and be reassigned to a different client by the DHCP server; and the Mac could end up using an IP address that belongs to something else (in rare cases of bad luck).

Based on the times in the article, a "DHCP discover", "DHCP offer", "DHCP request" and "DHCP ACK" sequence would've taken 653 ms and could've began 10 ms after the link is established (and you'd be able to use the MAC from the "DHCP ACK" to determine if you're on the same network as last time anyway).

- Brendan

Reply Score: 2