You are not logged in.

#1 2010-08-26 02:09:09

battlepanic
Member
Registered: 2009-08-22
Posts: 76

Establishing a connection is slow. DNS issues, maybe?

I'm setting up Arch on my system and recently reconfigured it to use a static ip as opposed to dhcp.  In /etc/resolv.conf I've assigned the dns server to be my Linksys WRT54G router at 192.168.1.1.  This is the usual address I specify as my DNS server on my Windows XP systems and it seems to work.

In this configuration, Arch takes a very long time to establish a connection with a remote host.  Running 'w3m google.com' takes at least 15 seconds before google will actually load.  However, entering something like 'w3m 72.14.204.147' doesn't seem to cause a delay when I type in an ip address as opposed to a domain name.  It should also be noted that the slow connection is not limited to w3m.  Pacman is quite slow when establishing a connection with a download mirror.  Once a connection is established, transfer speeds are normal.

w3m google.com       # very, very slow
w3m 72.14.204.147    #very fast
pacman -Sy           #also very slow

Interestingly, ping and dig both seem to run well and can resolve domain names instantly.

I had read that the ipv6 kernel module can create problems on some systems, but disabling ipv6 seems to have no effect.  Editing resolv.conf to point to another nameserer, like Google's at 8.8.8.8 does solve the issue, but I'd like to know why things are so slow when using my Linksys router as my DNS server.  In the past this configuration always worked quite well on my Windows system.  Any thoughts or suggestions would be greatly appreciated

Offline

#2 2010-08-26 02:35:56

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Establishing a connection is slow. DNS issues, maybe?

What is the contents of /etc/resolv.conf and /etc/nsswitch.conf?
What is the output of:

dig www.google.com @192.168.1.1
dig www.google.com @8.8.8.8

Offline

#3 2010-08-26 18:50:43

battlepanic
Member
Registered: 2009-08-22
Posts: 76

Re: Establishing a connection is slow. DNS issues, maybe?

Current contents of my /etc/resolv.conf:

# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
nameserver 8.8.8.8
# /etc/resolv.conf.tail can replace this line

Current contents of my /etc/nsswitch.conf:

# Begin /etc/nsswitch.conf

passwd: files
group: files
shadow: files

publickey: files

hosts: files dns
networks: files

protocols: files
services: files
ethers: files
rpc: files

netgroup: files

# End /etc/nsswitch.conf

Output of 'dig www.google.com' after setting the nameserver to 192.168.1.1 in /etc/resolv.conf:

; <<>> DiG 9.7.1-P2 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44262
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         8266    IN      CNAME   www.l.google.com.
www.l.google.com.       206     IN      A       72.14.204.103
www.l.google.com.       206     IN      A       72.14.204.104
www.l.google.com.       206     IN      A       72.14.204.147
www.l.google.com.       206     IN      A       72.14.204.99

;; Query time: 9 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Aug 26 02:47:53 2010
;; MSG SIZE  rcvd: 116

Output of 'dig www.google.com' after setting the nameserver to 8.8.8.8 in /etc/resolv.conf:

; <<>> DiG 9.7.1-P2 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57220
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         86399   IN      CNAME   www.l.google.com.
www.l.google.com.       299     IN      A       72.14.204.99
www.l.google.com.       299     IN      A       72.14.204.104
www.l.google.com.       299     IN      A       72.14.204.103
www.l.google.com.       299     IN      A       72.14.204.147

;; Query time: 79 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Thu Aug 26 02:48:43 2010
;; MSG SIZE  rcvd: 116

Offline

#4 2010-08-26 23:07:14

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Establishing a connection is slow. DNS issues, maybe?

battlepanic wrote:

Output of 'dig www.google.com' after setting the nameserver to 192.168.1.1 in /etc/resolv.conf:

; <<>> DiG 9.7.1-P2 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44262
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         8266    IN      CNAME   www.l.google.com.
www.l.google.com.       206     IN      A       72.14.204.103
www.l.google.com.       206     IN      A       72.14.204.104
www.l.google.com.       206     IN      A       72.14.204.147
www.l.google.com.       206     IN      A       72.14.204.99

;; Query time: 9 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Aug 26 02:47:53 2010
;; MSG SIZE  rcvd: 116

Doesn't seem to be a DNS issue -- those queries returned in excellent time. Perhaps run a tcpdump while you try running w3m

tcpdump -lnn -ttt -i eth0 port 80 and port 53

Offline

#5 2010-08-27 00:06:27

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: Establishing a connection is slow. DNS issues, maybe?

it could be that the router is not caching the dns queries by itself and has to repeat dns queries for every request, if pointing to another nameserver (google,opendns) works, try adding a caching server like dnsmasq to your system and pointing resolv.conf to 127.0.0.1, see if it solves the delay problems.

Offline

#6 2010-08-27 15:06:40

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Establishing a connection is slow. DNS issues, maybe?

Sin.citadel wrote:

it could be that the router is not caching the dns queries by itself and has to repeat dns queries for every request, if pointing to another nameserver (google,opendns) works, try adding a caching server like dnsmasq to your system and pointing resolv.conf to 127.0.0.1, see if it solves the delay problems.

But better add the entries to resolv.conf.head. The router ip will still be added to resolv.conf and somehow if the router sometimes takes more time to resolve an address things can still be slow sometimes (when using dnsmasq). Either that or I'm missing some configuration option in my dnsmasq.conf hmm

Also the router is probably not repeating the query but just applying some iptables-fu to rewrite it's IP address with the IP address of the DNS server configured in the router thus just passing the query along (I think). The easiest solution is to configure statically fast DNS servers in the router.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#7 2010-08-27 16:09:35

vacant
Member
From: downstairs
Registered: 2004-11-05
Posts: 816

Re: Establishing a connection is slow. DNS issues, maybe?

The routers I've used don't cache, they just forward. Anyway resolv.conf was 8.8.8.8 thus bypassing the router.

Other fast DNS to try: 156.154.70.1, 156.154.71.1

Long shots not mentioned yet:

1) reduce MTU
2) disable IPV6

Offline

#8 2010-08-27 16:35:44

