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. |
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.
|
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. |
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 :-) |
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:
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. |
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? |
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:
Quote:
Code:
[root@boris network-scripts]# ifconfig Quote:
Quote:
|
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? |
Quote:
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:
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. |
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. |
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? |
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 |
Quote:
Quote:
Quote:
cat /proc/ioports cat /proc/interrupts |
Quote:
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) |
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. |