DNS cache help please

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
gargoyle fan
Posts: 8
Joined: Sat Sep 01, 2012 12:16 pm

DNS cache help please

Post by gargoyle fan »

Hi,

First off thanks for the best router firmware ever!! we have a lan of about 20 devices and its been amazing at helping to manage it.

I am trying to get gargoyle to also act as a dns cache to increase the speed of our network a little.

I have googled and searched the forum, and see this is possible i think. And using WinSCP i have been able to login as root using file protocol SCP and find the /etc/dnsmasq.conf and /etc/config/dhcp

but im too scared to edit and brick my router and i dont really understand any of it. could someone be so kind as to tell me exactly what to put in those files so my dns cache is as large as possible? My understanding is its only 150 ip's by default?

would it be possible to remember 1,000. or 10,000? and would gargoyle be able to check every so often they are still current or just have a TTL of a few days?

Does it matter the specs of the router?

First router is a wzr-hp-g300nh (64 MB ram 32MB flash )Gargoyle Version:1.4.7

Second is a WRT54G-TM (32mb ram 8mb flash i think) Gargoyle Version:1.2.5 (dont think it can handle the newer firmware can it?)


Thanks tons. And please remember noob not coder so specific steps would really help =)

gargoyle fan
Posts: 8
Joined: Sat Sep 01, 2012 12:16 pm

Re: DNS cache help please

Post by gargoyle fan »

I believe ive really tried my best to research this and as you can see made some progress, but stuck and need help.. :!:

I found this and its my understanding gargoyle uses openwrt? but its like another language to me.. http://wiki.openwrt.org/doc/uci/dhcp?s[]=dns&s[]=cache

Can someone please provide specifics to help me increase the size of the gargoyle dns cache?? Im sure it will be halpfull to others too.

gargoyle fan
Posts: 8
Joined: Sat Sep 01, 2012 12:16 pm

Re: DNS cache help please

Post by gargoyle fan »

Ok i found another peice of the puzzle

-c, --cache-size=<cachesize>
Set the size of dnsmasq's cache. The default is 150 names. Setting the cache size to zero disables caching.

also found this http://www.thekelleys.org.uk/dnsmasq/do ... q-man.html

"The size of the DNS cache may be increased: the hard limit is 10000 names and the default (150) is very low. Sending SIGUSR1 to dnsmasq makes it log information which is useful for tuning the cache size. See the NOTES section for details"

ok found /etc/init.d/dnsmasq
append_parm "$cfg" cachesize "-c"

but do i delete the -c and replace it with a number or leve it and put somethign else??


almost there just a little help please :?:

gargoyle fan
Posts: 8
Joined: Sat Sep 01, 2012 12:16 pm

Re: DNS cache help please

Post by gargoyle fan »

I got some adive to do this
Openwrt uses UCI (Unified Configuration Interface).
http://wiki.openwrt.org/doc/uci

The dnsmasq configuration is in the "dhcp" config file
http://wiki.openwrt.org/doc/uci/dhcp

You can use the 'uci' cli to change the config.
http://wiki.openwrt.org/doc/uci#command.line.utility

so, log onto your router as root and run:

uci set dhcp.@dnsmasq[0].cachesize=1000
uci commit dhcp

can someone please offer a little help to confirm? im worried about bricking it

User avatar
ericwong
Posts: 430
Joined: Sat Aug 25, 2012 6:15 am
Location: Melbourne, Australia
Contact:

Re: DNS cache help please

Post by ericwong »

gargoyle fan wrote:I got some adive to do this
Openwrt uses UCI (Unified Configuration Interface).
http://wiki.openwrt.org/doc/uci

The dnsmasq configuration is in the "dhcp" config file
http://wiki.openwrt.org/doc/uci/dhcp

You can use the 'uci' cli to change the config.
http://wiki.openwrt.org/doc/uci#command.line.utility

so, log onto your router as root and run:

uci set dhcp.@dnsmasq[0].cachesize=1000
uci commit dhcp

can someone please offer a little help to confirm? im worried about bricking it
Just issue those commands vis SSH, I don't think you can brick it with this setting. At worst, your connected computers loses IP addresses which you can set manually to gain access to the router again to reverse the changes.
Eric Wong

PM me if you need to buy Gargoyle router in Australia/NZ, willing to pay me to help you on your Gargoyle configurations or build custom configured ROM with pre-installed app or try to fix your bricked router. Yes, I am looking for job/work.

Post Reply