How to put new udev rules for network interfaces into effect without rebooting?

Viewed 20

Om my Raspberry, I have two USB-Ethernet-Adapters connected to two USB ports. These would show up als eth1 and eth2.

In order to have a well-defined eth device name for each of them, based on the USB port position where it is plugged into, I created these 2 udev rules (note that the attribute devnum contains the USB port number on the Raspberry USB switch):

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTRS{idProduct}=="1a02", ATTRS{devnum}=="4", NAME="eth-special0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTRS{idProduct}=="1a02", ATTRS{devnum}=="5", NAME="eth-special1"

This works - after rebooting, instead of eth1 and eth2, two interfaces eth-special0 and eth-special1 are present. Everything fine.

My question: how can I put these "networking udev rules" into effect without having to reboot the whole system?

What I tried to no avail:

  • udevadm trigger
  • udevadm trigger --action="change"

These retrigger mechanism work in general with new udev rules, but seemingly not necessarily for network devices. These seem to be "stickier" than others.

So is there a way to activate these rules without rebooting - even better: without even restarting the entire networking service?

0 Answers
Related