Click to See Complete Forum and Search --> : eth0 receives address, then fails to work


commnerd
06-02-2004, 12:53 AM
I am a brand new Gentoo user (Kernel 6.4.5) and have just installed the operating system for the first time. Everything is beautiful. I installed from a Live CD and got everything working for the most part. After I boot up and after eth0 gets an IP address from my DHCP server, I try to ping something and it fails. If I try to ping the box from another computer, I get no response. I find this to be very strange... Any suggestions?

Thanks,

Mike

blobaugh
06-02-2004, 01:34 AM
did you check and make sure it's got an addr? type ifconfig and it should show you two readings one for loopback and the other for you eth0

commnerd
06-02-2004, 01:37 AM
I have done this... I've gone as far as logging into my router (which is acting as my DHCP server) to check to see that the connection was actually made. I thought that if it didn't receive anything from the server that it might assign a default IP address. Sure enough, my router had an entry for the address it had assigned to my Gentoo box.

hard candy
06-02-2004, 09:06 AM
(Kernel 6.4.5)
Probably because you are using a kernel that has not been developed yet. :) I want one, where did you download it from?
After it fails, try "ifconfig eth0 up" and then "ifconfig" and see if there are 2 addresses. If it does, then try a web browser and see if you can connect. If you can then 'ping" is not working properly.
If you can't, then perhaps the module for the NIC is being unloaded somehow. Try "modprobe themoduleforthecard" and then ifconfig again.

commnerd
06-02-2004, 10:05 AM
Sorry, man... I traveled into the future... (Kernel is 2.6.5... sound better =P)

commnerd
06-02-2004, 10:32 AM
Tried the following steps, the ifconfig eth0 up command does not add a second address. Links does not allow me access to any webpages outside, either.

hard candy
06-02-2004, 10:44 AM
I would go back through the Gentoo installation guide and read over the setting up the network section amd make sure you did not leave out any steps. That used to really piss me off, the installation cd network would work beautifully but then when I booted into the installation the network would be messed up because I left out a step or wrongly configured something.

commnerd
06-02-2004, 01:34 PM
Ok, I've gone through the setup guide (both online and the one that came with my LiveCD) and didn't appear to miss any steps. Even so, let's just say I missed a step in setting up the network properly. Even if I had done this and my box was receiving an IP via DHCP, I should still be able to ping the box once it received its IP, right? In this case, I can't do that...

commnerd
06-02-2004, 06:08 PM
After digging around in my /proc/net directory, I found that I have two eth0 listings under /proc/net/route. To me, this is a bit odd. Any ideas?

Thanks,

Mike

hard candy
06-02-2004, 08:06 PM
I can't help, I do not have any eth0 listings in /proc/net.:confused:

commnerd
06-02-2004, 08:12 PM
Try this... cat /proc/net/route

hard candy
06-02-2004, 08:23 PM
Yes, I have them.

commnerd
06-02-2004, 08:27 PM
Is eth0 listed twice?

hard candy
06-02-2004, 08:35 PM
Try adding both "pci=noacpi" and "noapic" to kernel line in your bootloader config. Lilo will have the "append=" pci=noacpi noapic " and grub will have it on the kernel line.

hard candy
06-02-2004, 08:37 PM
Yes I have eth0 listed twice. And I'm thinking it may be an interrupt problem, that's why I suggested the above.

commnerd
06-02-2004, 09:11 PM
Ok, here is what /proc/interrupts looks like:

CPU0
0: 38918 XT-PIC timer
1: 105 XT-PIC i8042
2: 0 XT-PIC cascade
5: 37 XT-PIC eth0
8: 2 XT-PIC rtc
9: 0 XT-PIC acpi
10: 0 XT-PIC yenta, yenta, ehci_hcd, uhci_hcd Intel 82801DB-ICH4
11: 2 XT-PIC ohci1394, uhci_hcd, uhci_hcd
12: 99 XT-PIC i8042
14: 1151 XT-PIC ide0
15: 33 XT-PIC ide1
NMI: 0
LOC: 26538
ERR: 0

On my Red Hat box, eth0 is on IRQ 10... I don't know if that does ANYTHING to help you, but I know that adding pci=noapci to the kernel line in my grub.conf file didn't work.

Mike

commnerd
06-02-2004, 09:15 PM
Never mind... After rebooting it again, it does work... Thanks, guys!

commnerd
06-03-2004, 01:38 AM
Ok, it turns out we're only closer... I rebooted my machine and now I'm having problems again, although less severe. In order to get my card to work, I have to:

ifconfig eth0 down
ifconfig eth0 up

Then, after I do that, I have network access, but then it won't resolve domain names. I'm a bit confused, though, because resolv.conf still has correct entries in it. Another thing that boggles my mind is that before I rebooted, it worked perfectly... Any ideas?

Thanks,

Mike

hard candy
06-03-2004, 08:59 AM
What are you using for the IP address for the router?
What does "netstat --route" show?

mdwatts
06-03-2004, 10:49 AM
Moved to the Networking forum since Installation is meant for distro install issues and it would seem you already have your distro installed and are now having networking problems.

commnerd
06-03-2004, 11:34 AM
Before I bring the nic down and back up, it gives me:

Destination Gateway Genmask
192.168.0.0 * 255.255.255.0
loopback localhost 255.0.0.0
default 192.168.0.1 0.0.0.0

Flags MSS Window irtt Iface
U 0 0 0 eth0
UG 0 0 0 lo
UG 0 0 0 eth0

