Click to See Complete Forum and Search --> : can not set up eth0 (was: new to Linux , question 1)


DimGR
04-05-2004, 06:47 PM
. I can not set up my ethernet card under linux. It is recognized as eth0 . I set it up as automatic DHCP but then it says FAILED. Even the manual configuration fails.
I have tried SuSe, Knoppix, Overclockix and all of them can not set it up. Only Mandarake can do the automated network set up perfect.

nouse66
04-05-2004, 06:54 PM
where's the question?

hard candy
04-05-2004, 07:06 PM
Bring up a terminal/console and run "/sbin/ifconfig" and paste the results.

DimGR
04-06-2004, 12:38 AM
this is what i get under Knoppix

Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:42 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2708 (2.6 KiB) TX bytes:2708 (2.6 KiB)



If you need to know the card is a Netgear FA311/FA312 PCI adapter


I tested dynebolic distro and the internet worked without any problems

nouse66
04-06-2004, 04:37 AM
i think i have an fa311 in one of my computers. that should be using the "natsemi" driver. try running "modprobe natsemi". if that doesnt throw an error than you're on your way. not sure how to restart the network service in knoppix though. "/etc/init.d/ net.eth0 restart" possibly. or maybe "ifconfig eth0 up".

jme
04-06-2004, 05:11 AM
HIya,

From the output of your ifconfig it seems that the network card isn't up or working at all as you only have the loopback address (127.0.0.1). I have included the output of mine with the eth0 and loopback address (both of which you should have)


eth0 Link encap:Ethernet HWaddr 00:10:A4:B5:08:B3
inet addr:192.168.0.197 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2290 errors:0 dropped:0 overruns:0 frame:0
TX packets:2123 errors:1 dropped:0 overruns:0 carrier:1
collisions:218 txqueuelen:100
RX bytes:1615913 (1.5 Mb) TX bytes:338659 (330.7 Kb)
Interrupt:11 Base address:0x4000

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:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:100 (100.0 b) TX bytes:100 (100.0 b)


Try running

$ dhcpcd eth0

If that doesn't work try to see if your system is recognising that there is a network card there. If it is a pci card run:

$ lspci

And see if you can find your network card in the output.

Other than that you may just need to add teh correct kernel module in at boot to get it working.

Let us know how you get on.

HTH
Jamie

DimGR
04-06-2004, 11:14 AM
this is what i get


