renaming ethernet interface not working

Karl Auer kauer at biplane.com.au
Fri May 6 06:18:48 UTC 2016


Hi there.

I have a link file in /etc/systemd/network called 11-eth0.link.

It contains this:

   [Match]
   MACAddress=50:7b:9d:9b:8d:07

   [Link]
   Name=eth0

I have another one in the same directory called 10-wlan0.link, that
contains this:

   [Match]
   MACAddress=a4:34:d9:94:a9:8a

   [Link]
   Name=wlan0

When I reboot, I get a wireless interface called wlan0, but my ethernet
interface stubbornly refised to change name, remaining at "enp0s31f6".

Why?

There is a lot of advice out there about writing udev rules, but
according to the systemd doco, the above method should work. Indeed it
DOES work for wlan0 - just not for eth0.

I've tried changing the lexical order of the two files, no change. Both
files have identical permissions.

The only difference I can find is that udevadm shows a netname path for
wlan0 of its old name (ID_NET_NAME_PATH=wlp1s0), not the new name,
while all names are identical for enp0s31f6.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B
Old fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4







More information about the ubuntu-users mailing list