Page 1 of 1

Changing MAC address of a NIC permanently

Posted: 20 Dec 2018 09:54
by selulven
My NAS4Free server has a dual port NIC installed. One of the interfaces reports an invalid MAC address, for some reason. The interface responds to network traffic to 00:1b:21:ba:e9:71, but the OS sees the MAC address as ff:ff:21:ba:e9:71. When another machine on the network looks up the MAC address using ARP, the reply is ff:ff:21:ba:e9:71. Since the interface responds to 00:1b:21:ba:e9:71, any traffic TO the interface fails. Traffic from the interface is fine.

I've fixed this by running

Code: Select all

ifconfig ix0 ether 00:1b:21:ba:e9:71
but this fix is temporary and isn't persisted when my NAS4Free on a USB stick restarts. Is there any way for me to make this fix permanent?

Re: Changing MAC address of a NIC permanently

Posted: 20 Dec 2018 10:01
by defcon999
... as PostInit-Script??

Gesendet von meinem SM-T900 mit Tapatalk


Re: Changing MAC address of a NIC permanently

Posted: 20 Dec 2018 11:54
by selulven
I'll give that a try! The exact same command, as a PostInit command? Could the interfaces potentially change device names so the interface in question is no longer ix0?

Re: Changing MAC address of a NIC permanently

Posted: 20 Dec 2018 13:26
by raulfg3
probably you need to provide full path for ifconfig to work on postinit.

Re: Changing MAC address of a NIC permanently

Posted: 21 Dec 2018 08:55
by selulven
So /sbin/ifconfig ?