Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 read a blog a while ago that created a loop with a program that flashed the led of each NIC for 30 seconds and printed the interface it was flashing, and for the darned of me didn't think to save it. The program could have been 'ip' but i'm not sure. I do know that it was not 'ifconfig'. Because I have two NIC's that are same build and manufacturer, I'm not able to figure out which NIC is assigned to which interface by MAC address alone. How can I figure which NIC is assigned to which interface?


Ok, found the tool to do this. It's called ethtool, the p switch will blink the led.

for int in eth0 eth1 eth2
  ethtool -p $int 10

10 defines the number of seconds. Not all NIC's are supported though so Jeff your method would be better in certain situations. Thanks for the help.

share|improve this question

migrated from Aug 28 '09 at 7:33

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

The way I do this usually is I'll connect only one of them and see which one shows up as connected and can send data. I then use whiteout to label each card with what interface it is. There's probably a better way to do this but this has worked for me for over 10 years and you only need to do it once.

Edit: you put the whiteout on the back of the cards next to where the cable plugin is, not on the inside. I know someone out there who reads this will appreciate this clarification.

share|improve this answer
+1 for practicality trumping coding! – Jefromi Aug 27 '09 at 20:52

Your Answer


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