Operating System - Linux
1830212 Members
1388 Online
109999 Solutions
New Discussion

Ethernet Interface order with rhas3

 
SOLVED
Go to solution
Rende Luitjes
Occasional Advisor

Ethernet Interface order with rhas3

For our HP Proliant BL20p G3 Blade farm we are looking to migrate from rhas3u2 to rhas4u1.

We have noticed some strange behaviour in the way the kernel assigns the physical Ethernet ports under rhas4u1.

Under rhas3u2 we're getting a nice and clean setup as follows:

eth0 -> NIC 1
eth1 -> NIC 2
eth2 -> NIC 3
eth3 -> NIC 4

Under rhas4u1 suddenly this whole sequence get reshuffled, ending up with a nasty and complicated following setup:

eth0 -> NIC 2
eth1 -> NIC 3
eth2 -> NIC 4
eth3 -> NIC 1

Given the fact that our netwerk setup would like to setup eth0+eth3 as bond0 and eth1+2 as bond1, you see that we'd have to change some physical cabling with all of our future rhas4u1 blades, which is basically unacceptable.

Is there a way of dealing with this port shuffling issue?

Kind regards,

Rende Luitjes
8 REPLIES 8
Steven E. Protter
Exalted Contributor
Solution

Re: Ethernet Interface order with rhas3

Shalom Rende,

There really isn't a good way to deal with this.

RH 4 has a different way/order NIC's. I've manipulated the process in regular servers by adding the NIC card's one boot at at time.

I will also state that I found RH update 1 to be less than stable and find RH update 2 a better choice, but it still has these issues.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: Ethernet Interface order with rhas3

In the ifcfg-ethX script, you can configure the mac address for that specific script/device. I think that if you manually set the mac address, you could force the IP to a specific interface.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Vitaly Karasik_1
Honored Contributor

Re: Ethernet Interface order with rhas3

You can change NICs order with "nameif" utility [from net-tools package]
Rende Luitjes
Occasional Advisor

Re: Ethernet Interface order with rhas3

Thank you for pointing me to the nameif utilty. I was aware of its existence, but I have given it a go with mixed results.

Some questions came up during experiments with nameif:

1. What is the best bootscript to place a call to /sbin/nameif in? I came up with /etc/rc.local myself. The preliminary results from nameif however don't look too promising. It seems that nameif is not able to re-assign the MAC address to specifically the eth0 interface.

2. An alternative method would be to explicitly reference HWADDR items in each of the system's /etc/sysconfig/network-scripts/ifcfg-ethX files. This method looks by far to bring me the best results.

Rende

Vitaly Karasik_1
Honored Contributor

Re: Ethernet Interface order with rhas3

1. even nameif manpage says that "nameif should be run before the interface is up, otherwise itâ ll fail.", so we should put it before "network" script.
Ivan Ferreira
Honored Contributor

Re: Ethernet Interface order with rhas3

The rc.sysinit script is the first executed on the system.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Matthew Ausmus
Advisor

Re: Ethernet Interface order with rhas3

Ivan's suggestion is the easiest. I use multiple NICs in machines and I use this method with never a problem. It also gives you the most flexibility. I've gotten to the point where I always put the mac address in the NIC configuration whether I'm running multiple NICs or not "just in case." This way just works period.
"What the gods get away with, the cows dont."
Steven E. Protter
Exalted Contributor

Re: Ethernet Interface order with rhas3

Shalom,

The eth# device is assigned by the system in order of discovery. Trying to override it in the ifcfg scripts will probably not work.

2. An alternative method would be to explicitly reference HWADDR items in each of the system's /etc/sysconfig/network-scripts/ifcfg-ethX files. This method looks by far to bring me the best results.

If they are all the same NIC, this solution might work but an alternative outcome is the configuration file will be ignored, because the MAC address you put in eth1 does not match the MAC address the system puts in eth1.

There is no problem at all with you making your bond pairs 0 2 and 1 3.

Its an elegant solution that can be well documented in /etc/modprobe.conf

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com