4 ms·
Here is a somewhat related anecdote: I don't know if all Android version do this by default, the one on my phone does: Whenever it connects to an AP, it genera
by Fischgericht 3y ago
Here is a somewhat related anecdote:
I don't know if all Android version do this by default, the one on my phone does: Whenever it connects to an AP, it generates a new random Fake-MAC. So, it's not a per-SSID permanent MAC, but a new one on each reconnect.
Now, at Bahrein Airport the WiFi coverage is somewhat spotty. Due to this you have lots of devices reconnecting. And each time they register with a new MAC.
The DHCP server behind their WiFi has a least time of 14 days. And even with them having chosen a /16 IP range for their DHCP, at an airport you can already imagine that those limits are not clever.
And even worse: The system is self-DDoS'ing. This is because every time a phone connects, and the DHCP server has run out of IPs, after a couple of seconds the phone will disconnect, and then try to reconnect - with ANOTHER random MAC address.
The solution I used myself (and showed to a couple of other people in the lounge was) was disabling the privacy feature. This way your MAC would stay the same. You then would keep hammering the AP until one of the thousands of leases had timed out and a IP was available again. You'd then get this IP, and due to your MAC staying constant having reconnects to it (for example because you went to the toilet) also aren't a problem.
So, let this be a lesson to those administrating large public WiFis: Now that devices use random MAC addresses, consider to make your DHCP pool larger, and the lease time much shorter. Unless you are Tom Hanks, you would not typically stay 14 days in an airport terminal. :)
- kstrauser 3y agoSimilar at the Flamingo Hotel in Vegas. Our room came with 2 free Wi-Fi connections. (I'm sure it's entirely coincidental that there was zero cell signal in our room.) Extra connections were around $15 per day. Their IT defines a MAC address as a connection. If your device uses random MACs, plan on disabling that in advance or spending half an hour on the phone with their tech support to get your device back online. Reminder to self: bring my own AP next time.
- giancarlostoro 3y agoTP link sells some insanely small wifi routers, some you can even power with micro USB.
- gh02t 3y agoI bought a gl.inet travel router a while back and it kicks ass. Being based on OpenWRT it has a ton of features, but also just works when I need it. I can even do wire guard on the router back to my home network, which I've found helps defeat hotels that block you if they detect multiple devices sharing an IP.
- rconti 3y agoFascinating. How do you know these details? :)
- pxeboot 3y agoMost desktop operating systems will show you the DHCP lease time and subnet mask if you look in the right place.
- runjake 3y agoWindows: ipconfig /all macOS: ipconfig getpacket <interface> Linux: cat /var/lib/dhcp/dhclient.leases
- Fischgericht 3y ago4 hour layover, Laptop, Wireshark, nothing better to do. Also, the wife demanded WiFi for her phone, so I decided to debug the problem...
- thaumasiotes 3y ago> I don't know if all Android version do this by default, the one on my phone does: Whenever it connects to an AP, it generates a new random Fake-MAC. So, it's not a per-SSID permanent MAC, but a new one on each reconnect. I do not even have this as an option except in the developer settings. I get either a per-SSID permanent MAC (the default) or the device's actual hardware MAC.
- Fischgericht 3y agoAre you sure? Not sure if there is a global setting, but if you press the gear icon next to a WiFi connection entry, there is a "privacy" option which in my case by default says "User random MAC-Address (default). I have that option even if developer options are turned off.
- alamortsubite 3y agoThe random MAC generated by my Pixel (still holding onto Android 13) are per SSID, not connection. So maybe the behavior you observed is manufacturer-specific.
- thaumasiotes 3y agoYes, in the per-connection settings there is a "privacy" option named "Use randomized MAC (default)". Enabling that setting (which, as noted, is enabled by default) gives you a permanent per-SSID MAC address that is used for that connection. It's listed under "Network details" on the same screen, as the "Randomized MAC address". For my local home network, my "randomized", in the sense of being more fixed and eternal than the stars, address is 76:78:c9:94:2a:94, and I cannot change it, other than by changing the setting. The only other MAC-address-related option on this screen is "Use device MAC". If I switch the randomized MAC off, and then switch it back on, I still have exactly the same "random" address that I am required to have for all of time. However, if you enable the developer options, you can find the option for "Wi-Fi non-persistent MAC randomization". It says "When this mode is enabled, this device's MAC address may change each time it connects to a network that has MAC randomization enabled." (This is all on stock Android, on a Pixel phone.) You shouldn't confuse the name of a setting with the behavior that setting controls. The name of the setting is lying to you. Sqlite's "autoincrement" column modifier is another good example of this phenomenon. It's named "autoincrement", but as the documentation for the modifier notes, you will get autoincrement functionality on a primary key column regardless of whether that modifier is set, and the behavior controlled by the setting is something entirely different. ("Autoincrement" means that values in that column, once they have ever existed, may never exist in another row, even if the row in which they originally existed has been dropped. You may notice that this has nothing to do with the meaning of the word "autoincrement". Other people have noticed that too.)
- kalleboo 3y ago> So, let this be a lesson to those administrating large public WiFis Or adopt IPv6 with NAT64! All mobile devices support this now since many large mobile networks are adopting it, Apple requires apps support it to be approved for the App Store, etc.