NanoPi R4S changes MAC address each boot

Hi @MichaIng

With nanoPi R4S new install, each boot it gets a new MAC address and new IP address.

Other issue is ethernet cable in WAN port still doesn’t work - needs to be LAN port each time.

But that is secondary and not as important to me - I’d like MAC address to stay constant ?

All details below

Required Information

  • DietPi version | cat /boot/dietpi/.version:
    G_DIETPI_VERSION_CORE=9

G_DIETPI_VERSION_SUB=1

G_DIETPI_VERSION_RC=1

G_GITBRANCH=‘master’

G_GITOWNER=‘MichaIng’

G_LIVE_PATCH_STATUS[0]=‘not applicable’

  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN:
    bookworm

  • Kernel version | uname --all:
    Linux DietPi 6.6.16-current-rockchip64 #1 SMP PREEMPT Fri Feb 23 08:25:28 UTC 2024 aarch64 GNU/Linux

  • Architecture | dpkg --print-architecture:
    arm64

  • SBC model | echo $G_HW_MODEL_NAME:
    NanoPi R4S (aarch64)

  • Power supply used | (EG: 5V 1A RAVpower)
    5V 2A

  • SD card used | (EG: SanDisk ultra)
    SanDisk Ultra

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)

  • Was the software title installed freshly or updated/migrated?
    Freshly

  • Can this issue be replicated on a fresh installation of DietPi?
    Fresh yes, tried 3 times

← If you sent a “dietpi-bugreport”, please paste the ID here →

  • Bug report ID | echo $G_HW_UUID

Every boot changes IP address and MAC address

Expected behaviour

Should stay same MAC address and hence IP address?

Can you have a look at following Github post? LAN port disappears after reboot on NanoPi R4S · Issue #6342 · MichaIng/DietPi · GitHub

Probably it helps.

1 Like

Thanks yes it mentions the same issues.

After the kernel upgrade, both Ethernet ports should actually work, also it was the “LAN” port which was disappearing after warm reboots, not the “WAN” port? Or ia the WAN port missing for you even on cold boots?

ls -l

The randomised MAC addresses are nasty. Probably there is a way to fix this via device tree overlay and finally patch: NanoPi 5/6 | Set/change MAC address persistently · Issue #6565 · MichaIng/DietPi · GitHub

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.