LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Which card is eth0? (https://www.linuxquestions.org/questions/linux-networking-3/which-card-is-eth0-19614/)

lommer0 04-27-2002 03:14 PM

Which card is eth0?
 
Ok, super-newbie question here:

I have a slackware 8 machine with 2 NICs in it. Which one is eth0 and which is eth1?

Also, I plan to use the machine as a gateway. From what I understand I should use eth0 as my 'net connection and eth1 as my connection to the hub, is this correct?

Thanks in advance.

trickykid 04-27-2002 03:58 PM

eth0 is whichever one you have eth0 as ? you can most likely know for sure by the mac address which you can get from ifconfig.

acid_kewpie 04-27-2002 04:03 PM

well no it won't actaully *matter* which interface you use as such, standards and conventions may recommend using a certain IF for a purpose, but it won't actually affect anything.

as for which is which... well unless you have them as different cards listed in /etc/modules.conf, i'd recommend using "lspci" which will (should) print all the cards in the order they are located on the system (assuming you've got a decent MoBo) and you should eb able to suss it out from there if everythign else is identical.

lommer0 04-27-2002 09:19 PM

which is eth0?
 
Thanks for the quick reply.

There is one problem tho... This is an ancient machine and as such is using ISA ethernet cards. Therefore, lspci doesn't work for obvious reasons. I tried lsisa but apparently that command doesn't exist :-)

DMR 04-28-2002 12:16 AM

Right, lsisa isn't a valid command.
If the two NIC aren't the same make/model (and therefore dont' use the same driver), you can probably determine which is eth0/eth1 by looking in /etc/modules.conf. You should see entries like the following:
alias eth0 driver_for_one_NIC
alias eth1 driver_for_other_NIC

Quote:

well no it won't actaully *matter* which interface you use as such, standards and conventions may recommend using a certain IF for a purpose, but it won't actually affect anything.
Acid is right about that.

AS trickykid said, ifconfig should give you information for both interfaces, including the MAC address. Since MAC addresses are unique, that should let you determine which card is which.

lommer0 04-28-2002 01:37 AM

alright my modules.conf looks like this:

alias net-pf-4 off # we won't use PF IPX
alias net-pf-5 off # we won't use PF AppleTalk

as well, my ifconfig doesn't list any NICs, only a local loopback link called "lo"

what exactly is ifconfig showing me? Am I right in thinking that the MAC address for any given card is the s/n that shows card manufacturer + card number? Is this (should this) be printed anywhere on the actual card or can it only be obtained through a console?

DMR 04-28-2002 05:27 AM

OK, it's time to give us the make/model of your network cards, as well as your general system specs, since /etc/modules.conf has no entries for either of your NICs.

Quote:

ifconfig doesn't list any NICs, only a local loopback link called "lo
This is not a Good Thing; try "ifconfig -a" instead, and post the results.
Quote:

what exactly is ifconfig showing me?
ifconfig should give you a number of stats for each network interface, as well as stats for lo. For example:
Code:

[root@boris network-scripts]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:A0:CC:76:0A:64 
          inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4317 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3966 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:2881565 (2.7 Mb)  TX bytes:646687 (631.5 Kb)
          Interrupt:9 Base address:0x1000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:82 errors:0 dropped:0 overruns:0 frame:0
          TX packets:82 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5908 (5.7 Kb)  TX bytes:5908 (5.7 Kb)

The "HWaddr" is the MAC, the "inet addr" is the IP assigned to the given NIC. "man ifconfig" for more info on the rest.

Quote:

Am I right in thinking that the MAC address for any given card is the s/n that shows card manufacturer + card number?
Not quite. The MAC (Media Access Control) address of a given network device is a unique ID, and although part the MAC code identifies the manufacturer, it isn't as simple as your description.
Quote:

Is this (should this) be printed anywhere on the actual card or can it only be obtained through a console?
Some cards actually do have their MAC address stamped on them somewhere, but it's pretty rare- you usually need to interrogate the device in some way to extract the MAC.

lommer0 04-28-2002 03:02 PM

alright, here's as many stats as I can think of...

Pentium I 100 mHz, 1.7 gb HD, 48 mb RAM running slackware 8 kernel 2.2.19

2 NICs:

3Com Etherlink III, s/n 6CC14E4842, FCC ID: DF63C5098

A card w/o any visible name, model: NIC-2005/R, s/n KC332402

neither of the above s/n return any matches on google although an etherlink III search does return some interesting results.

also, ifconfig -a returns the following:

dummy:

Link encap:Ethernet HWaddr 00:00:00:00:00:00
BROADCAST NOARP MTU:1500 Metric:1
RX Packets:0 errors:0 dropped:0 overruns:0 frame:0
TX Packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

eth0:

Link encap:Ethernet HWaddr 00:A0:24:4E:48:42
inet addr:24.80.7.211 Bcast:24.80.7.255 Mask:255.255.252.0
UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
RX Packets:4 errors:0 dropped:0 overruns:0 frame:0
TX Packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:642 (642.0 b) TX bytes:1366 (1.3 Kb)
Interrupt:10 Base address:0x300

lo:

Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX Packets:0 errors:0 dropped:0 overruns:0 frame:0
TX Packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

From this it looks like the system is somehow recognizing one of the cards, but not the other. Also, I can connect to the net through this card (tested by pinging google). Where do I go from here?

DMR 04-28-2002 10:20 PM

Quote:

