Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 2 Ethernet adapters on a 2U server, each of them has 4 ports, for a total of 8 ports. Is there a way to find out the interface name(eth0, eth1 ...eth7) for each port without connecting to a switch? Thanks.


OS: CentOS 5.6 64-bit

share|improve this question
I don't know how CentOS 5.6 handles this, I know with version >=6, udev does this just like I mentioned in my answer. – kbyrd Nov 10 '11 at 20:28
ifconfig, isn't it ??? If you want only to see – Lazy Badger Nov 10 '11 at 21:46
No, ifconfig will not set a particular physical network card to be eth0. In order to use ifconfig, the device names are already set. – kbyrd Nov 10 '11 at 22:52

It would be helpful if you edited your question to give the exact make and model of the Ethernet cards. Also, I'm assuming you're using Linux, but it would be helpful to know which distribution and version. Without that, I do have the basics of an idea. For forcing each port to a given eth[0-9] label rather than determining which one has been auto-assigned to which.

Each port will have it's own MAC address, in most modern distributions it is possible to map a given MAC address to a specific device name like eth0 or eth1 on every boot so it is always consistent.

For a specific example, a recent Ubuntu install has udev. A the file /etc/udev/rules.d/70-persistent-net.rules has the following line:

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1f:d0:8f:47:83", ATTR\ {type}=="1", KERNEL=="eth*", NAME="eth0"

That will map network card with a MAC address of 00:1f:d0:8f:47:83 to eth0 on every boot regardless of where that card is physically plugged in on my motherboard. For you, I suggest you determine the MAC address of each port, then map each one to the eth[0-9] that you want.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.