How to change the numeric order of Network Interface on CentOS 6.4

Edit /etc/udev/rules.d/70-persistent-net.rules:

You can change the NAME into eth0, eth1, eth2, eth3, etc to change the order.

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”xx:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″

# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”xx:xx:xx:xx:xx:xx”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″

Make sure the network interfaces are matched with their corresponding MAC addresses in  /etc/sysconfig/network-scripts/ifcfg-ethx

The changes will take effect once you reboot the system:

# reboot

Advertisements
This entry was posted in Linux Admin Basics. Bookmark the permalink.

One Response to How to change the numeric order of Network Interface on CentOS 6.4

  1. rogerwickes says:

    not working for me. should NAME== ? be a double equals??

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s