MAC Adress, default gw

Hi there,

two quick questions:

  1. the mac address of my Rock PI S keeps changing, any way to make it permanent?
  2. the rock pi seems to not honor the default ipv4 gateway, why is that? (I have to manually “route add default gw xx.xx.xx.xx” to i.e. clone from git)

Thanks!

update seems to be somewhat related to Networking Issues - disable IPv6, Static Gateway IP settings lost on reboot

try this, I’m not sure if it works!

sudo nano /usr/lib/NetworkManager/conf.d/rock.conf

[device-mac-randomization]
wifi.scan-rand-mac-address=yes
[connection-mac-randomization]
wifi.cloned-mac-address=stable
ethernet.cloned-mac-address=stable

thanks for the quick answer, the directory conf.d does not exist. I am looking primarily to make the eth0 mac address permanently

Additionally, setting the MAC address in /etc/network/interfaces apparently is a way to make it permanent, but still not luck with the ipv4 default gw from dhcp4.

added to /etc/network/interfaces:

auto eth0
iface eth0 inet dhcp
hwaddress ether XX:XX:XX:XX:XX

I am having the same changing mac addresses. In the ‘Rock Pi S new users’ forum I posted this question and thought I had it solved with the randomization.

  1. This sometimes work…
  2. or really when I start the rockpi-s from cold… I get new ip’s from my router because
    it has a different ip (both the ethernet and wifi)
  3. sometimes if I reboot with the NetworkManager config file the ‘stable’ mac is setup. not always

This is a real problem. I am trying to use this an iot sensor device on my wifi mqtt and not having
a consistent ip just makes it unusable.