centos 4 32 bit - New kernel ethX MAC address order issue

General support questions including new installations
anil510
Posts: 1
Joined: 2012/03/07 03:15:32

centos 4 32 bit - New kernel ethX MAC address order issue

Postby anil510 » 2012/03/07 03:33:41

I have compiled a new kernel (3.2.9) for centos 4/5/6 servers. There is an issue with the centos 4, 32 bit servers. The kernel changes the order in which the MAC address is determined and because of this the server network does not come up as the wrong MAC address are assigned. Even if we specify it correctly in /etc/sysconfig/network-scripts/ifcfg-eth* , kernel does not read it in the case of centos 4 during boot time. We passed using the ndev= parameter, that contain MAC address in the grub.conf file, this is also not doing good. Below is the way the old kernel identifies the MAC and new kernel identifies the MAC. My question is, Is there a way to change the order in which the kernel identifies the Card, so that it follows always the same sequence as in the Old kernel itself. Ie 00:xx:xx:xx:xx:2e will be always identified as eth0 and others also. You can see in the first case the lspci device “0000:03:08.0” is identified as eth0 and in the second case, “0000:03:08.0” is identified as eth2. I need 0000:03:08.0 always be identified as eth0 itself.

I have used the following in the file /etc/udev/rules.d/50-udev.rules Upon rebooting kernel seems to ignore it.

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:xx:xx:xx:xx:2e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:xx:xx:xx:xx:20", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:xx:xx:xx:xx:21", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

PS: The same kernel works fine in centos 5/6 servers. Issue seen only in centos 4 servers.


First case: How old kernel identifies MAC in /var/log/messages during boot up.

---------------------------------------
Mar 6 07:34:03 server kernel: [ 7.800794] e100 0000:03:08.0: eth0: addr 0xfeafb000, irq 18, MAC addr 00:xx:xx:xx:xx:2e

Mar 6 07:34:03 server kernel: [ 7.817023] tg3 0000:02:09.0: eth1: Tigon3 [partno(BCM95704A7) rev 2003] (PCIX:100MHz:64-bit) MAC address 00:xx:xx:xx:xx:20

Mar 6 07:34:03 server kernel: [ 7.825107] tg3 0000:02:09.1: eth2: Tigon3 [partno(BCM95704A7) rev 2003] (PCIX:100MHz:64-bit) MAC address 00:xx:xx:xx:xx:21
---------------------------------------

Second case: How new kernel identifies MAC in /var/log/messages during boot up.

---------------------------------------
Mar 6 07:23:42 server kernel: tg3 0000:02:09.0: eth0: Tigon3 [partno(BCM95704A7) rev 2003] (PCIX:100MHz:64-bit) MAC address 00:xx:xx:xx:xx:20

Mar 6 07:23:42 server kernel: tg3 0000:02:09.1: eth1: Tigon3 [partno(BCM95704A7) rev 2003] (PCIX:100MHz:64-bit) MAC address 00:xx:xx:xx:xx:21

Mar 6 07:23:42 server kernel: e100 0000:03:08.0: eth2: addr 0xfeafb000, irq 18, MAC addr 00:xx:xx:xx:xx:2e

User avatar
jlehtone
Posts: 1880
Joined: 2007/12/11 08:17:33
Location: Finland

Re: centos 4 32 bit - New kernel ethX MAC address order issue

Postby jlehtone » 2012/03/07 08:48:35

CentOS 5 Forum -- CentOS 4 question ...


A post about the way the devices have been named lately.

Did C4 already have the "set name of device with mac $HWADDR to be $DEVICE"? C5 had it, but C6.2 not any more.

More importantly, wasn't it /etc/modprobe.conf, where you did define aliases for kernel modules? That could force the 'tg3' to be loaded before 'e100'.

User avatar
AlanBartlett
Forum Moderator
Posts: 9311
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

centos 4 32 bit - New kernel ethX MAC address order issue

Postby AlanBartlett » 2012/03/08 02:35:51

CentOS 5 Forum -- CentOS 4 question ...

Moved to CentOS 4 - General Support.

Tadada
Posts: 1
Joined: 2012/03/15 13:55:36

Re: centos 4 32 bit - New kernel ethX MAC address order issue

Postby Tadada » 2012/03/15 13:58:36

I got the same trouble and I can't fix it... :(