This command have a useful function. Especially when we want to measure the speed our access from localhost through proxy to some website.
In my case, I have a problem with squid. I though the problem is squid but no.
I read in http://email@example.com/msg15689.html that I should check /etc/resolv.conf file again.
This is my resolv.conf :
The guy in mail archive suggested that I should use nameserver 127.0.0.1 instead of kanaanlocaldomain.com it will make everything shorter.
of maybe I should try to delete 127.0.0.1 so the server will directly search the address through the dns 126.96.36.199.
And Yes.. I don’t have the slower of failed connection anymore.
This is the result of
#time dig google.com @localhost
;; global options: printcmd
;; Got answer:
;; ->>HEADER< <- opcode: QUERY, status: NOERROR, id: 42305
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 4, ADDITIONAL: 0
;; QUESTION SECTION:
;google.com. IN A
;; ANSWER SECTION:
google.com. 300 IN A 188.8.131.52
google.com. 300 IN A 184.108.40.206
google.com. 300 IN A 220.127.116.11
google.com. 300 IN A 18.104.22.168
google.com. 300 IN A 22.214.171.124
google.com. 300 IN A 126.96.36.199
;; AUTHORITY SECTION:
google.com. 172068 IN NS ns2.google.com.
google.com. 172068 IN NS ns3.google.com.
google.com. 172068 IN NS ns4.google.com.
google.com. 172068 IN NS ns1.google.com.
;; Query time: 124 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Sep 20 10:15:48 2010
;; MSG SIZE rcvd: 196