You are not logged in.

#1 2011-03-01 00:52:03

mpz
Member
Registered: 2010-10-14
Posts: 54

[SOLVED] Slow connections on eth0

This is going to be vague so I apologize in advance.

For whatever reason, our internal network (managed by Cimco) seems to be prejudice towards Linux machines. Both my Arch x64 workstation and Ubuntu x64 laptop experience long connection times:

PING google.com (74.125.225.18) 56(84) bytes of data.
64 bytes from 74.125.225.18: icmp_req=1 ttl=55 time=6.71 ms
64 bytes from 74.125.225.18: icmp_req=2 ttl=55 time=10.1 ms
64 bytes from 74.125.225.18: icmp_req=3 ttl=55 time=6.91 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 10060ms
rtt min/avg/max/mdev = 6.716/7.943/10.197/1.598 ms

Yet when I disconnect eth0 and use wlan0, no such problems:

PING google.com (74.125.225.20) 56(84) bytes of data.
64 bytes from 74.125.225.20: icmp_req=1 ttl=55 time=10.0 ms
64 bytes from 74.125.225.20: icmp_req=2 ttl=55 time=11.6 ms
64 bytes from 74.125.225.20: icmp_req=3 ttl=55 time=11.7 ms

--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 10.018/11.134/11.738/0.794 ms

When I first built the machine at home, I never had slow connection. At our office however, both Linux machines have always been this slow. I even tried spoofing MAC address thinking that gateway tied my box to an IP, but to no avail. My colleagues use Macs and Windows, no such problems. Since our network is managed by third party, I have no access to the router and the firewall. I know for a fact Cimco does not log on the router anyway.

I realize this isn't much to go of but any ideas how to trace the problem?
Thanks!

Last edited by mpz (2011-03-01 15:22:24)

Offline

#2 2011-03-01 03:40:05

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [SOLVED] Slow connections on eth0

I've seen this very-slow-to-connect behavior on a friend's laptop. I think it's related to the nameservers configured /etc/resolv.conf and the way Linux queries them.

Try adding 'options single-request' to your /etc/resolv.conf and see if that helps.

http://markmail.org/thread/haf7hw72huo6frdz wrote:

single-request (since glibc 2.10)

By default, glibc performs IPv4 and IPv6 lookups in parallel since +version 2.9 (though many distribution packages of glibc are known +to disable that behavior in this version). Some appliance DNS servers +cannot handle these queries properly and make the requests time out. +This option disables the behavior and makes glibc perform the IPv6 and IPv4 requests sequentially (at the cost of some slowdown of the +resolving process).

Offline

#3 2011-03-01 03:40:15

TheCox
Member
From: Orlando, FL
Registered: 2010-02-23
Posts: 34

Re: [SOLVED] Slow connections on eth0

Looks like your DNS resolution is slow. Your pings are fine. Try disabling IPv6 or using another DNS server.

Offline

#4 2011-03-01 15:21:42

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] Slow connections on eth0

Thank you both!

'options single-request' did not help
disabling ipv6 did not help
switching to google DNS solved it

Also, had to stickybit /etc/resolv.conf to prevent NetworkManager from setting nameserver to our crappy internal one.

Offline

#5 2011-03-01 21:18:37

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [SOLVED] Slow connections on eth0

A caveat: Just be aware that using google dns (or opendns) will cause poor performance for anything using a GeoDNS (such as a site using a CDN, or streaming media through akamai or limelight), as the dns query origin is now much farther from your actual network egress (geo-dns will be less correct).


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#6 2011-03-01 23:29:04

mpz
Member
Registered: 2010-10-14
Posts: 54

Re: [SOLVED] Slow connections on eth0

I don't see performance getting any poorer then the 8-10 seconds I was experiencing before. What do you recommend? Using pdnsd or dnsmasq?

Thanks

Offline

#7 2011-03-02 07:18:21

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [SOLVED] Slow connections on eth0

If you don't do streaming, or notice a significant slowdown with things like netflix (roku) or amazon streaming movies, pandora, etc... then I would say just go with it (using google dns). I only mentioned it as a caveat (something to be on the lookout for).

Alternatively (and only if really needed), I would probably recommend something like unbound if my upstream dns was flakey and I wanted to ensure I was getting reasonable geo-dns results. dnsmasq is good, but it really only caches responses it gets from upstream servers. It isn't actually a recursing server in its own right.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

Board footer

Powered by FluxBB