battlepanic
Member
Registered: 2009-08-22
Posts: 76

Re: Establishing a connection is slow. DNS issues, maybe?

fukawi2 wrote:

Doesn't seem to be a DNS issue -- those queries returned in excellent time. Perhaps run a tcpdump while you try running w3m

tcpdump -lnn -ttt -i eth0 port 80 and port 53

I ran tcpdump and then at another terminal I entered:

w3m google.com

but the tcpdump incantation you suggested didn't produce output.  I changed it to what I think you meant:

tcpdump -lnn -ttt -i eth0 port 80 or port 53

Running the test again, first with /etc/resolv.conf set to 192.168.1.1 (my Linksys WRT54G router):

00:00:00.000000 IP 192.168.1.20.35803 > 192.168.1.1.53: 59420+ A? google.com. (28)
00:00:00.000279 IP 192.168.1.20.35803 > 192.168.1.1.53: 22568+ AAAA? google.com. (28)
00:00:00.011022 IP 192.168.1.1.53 > 192.168.1.20.35803: 59420 4/0/0 A 72.14.204.99, A 72.14.204.147, A 72.14.204.103, A 72.14.204.104 (92)
00:00:04.993094 IP 192.168.1.20.35803 > 192.168.1.1.53: 59420+ A? google.com. (28)
00:00:00.001316 IP 192.168.1.1.53 > 192.168.1.20.35803: 59420- 1/0/0 A 72.14.204.99 (54)
00:00:00.000060 IP 192.168.1.20.35803 > 192.168.1.1.53: 22568+ AAAA? google.com. (28)
00:00:05.003101 IP 192.168.1.20.44536 > 192.168.1.1.53: 59420+ A? google.com. (28)
00:00:00.001446 IP 192.168.1.1.53 > 192.168.1.20.44536: 59420- 1/0/0 A 72.14.204.99 (54)
00:00:00.000066 IP 192.168.1.20.53609 > 192.168.1.1.53: 22568+ AAAA? google.com. (28)
00:00:05.003106 IP 192.168.1.20.47720 > 72.14.204.99.80: Flags [s], seq 738247688, win 5840, options [mss 1460,sackOK,TS val 47098956 ecr 0,nop,wscale 6], length 0
00:00:00.024873 IP 72.14.204.99.80 > 192.168.1.20.47720: Flags [S.], seq 2716635395, ack 738247689, win 5672, options [mss 1430,sackOK,TS val 1804519708 ecr 47098956,nop,wscale 6], length 0
00:00:00.000016 IP 192.168.1.20.47720 > 72.14.204.99.80: Flags [.], ack 1, win 92, options [nop,nop,TS val 47098963 ecr 1804519708], length 0
00:00:00.000137 IP 192.168.1.20.47720 > 72.14.204.99.80: Flags [P.], seq 1:184, ack 1, win 92, options [nop,nop,TS val 47098963 ecr 1804519708], length 183
00:00:00.027924 IP 72.14.204.99.80 > 192.168.1.20.47720: Flags [.], ack 184, win 106, options [nop,nop,TS val 1804519736 ecr 47098963], length 0
00:00:00.004904 IP 72.14.204.99.80 > 192.168.1.20.47720: Flags [P.], seq 1:512, ack 184, win 106, options [nop,nop,TS val 1804519741 ecr 47098963], length 511
00:00:00.000039 IP 192.168.1.20.47720 > 72.14.204.99.80: Flags [.], ack 512, win 108, options [nop,nop,TS val 47098973 ecr 1804519741], length 0
00:00:00.000160 IP 192.168.1.20.47720 > 72.14.204.99.80: Flags [F.], seq 184, ack 512, win 108, options [nop,nop,TS val 47098973 ecr 1804519741], length 0
00:00:00.000024 IP 72.14.204.99.80 > 192.168.1.20.47720: Flags [F.], seq 512, ack 184, win 106, options [nop,nop,TS val 1804519741 ecr 47098963], length 0
00:00:00.000039 IP 192.168.1.20.47720 > 72.14.204.99.80: Flags [.], ack 513, win 108, options [nop,nop,TS val 47098973 ecr 1804519741], length 0
00:00:00.000222 IP 192.168.1.20.45305 > 192.168.1.1.53: 53312+ A? www.google.com. (32)
00:00:00.000046 IP 192.168.1.20.45305 > 192.168.1.1.53: 26733+ AAAA? www.google.com. (32)
00:00:00.015952 IP 192.168.1.1.53 > 192.168.1.20.45305: 53312 5/0/0 CNAME www.l.google.com., A 72.14.204.103, A 72.14.204.147, A 72.14.204.104, A 72.14.204.99 (116)
00:00:00.013521 IP 72.14.204.99.80 > 192.168.1.20.47720: Flags [.], ack 185, win 106, options [nop,nop,TS val 1804519771 ecr 47098973], length 0
00:00:04.974538 IP 192.168.1.20.45305 > 192.168.1.1.53: 53312+ A? www.google.com. (32)
00:00:00.001302 IP 192.168.1.1.53 > 192.168.1.20.45305: 53312- 1/0/0 A 72.14.204.103 (62)
00:00:00.000052 IP 192.168.1.20.45305 > 192.168.1.1.53: 26733+ AAAA? www.google.com. (32)
00:00:05.003062 IP 192.168.1.20.51520 > 192.168.1.1.53: 53312+ A? www.google.com. (32)
00:00:00.001458 IP 192.168.1.1.53 > 192.168.1.20.51520: 53312- 1/0/0 A 72.14.204.103 (62)
00:00:00.000065 IP 192.168.1.20.55221 > 192.168.1.1.53: 26733+ AAAA? www.google.com. (32)
00:00:05.003080 IP 192.168.1.20.60214 > 72.14.204.103.80: Flags [s], seq 972929959, win 5840, options [mss 1460,sackOK,TS val 47103477 ecr 0,nop,wscale 6], length 0
00:00:00.029526 IP 72.14.204.103.80 > 192.168.1.20.60214: Flags [S.], seq 2396220745, ack 972929960, win 5672, options [mss 1430,sackOK,TS val 1794598031 ecr 47103477,nop,wscale 6], length 0
00:00:00.000015 IP 192.168.1.20.60214 > 72.14.204.103.80: Flags [.], ack 1, win 92, options [nop,nop,TS val 47103486 ecr 1794598031], length 0
00:00:00.000108 IP 192.168.1.20.60214 > 72.14.204.103.80: Flags [P.], seq 1:188, ack 1, win 92, options [nop,nop,TS val 47103486 ecr 1794598031], length 187
00:00:00.033604 IP 72.14.204.103.80 > 192.168.1.20.60214: Flags [.], ack 188, win 106, options [nop,nop,TS val 1794598065 ecr 47103486], length 0
00:00:00.010973 IP 72.14.204.103.80 > 192.168.1.20.60214: Flags [P.], seq 1:820, ack 188, win 106, options [nop,nop,TS val 1794598075 ecr 47103486], length 819
00:00:00.000038 IP 192.168.1.20.60214 > 72.14.204.103.80: Flags [.], ack 820, win 117, options [nop,nop,TS val 47103499 ecr 1794598075], length 0
00:00:00.000039 IP 72.14.204.103.80 > 192.168.1.20.60214: Flags [F.], seq 820, ack 188, win 106, options [nop,nop,TS val 1794598075 ecr 47103486], length 0
00:00:00.000138 IP 192.168.1.20.60214 > 72.14.204.103.80: Flags [F.], seq 188, ack 821, win 117, options [nop,nop,TS val 47103499 ecr 1794598075], length 0
00:00:00.000275 IP 192.168.1.20.51179 > 192.168.1.1.53: 8254+ A? www.google.ca. (31)
00:00:00.000048 IP 192.168.1.20.51179 > 192.168.1.1.53: 22564+ AAAA? www.google.ca. (31)
00:00:00.014666 IP 192.168.1.1.53 > 192.168.1.20.51179: 8254 6/0/0 CNAME www.google.com., CNAME www.l.google.com., A 72.14.204.99, A 72.14.204.147, A 72.14.204.103, A 72.14.204.104 (143)
00:00:00.020276 IP 72.14.204.103.80 > 192.168.1.20.60214: Flags [.], ack 189, win 106, options [nop,nop,TS val 1794598111 ecr 47103499], length 0
00:00:04.969793 IP 192.168.1.20.51179 > 192.168.1.1.53: 8254+ A? www.google.ca. (31)
00:00:00.001315 IP 192.168.1.1.53 > 192.168.1.20.51179: 8254- 1/0/0 A 72.14.204.99 (60)
00:00:00.000052 IP 192.168.1.20.51179 > 192.168.1.1.53: 22564+ AAAA? www.google.ca. (31)
00:00:05.003059 IP 192.168.1.20.59801 > 192.168.1.1.53: 8254+ A? www.google.ca. (31)
00:00:00.001474 IP 192.168.1.1.53 > 192.168.1.20.59801: 8254- 1/0/0 A 72.14.204.99 (60)
00:00:00.000063 IP 192.168.1.20.42824 > 192.168.1.1.53: 22564+ AAAA? www.google.ca. (31)
00:00:05.003067 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [s], seq 1198702060, win 5840, options [mss 1460,sackOK,TS val 47108004 ecr 0,nop,wscale 6], length 0
00:00:00.024810 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [S.], seq 171922725, ack 1198702061, win 5672, options [mss 1430,sackOK,TS val 1360734179 ecr 47108004,nop,wscale 6], length 0
00:00:00.000015 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [.], ack 1, win 92, options [nop,nop,TS val 47108011 ecr 1360734179], length 0
00:00:00.000102 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [P.], seq 1:187, ack 1, win 92, options [nop,nop,TS val 47108011 ecr 1360734179], length 186
00:00:00.027534 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [.], ack 187, win 106, options [nop,nop,TS val 1360734208 ecr 47108011], length 0
00:00:00.013380 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [.], seq 1:1419, ack 187, win 106, options [nop,nop,TS val 1360734220 ecr 47108011], length 1418
00:00:00.000038 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [.], ack 1419, win 136, options [nop,nop,TS val 47108023 ecr 1360734220], length 0
00:00:00.000321 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [.], seq 1419:2837, ack 187, win 106, options [nop,nop,TS val 1360734220 ecr 47108011], length 1418
00:00:00.000010 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [.], ack 2837, win 180, options [nop,nop,TS val 47108024 ecr 1360734220], length 0
00:00:00.000426 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [.], seq 2837:4255, ack 187, win 106, options [nop,nop,TS val 1360734220 ecr 47108011], length 1418
00:00:00.000043 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [.], ack 4255, win 225, options [nop,nop,TS val 47108024 ecr 1360734220], length 0
00:00:00.002646 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [P.], seq 4255:4668, ack 187, win 106, options [nop,nop,TS val 1360734220 ecr 47108011], length 413
00:00:00.000152 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [.], ack 4668, win 269, options [nop,nop,TS val 47108025 ecr 1360734220], length 0
00:00:00.019973 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [.], seq 4668:6086, ack 187, win 106, options [nop,nop,TS val 1360734244 ecr 47108023], length 1418
00:00:00.000037 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [.], ack 6086, win 313, options [nop,nop,TS val 47108031 ecr 1360734244], length 0
00:00:00.000173 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [.], seq 6086:7504, ack 187, win 106, options [nop,nop,TS val 1360734244 ecr 47108023], length 1418
00:00:00.000058 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [.], ack 7504, win 358, options [nop,nop,TS val 47108031 ecr 1360734244], length 0
00:00:00.003568 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [.], seq 7504:8922, ack 187, win 106, options [nop,nop,TS val 1360734244 ecr 47108023], length 1418
00:00:00.000036 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [.], ack 8922, win 402, options [nop,nop,TS val 47108032 ecr 1360734244], length 0
00:00:00.003933 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [FP.], seq 8922:9072, ack 187, win 106, options [nop,nop,TS val 1360734244 ecr 47108023], length 150
00:00:00.000467 IP 192.168.1.20.47722 > 72.14.204.99.80: Flags [F.], seq 187, ack 9073, win 446, options [nop,nop,TS val 47108033 ecr 1360734244], length 0
00:00:00.026092 IP 72.14.204.99.80 > 192.168.1.20.47722: Flags [.], ack 188, win 106, options [nop,nop,TS val 1360734279 ecr 47108033], length 0

