Re: Consistent device naming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-      A day for firm decisions!!!   Well, then again, maybe not!    -
----------------------------------------------------------------------
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux