What is the correct way to restart udev?

Solution 1:

I don't know if this helps in reloading the network configuration, but when I modified /etc/udev/rules.d/70-persistent-cd.rules to correct the DVD device link from /dev/dvd1 to /dev/dvd, I had to run

sudo udevadm trigger

to get have the new links created.

Solution 2:

You have to combine all the advice given here in the right order:

  1. Bring down the network service networking stop
  2. Unload the driver module from the kernel
    1. Find the name of the module lspci -v and look for "Kernel driver in use:"
    2. modprobe -r <driver module>
  3. Reload the udev rules udevadm control --reload-rules
  4. Trigger the new rules udevadm trigger
  5. Load driver modprobe <driver module>
  6. Restart the network service networking start
  7. (optional) Re-run any iptables scripts that referenced the eth interface name before it was up.

I suspect either step 4 or step 5 isn't really needed, but these steps worked for me. You could check after step 4 with step 2.1 to see if the trigger command already did step 5, edit this answer to reflect your findings if you do.

Solution 3:

I had a similar problem. Since I didn't want to take the time to reboot, I ran a one liner using Chris Wesseling's suggestion.

/etc/init.d/networking stop && modprobe -r tg3 && udevadm control --reload-rules && udevadm trigger && modprobe tg3 && /etc/init.d/networking start

This worked for me using Ubuntu 12.04.02 server. My nics were using the tg3 kernel module driver, so change tg3 to the module your interfaces are using. I found the ones mine used in /etc/udev/rules.d/70-persistent-net.rules:

PCI device 0x14e4:/sys/devices/pci0000:00/0000:00:1c.4/0000:02:00.1 (tg3) <-kernel module driver for the nic

The one issue I had was a bad route which I fixed with a simple route add command. Thanks for the help Chris!