LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-15-2011, 11:34 AM   #1
g_paschoal
Member
 
Registered: Oct 2009
Posts: 131

Rep: Reputation: 15
how to find out which eth0 or eth1 does card belongs


I have in my ubuntu 3 eth?
eth0
eth1
eth2

just eth1 has an IP address...

I just have remote access to the server via ssh.

how do I find out which eth0 is a fiber nic ? Because I know one of them are.. but I cannot assign any IP address to them..

blabla@xxxxxx:/etc/network$ lspci |grep Ethernet
03:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)
07:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)
0a:00.0 Ethernet controller: Intel Corporation 82572EI Gigabit Ethernet Controller (Fiber) (rev 06)


which eth? belongs to this fiber nic ?

Thanks
 
Old 06-15-2011, 12:05 PM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You already have the device ID's (03:00.0, 07:00.0 and 0a:00.0)

This will give you the ID's for eth0,1 and 2:
Code:
 udevinfo -a -p /sys/class/net/eth0 | grep -m1 ID
 udevinfo -a -p /sys/class/net/eth1 | grep -m1 ID
 udevinfo -a -p /sys/class/net/eth2 | grep -m1 ID
Hope this helps.
 
Old 06-15-2011, 12:30 PM   #3
g_paschoal
Member
 
Registered: Oct 2009
Posts: 131

Original Poster
Rep: Reputation: 15
Command udevinfo is not valid...

need to install it?
 
Old 06-15-2011, 12:48 PM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Nope. In recent udev releases udevinfo has been replaced with udevadm info, so that the commands should be:
Code:
udevadm info -a -p /sys/class/net/eth0 | grep -m1 ID
udevadm info -a -p /sys/class/net/eth1 | grep -m1 ID
udevadm info -a -p /sys/class/net/eth2 | grep -m1 ID
 
Old 06-15-2011, 01:26 PM   #5
g_paschoal
Member
 
Registered: Oct 2009
Posts: 131

Original Poster
Rep: Reputation: 15
It worked..

thanks

 
Old 06-15-2011, 01:41 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You're welcome

@colucix: Thanks for providing the equivalent/current command!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
why does my laptop pc have a eth0 and eth1 when i only have 1 network card? neilcpp Linux - Networking 9 05-26-2009 03:01 PM
cannot find ALIASES to change eth0 to eth1 utnalove Slackware 2 07-20-2007 03:51 PM
howto acess intrnet thru eth1(wireless card)in winXP via briging in linux(eth0-eth1) labhesh_popli Linux - Wireless Networking 1 09-21-2006 01:11 AM
How To Rename Ethernet Card Eth1 to Eth0 chammoud Linux - Networking 4 04-20-2005 06:01 AM
Kernel 2.4.22 finds eth0 and eth1 but 2.6.0 does not find eth1 coollink Linux - Networking 3 01-13-2004 07:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration