After a hardware change (either network interface or motherboard), the network interfaces can be missing. This guide describe how to fix this issue.

This howto is tested on:

  • Debian 8.0 Jessie

Fixing the issue

Detect if sudo is available (“command” is used if not):

command type -f 'sudo' &>'/dev/null' && cmdProxy='sudo'

Udev manage a cache of the system’s network interfaces’ MAC addresses. The MAC address is linked to the network hardware. When changing hardware, the MAC address changes, and the network interface can not be created. To solve this issue, empty the Udev MAC addresses cache:

[ -e "/etc/udev/rules.d/z25_persistent-net.rules" ] \
  && ${cmdProxy} tee "/etc/udev/rules.d/z25_persistent-net.rules" <<< ""
[ -e "/etc/udev/rules.d/70-persistent-net.rules" ] \
  && ${cmdProxy} tee "/etc/udev/rules.d/70-persistent-net.rules" <<< ""

Reboot the system to force the recreation of the MAC addresses cache by Udev with the new hardware detected.


Categories: Setup


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.