One of the changes introduced in Ubuntu Wily Werewolf is persistent stateless names. It means your network interfaces in ifconfig output will no longer follow the ethX pattern. This solves major problems with predictability of an interface name on Ubuntu if you have multiple cards. This applies to ethernet, WLAN and WWAN interfaces.

This originally started off due to Dell devices and SLES has defaulted to the nomenclature earlier. It’s nice to see Ubuntu adopting the same too. Both udev and systemd are involved in this change.

The udev naming convention follows different schemes:

  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)
  5. Classic, unpredictable kernel-native ethX naming (example: eth0) – depreciated

systemd naming convention will use the same convention from above in the below order:

  1. if that information from the firmware is applicable and available
  2. if that information from the firmware is applicable and available
  3. if applicable
  4. in all other cases
  5. is not used by default, but is available if the user chooses so

It’s unlikely this will bother you. However, if you want to fallback to the older nomenclature, you need to make some changes in udev:

  1. Get your MAC address:
    $ ifconfig
    // OR
    $ ip link
  2. Create /etc/udev/rules.d/10-network.rules and add the following line:
    SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="aa:bb:cc:dd:ee:ff", NAME="eth1"

    Replace the last field with the name you want.

  3. Append the following kernel parameter (within quotes like the other options) to the line starting with GRUB_CMDLINE_LINUX_DEFAULT= in /etc/default/grub:
     net.ifnames=0
  4. Run:
    $ sudo update-grub2
  5. Reboot

Copy From https://tuxdiary.com/2015/10/28/persistent-network-interface-names-ubuntu/


arrow
arrow
    創作者介紹
    創作者 Frank 的頭像
    Frank

    經驗交流分享與備忘

    Frank 發表在 痞客邦 留言(0) 人氣()