- resolving websites takes too long
- Posted by johnny bobby bee on January 22nd, 2004
hey group,
i'm a bit stuck here. i've got an SMC7004VBR firewall/nat router that provides
dhcp/dns services to 3 pc's on my network. i've got a Mac OS X box and a
Windows XP box that have no problems when surfing (pages load instantly).
but on many occasions on my Linux (Mandrake 9.1) box, pages sometimes take
10+ seconds to load. this is with an ADSL connection. the status bar on
the bottom of the browser will say "resolving host slashdot.org" and will
stay that way for a few seconds then "transmitting" then "resolving" back
and forth for 10 seconds or more sometimes.
contents of /etc/resolv.conf:
cat /etc/resolv.conf
nameserver 192.168.2.1
(the above is the IP address of the SMC router)
i've tried adding other dns servers to /etc/dhclient.conf:
cat /etc/dhclient.conf
append domain-name-servers 137.82.1.1, 142.103.1.1;
(which are 2 dns servers of our local university. it doesn't seem to make
any difference.)
i've tried various combination(s) of starting/stopping services:
/etc/rc.d/init.d/network
/etc/rc.d/init.d/internet
killall dhclient
starting dhclient with 'dhclient'
the 2 other PC's never have the 'resolving' problem.
any other suggestions?
--
- Linux: the choice of a GNU generation
- free; as in free speech and free beer
remove '.eh' to email
- Posted by Noi on January 23rd, 2004
On Thu, 22 Jan 2004 18:24:35 +0000, johnny bobby bee thoughtfully wrote:
Compare the mtu sizes on the linux to the mtu sizes on the XP and Mac.
$ ifconfig /all
--
------------------------------------------------------
Linux registered user #302812
using Fedora Core 1 kernel 2.4.22-1.2149.nptl
------------------------------------------------------
- Posted by johnny bobby bee on January 23rd, 2004
Noi typed:
i'm not sure if you meant 'ipconfig /all' for the XP box, but wha'ts
'ifconfig /all' on linux?
anyway - the mtu's are:
linux: 1500
mac: 1280
xp: got nothing with 'ipconfig /all' - no mtu.
i'm not sure i know what this tells me?
maximum transmittion unit?
maximum transfer unit?
all i know is the linux box continues to take forever to resolve websites.
--
- Linux: the choice of a GNU generation
- free; as in free speech and free beer
remove '.eh' to email
- Posted by Ed Murphy on January 23rd, 2004
On Thu, 22 Jan 2004 18:24:35 +0000, johnny bobby bee wrote:
Add them to /etc/resolv.conf as well, and put them above 192.168.2.1
(since that one seems to be slow to respond). That might clear up
the speed issue.
- Posted by johnny bobby bee on January 23rd, 2004
Ed Murphy typed:
i've tried that, didn't work. not to mention 192.168.2.1 is all i have on
the other 2 PC's and it's not slow to resolve there.
--
- Linux: the choice of a GNU generation
- free; as in free speech and free beer
remove '.eh' to email
- Posted by johnny bobby bee on January 24th, 2004
surely somebody must have some other idea? anybody?
i'm dying here!
just last week everything wask ok. now over 10+ seconds for some websites
to appear. there must be a config file somewhere that may have gotten
corrupted. sometimes my /etc/hosts file gets written over. by what, i
don't know, it just does. maybe there's some other file gone wacko?
--
- Linux: the choice of a GNU generation
- free; as in free speech and free beer
remove '.eh' to email
- Posted by vturner on January 24th, 2004
johnny bobby bee wrote:
Dig will show you the query time for the lookup. This may help you confirm
it really is a lookup problem. The output will also show the DNS server
actually used. Make sure it's the one you intended. Dig should work on
Mac OSX as well (you're stuck with nslookup on windows which doens't show
as much info). You might want to compare and contrast the output of dig on
your Mac OSX and your linux box to see if there are any obvious
differences.
- Posted by Noi on January 24th, 2004
On Fri, 23 Jan 2004 07:23:23 +0000, johnny bobby bee thoughtfully wrote:
I thought maybe you could try lowering the mtu size on the Linux box. I
had problems when I switched DSL providers and I had to manually switch
mtu size on my Linux box.
$ ping -c 10 www.yahoo.com
$ ifconfig eth0 mtu 1492
$ ping -c 10 www.yahoo.com
$ ifconfig eth0 mtu 1454
$ ping -c 10 www.yahoo.com
$ ifconfig eth0 mtu 1280
$ ping -c 10 www.yahoo.com
Not all sites ping back but Yahoo does but better to test with a problem
website as long as you know pings to the site work on the Mac or Windows
box.
I had my .bashrc set the mtu size on login.
--
------------------------------------------------------
Linux registered user #302812
using Fedora Core 1 kernel 2.4.22-1.2149.nptl
------------------------------------------------------
- Posted by General Schvantzkoph on January 24th, 2004
On Thu, 22 Jan 2004 18:24:35 +0000, johnny bobby bee wrote:
Set up BIND on your system and then put 12.0.0.1 at the top of list in
/etc/resolve.com.
- Posted by John-Paul Stewart on January 24th, 2004
Noi wrote:
[snip]
It would be better to find where the MTU is set in the first place.
~/.bashrc is *not* the right place to do it. The system will have the
wrong MTU whenever you're not logged in.
There might be settings in /etc/sysconfig/<something> on RH-type distros
or you might want to directly edit the scripts that start networking
(/etc/init.d/networking or similar), regardless of distro. That's a
much more suitable place for modifying the MTU than ~/.bashrc.
- Posted by johnny bobby bee on January 24th, 2004
John-Paul Stewart typed:
thanks to both of you for still trying to help.
for anyone else still wishing to chime in with any other helpful
suggestion, i have one more development:
with the ethernet cable coming straight from the ADSL modem and not
through the router, the 'resolve' problem does NOT occur. websites render
and download instantly.
the only thing that has changed (that i can tell) is /etc/resolv.conf.
/etc/resolv.conf (through router):
nameserver 192.168.2.1 (router IP address)
/etc/resolv.conf (straight through ADSL modem):
search bc.hsia.telus.net
nameserver 209.53.4.130
nameserver 209.53.4.150
nameserver 207.102.99.66
nameserver 207.102.99.82
nameserver 209.53.4.130
nameserver 209.53.4.150
nameserver 207.102.99.66
nameserver 207.102.99.82
(i don't know why the 4 dns servers are duplicated?)
i've tried hooking up through the router and adding the above info into
/etc/dhclient.conf:
prepend domain-name-servers 209.53.4.130, 209.53.4.150, 207.102.99.66, 207.102.99.82;
supersede domain-name "bc.hsia.telus.net";
it doesn't seem to make any difference. resolving almost any website still
takes a good 8-12 seconds.
i'm not convinced it's a router problem because the other 2 PC's both go
through the router and they have no problem resolving websites.
anyone have any (wild) suggestions?
--
- Linux: the choice of a GNU generation
- free; as in free speech and free beer
remove '.eh' to email
- Posted by Noi on January 25th, 2004
On Sat, 24 Jan 2004 22:28:20 +0000, johnny bobby bee thoughtfully wrote:
fine for single user system otherwise I suggest placement in your favorite
/etc/rc.d script.
That's interesting. Someone else had a communication block through the
router. I suggested the they set the NIC speed from 100mbps to 10mbps,
in that case or from 10 to 100 because some routers operate at the
lowest common port speed. At a loss as to how to do that on Linux this
minute.
--
------------------------------------------------------
Linux registered user #302812
using Fedora Core 1 kernel 2.4.22-1.2149.nptl
------------------------------------------------------
- Posted by s. keeling on January 29th, 2004
On Sat, 24 Jan 2004 06:41:20 GMT, johnny bobby bee <useraddshine.eh@yahoo.ca.eh>:
Look around for maradns and run it as a caching nameserver. It's very
easy to use.
--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling
- - Spammers! http://www.spots.ab.ca/~keeling/spammers.html
http://learn.to/quote http://www.netmeister.org/news/learn2quote.html