Operating System - Linux
1829587 Members
2003 Online
109992 Solutions
New Discussion

identifiers of ethernet cards

 
Tonatiuh
Super Advisor

identifiers of ethernet cards

Red Hat Enterprise linux 4.

I have a server with two ethernet cards. Card A is the built-in (included into the same motherbaord) and card B is a PCI additional card.

When I re-install the server I does not have control about which of them is going to be identified as eth0 or eth1. Sometimes the eth0 os card A but sometimes eth0 is the card B.

Is there any way to control this situation so that, the eth0 always be the card A, and eth1 always be card B?
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: identifiers of ethernet cards

Shalom,

You have no control.

It doesn't even seem to make sense.

A way to gain some control is to remove the add in card, install the OS and then put the add in card later.

This will usually get you built in as eth0 and the add in as eth1

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
Rick Garland
Honored Contributor

Re: identifiers of ethernet cards

In the /etc/rc.local file you can make the modification of

ifconfig eth0 hw ether 31:32:33:34:35:36

The MAC address of the card
Tonatiuh
Super Advisor

Re: identifiers of ethernet cards

I am afraid that solution with /etc/rc.local did not work for me neither restarting network services nor restarting the server.

But I did it succesfully playing with system-config-network application.
Rick Garland
Honored Contributor

Re: identifiers of ethernet cards

I had it the other way - did not work for me using the /etc/sysconfig.networking/if-eth0 script.
HWADDR=aa.bb.cc.dd.ee

Did work for me using the rc.local and invoking the ifconfig command.

Vitaly Karasik_1
Honored Contributor

Re: identifiers of ethernet cards

other option is using nameif http://linux.about.com/library/cmd/blcmdl8_nameif.htm utility
dirk dierickx
Honored Contributor

Re: identifiers of ethernet cards

both rick (last answer, on RH) and vitaly have the correct answer.

are you still using a 2.4 kernel? afaik the init order of pci devices should always be the same in 2.6 (if you do not move them around).
Logu_2
Advisor

Re: identifiers of ethernet cards

If the NICs are of different chip (and driver) then it is perfectly possible. Check the /etc/modules.conf or /etc/modprobe.conf file and modify the driver alias line accordingly.

-logu