70 packets captured
71 packets received by filter
0 packets dropped by kernel

And finally, running the test once more with /etc/resolv.conf set to Google's nameserver at 8.8.8.8:

00:00:00.000000 IP 192.168.1.20.34586 > 8.8.8.8.53: 28285+ A? google.com. (28)
00:00:00.000200 IP 192.168.1.20.34586 > 8.8.8.8.53: 32487+ AAAA? google.com. (28)
00:00:00.067569 IP 8.8.8.8.53 > 192.168.1.20.34586: 28285 4/0/0 A 72.14.204.99, A 72.14.204.147, A 72.14.204.104, A 72.14.204.103 (92)
00:00:00.016217 IP 8.8.8.8.53 > 192.168.1.20.34586: 32487 0/1/0 (78)
00:00:00.000141 IP 192.168.1.20.47723 > 72.14.204.99.80: Flags [s], seq 3126226208, win 5840, options [mss 1460,sackOK,TS val 47144707 ecr 0,nop,wscale 6], length 0
00:00:00.022661 IP 72.14.204.99.80 > 192.168.1.20.47723: Flags [S.], seq 693910736, ack 3126226209, win 5672, options [mss 1430,sackOK,TS val 1412429779 ecr 47144707,nop,wscale 6], length 0
00:00:00.000015 IP 192.168.1.20.47723 > 72.14.204.99.80: Flags [.], ack 1, win 92, options [nop,nop,TS val 47144714 ecr 1412429779], length 0
00:00:00.000130 IP 192.168.1.20.47723 > 72.14.204.99.80: Flags [P.], seq 1:184, ack 1, win 92, options [nop,nop,TS val 47144714 ecr 1412429779], length 183
00:00:00.025427 IP 72.14.204.99.80 > 192.168.1.20.47723: Flags [.], ack 184, win 106, options [nop,nop,TS val 1412429805 ecr 47144714], length 0
00:00:00.004427 IP 72.14.204.99.80 > 192.168.1.20.47723: Flags [P.], seq 1:512, ack 184, win 106, options [nop,nop,TS val 1412429809 ecr 47144714], length 511
00:00:00.000039 IP 192.168.1.20.47723 > 72.14.204.99.80: Flags [.], ack 512, win 108, options [nop,nop,TS val 47144723 ecr 1412429809], length 0
00:00:00.000088 IP 72.14.204.99.80 > 192.168.1.20.47723: Flags [F.], seq 512, ack 184, win 106, options [nop,nop,TS val 1412429809 ecr 47144714], length 0
00:00:00.000119 IP 192.168.1.20.47723 > 72.14.204.99.80: Flags [F.], seq 184, ack 513, win 108, options [nop,nop,TS val 47144723 ecr 1412429809], length 0
00:00:00.000211 IP 192.168.1.20.45103 > 8.8.8.8.53: 57084+ A? www.google.com. (32)
00:00:00.000045 IP 192.168.1.20.45103 > 8.8.8.8.53: 65061+ AAAA? www.google.com. (32)
00:00:00.025247 IP 72.14.204.99.80 > 192.168.1.20.47723: Flags [.], ack 185, win 106, options [nop,nop,TS val 1412429835 ecr 47144723], length 0
00:00:00.042119 IP 8.8.8.8.53 > 192.168.1.20.45103: 65061 1/1/0 CNAME www.l.google.com. (102)
00:00:00.000728 IP 8.8.8.8.53 > 192.168.1.20.45103: 57084 5/0/0 CNAME www.l.google.com., A 72.14.204.104, A 72.14.204.147, A 72.14.204.103, A 72.14.204.99 (116)
00:00:00.000113 IP 192.168.1.20.53715 > 72.14.204.104.80: Flags [s], seq 3114375189, win 5840, options [mss 1460,sackOK,TS val 47144743 ecr 0,nop,wscale 6], length 0
00:00:00.030046 IP 72.14.204.104.80 > 192.168.1.20.53715: Flags [S.], seq 252324139, ack 3114375190, win 5672, options [mss 1430,sackOK,TS val 1794734689 ecr 47144743,nop,wscale 6], length 0
00:00:00.000013 IP 192.168.1.20.53715 > 72.14.204.104.80: Flags [.], ack 1, win 92, options [nop,nop,TS val 47144752 ecr 1794734689], length 0
00:00:00.000096 IP 192.168.1.20.53715 > 72.14.204.104.80: Flags [P.], seq 1:188, ack 1, win 92, options [nop,nop,TS val 47144752 ecr 1794734689], length 187
00:00:00.033569 IP 72.14.204.104.80 > 192.168.1.20.53715: Flags [.], ack 188, win 106, options [nop,nop,TS val 1794734723 ecr 47144752], length 0
00:00:00.003707 IP 72.14.204.104.80 > 192.168.1.20.53715: Flags [P.], seq 1:820, ack 188, win 106, options [nop,nop,TS val 1794734726 ecr 47144752], length 819
00:00:00.000038 IP 192.168.1.20.53715 > 72.14.204.104.80: Flags [.], ack 820, win 117, options [nop,nop,TS val 47144764 ecr 1794734726], length 0
00:00:00.000038 IP 72.14.204.104.80 > 192.168.1.20.53715: Flags [F.], seq 820, ack 188, win 106, options [nop,nop,TS val 1794734726 ecr 47144752], length 0
00:00:00.000136 IP 192.168.1.20.53715 > 72.14.204.104.80: Flags [F.], seq 188, ack 821, win 117, options [nop,nop,TS val 47144764 ecr 1794734726], length 0
00:00:00.000189 IP 192.168.1.20.43668 > 8.8.8.8.53: 26131+ A? www.google.ca. (31)
00:00:00.000046 IP 192.168.1.20.43668 > 8.8.8.8.53: 60944+ AAAA? www.google.ca. (31)
00:00:00.032033 IP 72.14.204.104.80 > 192.168.1.20.53715: Flags [.], ack 189, win 106, options [nop,nop,TS val 1794734759 ecr 47144764], length 0
00:00:00.008230 IP 8.8.8.8.53 > 192.168.1.20.43668: 26131 6/0/0 CNAME www.google.com., CNAME www.l.google.com., A 72.14.204.99, A 72.14.204.147, A 72.14.204.104, A 72.14.204.103 (143)
00:00:00.041584 IP 8.8.8.8.53 > 192.168.1.20.43668: 60944 2/1/0 CNAME www.google.com., CNAME www.l.google.com. (129)
00:00:00.000107 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [s], seq 3118894815, win 5840, options [mss 1460,sackOK,TS val 47144788 ecr 0,nop,wscale 6], length 0
00:00:00.023532 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [S.], seq 253085671, ack 3118894816, win 5672, options [mss 1430,sackOK,TS val 1794734836 ecr 47144788,nop,wscale 6], length 0
00:00:00.000012 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [.], ack 1, win 92, options [nop,nop,TS val 47144795 ecr 1794734836], length 0
00:00:00.000076 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [P.], seq 1:187, ack 1, win 92, options [nop,nop,TS val 47144795 ecr 1794734836], length 186
00:00:00.022855 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [.], ack 187, win 106, options [nop,nop,TS val 1794734859 ecr 47144795], length 0
00:00:00.002520 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [.], ack 187, win 106, options [nop,nop,TS val 1794734862 ecr 47144795], length 0
00:00:00.025894 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [.], seq 1:1419, ack 187, win 106, options [nop,nop,TS val 1794734887 ecr 47144795], length 1418
00:00:00.000036 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [.], ack 1419, win 136, options [nop,nop,TS val 47144811 ecr 1794734887], length 0
00:00:00.000313 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [.], seq 1419:2837, ack 187, win 106, options [nop,nop,TS val 1794734887 ecr 47144795], length 1418
00:00:00.000009 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [.], ack 2837, win 180, options [nop,nop,TS val 47144811 ecr 1794734887], length 0
00:00:00.000430 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [.], seq 2837:4255, ack 187, win 106, options [nop,nop,TS val 1794734887 ecr 47144795], length 1418
00:00:00.000038 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [.], ack 4255, win 225, options [nop,nop,TS val 47144811 ecr 1794734887], length 0
00:00:00.002203 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [P.], seq 4255:4668, ack 187, win 106, options [nop,nop,TS val 1794734887 ecr 47144795], length 413
00:00:00.000038 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [.], ack 4668, win 269, options [nop,nop,TS val 47144812 ecr 1794734887], length 0
00:00:00.020932 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [.], seq 4668:6086, ack 187, win 106, options [nop,nop,TS val 1794734910 ecr 47144811], length 1418
00:00:00.000037 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [.], ack 6086, win 313, options [nop,nop,TS val 47144818 ecr 1794734910], length 0
00:00:00.000170 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [.], seq 6086:7504, ack 187, win 106, options [nop,nop,TS val 1794734910 ecr 47144811], length 1418
00:00:00.000034 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [.], ack 7504, win 358, options [nop,nop,TS val 47144818 ecr 1794734910], length 0
00:00:00.003602 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [.], seq 7504:8922, ack 187, win 106, options [nop,nop,TS val 1794734910 ecr 47144811], length 1418
00:00:00.000033 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [.], ack 8922, win 402, options [nop,nop,TS val 47144819 ecr 1794734910], length 0
00:00:00.003978 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [FP.], seq 8922:9072, ack 187, win 106, options [nop,nop,TS val 1794734910 ecr 47144811], length 150
00:00:00.000488 IP 192.168.1.20.47725 > 72.14.204.99.80: Flags [F.], seq 187, ack 9073, win 446, options [nop,nop,TS val 47144821 ecr 1794734910], length 0
00:00:00.026050 IP 72.14.204.99.80 > 192.168.1.20.47725: Flags [.], ack 188, win 106, options [nop,nop,TS val 1794734946 ecr 47144821], length 0