And after I bring it back up:

192.168.0.0 * 255.255.255.0
loopback localhost 255.0.0.0


U 0 0 0 eth0
UG 0 0 0 lo

hard candy
06-03-2004, 11:42 AM
Shouldn't that be 192.168.1.1 for the gateway.?

mdwatts
06-03-2004, 12:14 PM
192.168.0.1 would be correct if using 192.168.0.* and not 192.168.1.*.

commnerd
06-03-2004, 12:15 PM
Nah, I'm using the default ip address scheme for the Cisco 501 Pix, which is 192.168.0.0. Most routers use 192.168.1.0, however, some use 192.168.0.0 (for network addresses). Anyway, the gateway on my network is 192.168.0.1.

My guess is that it's receiving the extra DHCP information and dropping it, not knowing what to do with it, or that it's receiving the IP address and the card itself quits working right after it receives the IP address portion of the DHCP packets, not getting the network information from DHCP. I think if we solve the problem of the nic failing after bootup, it may fix the problem.

Thanks,

Mike

hard candy
06-03-2004, 12:58 PM
Let's start over,
1. What brand NIC, what module are you using for it?

mdwatts
06-03-2004, 01:03 PM
If the module is loaded, eth0 is up and running with a ip address and you still cannot access the internet, then it's usually the gateway address and/or dns servers in /etc/resolv.conf.

If you are using a router, both of those should point to the ip address of the router. I have a Linksys router and have 192.168.1.1 for my gateway address and in /etc/resolv.conf.

commnerd
06-03-2004, 01:09 PM
The only thing I'm getting hung up on is that I was having what appeared to be IRQ conflicts, I added an option to my kernel line in my grub.conf file, rebooted, and vuala, it worked... Emerged a bunch of stuff, that downloaded successfully, my computer was getting hot, so I shut it down to give it a break, came back later, turned it back on, and got no name resolution. Tested to see if I could ping my router... I couldn't. Took the nic down: "ifconfig eth0 down"... Brought it back up: "ifconfig eth0 up"... Now I could ping my router, but still no name resolution. This is where I'm stuck now. Why would it work ONE time with the current settings, then turn around and not work the next time? I'm at a loss...

Mike

commnerd
06-03-2004, 01:43 PM
Hard Candy, can you verify my kernel entry in my grub file please? It reads as follows (and now that I've looked at dmesg) is probably wrong...

kernel /kernel-2.6.5-gentoo-r1 root=/dev/ram0 init=/linuxrc real_root=/dev/hda3 pci=noacpi noapic

Thanks,

Mike

hard candy
06-03-2004, 02:13 PM
Let's try "acpi=off" and "noapci" as arguments. Perhaps I gave you incorrect arguments.

mdwatts
06-03-2004, 07:07 PM
Originally posted by commnerd
and got no name resolution.

DNS servers as I explained above? Gateway address correct?

IRQ conflicts can be caused by not having PnP OS disabled in the bios.

commnerd
06-03-2004, 07:42 PM
If the DNS servers are set within /etc/resolv.conf and the default gateway is set within /etc/conf.d/net, then everything should be ok... DHCP hands out the DNS and gateway information, anyway, however... Anyway, I'm still not getting DNS resolution... disabled PNP O/S as well... I don't know if I'm getting IRQ conflicts, though... I still have to bring the card down and then back up to get it to work, but this works consistantly...

Mike

hard candy
06-03-2004, 08:25 PM
When you configured the kernel, did you enable IPV6 and make it a module or compile it in? If you did compile it in, try unenabling it. The new kernels will use IPV6 for DNS and only after that times out, will use IPV4.
Also, what brand of NIC is this? Which module/driver are you using?

commnerd
06-03-2004, 08:34 PM
I did not include IPv6, even as a module. I'm using an Intel PRO/100+ NIC and the driver I'm using is e100. I did not build the e100 driver into the kernel, however... It's built as a module...

hard candy
06-03-2004, 09:19 PM
In the config file in /etc/conf.d/net - is the "iface_eth0="dhcp" line uncommented?
If you bypass the router and connect directly to the internet, will it work?

commnerd
06-03-2004, 10:01 PM
In answer to your first question, yes... In answer to your second question, no... DHCP seems to update everything as it's supposed to. It seems that once it's updated my computer, however, that my computer just doesn't use the information in the configuration files... I'm wondering if it's not related to the same problem that's making my ethernet card quit working after I'm fully booted...

hard candy
06-03-2004, 10:45 PM
This seems like a lot of work for an installation. I'm out of ideas. If you want, I'll send you a Slackware cd. :)
All I can think of is that the /etc/resolv.conf file is messed up somehow or the dhcpd is messed up. If you can get it to stay up long enough, maybe unemerge dhcpd and re-emerge it. Or maybe get it off the installation cd. Good luck.

commnerd
06-03-2004, 10:58 PM
Well, I found a fix... Whenever I run /etc/init.d/net.eth0 restart it restarts EVERYTHING including the DNS services... I'm thinking that ifconfig eth0 down/up didn't have all the options needed to restart ALL services... although I could be wrong. Anyway, we went through /var/log/messages, and there was also a message that said I had a tainted kernel next to an e100: entry... I'm recompiling my kernel now to see if there wasn't a problem. however, /etc/init.d/net.eth0 restart worked just fine. Thanks a lot for the time you put in, man... I really appreciate it.

Mike