I am currently trying to change a HWaddr persistently. ifconfig eno0 down
, ifconfig eno0 hw ether 01:02:03:04:05:06
and ifconfig eno1 up
works fine, but I could not find a way to make this persistent.
I found Changing Network Interfaces name Ubuntu 16.04, which suggests to add net.ifnames=0 biosdevname=0
to GRUB_CMDLINE_LINUX
in /etc/default/grub
and run update-grub
. This did not change anything for me.
Also, like suggested in Configuring a network interface and changing mac adress permanently setting /etc/network/interfaces to
auto lo
iface lo inet loopback
pre-up ifconfig eno1 hw ether 01:02:03:04:05:06
did not work (Hardwareadress just stays the same).
The second advide was to use udev. I tried SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}==01:02:03:04:05:06, ATTR{dev_id}=="0x0", ATTR{type}"=="1", NAME="eno1"
. While running udevadm control --reload-rules && udevadm trigger --subsystem-match=net
seems to change something (as one can see using udevadm control
, it does not change the hardware address. After a reboot, the adress also stays the same. Does someone have an idea how to further debug this?