WiFi + short DHCP lease = problem?

Hi

I have been having really bad experience with my RB2011UiAS-2HnD-IN WiFi in the office. My apple laptop and my colleagues iPad kept disconnecting regularly. I have been struggling much with the logs on the router like

12:13:33 wireless,info A4:5E:60:xxx@wlan-practi-office: reassociating
12:13:33 wireless,info A4:5E:60:x@wlan-pxxracti-office: disconnected, ok
12:13:33 wireless,debug wlan-practi-office: A4:5E:60:xxx in local ACL, accept
12:13:33 wireless,info A4:5E:60:xxx@wlan-practi-office: connected
12:13:35 wireless,debug wlan-practi-office: A4:5E:60:xxx attempts to associate
12:13:35 wireless,info A4:5E:60:xxx@wlan-practi-office: reassociating
12:13:35 wireless,info A4:5E:60:xxx@wlan-practi-office: disconnected, ok
12:13:35 wireless,debug wlan-practi-office: A4:5E:60:xxx in local ACL, accept
12:13:35 wireless,info A4:5E:60:xxx@wlan-practi-office: connected

every 10 minutes or so. On the laptop it would look like missed pings - between 1 to 6 pings (1 hz rate)

On the MAC console I saw this for every reassociate

 Fri Nov  4 14:23:36.853 <kernel> Received Deauth from e6:8d:8c:xxx with Reason 1
Fri Nov  4 14:23:36.855 <kernel> Unexpected payload found for message 34, dataLen 2
Fri Nov  4 14:23:36.855 <kernel> payload Data 01 00 
Fri Nov  4 14:23:36.856 Driver Event: <airportd[71]> _bsd_80211_event_callback: APPLE80211_M_ROAM_START (en0)
Fri Nov  4 14:23:36.856 Info: <airportd[71]> Roaming started on interface en0
Fri Nov  4 14:23:36.856 Info: <airportd[71]> SUSPEND AWDL behavior for interface en0
Fri Nov  4 14:23:38.169 <kernel> en0: roam event, sending supplicant link down message.

I also ran some wireshark logs and was actually surprised to see lots of broadcast deauth from the mikrotik..
Screen Shot 2016-11-04 at 19.47.57.png
While my computer was reauthenticating automatically, half of the iPads would loose wifi and not attempt to associate after 10-15 mintues, without regards if the data connection was being used or not

So eventually I tried removing the 10 minutes DHCP lease timeout and putting it to 2 days.

And that was it! no more disconnects.

Is this a feature? or a bug? Or maybe I don’t get it right? There were definitely refreshes happening, I saw it in the leases logs.

A note from some knowledgeable people would be highly appreciated. Thanks

It is an iOS dhcp bug.

https://www.net.princeton.edu/apple-ios/ios41-allows-lease-to-expire-keeps-using-IP-address.html

To my knowledge the bug has never been fixed, but changes in versions since this article was authored has changed the behavior of the bug. A 8-12h lease is usually sufficient, depending on usage. I personally use 24h on my network.

But the logs and packet sniffing show that it’s the Mikrotik that sends deauth

erased

This is described in the first post.

This has nothing to do with the problem.

@ulysses Which RouterOS Version and wireless package do you use?
Please adjust DHCP lease time as suggested and post your results.