46

Everything works fine I just want to know why would my interface change to wlp2s0 by default instead of the usual wlan0

Pepe
  • 938
  • 2
  • 10
  • 19

2 Answers2

54

A new naming scheme has been introduced, to solve problems that arose from the old (eth0, wlan0) naming standards.

Here is a short introduction and explanation of the concept: http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

Basically, the first two letter describe the type of interface. 'wl' for wlan, 'en' for ethernet. The following code is often a description of the physical placement of the device in your computer - p2 is likely PCI bus 2, and s0 is likely slot 0.

As kyodake pointed out, this new standard was introduced when Ubuntu moved to systemd.

Matthias Braun
  • 957
  • 13
  • 19
eira wahlin
  • 728
  • 5
  • 10
3

Why Ubuntu with systemd have added native support for a number of different naming policies into systemd/udevd proper and made a scheme similar to biosdevname's the default. The following different naming schemes for network interfaces are now supported by udev natively:

(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)

By default, systemd will now name interfaces following policy:

  (1) if that information from the firmware is applicable and available, falling back to: 
  (2) if that information from the firmware is applicable and available, falling back to: 
  (3) if applicable, falling back to: 
  (5) in all other cases. 
  Policy (4) is not used by default, but is available if the user chooses so. 
kyodake
  • 15,052
  • 3
  • 40
  • 48
  • I don't really understand this. – Pepe Nov 28 '15 at 06:28
  • Ubuntu with systemd have added native support for a number of different naming policies – kyodake Nov 28 '15 at 13:31
  • From https://systemd.io/PREDICTABLE_INTERFACE_NAMES/#what-precisely-has-changed-in-v197 linking the [systemd.net-naming-scheme](https://www.freedesktop.org/software/systemd/man/systemd.net-naming-scheme.html) man page on *Network device naming schemes*. [This gist](https://gist.github.com/vookimedlo/7455104ba9cbf211b2f6b8e4af2c4053) contains a nice summary and the [RHEL](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/networking_guide/ch-consistent_network_device_naming) and [Debian](https://wiki.debian.org/NetworkInterfaceNames) docs are also informative. – cachius Jun 11 '23 at 13:37