[CentOS] Nic order detection

MatsK mkn0014 at gmail.com
Thu Jan 10 09:29:22 UTC 2008


Les Mikesell wrote:
> I have a number of machines that have 4 NICs, two of which are actually 
> in use, running Centos 5.  When they are rebooted, they seem to change 
> the eth interface names, assigning them in different orders.  I'm a 
> little fuzzy on the details because they are at a remote location and I 
> can't access them easily - especially after the network breaks.  Shouldn't:
> alias eth0 bnx2
> alias eth1 bnx2
> alias eth2 e1000
> alias eth3 e1000
> in /etc/modprobe.conf always make the intel cards eth2 and 3?

Noop, this is done with ifcfg-ethX where X is the if number.

Create a /etc/sysconfig/network/ifcfg-eth0 that look like this example:

DEVICE=eth0
HWADDR=00:01:23:45:67:89
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.154
GATEWAY=192.168.1.1

and then create ifcfg-eth1, ifcfg-eth2, ifcfg-eth3

then do a "service network restart" to activate the settings.


/Mats



More information about the CentOS mailing list