55 packets captured
56 packets received by filter
0 packets dropped by kernel

I've had a look, but I'm having a hard time penetrating tcpdump's output.  I did note that tcpdump caught more packets in the first test.  I'm not sure why more packets would have been generated.

Offline

#9 2010-08-27 16:53:02

battlepanic
Member
Registered: 2009-08-22
Posts: 76

Re: Establishing a connection is slow. DNS issues, maybe?

Sin.citadel wrote:

it could be that the router is not caching the dns queries by itself and has to repeat dns queries for every request, if pointing to another nameserver (google,opendns) works, try adding a caching server like dnsmasq to your system and pointing resolv.conf to 127.0.0.1, see if it solves the delay problems.

What I find strange is that using my router as my DNS server seems to work quite well on my Windows machine which is on the same local network.  I don't notice any speed issues.  In fact, I never really gave it a second thought.  This seems to suggest that it has something to do with how my Arch system is configured.

Offline

#10 2010-08-27 23:55:53

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Establishing a connection is slow. DNS issues, maybe?

battlepanic wrote:

I ran tcpdump and then at another terminal I entered:

w3m google.com

but the tcpdump incantation you suggested didn't produce output.  I changed it to what I think you meant:

tcpdump -lnn -ttt -i eth0 port 80 or port 53

