2016-08-16

iPhone WiFi roaming and DHCP issues

My last post on this went in to some detail, and this is a summary of my tests so far.

The issue, to recap, is that when you have multiple WiFi Access Points on the same SSID (WiFi name), the iPhone will move between these mostly seamlessly like any other device, but not quite.

It seems that some times when changing AP, and this is surprisingly frequent, the iPhone will not regain its IPv4 address when it does so, leaving you with no IPv4 connectivity, a 169.254. address on the WiFi settings screen, and most things broken. Logs show it is not even trying DHCP. It even stays broken when you have "Wifi assist" that should use mobile if the WiFi is not working, even though it knows that for IPv4 the WiFi is not working!

The test case I have for this was Unifi APs, and FireBrick DHCP, using WPA Personal (i.e. simple password) security, and also having IPv6 on the network. The IPv6 is fine.

Switching to only 5GHz

First thing I tried was only setting on 5GHz, and not 2GHz. The iPhones we have all do 5GHz. It helped as problem was not so frequent, I think, but did not fix it.

Different SSIDs

Then we tried different SSIDs for each AP. This is tedious. It also meant it hung on to the wrong AP for too long with poor signal before switching. When it switched it worked and got an IP address via DHCP.

Setting min-RSSI

One simple trick with multiple SSIDs was to set a min-RSSI in the config for the Unifi. This meant it switched more readily between the SSIDs as I moved around. I have tried this for over a week. It works. But again, is rather tedious with each AP on a different SSID. Not how it should be.

This is the only solution we have yet found reliable.

Fixed IP

I set the phone to use a fixed IP, netmask, gateway, and DNS when on the SSID I was using, and set all APs to the same SSID. This seemed to work, but has failed in a similar way, nonIP connectivity. Oddly even IPv6 did not work. This rather confirms it is an issue on the iPhone with DHCP on WiFi. The DHCP server in this case has no clue that the SSIDs. All indications are that it is the iPhone that has a bug.

WPA-Enterprise

Not tried. Well, I did, but it needs RADIUS and EAP. I tried an EAP accept, and even an EAP MD5 challenge and no joy. If anyone has a pcap of RADIUS/EAP for WPA Enterprise with an iPhone when it works, send me it and I'll code a server and test. Rumour is iPhones do work differently in Enterprise mode. This may be another solution, but the need for a RADIUS server would thwart most people.

All we really need is for Apple to fix this - it is tedious having to find a work around like this.

Updated: Fixed IP did not works

Update: Could it be the Unifi kit and not Apple? Well, yes, it could be, but googling other people with issues suggested Apple. I am trying newer Unifi firmware now.

Update: Two days of testing roaming on Unifi firmware 3.7.5.4969 and no problems yet - I'll keep testing.

12 comments:

  1. If you want possibly a worse experience than dealing with by, file a bug report with Apple at http://bugreport.apple.com anyone can do it you don't need a developer account. Be warned it's likely to be frustrating. My last bug report was marked as a duplicate of one filed after mess a result I have no idea what's being done about it.

    If your interested it's about how you can't create a contact for text messages and that come from names (usually company names likes wickes or Barclays) rather than numbers.

    I wanted to adding pretty pictures to those but can't 😂

    ReplyDelete
    Replies
    1. I have managed to create such contacts and they work (custom text tones). But lots of those appear as from Apple Inc on main screen, or used to :-)

      Delete
  2. If you file a bug report they may well ask you for sysdiagnose output. If you don't know about this, you do it by holding down both volume buttons and then pressing the power button briefly - the phone will vibrate. Then if you sync the phone you can find a tar.gz in:

    ~/Library/Logs/CrashReporter/MobileDevice/[name of your phone - e.g. Revk's iPhone]/DiagnosticLogs/sysdiagnose/

    ReplyDelete
  3. During a successful roam what dhcp requests are made? During a layer 3 roam I don't think my devices are making any dhcp requests... I'll check later on...

    ReplyDelete
  4. Something similar cropped up at my aunties this evening after I upgraded her "kitchen ap" to a 2.4GHz+5GHz ap. She then started complaining about connectivity loss while the iPad claimed it was still connected :(

    However in this case...
    The interface of the iPad shows the correct IPv4 IP but can't access stuff. Connectivity came back when I told the AP to drop her from the wifi and the iPad automatically reconnected.
    Likely to be the same issue?

    ReplyDelete
  5. Thank you very much for putting some work into researching this. Much appreciated. Now I dare buy Unifi kit.

    Does anyone have any contacts within Apple? Who ought to be embarrassed by this crummy bug.

    ReplyDelete
  6. I am a bit confused as to why your phone is trying to DHCP during layer 3 roaming - I just tested my android phone and it is not making any type of DHCP request when it roams between by UniFi access points. Are you roaming to a different subnet?

    ReplyDelete
    Replies
    1. I was surprised by this, even when setting 24 hour leases. Since writing I found that even with fixed IP connectivity dies sometimes.

      Delete
  7. I use UniFi kit at home - I have a mix of Pro 2/5Ghz and the older 2.4 only units. I can't say I've had any issues with mine losing IP and I have both IPv4 and IPv6 native connectivity at home.

    DHCP in my case is provided from a pair of Win2012 Servers (split for resilience... yeah at home).

    ReplyDelete
  8. I observed a similar problem where my MacBook Pro would not connect to a 2.4/5 AP. The fix I used was to alter one of the SSIDs. I believe that some Android devices get confused by duplicate SSIDs too.

    ReplyDelete
  9. Did you ever find a solution to this? I've been battling the problem with an iPhone 11 Pro / Orbi system. All other units (2x iPads, iPhone X, macbook pro) absolutely fine. I've even traded in the unit for a replacement. Apple has been no help (other than quickly and cheerfully replacing the unit). And while there seem to be other reports of this no one seems to have a good solution. ideas welcome!

    ReplyDelete

Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.

Don't use UPS to ship to UK

I posted about shipping and importing and tax and duty - general info. But this is specific. DON'T USE UPS! I had assumed the UPS issue ...