NanoPI NEO Static MAC Address for Static IP

Hello,

my NanoPI NEO v1.4 comes up with a random MAC address on each boot. This causes the DHCP server to assign a new IP every time, even though I marked that (first) MAC to get the same IP every time in my router.

I solved this by adding a small config file in the “interfaces.d” folder (so it does not get overwritten by config tools later …), like so:

$ cat /etc/network/interfaces.d/10-staticmac
iface eth0 inet dhcp
hwaddress ether 82:E3:A3:BB:39:34

Now I wonder if that is the right solution?!

Surely I am not the first who wants a static IP obtained via DHCP, i.e. without configuring everything static?
I did search a bit, but I must have missed that?!
Any pointers welcome. Thx.

1 Like

Hi,

many thanks for your message. I did a quick google search and you are not the first looking for this. I found a Armbian Forum entry from 2018 pointing to same solution. https://forum.armbian.com/topic/6354-does-nanopineos-gige-mac-address-randomly-change-from-time-to-time-after-rebooting/