Predictable Network Interface Names
or, why my interfaces are no longer called eth0 and eth1 etc... and I cant ifup and ifdown anymore, nor can I 'service network restart.'
Is this crap actually an improvement?
The classic naming scheme for network interfaces applied by the kernel is to simply assign names beginning with "eth0" and ethX after that. A problem occurs on new distributions with driver probing on every boot. On every boot the darn things do driver probing now to check to see if you made any hardware changes. The driver probing does not always assign interfaces with the same numbers. A system with two nics might have nic 1 as eth0 today and eth1 tomorrow even if you did not make any changes. Rather than trying to figure out why the driver probing is inconsistent, the devs used a band-aide and completely changed the name schema.
systemd - The change can be blamed on systemd. systemd is a new init system and system manager, that was adopted by most of Linux distributions now over the traditional SysVinit manager.
Predictable Network Interface Names - out with the old ethX naming schema and in with this new weird looking names like 'enp3s0' or 'enp0s10'. Now undev assigns names to ethernet devices incorporating Firmware/BIOS provided index numbers, and etc.
If you want to bring down your interface, and you identified it as 'enp3s0' as an example, issue the command:
ifconfig enp3s0 down
Interfaces are named following rules that use information from the firmware and bios if available.
The commands ifdown and ifup read the file /etc/network/interfaces on SysV machines. Either the scripts are not configured or are not compatible with systemd, since distributions like Ubuntu don't bother with them.
assignment name rules
- Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)
- Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)
- Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
- Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
enp3s0: | | | v | | en| | --> ethernet v | p3| --> bus number (3) v s0 --> slot number (0)