Thursday, December 13, 2007

OS X / iPod Touch DHCP timeout problem

It has been some time since I last posted, but I spent the time well, especially on a vacation in Malta. Very nice place, even in late November. Apart from one rainy day we had great weather and temperatures around 20°C. Very comfortable. Another nice aspect was the display of prices in both Maltesian Lira (Lm) and Euros, because as of January 1st, 2008 Malta will change their currency and introduce the Euro as well. Very convenient for travelers :)

Back to business: Of course I did not want to be cut off from the net completely, so apart from my girlfriend's notebook I took my iPod Touch with me. The hotel advertised free WiFi access in the lobby. The first day I went down there and connected to the network without any problems using the iPod. They provided a freely accessible, unencrypted access point.

Two days later I could not get a working link. The iPod detected the wireless network and was able to join it, however I never got an IP address from the DHCP server but ended up with one of those IPV4LL (better known as APIPA) addresses that usually don't do you any good...

Trying and renewing the DHCP lease did not help, so I decided to take the hard way and ask someone at the front desk. I was surprised when the guy I talked to showed some basic knowledge of DHCP and asked me to wait while he checked the router. A moment later he came back and told me he could not do anything, because on Sundays the technical hotline available for the staff was not available. He gave me a complementary hour of Internet access on one of the for-pay computers in the business lounge and asked me to check again on Monday.

So I did - and still had the same problem. So I went back to the front desk, again asking if they had any problems with the router leasing IP addresses. This time the person at the desk was less knowledgeable and told me "We do not have IP addresses. Just set everything to automatic and it will work.". Very helpful. I decided to try again and explained to her in layman's terms that my device being set to automatic would result in it asking their WiFi device what to do and that this did not work. She recommended moving over to the business area and try again, because "the wireless network is installed over there". Imagine the front desk being approximately 15m away from the business area. Just three steps down, no walls etc. and my iPod showing a perfectly fine signal strength for the "Lobby Wireless" network. Anyway, because she had asked nicely I went over there - and guess what - this time got an address when I hit the renew lease button...

While she was happy that she had been right and helped another one of the tech-illiterate guests, I was both happy that I finally could check my mails, but also a little confused. Trying again later with the XP notebook it dawned on me that this was simply a very slow DHCP service and apparently the iPod is not too keen on waiting longer than approximately 5 seconds (rough guess) before falling back to Zeroconf.

I went looking around the net for someone with similar problems. Turns out this does not seem to be a iPhone/iPod issue but a general Mac OS X thing. I have not tried it out (do not have a Mac), but maybe a change to /etc/dhclient.conf could work, specifying a longer timeout value - assuming that OS X uses dhclient...