knoppix@ttyp0[knoppix]$ lspci
00:00.0 Host bridge: Intel Corp. 82850 850 (Tehama) Chipset Host Bridge (MCH) (rev 04)
00:01.0 PCI bridge: Intel Corp. 82850 850 (Tehama) Chipset AGP Bridge (rev 04)
00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB PCI Bridge (rev 04)
00:1f.0 ISA bridge: Intel Corp. 82801BA ISA Bridge (LPC) (rev 04)
00:1f.1 IDE interface: Intel Corp. 82801BA IDE U100 (rev 04)
00:1f.2 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #1) (rev 04)
00:1f.3 SMBus: Intel Corp. 82801BA/BAM SMBus (rev 04)
00:1f.4 USB Controller: Intel Corp. 82801BA/BAM USB (Hub #2) (rev 04)
01:00.0 VGA compatible controller: ATI Technologies Inc: Unknown device 4152
01:00.1 Display controller: ATI Technologies Inc: Unknown device 4172
02:04.0 USB Controller: NEC Corporation USB (rev 41)
02:04.1 USB Controller: NEC Corporation USB (rev 41)
02:04.2 USB Controller: NEC Corporation USB 2.0 (rev 02)
02:09.0 Multimedia audio controller: Creative Labs SB Audigy (rev 04)
02:09.1 Input device controller: Creative Labs SB Audigy MIDI/Game port (rev 04)
02:09.2 FireWire (IEEE 1394): Creative Labs SB Audigy FireWire Port (rev 04)
02:0b.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller


and no it is still not working :(

i tried the modprobe natsemi but says command not found

mrBen
04-06-2004, 11:50 AM
You can only run modprobe as root.


Also, double check the output from dmesg to see what IRQ the card has been assigned - I had problems at one point because the network card had assigned itself the same IRQ as the onboard soundcard.

DimGR
04-06-2004, 11:51 AM
if i need to assign different IRQs ..how do i do that?

jme
04-06-2004, 12:12 PM
Well your network card is there and being recognised


02:0b.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller


Have you tried running (as root)


$ dhcpcd eth0


This usually works for me on my laptop if the network wasn't present at boot up.

HTH

Jamie

DimGR
04-06-2004, 12:26 PM
i tried dhcpcd eth0 as root and i get this :

batch: dhcpcd command not found

Originally posted by jme
Well your network card is there and being recognised


02:0b.0 Ethernet controller: National Semiconductor Corporation DP83815 (MacPhyter) Ethernet Controller


Have you tried running (as root)


$ dhcpcd eth0


This usually works for me on my laptop if the network wasn't present at boot up.

HTH

Jamie

DMR
04-06-2004, 02:25 PM
It is recognized as eth0 Where exactly are you seeing this? From the information you've posted, it appears that eth0 definitely isn't being recognized.


1. You need to find out if the module is loading sucessfully before worrying about DHCP:

- "natsemi" is the correct module for your card; does natsemi show up in the list of loaded modules reported by the "lsmod" command?

- Does your /etc/modules.conf file contain the following line? If not, edit the file by appending the line to the end of file:

alias eth0 natsemi

That will make the system load the module automatically at boot-up.


2. If natsemi isn't loaded, issue the modprobe command using its full pathname:

/sbin/modprobe natsemi


3. If the module fails to load, turn off Plug-N-Play functionality in your BIOS if possible. It often causes IRQ and I/0 conflicts in non-Microsoft operating systems. You can check for conflicts with the following two commands; see if eth0's resources are being shared with any other devices:

less /proc/interrupts
less /proc/ioports

You cannot manually change or force IRQ and I/O assignments of PCI cards through system utility software; the only thing that might help there is to open your case and physically rearrange the slot-ordering of your PCI cards.

DimGR
04-06-2004, 02:34 PM
Originally posted by DMR
Where exactly are you seeing this? From the information you've posted, it appears that eth0 definitely isn't being recognized.




When I manually try to set it up . The system is being scanned and it displays eth0 . Then it asks me to say Yes or No for automatic DHCP...



1. You need to find out if the module is loading sucessfully before worrying about DHCP:

- "natsemi" is the correct module for your card; does natsemi show up in the list of loaded modules reported by the "lsmod" command?

Yes

- Does your /etc/modules.conf file contain the following line? If not, edit the file by appending the line to the end of file:

alias eth0 natsemi


Yes

That will make the system load the module automatically at boot-up.


2. If natsemi isn't loaded, issue the modprobe command using its full pathname:

/sbin/modprobe natsemi


3. If the module fails to load, turn off Plug-N-Play functionality in your BIOS if possible. It often causes IRQ and I/0 conflicts in non-Microsoft operating systems. You can check for conflicts with the following two commands; see if eth0's resources are being shared with any other devices:

less /proc/interrupts
less /proc/ioports

You cannot manually change or force IRQ and I/O assignments of PCI cards through system utility software; the only thing that might help there is to open your case and physically rearrange the slot-ordering of your PCI cards.

DMR
04-06-2004, 02:56 PM
OK, good- the card and module look like they're at least initializing properly.

1. Are there any messages or errors related to eth0, DHCP, etc. in your bootup log? Run the "dmesg" command to view the log and post any suspicious messages you find.

2. What DHCP client daemon are you running (and is it running)? Try the following two commands and post the results:

ps ax |grep dhc
ps ax |grep pump

3. What device is acting as the DHCP server? Give us a little more info about your network configuration; the fact that multiple distros are having problems might indicate an external cause.

DimGR
04-06-2004, 03:47 PM
eth0: NatSemi DP8381[56] at 0xd0bcf000, 00:09:5b:21:3a:f3, IRQ 0

knoppix@ttyp1[knoppix]$ ps ax|grep dhc
knoppix@ttyp1[knoppix]$ ps ax|grep pump
465 ? S 0:00 pump -i eth0




The other 2 commands you mentioned showed nothing.


IRQ 0 sounds odd to me

DMR
04-06-2004, 04:38 PM
IRQ 0 does sound suspicious, but at least now we know that you're using "pump" as your DHCP client instead of dhcpcd.

The other 2 commands you mentioned showed nothing. If you mean the "less" commands- sorry, I screwed up. Should be:

cat /proc/ioports
cat /proc/interrupts

We need that info to see your IRQ and I/O assignments.

** Have you tried disabling PNP in your BIOS yet? Please do it if your BIOS setup program lets you.

DimGR
04-06-2004, 06:37 PM
Anyways, i went ahead and installed Mandrakee 9.2
It was 1 of the only 2 distros that could auto set up my NIC.

Thanks

DMR
04-07-2004, 02:03 PM
:)

Cadillac84
09-08-2004, 12:24 PM
Let's assume that this solved my problem. :D

I am running SuSE with 2.4.18 and had two 3Com 3c509 NICs. One fine day, one of the NICs died and I decided to replace both with new Netgear FA311 that were locally available etc.

No, that won't work because Netgear, much as I ordinarily love them, won't let me configure the cards -- or won't tell me how -- or I'm too stupid.

So, I figured out which 3c509 still worked and replaced the other. Headaches and more headaches. Finally got it working without ever knowing how.

Now, comes a power failure and the reboot didn't take. YaST says that the FA311 is eth0 and IP assined by DHCP and that the "unknown" (3c509) is eth1 with static IP (192.168.x.x). But when I look at ifconfig, eth0 is IRQ 5 and has an EISA address so I know it is the 3Com.

I think you hit on the answer. I have natsemi.o and lsmod shows natsemi as installed but not used. So I added the alias lines for both eth0 and eth1 and I'm getting ready to reboot. Reason I am answering now is I've got to pull the Internet from this laptop and plug it into the router before I reboot so it can do its DHCP thing.

Thanks once again for this great forum.

Chas


Originally posted by DMR
Where exactly are you seeing this? From the information you've posted, it appears that eth0 definitely isn't being recognized.


1. You need to find out if the module is loading sucessfully before worrying about DHCP:

- "natsemi" is the correct module for your card; does natsemi show up in the list of loaded modules reported by the "lsmod" command?

- Does your /etc/modules.conf file contain the following line? If not, edit the file by appending the line to the end of file:

alias eth0 natsemi

That will make the system load the module automatically at boot-up.


2. If natsemi isn't loaded, issue the modprobe command using its full pathname:

/sbin/modprobe natsemi


3. If the module fails to load, turn off Plug-N-Play functionality in your BIOS if possible. It often causes IRQ and I/0 conflicts in non-Microsoft operating systems. You can check for conflicts with the following two commands; see if eth0's resources are being shared with any other devices:

less /proc/interrupts
less /proc/ioports

You cannot manually change or force IRQ and I/O assignments of PCI cards through system utility software; the only thing that might help there is to open your case and physically rearrange the slot-ordering of your PCI cards.

Calipso
09-08-2004, 01:07 PM
If im not mistaken, if you are trying to check which modules are installed you check in:
/etc/modules.conf
or
/etc/modprobe.conf (check this one if you have kernel 2.6)

DMR
09-08-2004, 01:39 PM
Originally posted by Cadillac84
I have natsemi.o and lsmod shows natsemi as installed but not used.
OK- the natsemi.o module is correct for the FA-311. Don't worry about the "not used" part- that doesn't mean the module itself isn't being used, it only means that no other modules depend on (in other words, are using) the natsemi module. This is normal for that module.

Cadillac84
09-08-2004, 04:03 PM
Well, I was able to leave there and come home after a good end to a frustrating day. The system persisted in assigning the 3c509 to eth0. Well, my momma didn't raise no fool! I was tired and hungry and knew better than to fight with it. So I switched the cables and changed the alii (is that the plural of alias? :-) to reflect that. Ran SuSEconfig and rebooted and somehow came up with an outside IP on the 3Com and my private net on the FA311. Restarted dns, dhcpd, iptables, exim, qpopper, tcpdump, and all the good stuff. Ran a check on IP leases on a couple machines (we lease by MAC#) surfed a bit, sent email in and out. Mounted a NetWare drive and unmounted it and called it quits. :cool:

But, I'd like more control and I'd like to change out the EISA adapter for a PCI simply because if the adapter goes out, I've got to run the EISA configuration utility to keep from getting boot errors by removing an EISA card without "permission." And it just makes sense to have something more up-to-date in there. (maybe)

So, I called Netgear and inquired about Linux drivers for 2.6 kernels and or utilities for easily using two adapters in the same Linux machine. I realize that Linux is not a big market for them, but I must say I was disappointed to find that the rtl8139.o and natsemi.o are the only drivers they offer -- supporting things like Red Hat 6 and Red Hat 7.

Too bad! :(

This may not be the right place to ask, but perhaps you know anyway -- who offers the best support for their 100 Mbps NICs especially as regards having two of them in the same computer? Is there a Linux "champ" in the NIC industry? I'm currently running SuSE 8.0 and I'm likely to stick with SuSE but at a higher level in the future. (I just like the interface -- it suits me!)

Meanwhile, thanks again for the help understanding how to approach this and get it working.

Chas


Originally posted by DMR
OK- the natsemi.o module is correct for the FA-311. Don't worry about the "not used" part- that doesn't mean the module itself isn't being used, it only means that no other modules depend on (in other words, are using) the natsemi module. This is normal for that module.

DMR
09-08-2004, 05:21 PM
As far as "Champs" go, 3Com NICs have a long history of being well-supported (natively even) under Linux.