Very slow network response time - only on linux box
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Very slow network response time - only on linux box
Hello!
It's been a while since I posted on a linux forum, so please tell me if I left out any vital information. Found no answer by myself for a long time, so I figured it's worth asking for advice.
I've noticed over the past few months that my internet connection speed (D/Ls, browsing) are getting incredibly slow, but only on my linux box (my laptop, for instance, is fine - in fact, I'm dual-booting with WinXP and it isn't happening there, so I think I've managed to narrow it down to the OS alone):
Code:
uname -a
Linux PC 2.6.27-1-mepis-smp #1 SMP PREEMPT Fri Jan 8 13:33:17 EST 2010 i686 GNU/Linux
It seems to me this only happens when DNS is involved - I get very very slow responses when dealing with a URL instead of a direct IP address (pinging or tracing, for example (same goes for simple web browsing - replacing the URL with the server's IP seems much quicker)).Like I said, this doesn't happen on my Windows system (same machine) or my laptop. Some output:
root@Mepis:/# ping www.linuxquestions.org -c 10
PING www.linuxquestions.org (75.126.162.205) 56(84) bytes of data.
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=1 ttl=47 time=194 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=2 ttl=47 time=192 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=3 ttl=47 time=199 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=4 ttl=47 time=201 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=5 ttl=47 time=208 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=6 ttl=47 time=210 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=7 ttl=47 time=197 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=8 ttl=47 time=193 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=9 ttl=47 time=209 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_seq=10 ttl=47 time=207 ms
--- www.linuxquestions.org ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 46961ms
rtt min/avg/max/mdev = 192.591/201.431/210.705/6.752 ms
root@Mepis:/# ping 75.126.162.205 -c 10
PING 75.126.162.205 (75.126.162.205) 56(84) bytes of data.
64 bytes from 75.126.162.205: icmp_seq=1 ttl=47 time=201 ms
64 bytes from 75.126.162.205: icmp_seq=2 ttl=47 time=202 ms
64 bytes from 75.126.162.205: icmp_seq=3 ttl=47 time=232 ms
64 bytes from 75.126.162.205: icmp_seq=4 ttl=47 time=222 ms
64 bytes from 75.126.162.205: icmp_seq=5 ttl=47 time=217 ms
64 bytes from 75.126.162.205: icmp_seq=6 ttl=47 time=202 ms
64 bytes from 75.126.162.205: icmp_seq=7 ttl=47 time=193 ms
64 bytes from 75.126.162.205: icmp_seq=8 ttl=47 time=201 ms
64 bytes from 75.126.162.205: icmp_seq=9 ttl=47 time=202 ms
64 bytes from 75.126.162.205: icmp_seq=10 ttl=47 time=199 ms
--- 75.126.162.205 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9038ms
rtt min/avg/max/mdev = 193.307/207.615/232.223/11.659 ms
root@Mepis:/# tracert www.linuxquestions.org
traceroute to www.linuxquestions.org (75.126.162.205), 30 hops max, 40 byte packets
1 BB-152-60.018.net.il (91.205.152.60) 17.268 ms 17.608 ms *
2 * * *
3 * * *
4 * * *
5 * * *
6 * ge2-0.gw1.ptk.nv.net.il (212.143.10.209) 28.673 ms 33.797 ms
7 * * *
8 * * *
9 * * *
10 * * *
11 * * vlan69.csw1.Frankfurt1.Level3.net (4.68.23.62) 80.255 ms
12 ae-62-62.ebr2.Frankfurt1.Level3.net (4.69.140.17) 83.185 ms * *
13 * * *
14 * * *
15 * * *
16 * * *
17 * ae-7.ebr3.Dallas1.Level3.net (4.69.134.21) 204.299 ms 204.281 ms
18 ae-1-60.edge3.Dallas1.Level3.net (4.69.145.8) 196.419 ms 196.768 ms 196.777 ms
19 te2-1.cer01.dal01.dallas-datacenter.com (4.71.198.18) 197.268 ms 197.274 ms 198.667 ms
20 * * *
21 po1.fcr02.dal01.dallas-datacenter.com (66.228.118.178) 203.573 ms 203.573 ms *
22 www.linuxquestions.org (75.126.162.205) 202.069 ms * *
Connected by ethernet to my TP-Link router (WR641G) => to the modem => to the ISP using L2TP. Even though this only occurs on this OS I made sure - no packet loss, no ethernet card (or PCI bus) errors in logs or in ifconfig.
If this was an ISP issue then it would not have had an effect only on my Linux OS; same goes for router, cables or ethernet card.
This must be simple but I'm afraid I have little knowledge in networking, and unfortunately I'm now a student so I have very little time to dig up info and mess things up - losing my internet connection = no grades = no diploma.
Thanks in advance! All replies will be appreciated.
Can you give some info on your linux distribution, and your network configuration, that is, have you set your IP address locally to be static for some reason?
I'm running Mepis 8, kernel version 2.6.27-1. Getting the IP from the router (set as gateway) by DHCP (just like the two other systems). I'm using address reservation for this specific MAC address to allow port forwarding (had a few ports opened in iptables but that's about it).
I might as well mention: /etc/resolve.conf was updated to be:
Why have you the nameserver of your ISP in /etc/resolv.conf? I'm not sure I get what you're trying to achieve. Is it not simpler to allow the router to handle external DNS for you? This will probably solve your speed issue. Try commenting out the second nameserver in /etc/resolv.conf, then reload your net connection.
This was a few months back, when I had to set up the network in a haste - there might have been an original DNS problem, I honestly can't remember. It seems that resolv.conf is run over with these nameservers whenever I restart the network services, so I must have hard-coded it somewhere; still trying to figure out where... :-| I'll update as soon as I find out where I messed up.
Can this explain the long response times? Why would it matter if the machine simply uses the external DNS, instead of going through the router (which uses it anyway)?
Solved.
Something weird with Mepis's network manager - it kept updating resolv.conf with these addresses even after I removed them manually. Reset everything, set to DHCP and restarted the network services - it now only uses the ISP nameservers and everything works fine. My mistake, as always. :-)
Glad you got sorted vodyle, good stuff! Can you remember where you hardcoded the initial resolv.conf file? How did you solve your issue, did you find the script you had hardcoded and change it, or what? Just to give more info for anyone who finds this thread. Cheers! :-D
Took me a while to reply, sorry.
ericsully - thanks for the link! I'll check it out.
It seems I didn't hard-code anything, apparently I wasn't THAT much in a rush. Something weird with Mepis' Network Assistant; I entered these addresses as static in the past (so not to get them from the router), but after switching back to "Use DHCP for DNS" it kept updating resolv.conf with them anyway (something similar happened to me in Mepis 7). After erasing them from the "Static" mode, switching back to DHCP and applying, things now work fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.