You are not logged in.

#1 2008-06-27 15:45:39

gnav
Member
Registered: 2008-06-27
Posts: 7

[Solved] The Internet on my new system acts wierd (slow loading o..

I'm just finnished installing Archlinux on my Dell i9300. Everything works just fine exept the Internet. It's actually really strange, because loading new sites is very slow but when the site frontpage is loaded things happens to go fast again.

IE: Load the page www.archlinux.org takes about 40 sec, while getting in to the forums; 2-5 sec.

This happens in all of the readers. And when I test my internet-connection the result is always somewhere between 10 and 11 Mbit/s.

Someone have any idea what might fix it?

Last edited by gnav (2008-06-28 10:00:27)

Offline

#2 2008-06-27 15:53:56

MilosC
Member
From: Serbia
Registered: 2008-06-04
Posts: 79

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

It smells like a bad nameserver... What is the DNS adress that you use? I would try using OpenDNS.
http://en.wikipedia.org/wiki/Domain_Name_System
http://www.opendns.com/

Offline

#3 2008-06-27 16:52:11

sam
Member
Registered: 2008-05-23
Posts: 82

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

I agree with MilosC, its probably a dns issue.  This is even more likely the issue if you are connected to a router.  Your ISP is provides [usually] working dns servers; however, the router sometimes adds an extra dns server, in case you have your own cache server (which would be slightly faster).  This isn't a problem for windows users, because if a dns server is slow or not doesn't work it will immediately switch to another one.  However, linux takes longer to timeout (which is why you are getting a delay).

To check if this is the case:
Check /etc/resolv.conf for the ip address of the servers.  Then type (in a terminal) ping <one of the ip addresses>, and see how long the responses takes.

If one of the responses takes a long time (or times out), then you can just delete it from resolve.conf.  However, depending on you network setup, the file may get rewritten every time you reconnect to the network (like when rebooting).  In that case, you can block that ip in hosts.deny, or if you use iptables, you can add a rule to block that ip (the latter is what I did).

BYTW you've got a smoking fast connecting, I'm lucky to break 1 mb.

Last edited by sam (2008-06-27 16:54:29)

Offline

#4 2008-06-27 17:30:57

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

sam wrote:

I agree with MilosC, its probably a dns issue.  This is even more likely the issue if you are connected to a router.  Your ISP is provides [usually] working dns servers; however, the router sometimes adds an extra dns server, in case you have your own cache server (which would be slightly faster).  This isn't a problem for windows users, because if a dns server is slow or not doesn't work it will immediately switch to another one.  However, linux takes longer to timeout (which is why you are getting a delay).

To check if this is the case:
Check /etc/resolv.conf for the ip address of the servers.  Then type (in a terminal) ping <one of the ip addresses>, and see how long the responses takes.

If one of the responses takes a long time (or times out), then you can just delete it from resolve.conf.  However, depending on you network setup, the file may get rewritten every time you reconnect to the network (like when rebooting).  In that case, you can block that ip in hosts.deny, or if you use iptables, you can add a rule to block that ip (the latter is what I did).

BYTW you've got a smoking fast connecting, I'm lucky to break 1 mb.

Very insightful post ^

To speed things up, use OpenDNS. Edit /etc/resolv.conf and enter the ip's of the OpenDNS servers:

nameserver 208.67.222.222
nameserver 208.67.220.220

If you are using dhcp, edit /etc/conf.d/ and make it look like this:

DHCPCD_ARGS="-R -t 30 -h $HOSTNAME"

Make sure you have the -R. This will prevent dhcpcd from dynamically creating and destroying this file, and will force it to use OpenDNS, via the IP's you specified in /etc/resolv.conf If you fail to do this, dhcpcd will overwrite your info, negating this whole exercise.

You may also specify these IP's in your router under the DNS tab, and merely point to your router's IP from /etc/resolv.conf.

Offline

#5 2008-06-27 17:39:33

gnav
Member
Registered: 2008-06-27
Posts: 7

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

MilosC: How do you check that?

sam: I'm using a router, yes. The conf-file contains three servers, but none that have over 2,6 ms latency.
         Yes, I know, and it would be nice to use some of it :-)

Offline

#6 2008-06-27 17:55:18

MilosC
Member
From: Serbia
Registered: 2008-06-04
Posts: 79

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

gnav wrote:

MilosC: How do you check that?

sam wrote:

To check if this is the case:
Check /etc/resolv.conf for the ip address of the servers.  Then type (in a terminal) ping <one of the ip addresses>, and see how long the responses takes.

It's probably there. Follow Misfit's instructions and tell us does it works.

Offline

#7 2008-06-27 17:57:20

sam
Member
Registered: 2008-05-23
Posts: 82

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

gnav wrote:

MilosC: How do you check that?

sam: I'm using a router, yes. The conf-file contains three servers, but none that have over 2,6 ms latency.
         Yes, I know, and it would be nice to use some of it :-)

Humm, thats interesting.  So it seems the servers that are assigned are up, but maybe one of the servers is not working well or has too much traffic.  Try only one server at a time and see if that makes things better (the top server is the one you computer will try first).  If that doesn't work, try the open dns servers misfit suggested.  If all that doesn't work, then the problem lies on your computer (which I'm doubting).

Note:I tried pinging my nameserver (assigned by my isp) and the open dns ones, and my dns server is almost twice as fast as the one from open dns.  The speed difference isn't very big (a few ms), but since you got a fast connection, you might as well make the most of it.

Last edited by sam (2008-06-27 18:11:56)

Offline

#8 2008-06-27 18:04:27

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

Could also be a broken ipv6 support on the router.

To check whether that's it, disable "network.dns.disableIPv6" in firefox's about:config or blacklist ipv6 module in rc.conf and/or add "alias net-pf-10 off" to /etc/modprobe.conf.

Offline

#9 2008-06-27 18:08:31

gnav
Member
Registered: 2008-06-27
Posts: 7

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

It worked when I deleted the second server in the /etc/resolv.conf. :-D

Thanks to all of you!

(Great forum btw.)

Last edited by gnav (2008-06-27 18:11:11)

Offline

#10 2008-06-27 18:25:42

sam
Member
Registered: 2008-05-23
Posts: 82

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

gnav wrote:

It worked when I deleted the second server in the /etc/resolv.conf. :-D

Thanks to all of you!

(Great forum btw.)

Now that you found the problem, you need to save you setting so you don't have to do the same thing every time you reconnect.  you can follow the second code snippet from misfit, which works good if your computer is connected to the same network.  Or if you have a laptop that you roam with, you can try what I did (assuming you have iptables setup):

Where the x's is the bad ip address

iptables  -A OUTPUT -d xxx.xxx.x.x  -j REJECT
 iptables-save>/etc/iptables/iptables.rules

The first step tells iptables to reject connections to that nameserver.  This causes the nameserver to immediately timeout.  The second step saves the iptables rule.

Offline

#11 2008-06-27 18:40:40

gnav
Member
Registered: 2008-06-27
Posts: 7

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

Done.

Thanks again!

Offline

#12 2008-06-28 01:58:51

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

Please amend [solved] to your initial post.
Glad you got it working.

Offline

#13 2009-05-19 17:33:35

o_O??
Member
From: earth
Registered: 2009-05-02
Posts: 3

Re: [Solved] The Internet on my new system acts wierd (slow loading o..

good job  cool


:cool   Arch i686   AMD4800+  ATI HD3200

Offline

Board footer

Powered by FluxBB