﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
5394	udev assigns altname to network device	thomas	Xi Ruoyao	"It looks like udev (udev of systemd-254) assigns an 'altname's to NICs if there are more than one NIC in the system (and based on same hardware).

It led to a situation on a (sysv-based) machine with two identical NICs (identical except the MAC) that the first NIC has been renamed to `enp4s0` according to a rule which matches the MAC and an altname of `enp5s0` has been added. The next udev rule tried to rename the second NIC to `enp5s0` which failed as the name is already in use.

The udev rules (`/etc/udev/rules.d/70-persistent-net.rules`) are
{{{
SUBSYSTEM==""net"", ACTION==""add"", DRIVERS==""?*"", ATTR{address}==""2c:fd:a1:34:29:35"", ATTR{dev_id}==""0x0"", ATTR{type}==""1"", NAME=""enp4s0""
SUBSYSTEM==""net"", ACTION==""add"", DRIVERS==""?*"", ATTR{address}==""2c:fd:a1:34:29:36"", ATTR{dev_id}==""0x0"", ATTR{type}==""1"", NAME=""enp5s0""
}}}

xry111 brought up a solution:
{{{
sed '/^AlternativeNamesPolicy/s/=.*$/=/' /usr/lib/udev/network/99-default.link > /etc/udev/network/99-default.link
}}}

That works fine on this system.
"	enhancement	closed	normal	12.1	Book	git	normal	fixed		
