Why did the naming convention of network interfaces change in linux?

10

3

I recall not too long ago, interfaces were identified by eth0, eth1, wlan0, etc.

Now I'm finding interface names like enp0s3, enp0s8, etc.

In another question I asked here only moments ago, someone mentioned that the new format was:

"ethernet network peripheral # serial #"

and that got me wondering:

1.Why did it change?
2.When did it change?
3.What does the first number signify?
4.Why does the 's' stand for serial, why is that in the interface name?
5.What does the second number signify?

I've googled around for answers but didn't find anything that covers the transition from the old naming system to the new one.

Volumetricsteve

Posted 2015-05-14T02:11:44.887

Reputation: 555

You'd have got all your answers from the wiki article and its sources, which BTW happens to be the first result for a simple search. Hardly difficult to do, so what were you searching for?

– Karan – 2015-05-14T02:47:19.530

it's easier to search when you know what to look for :p I had been searching for things like "enp0s3 vs eth0" and "network interface names" I did arrive at the freedesktop.org predictable interface naming article, but I didn't know that was this. – Volumetricsteve – 2015-05-14T12:28:17.323

This is a legit question and has a rather insightful answer. Don't know why it was being downvoted. – WarmWaffles – 2015-12-10T02:25:45.760

It wouldn't be stackexchange if people didn't nitpick the legitimacy of every word used in every question...and then bash it anyway :p – Volumetricsteve – 2015-12-10T15:31:08.927

Answers

9

Why it changed

The classic naming scheme for network interfaces applied by the kernel is to simply assign names beginning with "eth0", "eth1", ... to all interfaces as they are probed by the drivers. As the driver probing is generally not predictable for modern technology this means that as soon as multiple network interfaces are available the assignment of the names "eth0", "eth1" and so on is generally not fixed anymore and it might very well happen that "eth0" on one boot ends up being "eth1" on the next. This can have serious security implications, for example in firewall rules which are coded for certain naming schemes, and which are hence very sensitive to unpredictable changing names.

http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/

When it changed

Depends on what distribution you're using. It startwed with systemd v197. So any distro that is using that version or higher will most likely use this naming convention.

What the letters and numbers mean

I can't find anything to verify this, but I believe the p stands for physical peripheral, and the s stands for slot. The en stands for ethernet. This is just what I gathered from the link above, but it does not explicitly state this. Nor could I find anytning on Google.

Drew Chapin

Posted 2015-05-14T02:11:44.887

Reputation: 4 839

the p is for peripheral not physical its in wireless too like so : wlp3s0 being WireLess Peripheral 3 Slot 0 – linuxdev2013 – 2015-05-14T02:44:00.330

@linuxdev2013, thank you. Do you have any references I could post? – Drew Chapin – 2015-05-14T02:45:37.610

3Lowercase p doesn't stand for physical or peripheral, it indicates the next number is the index of the pci bus the device is connected to. – Paul – 2015-05-14T03:01:01.657

@Paul, wouldn't it stand to reason that if p is for the PCI bus, and PCI stands for Peripheral Component Interconnect, then the p in this case stands for Peripheral? – Drew Chapin – 2018-04-23T15:03:59.533

@DrewChapin Hah. Well in the same way that if it was a s390 system the c in encf1f1 would stand for ccw and not 'channel'. – Paul – 2018-04-23T21:23:01.293