Android phone not taking DHCP reservation
-
With my Google 7a phone and I have a DHCP reservation for it, but no matter what I do, the phone will not use it, it always uses an IP address from the pool.
Also when I look at the DHCP Leases, it is not showing there.
When I got the phone some months back this was a problem, I was able to resolve it back then by changing DHCP servers from KEA to ISC, however it is now back.
Running version 2.7.2 on baremetal.
Any thoughts on how to troubleshoot this?
-
@girkers You sure you set the reservation for the correct mac address? Phones love to use private or random mac addresses.. If a device got an IP from your pool, then it would be listed in your leases.
So either it using a static IP on the device, it got a lease a while ago and you cleared your leases and it hasn't renewed this lease so not listed yet. Or you looking for the wrong mac, etc.. Or you have some other dhcp server running that its getting its lease from.
But if pfsense handed out a lease, then it would be listed in the lease table on pfsense.
-
@girkers said in Android phone not taking DHCP reservation:
it always uses an IP address from the pool
and
@girkers said in Android phone not taking DHCP reservation:
Also when I look at the DHCP Leases, it is not showing there.
is contradictory.
The phone obtained a lease, or it didn't.
If it didn't, the wifi ? connection doesn't work, and that's easy to test.@girkers said in Android phone not taking DHCP reservation:
I have a DHCP reservation for it
Be sure to use the correct MAC addresses.
Most phones, these day, use 'random' MAC addresses when they connect to a wifi network.
If this is your own Wifi network, you could say that you 'trust' your own network, and thus, for your own network, switch of the random MAC generation on the phone. -
@Gertjan and @johnpoz are correct -- likely your Android is using MAC randomization. That would make a DHCP reservation hit-or-miss as the phone would be submitting a MAC address that differs from what you may have configured in the reservation. This new random MAC would likely show up the next time the Android client renews its lease, or it could be at any random time the Android client is programmed to use.
Here is a link I found describing the feature and how to disable it: https://support.boingo.com/s/article/How-to-Disable-MAC-Randomization-in-Android-13. You may have a different OS version than shown in the link, but I suspect the mechnism for disabling the feature is still the same.
-
Thanks for feeback, I am fully aware of the Random MAC thing and that was the first thing that caught me out when I got the phone.
I can't explain why it is not appearing in the DHCP log, so here are some screenshots:
Phone network connection:
DHCP Log sorted by IP address:
DHCP Lease Pool Info:
DHCP Reservation for the Phone:
I have checked the MAC address multiple times. I am also as confused by all of you why it is showing as connected but not appearing in the DHCP log.
-
Go here : Status > System Logs > DHCP
(logs contain always the answer ^^ )and hit Ctrl-F (search) and look for the "bd:db" (without the " ).
If you don't find any occurrences of "bd:db" you have proof that the pfSense DHCP server didn't handle the DHCP transaction. As it never received the request.
That means some other DHCP server on the LAN work exists. Like an wifi access point that is also a router with DHCP capabilities.Btw : you screen shot of the phone's address details doesn't say me that it's in 'automatic' mode (== DHCP).
So, for me, these settings could be static == set by you, manually.
That would also explain a lot, if not everything.Hummm ... https://forum.netgate.com/topic/190153/change-mac-address-on-static-ip-now-can-t-get-dhcp/9 => you use kea or isc ?