Whoops... Brain fart, sorry wink

battlepanic wrote:

Running the test again, first with /etc/resolv.conf set to 192.168.1.1 (my Linksys WRT54G router):

Your machine keeps asking for AAAA (IPv6 DNS) records, but never gets a reply. The first attempt waits around 4 seconds before continuing with IPv4.

I'd try disabling IPv6 (in the wiki) and try again.

Offline

#11 2010-08-28 13:56:46

shak
Member
Registered: 2009-03-16
Posts: 405

Re: Establishing a connection is slow. DNS issues, maybe?

I had a similar issue because the ipv6 module was autoloaded at boot . Try to disable the ipv6 module

Offline

#12 2010-08-30 02:04:57

battlepanic
Member
Registered: 2009-08-22
Posts: 76

Re: Establishing a connection is slow. DNS issues, maybe?

fukawi2 wrote:

Your machine keeps asking for AAAA (IPv6 DNS) records, but never gets a reply. The first attempt waits around 4 seconds before continuing with IPv4.

I'd try disabling IPv6 (in the wiki) and try again.

So, I've disabled the ipv6 kernel module as per the wiki's instructions.  I've rebooted and run the test again, and the problem is persisting.  My /etc/modprobe.d/modprobe.conf now reads:

#
# /etc/modprobe.d/modprobe.conf (for v2.6 kernels)
#
# disable autoload of ipv6
alias net-pf-10 off

