Ok, so my goal here is to set a static IP address to my NAS running on a NanoPi M4 with OMV + Debian Stretch (latest updates installed), but I have encountered two issues:
The cleanest way to achieve this (IMO) is to set the static IP via the router, which is perfectly possible except for the fact that my M4 changes its mac address every time it is rebooted. I searched in this forum and I found this old post from Jan 2018, but apparently the error was not reproducible so there is not much info there. Then, I searched in Armbian's forum and found 2 similar threads (one from February 2018 regarding a NanoPi Neo and one from May 2017 regarding and Opi Zero) and the suggested solution is to edit the /etc/interfaces file to hardcode the MAC address, but this thread of September-December 2018 says that editing the interfaces file is not a good idea as it may clash with whatever the Network Manager is doing.
So, the not cleanest way (but still functional) is to set the static IP via the OMV web GUI. I encountered a loooot of issues about how changing the interfaces may break the web GUI's network section (which I think have been described a lot in this forum. See the May 2017 post mentioned above, for example), but still I managed to do it.
The issue now is that I found that if I reboot my router (there are weeks I have to do it every day) while the M4 is on, when the router gets back and re-assigns IP addresses, apparently it ignores the static IP configuration and the N4 ends up with a completely different IP address, which is not the behavior I want.
So, as I still prefer to set the static IP directly in the router via de MAC address, my main question is:
How can I prevent the MAC address from changing on every reboot?
If that is not possible (for whatever reason, which would be odd), then my question would be:
How can I prevent the IP address from changing on every router reboot? Is it an issue with the router or with the N4?