# My Degrading Connection

## DaleNixon

I've been running Gentoo on my PC for a couple of weeks now and a new problem has cropped up.  I connect to the internet through a cable modem which gives my three computers a connection behind a router.  Only the gentoo install on my PC has started behaving in the following way:

If I issue a ping command, it takes about 5 seconds before I start getting anything.

If I open a browser and try to load a web page, it takes about 5 seconds before the hostname is resolved.

If I open quake3 and try to find game servers on the internet, it tells me "no response from master server".

My other two computers (one of them a mac running Gentoo) have no problem with their connections.  This machine has no problem in windows 2000 (so it isn't a hardware problem).  Only in Gentoo on this machine am I running into this oddness.  Is there a trivial fix for this?  Is there some elementary setting in a config file somewhere that I screwed up?

----------

## mrchuckles

Sounds like a DNS issue.  Check to be sure that you're using the same DNS servers as the other PCs on your network.  Also, try commenting out the 'search' line in /etc/resolv.conf.

Are you running a Linksys router?  If so, what version of firmware are you using?

----------

## DaleNixon

It's definitely a DNS issue.  When I pinged yahoo's IP address, the results came immediately.  ping www.yahoo.com still hung for 5 seconds.  I tried commenting out the search line in resolv.conf, but it didn't fix the problem.  I saw some DNS servers listed in that file, but my other two machines (macs running OSX) have nothing listed for DNS Servers (the box says optional).  The other Gentoo machine (an ibook g3/300) is busy compiling xfree and gnome right now, so I'll wait until later to check its resolv.conf.  My linksys router's firmware version isn't reported anywhere in the settings as far as I can see.  I upgraded the firmware over a year ago.  Maybe it's time to check their site?

----------

## mrchuckles

The firmware version for your Linksys router should be listed on the 'Status' page in the web-based management screen.  The status page will also list the DNS servers assigned to you by your broadband company's DHCP server.  Make sure those DNS servers match the ones listed in  your /etc/resolv.conf.  Do you have a local DNS server running on your box?

Don't upgrade your routers firmware.  The newer firmware versions from Linksys for their 4-port switch routers are terrible.  If you have one of these routers, make sure you're running the v1.40.2 firmware.  I've seen the newer versions cause problems similar to yours.

----------

## DaleNixon

Oh great!  My firmware version is 1.42.3.  And this problem is occuring on my other Gentoo machine as well.  Anybody have the old firmware?  Can I flash back?  Is there a fix?

----------

## DaleNixon

Why did this problem only recently pop up?  It used to not be there.  And I updated my firmware back in January.

----------

## mrchuckles

 *Quote:*   

> Anybody have the old firmware? Can I flash back? Is there a fix?

 

Yes, you can get the old firmware from the Linksys FTP site.  Assuming you're running a BEFSR series router...

ftp://ftp.linksys.com/pub/befsr41/befsr-fw1402.zip

The flash happens via tftp, so you should be able to run it under Linux.  I've never tried it, though.  I just use the included program and run it from my wife's PC.

 *Quote:*   

> Why did this problem only recently pop up? It used to not be there. And I updated my firmware back in January.

 

Dunno.  I've read the problems stem from incompatibilities between the firmware on the router and your ISPs DHCP server.  Maybe your ISP upgraded their DHCP server, or changed some settings.

----------

## DaleNixon

This problem only happens in Gentoo though.  Is this a linksys router/my isp/Gentoo problem?  No DNS problems are evident in Win2000 or MacOSX behind the same router.

----------

## mrchuckles

 *Quote:*   

> This problem only happens in Gentoo though. Is this a linksys router/my isp/Gentoo problem? No DNS problems are evident in Win2000 or MacOSX behind the same router.

 

It's probably a misconfiguration of your DNS in Gentoo, but it wouldn't hurt to put your router to a proper firmware version.  My only other idea at the moment is that you have an invalid DNS server listed in your resolv.conf.  Do an 'ipconfig /all' under Win2k, write down the DNS servers listed, and check those against your '/etc/resolv.conf' in Gentoo.

----------

## DaleNixon

I downgraded my firmware to the proper version (1.40.2), and I did an ipconfig /all in Windows2000...  Those DNS server IPs match the ones in /etc/resolv.conf.  It still takes about 5 seconds to resolve a host name in Gentoo (on the two different Gentoo installs I run)!  This is a very annoying problem and it is brand new.  Does anybody have any ideas?

----------

## DaleNixon

It must not be the router at all.  I hooked the cable modem DIRECTLY to the Gentoo box, and the same exact symptoms are there.  Same goes for my other two Gentoo boxes.  This is becoming extremely frustrating.  Has anyone out there dealt with anything like this?

----------

## mrchuckles

Check your '/etc/nsswitch.conf', and ensure that 'hosts' and 'networks' are set to 'files dns'.  Check your '/etc/hosts' file for anything that looks funny.  Is this a hardware problem, or are you running Windows 2000 on the same box?  Are you running any network services on this machine?  Samba, Apache, BIND, etc?  Try disabling them and see what happens.

You could also try troubleshooting at the packet level using ethereal.  This will give you an idea of where you're machine is trying to send packets.

----------

## DaleNixon

Thanks for all your help mrchuckles.  I finally found the problem.  I did an nslookup in OSX on www.yahoo.com (what ebuild contains nslookup?).  The first line of output was

```
*** Can't find server name for address 68.11.16.30: Timed out
```

I looked at resolv.conf again in Gentoo.  Of the two DNS's listed, one of them was 68.11.16.30.  I commented that one out.  I did a ping www.yahoo.com, and the results came back right away!  Just for the hell of it, I commented out the good DNS and uncommented 68.11.16.30 and tried again.  The request timed out.  So I set it back to the bad one being commented out and the good one uncommented.  My problem is gone now!  I lost my connection last night for about 5 hours.  I hope they are trying to fix the bad DNS.  Bite my shiny, metal ass!

----------

## mrchuckles

Thanks, I'm glad you got it figured out.  It's strange that the timeout for DNS queries on Gentoo was so long compared to OSX.

 *Quote:*   

> what ebuild contains nslookup?

 

nslookup as been depreciated in favor of dig.  However, both are in bind-tools.

----------

