PDA

View Full Version : Can't connect to network: "eth0 failed"


JustinGiroux
2005-05-03, 11:28 AM CDT
Relative newbie here. I've read through the forums and have not had any luck with what I found.

Problem: my Linux box will not connect to the internet.

Home network with one Linux box (this computer) that won't connect and one Windows computer that will connect. Toshiba cable modem (DAZ8817F) connected to D-Link router (DE805TP). I also own another router, a Linksys WRT54G, but was unable to connect with it.

When booting up I see this: Determining IP information for eth0... failed: no link present. Check cable?

Tried other cables; no change.

Equipment:
Toshiba S526, laptop with integrated NIC
NIC = Realtek RTL-8139/8139C/8139C+ (MAC 00:02:3f:d7:41:9b)
Fedora Core 3, kernel 2.6.9-1.667smp
NIC driver = 8139too

Tried static IP instead of my usual DHCP; didn't work either way.

results of ifconfig
eth0 Link encap:Ethernet HWaddr 00:02:3F:D7:41:9B
inet6 addr: fe80::202:3fff:fed7:419b/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:55 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:17478 (17.0 KiB)
Interrupt:209 Base address:0x3000
lo Link encap:Local Loopback
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3738 errors:0 dropped:0 overruns:0 frame:0
TX packets:3738 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4325115 (4.1 MiB) TX bytes:4325115 (4.1 MiB)
sit0 Link encap:IPv6-in-IPv4
inet6 addr: ::127.0.0.1/96 Scope:Unknown
UP RUNNING NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:45 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
IPV6INIT=no
NETMASK=255.0.0.0
IPADDR=192.168.1.2
GATEWAY=192.168.1.1
HWADDR=00:02:3f:d7:41:9b

results of route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface

results of ping localhost.localdomain
connect: Network is unreachable

results of dhclient
Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
sit0: unknown hardware address type 776
/sbin/dhclient-script: configuration for sit0 not found. Continuing with defaults.
sit0: unknown hardware address type 776
Listening on LPF/sit0/
Sending on LPF/sit0/
Listening on LPF/eth0/00:02:3f:d7:41:9b
Sending on LPF/eth0/00:02:3f:d7:41:9b
Listening on LPF/lo/
Sending on LPF/lo/
Sending on Socket/fallback
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on sit0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on sit0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on sit0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on sit0 to 255.255.255.255 port 67 interval 21
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 16
DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 17
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on sit0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
No DHCPOFFERS received.
No working leases in persistent database – sleeping.

results of system-config-network
/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py:90: GtkDeprecationWarning: gtk.mainiteration is deprecated, use gtk.main_iteration instead
self.warn(message, DeprecationWarning)
then in gui window: Determining IP information for eth0... failed.

tashirosgt
2005-05-03, 11:42 AM CDT
My understanding is that Windows computers (and perhaps sometimes Linux computers) which expect to be assigned an IP address on a network and don't get one, will assign themselves one. It begins 169.254.... If there are machines like this on a network, is there an efficient way to track them down? (I mean by some software tool, not walking around the factory looking at each one.)

AndyGreen
2005-05-03, 12:02 PM CDT
results of

mii-tool eth0

? Is it possible you are using a crossover CAT5 somewhere along the line, and some ports you connect to are autoswapping and some aren't? Are there any lights in or next to the RJ45 socket on this box and do they come on when you have the cable in?

tail /var/log/messages

bitrain
2005-05-03, 12:02 PM CDT
Did you check if the card is placed correctly in the pci-slot?

AndyGreen
2005-05-03, 12:05 PM CDT
BTW your netmask is broken, can be 255.255.0.0 through 255.255.255.254, but anything less than 255.255.0.0 and you can't reach a little slice of the internet that is on 192.*

JustinGiroux
2005-05-03, 09:26 PM CDT
Thanks, bitrain. The card is built into my laptop.

JAG