Running the test once more with my nameserver set to 192.168.1.1 in resolv.conf gives:

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
00:00:00.000000 IP 192.168.1.20.51911 > 192.168.1.1.53: 5478+ A? google.com. (28)
00:00:00.000152 IP 192.168.1.20.51911 > 192.168.1.1.53: 60681+ AAAA? google.com. (28)
00:00:00.009046 IP 192.168.1.1.53 > 192.168.1.20.51911: 5478 4/0/0 A 72.14.204.147, A 72.14.204.99, A 72.14.204.104, A 72.14.204.103 (92)
00:00:04.995075 IP 192.168.1.20.51911 > 192.168.1.1.53: 5478+ A? google.com. (28)
00:00:00.001317 IP 192.168.1.1.53 > 192.168.1.20.51911: 5478- 1/0/0 A 72.14.204.147 (54)
00:00:00.000049 IP 192.168.1.20.51911 > 192.168.1.1.53: 60681+ AAAA? google.com. (28)
00:00:05.003056 IP 192.168.1.20.59320 > 192.168.1.1.53: 5478+ A? google.com. (28)
00:00:00.001397 IP 192.168.1.1.53 > 192.168.1.20.59320: 5478- 1/0/0 A 72.14.204.147 (54)
00:00:00.000057 IP 192.168.1.20.37740 > 192.168.1.1.53: 60681+ AAAA? google.com. (28)
00:00:05.003028 IP 192.168.1.20.51358 > 72.14.204.147.80: Flags [s], seq 1467111692, win 5840, options [mss 1460,sackOK,TS val 123800 ecr 0,nop,wscale 6], length 0
00:00:00.118794 IP 72.14.204.147.80 > 192.168.1.20.51358: Flags [S.], seq 1437278272, ack 1467111693, win 5672, options [mss 1430,sackOK,TS val 2001606171 ecr 123800,nop,wscale 6], length 0
00:00:00.000019 IP 192.168.1.20.51358 > 72.14.204.147.80: Flags [.], ack 1, win 92, options [nop,nop,TS val 123836 ecr 2001606171], length 0
00:00:00.000133 IP 192.168.1.20.51358 > 72.14.204.147.80: Flags [P.], seq 1:184, ack 1, win 92, options [nop,nop,TS val 123836 ecr 2001606171], length 183
00:00:00.119170 IP 72.14.204.147.80 > 192.168.1.20.51358: Flags [.], ack 184, win 106, options [nop,nop,TS val 2001606294 ecr 123836], length 0
00:00:00.003780 IP 72.14.204.147.80 > 192.168.1.20.51358: Flags [P.], seq 1:512, ack 184, win 106, options [nop,nop,TS val 2001606297 ecr 123836], length 511
00:00:00.000038 IP 192.168.1.20.51358 > 72.14.204.147.80: Flags [.], ack 512, win 108, options [nop,nop,TS val 123872 ecr 2001606297], length 0
00:00:00.000092 IP 72.14.204.147.80 > 192.168.1.20.51358: Flags [F.], seq 512, ack 184, win 106, options [nop,nop,TS val 2001606298 ecr 123836], length 0
00:00:00.000192 IP 192.168.1.20.51358 > 72.14.204.147.80: Flags [F.], seq 184, ack 513, win 108, options [nop,nop,TS val 123873 ecr 2001606298], length 0
00:00:00.000220 IP 192.168.1.20.36969 > 192.168.1.1.53: 21772+ A? www.google.com. (32)
00:00:00.000226 IP 192.168.1.20.36969 > 192.168.1.1.53: 40232+ AAAA? www.google.com. (32)
00:00:00.014484 IP 192.168.1.1.53 > 192.168.1.20.36969: 21772 5/0/0 CNAME www.l.google.com., A 72.14.204.104, A 72.14.204.103, A 72.14.204.147, A 72.14.204.99 (116)
00:00:00.107060 IP 72.14.204.147.80 > 192.168.1.20.51358: Flags [.], ack 185, win 106, options [nop,nop,TS val 2001606420 ecr 123873], length 0
00:00:04.882905 IP 192.168.1.20.36969 > 192.168.1.1.53: 21772+ A? www.google.com. (32)
00:00:00.001265 IP 192.168.1.1.53 > 192.168.1.20.36969: 21772- 1/0/0 A 72.14.204.104 (62)
00:00:00.000045 IP 192.168.1.20.36969 > 192.168.1.1.53: 40232+ AAAA? www.google.com. (32)
00:00:05.003160 IP 192.168.1.20.38866 > 192.168.1.1.53: 21772+ A? www.google.com. (32)
00:00:00.001539 IP 192.168.1.1.53 > 192.168.1.20.38866: 21772- 1/0/0 A 72.14.204.104 (62)
00:00:00.000058 IP 192.168.1.20.55915 > 192.168.1.1.53: 40232+ AAAA? www.google.com. (32)
00:00:05.003118 IP 192.168.1.20.40341 > 72.14.204.104.80: Flags [s], seq 1692929994, win 5840, options [mss 1460,sackOK,TS val 128377 ecr 0,nop,wscale 6], length 0
00:00:00.121869 IP 72.14.204.104.80 > 192.168.1.20.40341: Flags [S.], seq 3708065930, ack 1692929995, win 5672, options [mss 1430,sackOK,TS val 1494322067 ecr 128377,nop,wscale 6], length 0
00:00:00.000020 IP 192.168.1.20.40341 > 72.14.204.104.80: Flags [.], ack 1, win 92, options [nop,nop,TS val 128413 ecr 1494322067], length 0
00:00:00.000099 IP 192.168.1.20.40341 > 72.14.204.104.80: Flags [P.], seq 1:188, ack 1, win 92, options [nop,nop,TS val 128413 ecr 1494322067], length 187
00:00:00.129215 IP 72.14.204.104.80 > 192.168.1.20.40341: Flags [.], ack 188, win 106, options [nop,nop,TS val 1494322194 ecr 128413], length 0
00:00:00.002855 IP 72.14.204.104.80 > 192.168.1.20.40341: Flags [P.], seq 1:820, ack 188, win 106, options [nop,nop,TS val 1494322197 ecr 128413], length 819
00:00:00.000038 IP 192.168.1.20.40341 > 72.14.204.104.80: Flags [.], ack 820, win 117, options [nop,nop,TS val 128453 ecr 1494322197], length 0
00:00:00.000040 IP 72.14.204.104.80 > 192.168.1.20.40341: Flags [F.], seq 820, ack 188, win 106, options [nop,nop,TS val 1494322197 ecr 128413], length 0
00:00:00.000131 IP 192.168.1.20.40341 > 72.14.204.104.80: Flags [F.], seq 188, ack 821, win 117, options [nop,nop,TS val 128453 ecr 1494322197], length 0
00:00:00.000200 IP 192.168.1.20.35423 > 192.168.1.1.53: 36224+ A? www.google.ca. (31)
00:00:00.000039 IP 192.168.1.20.35423 > 192.168.1.1.53: 1520+ AAAA? www.google.ca. (31)
00:00:00.012264 IP 192.168.1.1.53 > 192.168.1.20.35423: 36224 6/0/0 CNAME www.google.com., CNAME www.l.google.com., A 72.14.204.104, A 72.14.204.103, A 72.14.204.147, A 72.14.204.99 (143)
00:00:00.116774 IP 72.14.204.104.80 > 192.168.1.20.40341: Flags [.], ack 189, win 106, options [nop,nop,TS val 1494322325 ecr 128453], length 0
00:00:04.875342 IP 192.168.1.20.35423 > 192.168.1.1.53: 36224+ A? www.google.ca. (31)
00:00:00.001261 IP 192.168.1.1.53 > 192.168.1.20.35423: 36224- 1/0/0 A 72.14.204.104 (60)
00:00:00.000044 IP 192.168.1.20.35423 > 192.168.1.1.53: 1520+ AAAA? www.google.ca. (31)
00:00:05.003047 IP 192.168.1.20.32833 > 192.168.1.1.53: 36224+ A? www.google.ca. (31)
00:00:00.001465 IP 192.168.1.1.53 > 192.168.1.20.32833: 36224- 1/0/0 A 72.14.204.104 (60)
00:00:00.000055 IP 192.168.1.20.50904 > 192.168.1.1.53: 1520+ AAAA? www.google.ca. (31)
00:00:05.003101 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [s], seq 1938296520, win 5840, options [mss 1460,sackOK,TS val 132957 ecr 0,nop,wscale 6], length 0
00:00:00.124455 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [S.], seq 2620217454, ack 1938296521, win 5672, options [mss 1430,sackOK,TS val 324468099 ecr 132957,nop,wscale 6], length 0
00:00:00.000012 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [.], ack 1, win 92, options [nop,nop,TS val 132994 ecr 324468099], length 0
00:00:00.000096 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [P.], seq 1:187, ack 1, win 92, options [nop,nop,TS val 132994 ecr 324468099], length 186
00:00:00.123740 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [.], ack 187, win 106, options [nop,nop,TS val 324468227 ecr 132994], length 0
00:00:00.008315 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [.], seq 1:1419, ack 187, win 106, options [nop,nop,TS val 324468235 ecr 132994], length 1418
00:00:00.000040 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [.], ack 1419, win 136, options [nop,nop,TS val 133034 ecr 324468235], length 0
00:00:00.000150 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [.], seq 1419:2837, ack 187, win 106, options [nop,nop,TS val 324468235 ecr 132994], length 1418
00:00:00.000007 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [.], ack 2837, win 180, options [nop,nop,TS val 133034 ecr 324468235], length 0
00:00:00.000113 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [.], seq 2837:4255, ack 187, win 106, options [nop,nop,TS val 324468235 ecr 132994], length 1418
00:00:00.000005 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [.], ack 4255, win 225, options [nop,nop,TS val 133034 ecr 324468235], length 0
00:00:00.002148 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [P.], seq 4255:4668, ack 187, win 106, options [nop,nop,TS val 324468235 ecr 132994], length 413
00:00:00.000045 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [.], ack 4668, win 269, options [nop,nop,TS val 133035 ecr 324468235], length 0
00:00:00.116212 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [.], seq 4668:6086, ack 187, win 106, options [nop,nop,TS val 324468357 ecr 133034], length 1418
00:00:00.000043 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [.], ack 6086, win 313, options [nop,nop,TS val 133070 ecr 324468357], length 0
00:00:00.000308 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [.], seq 6086:7504, ack 187, win 106, options [nop,nop,TS val 324468357 ecr 133034], length 1418
00:00:00.000032 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [.], ack 7504, win 358, options [nop,nop,TS val 133070 ecr 324468357], length 0
00:00:00.000657 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [.], seq 7504:8922, ack 187, win 106, options [nop,nop,TS val 324468357 ecr 133034], length 1418
00:00:00.000031 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [.], ack 8922, win 402, options [nop,nop,TS val 133070 ecr 324468357], length 0
00:00:00.001626 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [FP.], seq 8922:9108, ack 187, win 106, options [nop,nop,TS val 324468357 ecr 133034], length 186
00:00:00.000645 IP 192.168.1.20.40342 > 72.14.204.104.80: Flags [F.], seq 187, ack 9109, win 446, options [nop,nop,TS val 133071 ecr 324468357], length 0
00:00:00.120718 IP 72.14.204.104.80 > 192.168.1.20.40342: Flags [.], ack 188, win 106, options [nop,nop,TS val 324468482 ecr 133071], length 0

