multiple ethernet cards, how to control which is which?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
multiple ethernet cards, how to control which is which?
Hello,
I have a RedHat 9.0 box (I know, I know, it's not up for debate, so please don't bother. I actually have 52 RedHat 9.0 boexs... but anyway).
In this box are two integrated IntelPro/1000 Ethernets. I have also added an IntelPro/1000 dual port card for a total of four interfaces. Since all of these interfaces use the same driver, I can't control which is which by setting "alias ethX <whatever>" in /etc/modules.
How can I force a certain physical interface to be eth0, eth1, etc. all the time? As it stands now, it is booting like follows:
ONBOARD#2 = eth0
PCI#2 = eth1
PCI#1 = eth2
ONBOARD#1 = eth3
I need it to boot as follows:
PCI#1 = eth0
PCI#2 = eth1
ONBOARD#1 = eth2
ONBOARD#2 = eth3
Also, if one of the interfaces fails to initialize for any reason, it will renumber the assignments, which would be not so good. If for example, PCI#2 has a hardware failure, it is important that it skips eth1 and still makes the onboards eth2 & eth3...
i'd assume that you can just use the HWADDR variable in the /etc/sysconfig/network-scripts/ifcfg-ethX files. i've not used them in that context, but when i change a NIC in a box and redhat put the mac address in the file it no longer finds it, so i see no reason that this wouldn't force the order of interface assignments.
btw, redhat 9.0 is really old now... you should upgrade. couldn't resist. sorry.
Sounded too simple to be true, and apparently that is the case. Got some errors in the logs after I added HWADDR to the four config files:
On screen during boot I also saw something along the lines of (couldn't find in any log though):
Code:
has different MAC address than expected ignoring
From boot.log:
Code:
Apr 27 06:55:23 burn-in ifup: cannot change name of eth2 to eth1: File exists
Apr 27 06:55:23 burn-in network: Bringing up interface eth1: failed
Apr 27 06:55:23 burn-in ifup: interface 'eth2' not found
Apr 27 06:55:23 burn-in network: Bringing up interface eth2: succeeded
Apr 27 06:55:23 burn-in network: Bringing up interface eth3: succeeded
I guess this means it is assigning devices prior to actually hitting the ifcfg-ethX files. When the box came up, eth0 had totally disappeared, and the others came up like listed in my first post.
I could not find conf files in /etc or /etc/sysconfig that seemed to contain the mac addresses, so I don't know how it is deciding that they are wrong in the ifcfg-ethX files...
ok, well also ensure that the /etc/modules.conf file is set up right too. I very much doubt you have 4 cards with identical chipsets, so they will use different drivers. that can restrcit to chipset types, but after that you may be able to pass suboptions on each alias entry to defined a pci id or something to fully tie it down.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.