smithy73
2005-05-03, 09:43 PM CDT
LINUX NOOBIE Reply Warning (Me that is)

I had a similar problem in that my FC3 box (as a server) failed to connect.
I found that the settings of IP address, Subnet, etc had disappeared from the machine.

I reset theses details using the Network Preferences GUI, and all is good again.

w5set
2005-05-03, 11:00 PM CDT
what does netplugd say from the command line
service netplugd status
and network from the command line
service network status

JustinGiroux
2005-05-04, 10:58 AM CDT
Thanks for the tips, Andy.

Mii-tool eth0 yielded the following: SIOCGMIIPHY on "eth0" failed: Invalid argument. No MII interfaces found.

tail /var/log/messages had no messages re: the network card.

There is a light next to the RJ45 port, but it was not coming on at all.

Justin

AndyGreen
2005-05-04, 11:01 AM CDT
No MII interfaces found?????

Feels to me that your network adapter is being run by the wrong, or broken driver, or is being talked to at a memory address that it ain't at, something really basic is broken.

What does

lspci | grep net

say, and also

cat /etc/modprobe.conf | grep eth0

chili555
2005-05-04, 08:26 PM CDT
I suggest you also check to see if the proper module -- 8139too -- is loaded.

/sbin/lsmod should show it. If not, as root, /sbin/modprobe 8139too

Then try /sbin/ifup eth0

JustinGiroux
2005-05-05, 11:18 AM CDT
"service netplugd status" gave "netplugd is stopped."

"service network status" gave:
configured devices: lo eth0
currently active devices: lo

"lspci | grep net" gives:

02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
02:02.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

"cat /etc/modprobe.conf | grep eth0" gives alias eth0 8139too

"/sbin/lsmod" gives 8139too

AndyGreen
2005-05-05, 12:01 PM CDT
Hm. There are two 8139+ drivers in Linux.

The other one is called 8139cp.

Why don't we try an experiment of editing /etc/modprobe.conf so that

alias eth0 8139too

is changed to

alias eth0 8139cp

and reboot.

JustinGiroux
2005-05-05, 09:00 PM CDT
Okay, I've tried something new and I've gotten some different (and maybe better) results. I've interposed my linksys router between the Dlink router and my linux box. The setup now looks like this:

Windows box
(working fine)_______
\
\
Dlink_______Toshiba cable modem______internet
router
/
/
Linux____Linksys____/
box router

The light next to my RJ45 port is now lit, and all modem and router lights are lit as if everything were OK, but I still can't connect to the internet. :(

Here are my new data:

