Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DNS issue - ipv6 disabled - but "not really"?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
alashain
n00b
n00b


Joined: 26 Nov 2010
Posts: 16

PostPosted: Fri Nov 26, 2010 1:14 am    Post subject: DNS issue - ipv6 disabled - but "not really"? Reply with quote

Hey...

I am experiencing very slow DNS lookups with most software.
I have uncommented the line in aliases.conf to make it not load ipv6.

To reproduce my issues, I run the following four commands:
Code:
wget -4 google.ch
wget google.ch
wget -6 google.ch


wget -6 fails instantly. "Name or service not known"

wget works, but it takes ages to resolve the DNS (lynx, python etc operate equally slowly)
tcpdump:
Code:
wget google.ch - SLOW
03:47:38.540987 IP 192.168.0.44.57293 > 208.67.222.222.domain: 47030+ A? google.ch. (27)
03:47:38.541033 IP 192.168.0.44.57293 > 208.67.222.222.domain: 50058+ AAAA? google.ch. (27)
03:47:38.679959 IP 208.67.222.222.domain > 192.168.0.44.57293: 47030 6/0/0 A 209.85.135.105, A 209.85.135.147, A 209.85.135.104, A 209.85.135.106, A 209.85.135.103, A 209.85.135.99 (123)
03:47:43.541344 IP 192.168.0.44.57293 > 208.67.222.222.domain: 47030+ A? google.ch. (27)
03:47:43.591126 IP 208.67.222.222.domain > 192.168.0.44.57293: 47030 6/0/0 A 209.85.135.103, A 209.85.135.99, A 209.85.135.105, A 209.85.135.147, A 209.85.135.104, A 209.85.135.106 (123)
03:47:43.591224 IP 192.168.0.44.57293 > 208.67.222.222.domain: 50058+ AAAA? google.ch. (27)
03:47:48.546332 IP 192.168.0.44.34923 > 208.67.222.222.domain: 47030+ A? google.ch. (27)
03:47:48.598239 IP 208.67.222.222.domain > 192.168.0.44.34923: 47030 6/0/0 A 209.85.135.106, A 209.85.135.103, A 209.85.135.99, A 209.85.135.105, A 209.85.135.147, A 209.85.135.104 (123)
03:47:48.598386 IP 192.168.0.44.49531 > 208.67.222.222.domain: 50058+ AAAA? google.ch. (27)
03:47:48.651400 IP 208.67.222.222.domain > 192.168.0.44.49531: 50058 0/0/0 (27)
03:47:48.740217 IP 192.168.0.44.59166 > 208.67.222.222.domain: 6965+ A? www.google.ch. (31)
03:47:48.740308 IP 192.168.0.44.59166 > 208.67.222.222.domain: 57338+ AAAA? www.google.ch. (31)
03:47:48.793031 IP 208.67.222.222.domain > 192.168.0.44.59166: 6965 8/0/0 CNAME www.google.com., CNAME www.l.google.com., A 209.85.135.105, A 209.85.135.106, A 209.85.135.147, A 209.85.135.103, A 209.85.135.99, A 209.85.135.104 (175)
03:47:53.745115 IP 192.168.0.44.59166 > 208.67.222.222.domain: 6965+ A? www.google.ch. (31)
03:47:53.808854 IP 208.67.222.222.domain > 192.168.0.44.59166: 6965 8/0/0 CNAME www.google.com., CNAME www.l.google.com., A 209.85.135.105, A 209.85.135.103, A 209.85.135.106, A 209.85.135.104, A 209.85.135.147, A 209.85.135.99 (175)
03:47:53.808949 IP 192.168.0.44.59166 > 208.67.222.222.domain: 57338+ AAAA? www.google.ch. (31)
03:47:58.750016 IP 192.168.0.44.39893 > 208.67.222.222.domain: 6965+ A? www.google.ch. (31)
03:47:58.803568 IP 208.67.222.222.domain > 192.168.0.44.39893: 6965 8/0/0 CNAME www.google.com., CNAME www.l.google.com., A 209.85.135.103, A 209.85.135.106, A 209.85.135.104, A 209.85.135.147, A 209.85.135.99, A 209.85.135.105 (175)
03:47:58.803713 IP 192.168.0.44.44544 > 208.67.222.222.domain: 57338+ AAAA? www.google.ch. (31)
03:47:58.856832 IP 208.67.222.222.domain > 192.168.0.44.44544: 57338 2/0/0 CNAME www.google.com., CNAME www.l.google.com. (79)


