Page 1 of 1

Random MAC address

Posted: Thu Feb 04, 2021 10:55 am
by ea7gwc
In beta 4.1.4 the MAC address of the ethernet port changes randomly at each boot.
This causes my DHCP server to assign it a different IP each time.

73.

Re: Random MAC address

Posted: Thu Feb 04, 2021 11:24 am
by MW0MWZ
Wow that must be annoying :( Let me take a look and see if I can pin that down.

Re: Random MAC address

Posted: Sat Feb 06, 2021 11:16 am
by MW0MWZ
This one is super annoying - its an up-stream problem, and I could not get the mac address to stay fixed no matter where I set it.
Boot process / nic config / dhcp client - you name it, it moved, the closest I came was to send a specified identifier to the DHCP server, that seemed to help but its not a good fix.

So... still working on it...

Re: Random MAC address

Posted: Sat Feb 06, 2021 6:46 pm
by MW0MWZ
KE7FNS wrote: Sat Feb 06, 2021 6:23 pm
MW0MWZ wrote: Sat Feb 06, 2021 11:16 am This one is super annoying - its an up-stream problem, and I could not get the mac address to stay fixed no matter where I set it.
Shouldn't it be read from the hardware?

Can you spoof a specific one with macchanger?
Yes, if the hardware has a MAC burned into the EEPROM and if the Kernel knows how to read that EEPROM.
I believe that in this case, there is no address available in the EEPROM.

Re: Random MAC address

Posted: Sun Feb 07, 2021 10:46 am
by MW0MWZ
KE7FNS wrote: Sat Feb 06, 2021 8:17 pm
MW0MWZ wrote: Sat Feb 06, 2021 6:46 pm Yes, if the hardware has a MAC burned into the EEPROM and if the Kernel knows how to read that EEPROM.
I believe that in this case, there is no address available in the EEPROM.
It looks like it has to do with the dwmac-sun8i driver and device tree.

I found a patch for armbian that fixes it, so it has to have a unique mac stored somewhere.

What OS are you using, and does it use u-boot?
Using Armbian kernel / modules and dtb, with RasPiOS for everything else.
Can you point me at the Armbian Patch please - all i could find was a "yes this happens, we'll get to it" from Armbian so far.

EDIT: I did investigate the dwmac option, that seems to be related to older kernel versions, couldn't find much that is/was current.
In the mean time I have a fix that cures it nicely, pushing a new image to the beta folder today.

Re: Random MAC address

Posted: Sun Feb 07, 2021 9:37 pm
by MW0MWZ
Already have a working fix for it in the posted beta :)

Re: Random MAC address

Posted: Mon Feb 08, 2021 10:00 am
by ea7gwc
Thanks Andy. This afternoon I will record the microSD and test it.