how to get a static MAC after reboot?

This forum is for supported devices using an ARMv7 Samsung SoC.

how to get a static MAC after reboot?

Postby butch » Thu Aug 24, 2017 6:51 am


I needed to reinstall my odroid-u3 after an SD-card defect.
No I am facing the issue, that my odroid gets a new MAC address after each reboot.

So my router recognizing it as a new device on each boot and providing a static IP via DHCP by the router based on mac address does not work.

I don't remember this issue before, but I am not completely sure.

Is this problem known? How can I solve / workaround it?

thanks, butch
Posts: 6
Joined: Fri Sep 05, 2014 8:02 pm

Re: how to get a static MAC after reboot?

Postby summers » Thu Aug 24, 2017 10:05 am

Assuming you are using systemd-networkd see:

I think you need the [Link] MACAddress=

Not that I've tried it though ...

Another thought, I don't know how the u3 boots. But if it boots via uboot - recent versions can set the ethernet mac. Now recent versions of arm arch uboot have been set up the read /boot/uEnv.txt (IIRC) - and so you may be able to set the mac address then. Then uboot will set it before passing control to the linux kernel. Anyway you would need to dig into the u3 boot mechanism for this ...

This is helpful

On reflection think this requires device tree, as uboot sets the ethernet mac in the device tree, and passes the device tree to the linux kernel. My guess is though that you are modern enough to use a device tree.
Posts: 177
Joined: Sat Sep 06, 2014 12:56 pm

Re: how to get a static MAC after reboot?

Postby renegat » Sun Nov 19, 2017 7:35 am

I'am running into the same issue: On every boot of my U3 the MAC changed to a new one spamming my DNS leases and make the DNS fail after max. leases are reached.
Unfortunately there is absolutely no hint how to stop this.
Setting optargs=usbethaddr="c6:49:e2:af:cc:03" in /boot/uEnv.txt did not help
ifconfig eth0 down
rmmod smsc95xx
modprobe smsc95xx
rmmod smsc95xx
modprobe smsc95xx

as mentioned here does not help

and the hint from here to
delete /etc/smsc95xx_mac_addr and reboot

did also change nothing as this file does not even exist.

At it is said, that:

- Ethernet MAC address is defined in /etc/smsc_95xx_addr instead of /usr/

but that file does not exist and creating it with a MAC in it changes: nothing!

I found an entry in journalctl:
Code: Select all
alarm systemd-udevd[211]: Could not generate persistent MAC address for eth0: No such file or directory

but I do not know to which file it refers to and in which format the MAC has to be set there.

At last I found something about this udev error above here:

you should be able work around it by copying /usr/lib/systemd/network/ to /etc/systemd/network/ and replace MACAddressPolicy=persistent with MACAddressPolicy=none in the latter, which should prevent udev from doing anything relevant.

After that the error is gone - but you will still get a random MAC no matter what you have set in /boot/uEnv.txt or /etc/smsc_95xx_addr

Please help me to set a persisting MAC on my U3 or I can only use it as a paperweight anymore!
Thank you in advance.

EDIT: added information about system

Device: Odroid U3+
Kernel: Linux alarm 4.14.0-1-ARCH #1 SMP Tue Nov 14 05:03:13 UTC 2017 armv7l GNU/Linux
Posts: 11
Joined: Sat Oct 12, 2013 1:56 pm

Return to Samsung

Who is online

Users browsing this forum: No registered users and 1 guest