Random MAC address

Help with FriendlyArm Nano Pi Neo / Neo Air
Post Reply
ea7gwc
Posts: 35
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: 1357
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: 1357
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
KE7FNS
Pi-Star Team
Posts: 1919
Joined: Wed Apr 17, 2019 11:11 pm

Re: Random MAC address

Post by KE7FNS »

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?
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
User avatar
MW0MWZ
Site Admin
Posts: 1357
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
KE7FNS
Pi-Star Team
Posts: 1919
Joined: Wed Apr 17, 2019 11:11 pm

Re: Random MAC address

Post by KE7FNS »

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?
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
User avatar
MW0MWZ
Site Admin
Posts: 1357
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
KE7FNS
Pi-Star Team
Posts: 1919
Joined: Wed Apr 17, 2019 11:11 pm

Re: Random MAC address

Post by KE7FNS »

MW0MWZ wrote: Sun Feb 07, 2021 10:46 am EDIT: I did investigate the dwmac option, that seems to be related to older kernel versions, couldn't find much that is/was current.
Yeah the info I found was dated. It says it was only with FriendlyArm NanoPi Neo v1.1 and v1.2 boards with Armbian using a 4.x kernel.

It says it doesn't exist when using the FriendlyCore image (Xenial with kernel 4.14.0)

Oh well, dunno if it matters or not but maybe it will help.
https://github.com/epsilonrt/armbian-na ... addr-patch
If someones previous actions are any indication of their future actions, then I predict the deletion and removal of access will happen at any moment. 7-11-2020.

"07/13/20 This Website Has Been Taken Down" ... again :lol:
User avatar
MW0MWZ
Site Admin
Posts: 1357
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: 35
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