69 packets captured
70 packets received by filter
0 packets dropped by kernel

If appears as though my machine is still asking for the "AAAA" (ipv6 DNS) record that you mention.  But I'm quite sure that I've followed the wiki's instructions on disabling ipv6.

lsmod | grep ipv6

The above command shows nothing, both before and after running w3m.  Am I missing something here?  Is the ipv6 module still somehow getting loaded?

Offline

#13 2010-08-30 02:07:39

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Establishing a connection is slow. DNS issues, maybe?

What is the output of `ifconfig`? Does it show an "inet6 addr"?

Offline

#14 2010-08-30 19:17:38

battlepanic
Member
Registered: 2009-08-22
Posts: 76

Re: Establishing a connection is slow. DNS issues, maybe?

`ifconfig | grep inet6` shows no output.  Here is the eth0 portion of ifconfig's output:

eth0      Link encap:Ethernet  HWaddr 00:11:25:BA:1E:34
          inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:20 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3093 (3.0 Kb)  TX bytes:3541 (3.4 Kb)
          Interrupt:16

As a comparison,  I tried reenabling ipv6 in /etc/modprobe.d/modprobe.conf, rebooted, and checked the output ifconfig again.  Again, there is no mention of an inet6 address.

After running the command `w3m google.com` and checked ifconfig again.  ifconfig still does not show an inet6 address.  Next, I tried running `dig 8.8.8.8` followed by ifconfig and suddenly there is a inet6 address in it's output:

