Consistent device naming
Rick Stevens
ricks at alldigital.com
Wed May 14 22:52:35 UTC 2014
On 05/14/2014 03:35 PM, CLOSE Dave issued this missive:
> Bruno Wolff III wrote:
>
>>>> To exchange names, you need to use a temporary name and do three
>>>> renames. Pretty much like swapping to values using a temporary
>>>> variable.
>>>
>>> I can't find a way to do that with udev. Please enlighten me.
>>
>> I use "ip link set" to do that. I am not sure how you would do it
>> with udev.
>
> Thanks for the reference. But that can't be used after the interface is
> up, and my interfaces come up during boot. I think it must be udev or
> nothing, and nothing seems to win based on the link I posted previously.
> I still think the new naming system is broken /by design/.
I believe you can edit /etc/udev/rules.d/70-persistent-net.rules and add
lines such as:
# Broadcom Corporation NetXtreme BCM5754 Gigabit Ethernet PCI Express
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:1d:09:29:34:03", ATTR{type}=="1", NAME="eth0"
# PCI device 0x8086:0x1079 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:1b:21:08:0d:1c", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth1"
# PCI device 0x8086:0x1079 (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:1b:21:08:0d:1d", ATTR{type}=="1", KERNEL=="eth*",
NAME="eth2"
Each rule must be on a separate line, blank lines and those starting
with "#" are ignored.
After a reboot, this should cause the NIC with the MAC address
00:1d:09:29:34:03 to be named "eth0", the one with MAC address
00:1b:21:08:0d:1c to be named "eth1" and so on. There are other
attributes you can specify. I use this on F19 and F20.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ricks at alldigital.com -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- A day for firm decisions!!! Well, then again, maybe not! -
----------------------------------------------------------------------
More information about the users
mailing list