[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:02:3F:D7:41:9B
inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::202:3fff:fed7:419b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:126 errors:0 dropped:0 overruns:0 frame:0
TX packets:166 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15833 (15.4 KiB) TX bytes:15591 (15.2 KiB)
Interrupt:209 Base address:0x3000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2031 errors:0 dropped:0 overruns:0 frame:0
TX packets:2031 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2500415 (2.3 MiB) TX bytes:2500415 (2.3 MiB)

contents of /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet

[root@localhost ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0

results of ping localhost.localdomain:
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.051 ms repeated over and over again

[root@localhost ~]# dhclient
Internet Systems Consortium DHCP Client V3.0.1
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP
sit0: unknown hardware address type 776
/sbin/dhclient-script: configuration for sit0 not found. Continuing with defaults.
/etc/sysconfig/network-scripts/network-functions: line 47: sit0: No such file or directory
sit0: unknown hardware address type 776
Listening on LPF/sit0/
Sending on LPF/sit0/
Listening on LPF/lo/
Sending on LPF/lo/
Listening on LPF/eth0/00:02:3f:d7:41:9b
Sending on LPF/eth0/00:02:3f:d7:41:9b
Sending on Socket/fallback
DHCPDISCOVER on sit0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 192.168.1.1
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.100 -- renewal in 125 seconds.

results of system-config-network: gui window shows eth0 is active.

[root@localhost ~]# mii-tool eth0
eth0: negotiated 100baseTx-FD, link ok

[root@localhost ~]# tail /var/log/messages
May 5 14:57:48 localhost dhclient: No DHCPOFFERS received.
May 5 14:57:48 localhost dhclient: No working leases in persistent database - sleeping.
May 5 14:57:52 localhost dhclient: No DHCPOFFERS received.
May 5 14:57:52 localhost dhclient: No working leases in persistent database - sleeping.
May 5 14:58:55 localhost dhclient: DHCPREQUEST on eth0 to 192.168.1.1 port 67
May 5 14:58:55 localhost dhclient: DHCPACK from 192.168.1.1
May 5 14:58:55 localhost dhclient: bound to 192.168.1.100 -- renewal in 136 seconds.
May 5 14:59:11 localhost dhclient: DHCPREQUEST on eth0 to 192.168.1.1 port 67
May 5 14:59:11 localhost dhclient: DHCPACK from 192.168.1.1
May 5 14:59:11 localhost dhclient: bound to 192.168.1.100 -- renewal in 131 seconds.

[root@localhost ~]# service netplugd status
netplugd is stopped
[root@localhost ~]# service network status
Configured devices:
lo eth0
Currently active devices:
lo eth0 sit0
[root@localhost ~]# lspci |grep net
02:01.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
02:02.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
[root@localhost ~]# cat /etc/modprobe.conf |grep eth0
alias eth0 8139too
[root@localhost ~]# /sbin/lsmod
Module Size Used by
nls_utf8 5953 1
parport_pc 27777 1
lp 14893 0
parport 40969 2 parport_pc,lp
autofs4 21700 0
i2c_dev 13249 0
i2c_core 25921 1 i2c_dev
sunrpc 136997 1
ds 20805 4
ipt_REJECT 10433 1
ipt_state 5825 1
ip_conntrack 45701 1 ipt_state
iptable_filter 6721 1
ip_tables 20929 3 ipt_REJECT,ipt_state,iptable_filter
button 10449 0
battery 12485 0
ac 8773 0
md5 8001 1
ipv6 235105 10
ohci1394 35033 0
ieee1394 302965 1 ohci1394
yenta_socket 22721 0
pcmcia_core 66681 2 ds,yenta_socket
joydev 12545 0
uhci_hcd 32729 0
ehci_hcd 31941 0
hw_random 9301 0
snd_intel8x0m 20873 2
snd_intel8x0 35853 2
snd_ac97_codec 65169 2 snd_intel8x0m,snd_intel8x0
snd_pcm_oss 50809 0
snd_mixer_oss 20929 3 snd_pcm_oss
snd_pcm 89669 3 snd_intel8x0m,snd_intel8x0,snd_pcm_oss
snd_timer 27077 1 snd_pcm
snd_page_alloc 13641 3 snd_intel8x0m,snd_intel8x0,snd_pcm
gameport 8513 1 snd_intel8x0
snd_mpu401_uart 11329 1 snd_intel8x0
snd_rawmidi 27109 1 snd_mpu401_uart
snd_seq_device 11849 1 snd_rawmidi
snd 54821 14 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_pcm_ oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uar t,snd_rawmidi,snd_seq_device
soundcore 12961 3 snd
8139too 27329 0
mii 8641 1 8139too
floppy 57297 0
dm_snapshot 20837 0
dm_zero 6337 0
dm_mirror 24989 2
ext3 117961 2
jbd 59353 1 ext3
dm_mod 56773 6 dm_snapshot,dm_zero,dm_mirror

JustinGiroux
2005-05-05, 09:16 PM CDT
Andy,

I edited the /etc/modprobe.conf as you suggested, but I still was unable to connect.

Thank you for all your help!

Justin

JustinGiroux
2005-05-10, 03:14 PM CDT
Got a tip from a friend to remove my 2.4Ghz portable phone. Reinstalled everything from scratch and now everything works like a charm. Amazing.

Thanks to all who helped!

Best,

Justin