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
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:
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.