You are not logged in.

#1 2007-02-15 23:21:08

beejayzed
Member
From: New Zealand
Registered: 2006-12-15
Posts: 24
Website

dnsmasq does not cache names.

I installed dnsmasq and configured it, it resolves domain names, but it doesn't seem to be caching them.
I would expect after running: dig google.com a second time, the query time would be less than 10ms, but it remains the same at about 60ms.

/etc/resolv.conf contains:

nameserver 127.0.0.1

The only changes I made to /etc/dnsmasq.conf are:

resolv-file=/etc/resolv.conf.dnsmasq
interface=eth0
listen-address=127.0.0.1

Where /etc/resolv.conf.dnsmasq contains:

nameserver 202.27.158.40
nameserver 202.27.156.72

Any ideas on how to get the caching to work?

Offline

#2 2007-02-15 23:32:31

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: dnsmasq does not cache names.

Arr, maybe you could use nscd (glibc package) for caching.

Offline

#3 2007-02-16 00:00:21

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

Re: dnsmasq does not cache names.

works for me.
I do one query, and it takes a while..
I do it again, and it returns quickly.


"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

#4 2007-02-16 00:19:51

beejayzed
Member
From: New Zealand
Registered: 2006-12-15
Posts: 24
Website

Re: dnsmasq does not cache names.

cactus wrote:

works for me.
I do one query, and it takes a while..
I do it again, and it returns quickly.

Could you let me know the query times you're getting? Maybe my expectations are wrong. Also, perhaps some of your relevant configuration files.

Offline

#5 2007-02-16 00:32:47

beejayzed
Member
From: New Zealand
Registered: 2006-12-15
Posts: 24
Website

Re: dnsmasq does not cache names.

I tried something else, deleting the nameservers from /etc/resolv.conf.dnsmasq after running dig: google.com.
What happens is the answer received is:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 3374

instead of:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33233

I would think if the cache was working, it should have given me the NOERROR header.

Offline

#6 2007-02-16 01:05:35

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

Re: dnsmasq does not cache names.

holy crap. you are right.
I thought it was caching...but it is my other dns server that is caching...

I just enabled debug in dnsmasq, and I see it sending queries for each query it gets..
hmmm. I wonder how long it has been borken...


"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

#7 2007-02-16 04:03:54

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

Re: dnsmasq does not cache names.

did some searching through the dnsmasq mailing list, and it appears the version that arch is using, is broken.
I am going to try building the latest version, and see if that fixes it.
I did also flag the package as out of date on the arch site..not sure how long until it gets rebuild/updated.


"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

#8 2007-02-16 04:25:44

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

Re: dnsmasq does not cache names.

yup. rebuilt with the new version, and caching works fine again.

Here is the binary package, until the main package gets updated.

http://stdout.cactuswax.net/pub/ArchRep … pkg.tar.gz


"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

#9 2007-02-16 05:23:00

beejayzed
Member
From: New Zealand
Registered: 2006-12-15
Posts: 24
Website

Re: dnsmasq does not cache names.

Cool, thanks for the help. I will try out the package and update.

Excellent, it works as expected, thanks. big_smile

Last edited by beejayzed (2007-02-16 05:25:00)

Offline

Board footer

Powered by FluxBB