does anyone happen to know how to force a specific ethernet device to be used? or maybe a easier way than udev rules?
Depends on what you are doing exactly. You could set a default gateway or some other iptable
rules.
i have a network storage with to many ethernet devices. uh it can have up to 4 ethernet ports. i just want to use one of the four and not have the network storage “forget” every reboot asking me to fix it again with the config. if i can get it to stop asking me to config it after a reboot then i don’t need a display mouse and keyboard connected and i would just be able to ssh in.
Is this device running DietPi?
yep its a qnap device but i have dietpi installed on a ssd.
And the order or name of ports is changing each reboot?
yeah such as eth1 and eth0 becoming eth2 and eth3.
Udev rules might be the way. You could try something like this:
Create a file /etc/systemd/network/70-persistent-net.rules
and add
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:0c:29:0d:10:74", NAME="eth0"
Adjust mac to yours and reload configuration
sudo udevadm control --reload
cool I’ll try that. thank you