Difference between revisions of "Predictable Network Interface Names"

From Free Knowledge Base- The DUCK Project: information for everyone
Jump to: navigation, search
(Created page with "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?...")
 
m
Line 7: Line 7:
 
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.  
 
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'.
+
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:
 
If you want to bring down your interface, and you identified it as 'enp3s0' as an example, issue the command:
Line 16: Line 16:
 
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.
 
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.
  
SysV init scripts normally reside in /etc/rc.d/init.d/  
+
== 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)
  
systemctl is (not finished page)
+
enp3s0:
 +
| | |
 +
v | |
 +
en| |  --> ethernet
 +
  v |
 +
  p3|  --> bus number (3)
 +
    v
 +
    s0 --> slot number (0)

Revision as of 20:31, 17 April 2020

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

  1. Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)
  2. Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)
  3. Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
  4. Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
enp3s0:
| | |
v | |
en| |   --> ethernet
  v |
  p3|   --> bus number (3)
    v
    s0 --> slot number (0)