You are not logged in.

#1 2012-07-16 17:02:57

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

local dnsmasq server: first time it fails, next ones it works.

This small piece of bash output shows well the problem...

$ ssh turing.lesalab.net
ssh: Could not resolve hostname turing.lesalab.net: Name or service not known

$ ssh turing.lesalab.net
Last login: Mon Jul 16 18:31:09 2012 from ...

$ logout

I followed the dnsmasq article, am I not sure what I did wrong.

Here is my /etc/resolv.conf

nameserver 127.0.0.1
nameserver 160.78.48.10

About dnsmasq configuration...

$ </etc/dnsmasq.conf grep -v '^#\|^$'
listen-address=127.0.0.1
$

And finally and example with dig that seems working...
The second time dig is much faster.

$ dig www.cnngo.com

; <<>> DiG 9.9.1-P1 <<>> www.cnngo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33872
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 8, ADDITIONAL: 9

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.cnngo.com.			IN	A

;; ANSWER SECTION:
www.cnngo.com.		3600	IN	CNAME	www.cnngo.com.edgesuite.net.
www.cnngo.com.edgesuite.net. 14098 IN	CNAME	a267.g.akamai.net.
a267.g.akamai.net.	20	IN	A	213.254.17.24
a267.g.akamai.net.	20	IN	A	213.254.17.22

;; AUTHORITY SECTION:
g.akamai.net.		9746	IN	NS	n3g.akamai.net.
g.akamai.net.		9746	IN	NS	n4g.akamai.net.
g.akamai.net.		9746	IN	NS	n5g.akamai.net.
g.akamai.net.		9746	IN	NS	n6g.akamai.net.
g.akamai.net.		9746	IN	NS	n7g.akamai.net.
g.akamai.net.		9746	IN	NS	n0g.akamai.net.
g.akamai.net.		9746	IN	NS	n1g.akamai.net.
g.akamai.net.		9746	IN	NS	n2g.akamai.net.

;; ADDITIONAL SECTION:
n0g.akamai.net.		11810	IN	A	95.101.34.46
n1g.akamai.net.		13951	IN	A	95.101.34.44
n2g.akamai.net.		7743	IN	A	46.33.73.61
n3g.akamai.net.		11810	IN	A	95.101.34.54
n4g.akamai.net.		13951	IN	A	95.101.34.52
n5g.akamai.net.		7743	IN	A	95.101.34.45
n6g.akamai.net.		11810	IN	A	95.101.34.47
n7g.akamai.net.		13951	IN	A	95.101.34.55

;; Query time: 100 msec
;; SERVER: 160.78.48.10#53(160.78.48.10)
;; WHEN: Mon Jul 16 18:59:59 2012
;; MSG SIZE  rcvd: 415

$ dig www.cnngo.com

; <<>> DiG 9.9.1-P1 <<>> www.cnngo.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29335
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

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

;; ANSWER SECTION:
www.cnngo.com.		60	IN	A	95.100.249.106

;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Jul 16 19:00:01 2012
;; MSG SIZE  rcvd: 47

What can I try? Any ideas?
What might be the reason that the dns resolution fails the first time and works the successive ones?

Thanks.

Offline

Board footer

Powered by FluxBB