LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 01-10-2005, 06:54 AM   #1
Menestrel
Member
 
Registered: Oct 2003
Location: Bucharest
Distribution: Debian Sarge, Slackware Current, Ubuntu
Posts: 183

Rep: Reputation: 30
finding out which ethX is using which module


I have two ethernet cards. One is a 3com and the other is a Realtek. When I issue the command ifconfig, both eth0 and eth1 are displayed. The question is: How can I find out if eth0/eth1 is 3com or Realtek ?
 
Old 01-10-2005, 07:12 AM   #2
okmyx
Member
 
Registered: May 2004
Location: Cornwall, UK
Distribution: Ubuntu 8.04
Posts: 464

Rep: Reputation: 31
if i remember correctly the number given to each adaptor is based on its position in the pci slots.

e.g. eth0 will be the network card nearest the agp slot (if your motherboard has an agp slot)

I'm guesing that an adaptor built in to the motherboard would be eth0 then the next one in the pci slots would be eth1
 
Old 01-10-2005, 07:15 AM   #3
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
This command might prove helpful:
Code:
lspci
 
Old 01-10-2005, 07:16 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,157

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Check the /etc/modules.conf file. There will be a line for each with the associated module. The module name will indicate the network card.

BTW the PCI slots are scanned first then the built in adapter. So it would be eth1 not eth0

Last edited by michaelk; 01-10-2005 at 07:20 AM.
 
Old 01-10-2005, 07:17 AM   #5
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Rep: Reputation: 30
well menstrell .... check " hwconf " file or similar file in ur OS... which is available in /etc/sysconfig or else hardware browser....

hope this helps...

zameer ------
 
Old 01-10-2005, 02:39 PM   #6
Menestrel
Member
 
Registered: Oct 2003
Location: Bucharest
Distribution: Debian Sarge, Slackware Current, Ubuntu
Posts: 183

Original Poster
Rep: Reputation: 30
First of all let me thank you for the answers, Linux has a really great community
okmyx: you were right
scuzzman: how could lspci be used ? it outputs something like
00:0b.0 Ethernet controller: 3com Corporation 3c905 100BaseTX [boomerang]
00:0c.0 Ethernet controller: Realtek Semiconductor Co,
Can this be always used ? Does this mean that I have the 3com card on the 2nd PCI slot (and the realtek card on the 3rd PCI slot) counting from the AGP Slot downwards ?

michaelk: My network cards are compiled into the kernel, so checking /etc/modules.conf didn't help

zameer_india: Which is the equivalent of hwconf for Slackware ?
 
Old 01-10-2005, 03:04 PM   #7
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 77
Why not use dmesg?
Code:
# dmesg | grep eth
eth0: RealTek RTL8139 at 0xd000, 00:40:f4:39:9d:90, IRQ 10
eth0:  Identified 8139 chip type 'RTL-8139C'
eth1: RealTek RTL8139 at 0xd100, 00:40:f4:5d:76:10, IRQ 11
eth1:  Identified 8139 chip type 'RTL-8139C'
<snip>
Here you can see I have 2 nics, both using realtek driver...your output will show which card is using which driver if they are different...
 
Old 01-11-2005, 12:32 AM   #8
zameer_india
Member
 
Registered: Sep 2004
Location: hyderabad
Posts: 210

Rep: Reputation: 30
well menstrell... bulliver gave u a clean answer ..... I never used slackware before...

i ma not haivng any idea about it... just check with this command ls h* in /etc/sysconfig ...and find which is hwconf(hardware configuration) similar file..i am sure u will get it... in this file u found information like as follows..for example ..

class: NETWORK
bus: PCI
detached: 0
device: eth0(here u can find information )
driver: 8139too
desc: "Realtek|RTL-8139/8139C/8139C+"(its ur card description)
vendorId: 10ec
deviceId: 8139
subVendorId: 11f6
subDeviceId: 8139
pciType: 1
pcibus: 3
pcidev: 2
pcifn: 0
-
class: MOUSE
bus: PSAUX
detached: 0
device: psaux
driver: msintellips/2
desc: "Generic PS/2 Wheel Mouse"
-
class: AUDIO
bus: PCI
detached: 0
driver: i810_audio
desc: "Intel Corp.|82801DB (ICH4) AC'97 Audio Controller"
vendorId: 8086
deviceId: 24c5
subVendorId: 13f6
subDeviceId: 0300
pciType: 1
pcibus: 0
pcidev: 1f
pcifn: 5
-
class: CDROM
bus: IDE
detached: 0
device: hdb
driver: ignore
desc: "SAMSUNG CD-ROM SC-152A"
-
class: VIDEO
bus: PCI
detached: 0
driver: Card:Intel 845
desc: "Intel Corp.|82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device"vendorId: 8086
deviceId: 2562
subVendorId: 8086
subDeviceId: 2562
pciType: 1
pcibus: 0
pcidev: 2
pcifn: 0
-


hope this helps...

zameer-------
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Finding Module depenencies dagrafixman Linux - Newbie 2 03-30-2004 09:36 AM
Finding Module Dependencies???... CrAzY G Mandriva 7 01-18-2004 05:38 AM
Finding module dependencies???? aaronmcwilliams Linux - Software 4 01-07-2004 02:43 AM
Finding Module Dependencies xAXISx Mandriva 1 12-07-2003 01:38 PM
finding module dependencies jakublgz Linux - Newbie 9 07-28-2002 01:11 PM


All times are GMT -5. The time now is 03:14 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration