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.
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
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.
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
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.