Operating System - Linux
1829802 Members
2670 Online
109992 Solutions
New Discussion

how do I determine on RedHat which ethX is being used for this port?

 
SOLVED
Go to solution
Hanry Zhou
Super Advisor

how do I determine on RedHat which ethX is being used for this port?

 

one of two ports ethernet card (10GbE), how do I know which ethX on linux is corresponding to this port?

 

NC523SFP 10Gb 2-port Server Adapter

HP G5 server

 

Thanks!

none
1 REPLY 1
Matti_Kurkela
Honored Contributor
Solution

Re: how do I determine on RedHat which ethX is being used for this port?

You can use the "ethtool --identify ethX" command to blink the LEDs of each network port to identify them.

 

Usually multi-port NICs have been designed so that the order of both the MAC addresses and the PCI IDs of each port matches the port numbering marked on the card or listed in the card documentation. Usually this causes Linux to assign consecutive ethX numbers in the same order as the ports are marked on the card.

 

If the MAC addresses are in order but the PCI IDs are not, or vice versa, it depends on exactly how the driver for this ethernet card type is programmed.

 

If there are multiple NIC models in the same server, the loading order of the NIC drivers can influence the ordering of the ethX numbers too.

 

If you are adding a new card to a system that is already configured, many modern Linux distributions have a system that will attempt to keep each existing ethX number forever assigned with a particular MAC address. This makes things easier when you are adding new cards to an old system, but requires extra steps to update the ethX <-> MAC address mapping if you are replacing a failed NIC and want the new one to have the same ethX number(s) as the old one.

 

In most new Linux distributions, this mapping is maintained in a file like /etc/udev/rules.d/*-persistent-net.rules. RedHat used to do things differently: they used the HWADDR= variables in the /etc/sysconfig/network-scripts/ifcfg-ethX files to create the mappings. RHEL 6 seems to have both the usual RedHat scheme and the more common udev-based scheme: I wonder which one of them takes priority?

MK