Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Linux machine with two Ethernet cards both using the Intel e1000 driver. lspci reports different models of Ethernet cards, but I can't tell which is eth0 and which is eth1. Other than turning off the machine and reading the chips, how can I tell which model is eth0 and which is eth1?

share|improve this question

migrated from Nov 2 '10 at 21:34

This question came from our site for professional and enthusiast programmers.

5 Answers 5

I haven't tried it myself, but try the ethtool command. With

ethtool -p eth0

you can get the LEDs on the card to blink. You can then easily identify which card is blinking.

share|improve this answer
Check the manpage for details: – socken23 Nov 2 '10 at 21:44

Parse the output of ifconfig. It will give you the hardware MAC address that you can use to identify which card is which.

share|improve this answer
Is there a mapping somewhere from lspci output to mac address? Unfortunately, I don't have the mac addresses written down. – User1 Nov 3 '10 at 3:53
This is useful when the MAC address is written on a sticker on (an accessible place of) the card. – pabouk Aug 19 at 13:34

Connect only one of the interfaces to a switch then use the output of mii-diag, ethtool or mii-tool (depending on which is installed) to see which has a link. You'll then know which physical card is which interface. The output of dmesg should then help you work out which is which.

share|improve this answer

To relate PCI number with device name, check

ls /sys/net/eth0/driver

this will show PCI number.

share|improve this answer
lspci -nn is a much easier alternative to this, if you have it available. – WildVelociraptor Aug 18 at 21:41

I know the thread is old, but I think the anwsers missed the point.

To associate the device as listed with ifconfig with the physical device, I do the following:

ethtool -i DEVICE

This will give you the bus-info which you can correlate with the infomation obtained from :


The bus-info should match the numbers at the beginning of the line returned by lspci.

share|improve this answer
This is nice but how do you map the PCI bus number to a physical card? – pabouk Oct 30 '13 at 12:40
How does this help you to know which one is your left-hand card, and which is the right-hand one? – MariusMatutiae Oct 30 '13 at 17:37
@pabouk you can use lspci -nn, which shows the PCI number at the end, like (1234:abcd) – WildVelociraptor Aug 18 at 21:42
@WildVelociraptor: This option will show PCI vendor and device codes. My point was: The tools will show you the bus code and device code but anyway you will need a documentation for your computer describing where are the particular buses physically located. – pabouk Aug 19 at 13:31
@pabouk Ah okay, I understand. Yeah unfortunately I don't think there is a standard numbering convention for PCI slots, and it seems dependent on how many "integrated" components you have that are connected to the PCI bus. Which unfortunately means that there's no real way for Linux or additional software to know the physical layout of your board, barring some sort of ascii-art generator of your mobo layout based on some sort of JSON configuration file.....this gives me an idea. – WildVelociraptor Aug 20 at 13:16

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.