[Dnsmasq-discuss] Kind request regarding Dnsmasq's Dns response auto caching feature not working

Joyabrata Ghosh joy.career at gmail.com
Sat May 30 23:21:51 BST 2015


Dear Dnsmasq Experts,

Myself new to Dnsmasq and facing issues in personally evaluating Auto
Caching feature of very popular Dnsmasq product.

Followed the recommended links inline, however unable to resolve the
caching issue, kindly share some expertise advice/pointer to resolve the
caching problem, setup details inline:


Thanks & Regards,
JGhosh
Networking developer, Bangalore, India

==
==

references official:
http://www.thekelleys.org.uk/dnsmasq/doc.html
http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html

references other:
https://help.ubuntu.com/community/Dnsmasq
http://www.cyberciti.biz/faq/caching-dns-server/
http://www.georgestarcher.com/splunk-dns-lookup-performance-and-caching-with-dnsmasq/
http://unix.stackexchange.com/questions/162973/how-to-measure-dns-cache-efficiency-cached-items/206403#206403
http://serverfault.com/questions/695441/dnsmasqs-dns-response-auto-caching-feature-not-working
http://www.devshed.com/c/a/braindump/managing-a-linux-wireless-access-point/

*Problem Description:*

Dnsmasq Cache and Internal Log on USR1 signal dump (when running with or
without --no-daemon and --log-queries for analysis) it always shows: 0/0
cache, meaning caching feature of Dnsmasq not working.

It is also observed that although repetitive DNS A?(host query) and
A(response) records are populated successfully over the same listening
interface continuously, but cache count still remains 0.

Any one having any idea how to solve/debug this Dnsmasq Cache Not Working
problem ?

Alternatively, please suggest another Ubuntu linux supported DNS Caching
tool which can be configured for targeted interface.

>  **dnsmasq: cache size 150, 0/0 cache insertions re-used unexpired cache
entries**



    root at host1:~# sudo pkill -USR1 dnsmasq
    dnsmasq: query[AAAA] host1 from 127.0.0.1
    dnsmasq: query[AAAA] host1 from 127.0.0.1
    dnsmasq: query[A] host1 from 127.0.0.1
    dnsmasq: query[A] host1 from 127.0.0.1
    sudo: unable to resolve host host1
    dnsmasq: time 1432979095
    dnsmasq: cache size 150, 0/0 cache insertions re-used unexpired cache
entries.
    dnsmasq: queries forwarded 0, queries answered locally 4
    dnsmasq: Host Address Flags Expires
    dnsmasq: ip6-loopback ::1 6F I H
    dnsmasq: pep 127.0.1.1 4FRI H
    dnsmasq: ip6-mcastprefix ff00:: 6FRI H
    dnsmasq: ip6-allrouters ff02::2 6FRI H
    dnsmasq: ip6-localhost ::1 6FRI H
    dnsmasq: localhost 127.0.0.1 4FRI H
    dnsmasq: ip6-allnodes ff02::1 6FRI H
    dnsmasq: ip6-localnet fe00:: 6FRI H
    [1]- User defined signal 1 /etc/init.d/dnsmasq restart
    root at host1:~#

    TCPDUMP ON DNSMASQ Interface:

    05:40:47.555213 IP 172.20.20.10.52592 > 172.20.20.2.53: 8856+ A?
app.host2.com. (45)
    05:40:47.558364 IP 172.20.20.2.53 > 172.20.20.10.52592: 8856* 1/0/0 A
10.60.60.190 (61)
    05:41:52.875128 IP 172.20.20.10.60448 > 172.20.20.2.53: 11981+ A?
app.host2.com. (45)
    05:41:52.878377 IP 172.20.20.2.53 > 172.20.20.10.60448: 11981* 1/0/0 A
10.60.60.190 (61)
    05:42:44.241724 IP 172.20.20.10.65300 > 172.20.20.2.53: 6667+ A?
app.host2.com. (45)
    05:42:44.244808 IP 172.20.20.2.53 > 172.20.20.10.65300: 6667* 1/0/0 A
10.60.60.190 (61)

    Dnsmasq setting: /etc/dnsmasq.conf

    log-facility=/var/log/dnsmasq.log
    log-queries
    log-dhcp
    no-daemon
    listen-address=127.0.0.1
    port=53
    interface=eth0
    bind-interfaces
    cache-size=1000
    neg-ttl=3600

    Dnsmasq Running as inline from default:

    root at host1:~# /etc/init.d/dnsmasq restart
    * Restarting DNS forwarder and DHCP server dnsmasq

    dnsmasq: started, version 2.68 cachesize 1000
    dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP
    DHCPv6 no-Lua TFTP conntrack ipset auth
    dnsmasq: reading /etc/resolv.conf
    dnsmasq: using nameserver 11.45.45.9#53
    dnsmasq: read /etc/hosts - 7 addresses
    User defined signal 1
    root at host1:~# dnsmasq: time 1433019086
    dnsmasq: cache size 1000, 0/0 cache insertions re-used unexpired cache
    entries.
    dnsmasq: queries forwarded 0, queries answered locally 0
    dnsmasq: queries for authoritative zones 0
    dnsmasq: Host                                     Address

    Flags     Expires
    dnsmasq: ip6-allnodes                             ff02::1

    6FRI   H
    dnsmasq: ip6-localnet                             fe00::

    6FRI   H
    dnsmasq: ip6-localhost                            ::1

    6FRI   H
    dnsmasq: pep                                      127.0.1.1

    4FRI   H
    dnsmasq: ip6-mcastprefix                          ff00::

    6FRI   H
    dnsmasq: localhost                                127.0.0.1

    4FRI   H
    dnsmasq: ip6-loopback                             ::1

    6F I   H
    dnsmasq: ip6-allrouters                           ff02::2

    6FRI   H

    Dnsmasq process status:

    root at host1:~# ps aux | grep dnsmasq
    dnsmasq  23437  0.0  0.0  27636   936 ?        S    16:36   0:00
    /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq
    -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-
    old,.dpkg-new

    Dnsmasq package status:

    root at host1:~# dpkg -l | grep dnsmasq
    ii  dnsmasq                                               2.68-1
                                       all          Small caching DNS proxy
and DHCP/TFTP server
    ii  dnsmasq-base                                          2.68-1
                                   amd64        Small caching DNS proxy and
DHCP/TFTP server
    ii  dnsmasq-utils                                         2.68-1
                                      amd64        Utilities for
manipulating DHCP leases

==
==
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20150531/08054c80/attachment.html>


More information about the Dnsmasq-discuss mailing list