# lose internet after a while

## kachaffeous

This has happened to me twice, wondering if anyone else has seen it.  

After a couple days uptime my gentoo box can not see the internet anymore(DNS not working).  I can ping the boxes on my local lan and the DNS servers.  I can ping a web page IP from my gentoo box but not the internet name.   If I try to open a web page on the gentoo system it will not work.  My xp system will open the page fine though.

I have tried using the net.eth0 script to stop and restart the network but the problem does not go away.  A reboot will fix the problem.  This is my network layout

Smoothwall -->HUB -->(gentoo, winxp, win98)

----------

## delta407

Maybe DHCP is overwriting your /etc/resolv.conf...?

----------

## BonezTheGoon

Are you using DHCP with your router?  It sounds like your DHCP lease is running out and a simple reboot asks for a DHCP renewal, which gets you back online.  Now then if you are using static IP's this obviously is the wrong answer.  You might check your router to see if you can give infinite leases which would correct the problem.  I'm sure there is another elegant way of handling things on the local host (such as having the DHCP client request a new lease without having to reboot the machine), unfortunately I don't know that much about the Linux DHCP client or daemon or whatever that black-magic is.

Hope that helps, at the very least now someone is likely to correct me--and then you'll get a better answer anyway!!!   :Smile: 

Regards,

BonezTheGoon

----------

## kachaffeous

The smoothwall machine is a dialup machine,  so I get a dynamic ip eveytime I log on.  I am also not using DHCP.  I will check the smoothwall machine for any DHCP settings, but I don't think that is it b/c my other boxes aren't affected.

----------

## BonezTheGoon

When you say that you get an IP dynamically but you are not running DHCP, how does that work?  Or do you mean that your external IP is DHCP but all your LAN IP's are static?  If you have static LAN IP's then you really don't need to worry about any of the DHCP settings--your external IP is obviously fine.  If you are getting a new IP each boot on your internal LAN though I would bet you are using DHCP.  If you are using DHCP on your LAN even though your other machines are not having trouble it could still have something to do with the DHCP client on your troubled box.  If you are using static though on your LAN then it sounds like it would have to be something related to either software settings (/etc/resolv.conf as mention before or your default gateway) -- there is of course the VERY SLIM possibility that there is actually a hardware issue with the NIC itself.  Hardware is the VERY LAST thing I would consider though, I would put it right out of my mind until I had disproved all other available theories.

Regards,

BonezTheGoon

----------

## kachaffeous

 *Quote:*   

> 
> 
> Or do you mean that your external IP is DHCP but all your LAN IP's are static?

 

My local lan addresses are static, the only dynamic ip is my PPP0 connection on the smoothwall machine.  I have checked my 

/etc/resolv.conf files and it has my DNS servers listed.  So the problem

isn't there.  I guess the next time it happens I can check my route table

to see what is there.

----------

## klieber

 *kachaffeous wrote:*   

> After a couple days uptime my gentoo box can not see the internet anymore(DNS not working).  I can ping the boxes on my local lan and the DNS servers.  I can ping a web page IP from my gentoo box but not the internet name.   If I try to open a web page on the gentoo system it will not work.  My xp system will open the page fine though.

 

is your XP box using the same DNS servers as your gentoo box?

what happens if you try to use nslookup and/or dig from the gentoo box?  Are you able to connect to the name server?

you say you can't open a web page -- can you open a web page if you request it by IP address?  (try http://66.250.107.251/, which will get you to the forums)

--kurt

----------

## klieber

 *kachaffeous wrote:*   

> I guess the next time it happens I can check my route table to see what is there.

 

If you can ping by IP address, but not by name, then your routing table is fine.

--kurt

----------

## kachaffeous

 *Quote:*   

> 
> 
> is your XP box using the same DNS servers as your gentoo box? 
> 
> 

 

Yes.

 *Quote:*   

> 
> 
> what happens if you try to use nslookup and/or dig from the gentoo box? Are you able to connect to the name server? 
> 
> you say you can't open a web page -- can you open a web page if you request it by IP address? (try http://66.250.107.251/, which will get you to the forums)
> ...

 

Will try next time it happens.

Thanks for the responses so far  :Smile: 

----------

## lecholet

I got the same problem. I realize that it always happen when im connected to another machine trough samba (the netbios thing). I also have to reboot, but its maybe not necessary to do so. i have tried to reboot the modem and the router, just in case, killing all smb connections doesnt help either. i havent got time to investigate further to pin point the root of the problem. My network seems to be set up the same way also. If i ever find anything interesthing, ill post it here.

----------

## crown

I've had this same problem twice now. Both times it started occurring just after an emerge. The first time it was after an emerge -u world (though I didn't notice it until a day or so afterwards) so I thought it was one of the packages there that caused the problem. 

This time, however, only perl was updated which most certainly (hopefully!) didn't cause the problem. However it's still odd that both times it happened just after an emerge. This time I noticed it more quickly because fetchmail immediately threw errors into my mailbox complaining that it couldn't resolve the hostnames.

As the original poster did I also tried restarting eth0 among other things. Didn't work. What did work however (both times) was hitting my apache server from another machine on the network. The second I hit it names started resolving again. I can't explain it. Anyone have any theories?

crown

----------

## pjp

Might be worth running ifconfig -a on the machine with the dynamic IP when it is working, then again after it fails.  See if any IPs change.

----------

## crown

 *kanuslupus wrote:*   

> Might be worth running ifconfig -a on the machine with the dynamic IP when it is working, then again after it fails.  See if any IPs change.

 

I forgot to mention that this box isn't using DHCP. It has a static IP (but passes through a Linksys NAT) and resolv.conf is a-ok.

----------

## pjp

Does dmesg output anything that looks suspicious?

----------

## crown

 *kanuslupus wrote:*   

> Does dmesg output anything that looks suspicious?

 

I don't see anything out of the ordinary. Might be more helpful to check when it's not working though. Anything in particular I should be looking for?

I'm using a Netgear FA311 NIC with the natsemi driver.. could there be something wrong with the driver? Seems unlikely though

----------

## pjp

I'm just guessing, no idea that anything will show up, but give it a shot next time it croaks.  /etc/dhcpc is a directory for cached information.  I didn't see anything that looked similar for static, might be worth looking for.

----------

