renaming ethernet interface not working
Tom H
tomh0665 at gmail.com
Fri May 6 07:59:53 UTC 2016
On Fri, May 6, 2016 at 8:18 AM, Karl Auer <kauer at biplane.com.au> wrote:
>
> 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.
0) "Re-"naming to kernel names isn't recommended, if not actually discouraged.
1) Are you sure that the "MACAddress=" in "11-eth0.link" is correct?
2) What's the value of "ID_NET_LINK_FILE" for "enp0s31f6"?
3) Does copying "/lib/systemd/network/99-default.link" to
"/etc/systemd/network/" and changing "NamePolicy=" to
"NamePolicy=kernel" keep both kernel names?
4) Does setting "net.ifnames=0" at the kernel cmdline keep both kernel names?
More information about the ubuntu-users
mailing list