wget -4 on the other hand is blazing fast.
Code:
wget -4 google.ch
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
03:49:22.391389 IP 192.168.0.44.40402 > 208.67.222.222.domain: 4493+ A? google.ch. (27)
03:49:22.441822 IP 208.67.222.222.domain > 192.168.0.44.40402: 4493 6/0/0 A 209.85.135.147, A 209.85.135.104, A 209.85.135.106, A 209.85.135.103, A 209.85.135.99, A 209.85.135.105 (123)
03:49:22.442331 IP 192.168.0.44.48135 > 208.67.222.222.domain: 3492+ A? google.ch. (27)
03:49:22.495850 IP 208.67.222.222.domain > 192.168.0.44.48135: 3492 6/0/0 A 209.85.135.147, A 209.85.135.104, A 209.85.135.106, A 209.85.135.103, A 209.85.135.99, A 209.85.135.105 (123)
03:49:22.587761 IP 192.168.0.44.46082 > 208.67.222.222.domain: 16837+ A? www.google.ch. (31)
03:49:22.641294 IP 208.67.222.222.domain > 192.168.0.44.46082: 16837 8/0/0 CNAME www.google.com., CNAME www.l.google.com., A 209.85.135.103, A 209.85.135.106, A 209.85.135.104, A 209.85.135.147, A 209.85.135.99, A 209.85.135.105 (175)
03:49:22.641664 IP 192.168.0.44.35000 > 208.67.222.222.domain: 45549+ A? www.google.ch. (31)
03:49:22.697709 IP 208.67.222.222.domain > 192.168.0.44.35000: 45549 8/0/0 CNAME www.google.com., CNAME www.l.google.com., A 209.85.135.103, A 209.85.135.106, A 209.85.135.104, A 209.85.135.147, A 209.85.135.99, A 209.85.135.105 (175)


Why would setting -4 explicitly be any different from running wget without the -4 switch? I mean ipv6 seems to be disabled, but why doesn't it behave the same way then?

Any ideas?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Nov 26, 2010 3:13 am    Post subject: Reply with quote

See options single-request

Show your /etc/resolv.conf - I run bind (and I suggest you do too), so mine is:
nameserver 127.0.0.1
Back to top
View user's profile Send private message
alashain
n00b
n00b


Joined: 26 Nov 2010
Posts: 16

PostPosted: Fri Nov 26, 2010 3:44 am    Post subject: Reply with quote

Code:
# Generated by resolvconf
nameserver 208.67.222.222
nameserver 208.67.220.220


after putting these lines into resolve.conf.tail - they appear in resolve.conf. I'm not sure, but I believe it is faster now. But still in the 5 second range per DNS like that


Bind,... wouldn't that mean to run my own DNS Server...I mean wouldn't that over overkill?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Nov 26, 2010 5:57 am    Post subject: Reply with quote

BIND isn't overkill if one is sick 'n' tired of various ISPs' crappy nameservers.

But, if BIND offends thee, use dnsmasq as a compromise.

The file is resolv.conf - remove the "e" - the BSD designers were crappy spellers ;)
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Fri Nov 26, 2010 9:41 am    Post subject: Reply with quote

DJBDNS is pretty cool too as a caching DNS server.
Back to top
View user's profile Send private message
alashain
n00b
n00b


Joined: 26 Nov 2010
Posts: 16

PostPosted: Sun Nov 28, 2010 9:45 pm    Post subject: Reply with quote

Well.. I installed bind.. had to adjust some permissions now it works like a charm.
Thanks a lot for the suggestion.

Am I ok with just running this default config? Or should I adjust something?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Mon Nov 29, 2010 2:14 am    Post subject: Reply with quote

We're not mindreaders - show what you changed, and your current config.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum