# [Unsolved] Net. connection lost after ~30 seconds from boot.

## kristjans

I just recently got Gentoo working (for the first time). Now, I got into some problems (not for the first time - in the beginning I tried to compile the kernel on my own, but I failed, so I used genkernel all - many thanks to who helped me out). When I boot the computer up, the internet works just fine - if I put it to ping some random site, it will for a while, but when about 30 seconds has passed, then it happily begins to report "Destination Host Unreachable".

/etc/conf.d/net (unchanged)

 *Quote:*   

> #This blank configuration will automatically use DHCP for any net.*
> 
> #scripts in /etc/init.d.  To create a more complete configuration,
> 
> #please review /etc/conf.d/net.example and save your configuration
> ...

 

/etc/hosts (that's which I think the mistake is in, because I am clueless on how to configure it)

 *Quote:*   

> # hosts         This file describes a number of hostname-to-address
> 
> #               mappings for the TCP/IP subsystem.  It is mostly
> 
> #               used at boot time, when no name servers are running.
> ...

 

Gateway: 192.168.10.1

Local IP: *dynamic*, probably 192.168.10.9 at the moment.

Connection-specific DNS suffix (from another computer on the same router, that is running Windows XP): kodunet.webs.ee 

Thank you

edit:

#/etc/init.d/net.eth0 start

 * Caching servire dependencies ...

 * WARNING: "net.eth0" has already been started.

#/etc/init.d/net.eth0 stop

 * Caching service dependencies ...

 * Unmounting network filesystems ...

 * Stopping eth0

 * Bringing down eth0

 *  Stopping dhcpcd on eth0 ...

 *  Shutting down eth0 ...

#/etc/init.d/net.eth0 start

 * Caching service dependencies ...

 * Starting eth0

 *  Bringing up eth 0

 *  Configuration not set for eth0 - assuming dhcp

 *  dhcp

 *    Running dhcpcd ...

Error, timed out waiting for a valid DHCP server response. 

But then again, I couldn't ping the gateway after I lost the connection anyways.

----------

## alacheesu

 *Quote:*   

> /etc/hosts (that's which I think the mistake is in, because I am clueless on how to configure it) 

 

Probably not. This file just "asccociates IP addresses with hostname", as the manpage says. That is, you can put something like

```
192.168.10.1 mygateway
```

and you can use the hostname "mygateway" instead of the IP-address. It's more of a convenience than neccessary, AFAIK, and I don't think it is the cause of your troubles. 

When you lose your connection, are you connected to anything at all. Can you, f.ex. still ping your gateway? Also, try running "ifconfig" after you get seem to lose your connection, and post the output.

----------

## kristjans

# ping 192.168.10.1

PING 192.18.10.1 (192.168.10.1) 56(84) bytes of data.

From 192.168.10.8 icmp_seq=9 Destination Host Unreachable

From 192.168.10.8 icmp_seq=10 Destination Host Unreachable

From 192.168.10.8 icmp_seq=11 Destination Host Unreachable

etc...

#ping www.google.com

ping: unknown host www.google.com

It doesn't seem to get a reply from the router, but it's somehow different from websites.

#ifconfig

eth0  Link encap: Ethernet HWaddr 00:80:AD:00:DF:C4

inet addr:192.168.10.8 Bcast:192.168.10.255 Mask: 255.255.255.0

UP BROADCAST NOTRAILERS MULTICAST MTU:1500 Metric:1

RX packets:190 errors: 111 dropped:0 overruns: 0 frame:0

TX packets:94 errors: 17 dropped:0 overruns:0 carrier:17

collisions:0 txquelen:1000

RX bytes:23132 (22.5 Kb)  TX bytes:8950 (8.7 Kb)

Interrupt:9 Base address: 0x6000

e: Note, that I had pinged a server before, thus the packets that went through.

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:13 errors:0 dropped:0 overruns:0 frame:0

TX packets:1 errors:0 dropped:0 overruns:0 carrier:0

collisons:0 txquelen:0

RX bytes:1352 (1.3 Kb) TX bytes:1352 (1.3 Kb)

e: It both tells "Destination Host Unreachable" on each try to ping the router and also other computers in the network, but if I try to ping itself (192.168.10.8), then it will successfully ping itself.

Also it shouldn't be router's fault - internet works on all the other computers connected and it did work on that computer I installed gentoo on when I was in the install process, because I used the minimal CD.

----------

## alacheesu

 *Quote:*   

> It doesn't seem to get a reply from the router, but it's somehow different from websites. 

 

Router might be set up to ignore pings, but it's not really important.

So if I understand you correctly the router works as it should, your hardware is working and you seem to have configured your network interface correctly. You can check your default gateway with the route command, if you haven't already done so.

Since you used genkernel, there is always the possibility that the wrong modules get loaded for your card. If you boot with the installation CD and run lsmod you'll get a list of all loaded modules. Verifying again that your NIC works with the installation CD probably doesn't hurt either, just to be sure.  :Smile:  Then compare that with the output of lsmod when booted with your genkernel. 

Checking your logs might be useful too. Look at the output of dmesg and 

```
 #cat /var/log/messages
```

Maybe something useful will turn up.

----------

## kristjans

The route command didn't show anything interesting, but there seems to be the possible cause of the problem with tulip...

Results of lsmod on LiveCD (sorry, but I handwrote these down, so there are probably a few typos).

dmfe

dm_mirror

dm_mod

pdc_adma

sata_mv

ata_piix

ahci

sata_qstor

sata_vsc

sata_uli

sata_sis

sata_sx4

sata_nv

sata_via

sata_svw

sata_sil24

sata_sil

sata_promise

libdata

ohci1394

ieee1394

sl811_hcd

dhci_hcd

uhci_hcd

usb_storage

usbhid

ehci_hcj

usbcore

hci_hcd

Results of lsmod on my Gentoo installation.

tulip

rtc

nfo

lockd

sunrpc

jfc

dm_mirror

dm_mod

pdc_adma

sata_mv

ata_piix

ahci

sata_qstor

sata_vsc

sata_sis

sata_sx4

sata_hv

sata_via

sata_svw

sata_sil24

sata_sil

sata_promise

libdata

sbpc2

ohci1394

ieee1394

sl811_hcd

ohci_hcd

uhci_hcd

usb_storage

usbhid

ehci_hcd

usbcore

hci_hcd

#dmesg

[...]

Linux Tulip driver version 1.1.13-NAPI (May 11, 2002)

PCI: Found IRQ 9 for device 0000:00:10.0

tulip0: EEPROM default media type Autosense

tulip0: Index #0 - Media MII (#11) described y a 21140 MII PHY (1) block

tulip0: Index #1 - Media 10baseT (#0) described by a 21140 non-MII (0) block

tulip0: Index #2 - Media 100baseTx (#3) described by a 21140 non-MII (0) block

tulip0: Index #3 - Media 10baseT-FDX (#4) described by a 21140 non-MII (0) block

tulip0: Index #4 - Media 100baseTx-FDX (#5) described by a 21140 non-MII (0) block.

tulip0: MII transreceiver #1 config 3100 status 7809 advertising 01e1.

eth0: Davcom DM9102/DM9102A rev 49 at cca16000, 00:80:AD:00:DF:C4, IRQ 9.

eth0: Setting full-duplex based on MII#1 link partner capability of 45e1.

----------

## PaulBredbury

It sounds like this kernel bug.

----------

## kristjans

 *Quote:*   

> Steps to reproduce:
> 
> Download at the maximun transfer rate with a big file
> 
> apt-get -y install tex --> 106K

 

I am not sure about if it is this bug, because I'll loose the connection even if I don't put it to download anything.

----------

## PaulBredbury

Easy answer:  emerge git-sources (it's in Portage) and see whether it fixes the problem.

----------

## kristjans

Which one should I choose - 2.6.18 rc1-r2/rc1-r4/rc1-r9/rc2-r6/rc2-r9?

And now since I am on LiveCD... Can I install Gentoo to my Linux from LiveCD?    :Idea: 

----------

## alacheesu

According to Paul Bredbury, 2.6.18-rc3-git4 includes the patch for this bug. According to the same link, the bug did not appear in the 2.6.16 kernel either, so you can try those if you want too. If this is the bug you're experiencing is a different matter, though.

As for this

 *kristjans wrote:*   

> And now since I am on LiveCD... Can I install Gentoo to my Linux from LiveCD? 

 

Are you asking if you can install the same kernel that the livecd uses? If so, I don't see why not, though I've never tried. You just need to find the file that contains the kernel, copy it to your boot partition and configure GRUB (or your bootloader of choice) as usual.

----------