3Com Etherlink III, s/n 6CC14E4842, FCC ID: DF63C5098
In eth0's HWaddr (MAC), the manufacurer ID (00:A0:24) tells us that this is the 3Com card, which should be using the 3c59x.o module. As root, open a term window and type "neat" (no quotes) to bring up Redhat's network config tool; the 3Com card should show up as device "eth0". Highlight it and click the Edit button; in the Adapter window, it should indicate that the card is using the "3Com 3c590/3cs595//3c90x/3c980" module. If not, choose that module from the drop-down list.
It is kind of weird that you can use the card even though lsmod doesn't show its driver/module loaded. Did you ping Google by URL, or just by IP?
:confused:

Quote:

A card w/o any visible name, model: NIC-2005/R, s/n KC332402
I can't help you there- the model number turns up nothing. If you can look at the major (largest) chips on the card and post the manufacturer name and chip numbers, I can probably figure out what module you need to use.

As to why the second card isn't being detected:

-since they're both ISA cards, have you correctly configured their IRQ and I/O address? This is done either by setting hardware jumpers on the cards themselves, or via a software configuration utility (usually a DOS program) that came with the cards. It's possible that you have an IRQ/address conflict with the second card.

bbenz3 04-29-2002 03:37 AM

Firest thing find out which card is working.
Do an "lsmod" and that should tell you which modules you have loaded. Look for one that starts with 3c5... b/c almost every version of linux knows what those cards are. If not follow the rest of my message.

The 3com cards are always well marked by what they are. Pull the card out and look for a number on it. If it is a 10/100 card it is the 3c515 card which uses the 3c515.o driver module. If it isn't that card then it is a 10mb card and most of them are the 3c509 cards but there are a few others. The 3c509 cards use the 3c509.o driver modules.

To make this card work once you have found the right driver module for it try the following.

insmod driver.o
where driver.o = 3c509.o etc. what ever your module is.
then do an ifconfig and see if it is responding. If that all works then you need to add a line to your modules.conf file that says:

alias eth0 driver.o see note on driver.o above

as for the other card goodluck unless you can figure out exactly what it is.
I will be running 3 3c509 cards in my router soon and a 3c515 card. to differentiate between the cards with the same driver you add more lines to your modules.conf file

ie)

alias eth0 driver.o
alias eth1 driver.o
and so on.

as for editing the 3com cards it really isn't necessary. At least I didn't have to with all the ISA nics that i am using.

lommer0 04-29-2002 07:59 PM

Ok a few things:

A) This is a slackware installation without an xserver, thus, console only. (neat is not an option)

B) I pinged google by URL

C) On the second card, the 3 largest chips are "YCL" chips (numbers 9453, 9524A, and 9523G). as well, there is a socket for an IC labeled "BOOT ROM" on one end. At the back there's "Link" and "Traffic" LEDs, an ethernet port and a connector that looks like a coaxial port but isn't. As well, I noticed a s/n of some sort stenciled on the metal mount-plate: R0157186*S21 (*the 2 #s are on different lines) As well, "Mide in Taiwan" is stenciled on th card while "Made in Taiwan" is on them sticker on the back.

D) I can tell you which card is working, because the 3com card is the one that is connected to the net whereas the other one is connected to a basically dead network.

E) As for IRQ and I/O addresses, I haven't done anything with those. There are no jumpers on the cards, so I would assume that these would have to be set using some utility (I don't have it.) How can I query the cards to find out what their IRQs and addresses are?

lommer0 04-29-2002 08:07 PM

Oh, forgot one thing, lsmod returns this line:

Module Size Used by
3c509 6032 1
...


The insmod said the module was already in use, and ifconfig, as was stated bfore, already detects the 3com card. I assume this means I should add the following line to my modules.conf?

alias eth0 3c509.o

DMR 04-29-2002 08:48 PM

Quote:

This is a slackware installation without an xserver, thus, console only. (neat is not an option)
Sorry about that. Your profile lists Redhat 7.2, which is what stuck with me, but you did say Slack in your original post.

Quote:

On the second card, the 3 largest chips are "YCL" chips (numbers 9453, 9524A, and 9523G). as well, there is a socket for an IC labeled "BOOT ROM" on one end. At the back there's "Link" and "Traffic" LEDs, an ethernet port and a connector that looks like a coaxial port but isn't. As well, I noticed a s/n of some sort stenciled on the metal mount-plate: R0157186*S21 (*the 2 #s are on different lines) As well, "Mide in Taiwan" is stenciled on th card while "Made in Taiwan" is on them sticker on the back.
I couldn't find any matches for those part numbers, check the tips on indentifying cards at the bottm of this page.

Quote:

How can I query the cards to find out what their IRQs and addresses are?
For a non-functioning mystery card, I'm not sure. Is there anything that looks promising when you do:
cat /proc/ioports
cat /proc/interrupts

DMR 04-30-2002 12:33 AM

Quote:

Originally posted by lommer0
Oh, forgot one thing, lsmod returns this line:

Module Size Used by
3c509 6032 1
...


The insmod said the module was already in use, and ifconfig, as was stated bfore, already detects the 3com card. I assume this means I should add the following line to my modules.conf?

alias eth0 3c509.o

Oh, fsck! bbenz3 is right about the module names; the driver I referred to was the 3Cm PCI driver, but you have ISA cards.

Slack doesn't always do things the same way as the Redhat and Mandrake distros that I use, but yes, I believe you should have the following entry in /etc/modules.conf:
alias eth0 3c509 (without the ".o" extention in my distros)

bbenz3 04-30-2002 04:17 PM

as far as I know you shouldn't need to modify any of the settings as far as IRQs and stuff b/c the 3com card will auto detect the available settings for you.


All times are GMT -5. The time now is 06:00 AM.