Redefine ethX interface names in CentOS 5.11?

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



Hi,

I have a LAN server running CentOS 5.11 with two NICs eth0 and eth1. I'd
like to swap the interface names, but I don't know how to go about that
under CentOS.

Here's what I would do on a Slackware server (I have one next to me in
my office).

Open /etc/udev/rules.d/70-persistent-net.rules and edit it:

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0
(e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:22:64:8a:4c:c2", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0
(e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="2c:27:d7:15:54:a1", ATTR{dev_id}=="0x0",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

To swap interfaces, I simply have to switch the respective NAME="ethX"
attributes and restart the server.

How would you do something similar on a machine running CentOS 5.11?

Cheers,

Niki
-- 
Microlinux - Solutions informatiques durables
7, place de l'église - 30730 Montpezat
Web  : http://www.microlinux.fr
Mail : info@xxxxxxxxxxxxx
Tél. : 04 66 63 10 32
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux