Random MAC address

Help with FriendlyArm Nano Pi Neo / Neo Air
Post Reply
ea7gwc
Posts: 36
Joined: Wed Apr 11, 2018 3:53 pm
Location: Malaga, Spain

Random MAC address

Post 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.
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: Random MAC address

Post by MW0MWZ »

Wow that must be annoying :( Let me take a look and see if I can pin that down.
Andy

73 de MW0MWZ
http://pistar.uk
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: Random MAC address

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

73 de MW0MWZ
http://pistar.uk
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: Random MAC address

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

73 de MW0MWZ
http://pistar.uk
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: Random MAC address

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

73 de MW0MWZ
http://pistar.uk
User avatar
MW0MWZ
Site Admin
Posts: 1505
Joined: Wed Apr 04, 2018 9:15 pm
Location: Wales, UK
Contact:

Re: Random MAC address

Post by MW0MWZ »

Already have a working fix for it in the posted beta :)
Andy

73 de MW0MWZ
http://pistar.uk
ea7gwc
Posts: 36
Joined: Wed Apr 11, 2018 3:53 pm
Location: Malaga, Spain

Re: Random MAC address

Post by ea7gwc »

Thanks Andy. This afternoon I will record the microSD and test it.
Post Reply