eth0      Link encap:Ethernet  HWaddr 00:11:25:BA:1E:34
          inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::211:25ff:feba:1e34/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:214 errors:0 dropped:0 overruns:0 frame:0
          TX packets:153 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:32665 (31.8 Kb)  TX bytes:20748 (20.2 Kb)
          Interrupt:16

This seems to suggest that the ipv6 kernel module is not loaded until the first time it is needed.

Disabling the ipv6 kernel module once more and making sure my nameserver is 192.168.1.1, I've ran `w3m google.com` and it still takes forever to load a page.  I then ran `dig 8.8.8.8` and this time it timed out with the following output:

; <<>> DiG 9.7.1-P2 <<>> 8.8.8.8
;; global options: +cmd
;; connection timed out; no servers could be reached

So, now I tried `dig google.com` and it gives me:

; <<>> DiG 9.7.1-P2 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33028
;; flags: qr rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             139     IN      A       72.14.204.103

;; Query time: 1 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Mon Aug 30 03:12:54 2010
;; MSG SIZE  rcvd: 54

Checking ifconfig again, it's definitely not showing an inet6 address.  It seems that the only effect disabling ipv6 had is that now dig times out when I feed it an ip as opposed to a domain and w3m is still taking forever to load a page.  I'm as confused as ever.

Offline

#15 2010-08-30 23:06:53

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Establishing a connection is slow. DNS issues, maybe?

battlepanic wrote:

'm as confused as ever.

Me too neutral lol

I understand that the ipv6 module could be loaded as required (but seems strange that 'dig' would instigate it). What I don't understand is why w3m insists on asking for AAAA records when you have blacklisted ipv6.

Try adding this to /etc/modprobe.d/disable-ipv6.conf

alias net-pf-10 off
options ipv6 disable=1

Offline

#16 2010-08-31 13:30:12

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Establishing a connection is slow. DNS issues, maybe?

I also find that 1ms response time from your router suspiciously fast and shouldn't 'dig google.com' return more than just one IP? It almost seems that the router is using dnsmasq or similar to cache queries.

Are you running that router with an alternate firmware such as dd-wrt, tomato or the likes? Also, which dns server address do you get from the router if you are using dhcp?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#17 2010-09-03 00:13:40

battlepanic
Member
Registered: 2009-08-22
Posts: 76

Re: Establishing a connection is slow. DNS issues, maybe?

R00KIE wrote:

Are you running that router with an alternate firmware such as dd-wrt, tomato or the likes? Also, which dns server address do you get from the router if you are using dhcp?

I'm not using any custom firmware.  The firmsware version is: "v8.00.6 build 005, Jun. 16, 2008"

When using dhcp the cotents of my /etc/resolv.conf are as follows:

# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
domain r
nameserver 24.200.241.37
nameserver 24.201.245.77
nameserver 24.200.243.189
# /etc/resolv.conf.tail can replace this line

A reverse DNS lookup of those ip's shows that they belong to my ISP.

Offline

#18 2010-09-04 13:49:52

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Establishing a connection is slow. DNS issues, maybe?

No ideas here why it is not working properly (I'm not an expert on networks though). The only extra thing that seems to be added when using dhcp is the domain line, which I never needed to use.

Everything else is equivalent to what you are trying to set so it's a bit of a mystery why it isn't working properly (at least for me).

When using dhcp your router tells the machine requesting an IP to use whatever dns servers your isp advertises, that seems to be the 3 nameservers you get (isn't it typically just 2?), but that is the same as trying to use google's dns servers or opendns.

The only thing I can think of is some weird bug in the firmware of your router that may be causing this problem. If that router is using linux and allows a telnet login _maybe_ you can try to get some info about what the router is doing.

Do check that you are not trying to use an IP address that can be assigned by dhcp by the router (I don't know if that can be a problem but with manufacturer custom firmwares who knows), the other option is to try and set a static dhcp address assignment (it is better to understand what is going on but if push comes to shove whatever gets the job done without much fuss is welcome).


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#19 2015-08-09 07:36:08

fujimotos
Member
Registered: 2015-08-09
Posts: 1

Re: Establishing a connection is slow. DNS issues, maybe?

This is a bit old post, but I think I found a solution.

Just run w3m with '-4' option:

$ w3m -4 http://google.com

No DNS/router settings needed; This speed up the 'opening socket' process significantly.

Last edited by fujimotos (2015-08-09 07:38:21)

Offline

#20 2015-08-09 23:01:38

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: Establishing a connection is slow. DNS issues, maybe?

fujimotos -> Welcome to the Arch forums. Firstly, that is a workaround, but not a solution. Second, please leave the dead to rest in peace: https://wiki.archlinux.org/index.php/Fo … bumping.22

Closing.

Offline

Board footer

Powered by FluxBB