Random MAC address mobile devices

Hi everyone,

I know it's something not directly related to OpenWRT, but maybe someone can put some light how to solve my issue.
In one network I have many type of devices (laptops, desktop PC's, mobiles...) each one with each MAC address, and a DHCP reserve in the main router (running OpenWRT), pointing one MAC to one internal IP address.

The problem comes with some mobiles devices (Android) with random MAC address function enabled by default, each time it connects gets a new IP.

Is there any way to make a DHCP reserve by device-id or something similar for random mac adddress devices? Any idea/suggestion is welcome?

Of course, I can't disable the mobile random function.

Many Thanks everyone!!!

You usually can disable the Random MAC per Wifi/SSID , so disable it for your own home network.

But the Random MAC comes from the device (mobile) not from my Wifi/SSID.
Sorry but I don't understand your idea (my fault).

On your device disable the Random MAC address.
I have it disabled on my Samsung Phone but only for my own home network, that is something you can set on your device, on the Wifi SSID on your device

Thanks for your help @egc

Is there any other way without modifying the mobile/device with random mac?
Some devices are out of my hands.

If the device advertises a hostname you can set the IP address for that hostname and you do not need the MAC address. but not all devices advertises a hostname (note that OpenWRT truncates hostname so have a look at the leases if the device advertises a hostname and what it is)

The point of using random MAC addresses is to avoid identification. But you pretend to identify the devices, and even assign a static known IP address. Perhaps you should explain your use case.

Thanks I'll try it by name.

I don't want to use random MAC address, some devices connect to one network (wifi isolated VLAN) using it.
More of those devices are out of my hands, but I want to "control" their activity by IP address.

It is easy to set an other host name on the device to escape your control so sounds like an uphill battle :frowning:
Somewhat better solution is to only use static leases on MAC address and no DHCP range, spoofing another known MAC address is possible but much more difficult.

Thanks for your time and help @egc

@eduperez Gracias por tu ayuda, saludos.

You are welcome.

If you have a working solution for your use case please mark that solution as solved: