No static Mac address since v9.7.1

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | v9.7.1
  • Distro version | bookworm
  • Kernel version | Linux pihole 6.6.44-current-rockchip64 #1 SMP PREEMPT Sat Aug 3 06:54:42 UTC 2024 aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | NanoPi R5S/R5C (aarch64)
  • Power supply used | 5V 3A
  • SD card used | ineternal emmc

Additional Information (if applicable)

Steps to reproduce

  1. Reboot system
  2. always New changing Mac address

Expected behaviour

  • always same mac address

Actual behaviour

  • changing mac address

Extra details

@MichaIng Can you support

Are you referring to mac address of the ethernet or wifi?
Where is the mac changing? For example what is the output of ip link in every boot?

ethernet mac address

`1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether be:12:e5:f7:15:5c brd ff:ff:ff:ff:ff:ff

new boot

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 02:51:bd:07:ad:05 brd ff:ff:ff:ff:ff:ff

`

maybe this could be an option to work around

1 Like

So I don’t understand everything so what is the workaround?

This?

mkdir -p /etc/systemd/system/networking.service.d
echo -e '[Service]\nExecStartPre=/sbin/ip l set dev eth1 address XX:XX:XX:XX:XX:XX' > /etc/systemd/system/networking.service.d/set_mac.conf

yes, where XX:XX:XX:XX:XX:XX would need to be replaced with a MAC you can choose.

Just to be sure: you did not have the problem initially, but only after the upgrade to DietPi v9.7 and the doing the kernel migration to Linux 6.6? Because I remember and based on the GitHub issue, this existed before :thinking:.

I will open an issue at the FriendlyELEC kernel repository. There must be a prober fix within kernel sources, likely the device tree.

Yes, the issue occurred at me with the update to 9.7.1

The WAN port MAC remains static in your case, doesn’t it? At least on my R5S, it remains static, but LAN1 and LAN2 ports are dymaic.

Wan port remains static
Ethernet port (I only have one) doesn’t remain static…

Do I need to delete the work around if it’s solved? I just need to remind myself on this

1 Like

I have the same exact device and issue. I am planning to do a complete re-install of DietPi :sweat_smile: Is there a workaround instead? Thanks!

This one No static Mac address since v9.7.1 - #5 by temp

Thanks! Will this fix be implemented in the next update?

we are looking into another permanent solution, but no ETA yet. Therefore you can use the workaround and follow the related GitHub issue. NanoPi 5/6 | Set/change MAC address persistently · Issue #6565 · MichaIng/DietPi · GitHub

thanks! My apologies as I am not technically inclined and have a few more clarifications:

  1. This fix will persist even after reboot?
  2. This issue only affects this particular hardware(NanoPi R5)?

thanks again!

Yes

NanoPi R5/6 SBC family