Last modified: Sun Jun 2 10:50:07 EDT 2019
Typical symptom: a de minimis change to ethernet or WiFi hardware caused complete breakage of the network configuration at the OS level.
Udev tries to make sure that a given device name always maps to the same NIC. That's a regression, not a feature. What we want is for eth0 or wlan0 to always refer to THE NIC THAT ACTUALLY EXISTS so that downstream scripts and apps don't have to guess which device name is the working one today. That was the behavior in the pre-udev days; udev screwed it up.
The following workarounds have been tested only on Slackware 14.2 and are unlikely to apply to any distro using systemd.
How to purge the MAC-to-name mapping and get back to eth0 or wlan0 for whatever you have installed:
rm /etc/udev/rules.d/70-persistent-net.rules
To stop MAC randomization from triggering udev on every reboot, insert this in rc.S prior to the initialization of udev, substituting your original MAC (if you remember it) for the xx:
echo Setting MAC to its original value /sbin/ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx