Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Edit

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

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

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 stackoverflow.com Aug 28 '09 at 7:33

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

1 Answer 1

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

 
discard

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