What's new

LAN DNS vs Cached DNS

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Xrsenal

Senior Member
If no lan dns servers are inputted, the router will cache queries.

If lan dns servers are used as well as wan, is there no cache?

forward local queries to upstream dns prevents local cache?

what would be the best configuartion for gaming? even if its 1ms related, please let me know!


dont post things, like for gaming it wont matter, or hateful responses.
 
on topic answer - dnsmasq (the router's DNS server) will cache queries from your LAN clients by default. it will do this as long as you are not setting an upstream DNS server on clients themselves, or by filling in the LAN DHCP DNS fields (these should be left blank so that the router is advertised as the DNS server).
 
but DNS won't matter for gaming. it's not like every bullet has to do a DNS query to check where its going to land...
But the intial lobby connection will do a query check. Things like loading other players into the game etc. what would be the LEAST amount of latency setup?

no dns loops - Merlin settings can cause these
 
on topic answer - dnsmasq (the router's DNS server) will cache queries from your LAN clients by default. it will do this as long as you are not setting an upstream DNS server on clients themselves, or by filling in the LAN DHCP DNS fields (these should be left blank so that the router is advertised as the DNS server).
Which configuration will cause the query to be answered faster?
 
But the intial lobby connection will do a query check. Things like loading other players into the game etc. what would be the LEAST amount of latency setup?

no dns loops - Merlin settings can cause these
it's hard to cause a DNS loop unless you're setting things you don't understand. the most basic setup for a caching DNS Server is to have your LAN clients use the router as its DNS server. the router will query the upstream servers (WAN DNS settings) and cache the response. then, if a client asks for the same address again, the router will reply with the response it cached from the last time, assuming that the cached entry hasn't expired - but that's not something you can really control.
 
It's not that hard to measure DSN response times. Tools like GRC DNS Bench are pretty easy to use.

Using Pi-Hole (my RT-AC86u doesn't like Diversion), I can see that there is an average of 40,000 DNS queries on my LAN every day. Thanks to DNS Bench I can see those queries take just over 2ms (1/300th second) each, but if I were to use my ISPs DNS then it's around 17ms (1/58th second).
So even allowing for DNS misses, the total time taken for the LAN based DNS queries here is around 120 seconds and even if I switched to my ISP DNS it would only be 680 seconds per day! And it's not as if every other data stream stops while those DNS queries take place. The effect of that single initial DNS check to get the lobby address is a small fraction of a second, and the speed of your DNS lookups will have zero effect on the speed of others entering the lobby and your latency when communicating with them.
 
it's hard to cause a DNS loop unless you're setting things you don't understand. the most basic setup for a caching DNS Server is to have your LAN clients use the router as its DNS server. the router will query the upstream servers (WAN DNS settings) and cache the response. then, if a client asks for the same address again, the router will reply with the response it cached from the last time, assuming that the cached entry hasn't expired - but that's not something you can really control.
It's not that hard to measure DSN response times. Tools like GRC DNS Bench are pretty easy to use.

Using Pi-Hole (my RT-AC86u doesn't like Diversion), I can see that there is an average of 40,000 DNS queries on my LAN every day. Thanks to DNS Bench I can see those queries take just over 2ms (1/300th second) each, but if I were to use my ISPs DNS then it's around 17ms (1/58th second).
So even allowing for DNS misses, the total time taken for the LAN based DNS queries here is around 120 seconds and even if I switched to my ISP DNS it would only be 680 seconds per day! And it's not as if every other data stream stops while those DNS queries take place. The effect of that single initial DNS check to get the lobby address is a small fraction of a second, and the speed of your DNS lookups will have zero effect on the speed of others entering the lobby and your latency when communicating with them.
Yes - do I just choose the fastest? Or the most stable via ping over 5 minutes
 
Your router or a local DNS server will be the fastest after the first querry. Merlin DNSMASQ has a cache size of 1500. These are held in memory. Dnsmasq default is a cache size of 150 and you are warned that increasing this can effect performance. Pi-Hole has a Dnsmasq cache size of 10,000 which should cache plenty of your gaming queries for faster response. I use a Pi-Hole on a Pi3B+ to do extra malware site protection that Quad9 might miss. So far .05% of daily queries are blocked by the Pi-Hole and my DNS response is great!
Oh, DNS does not have an effect on ping
 
Your router or a local DNS server will be the fastest after the first querry. Merlin DNSMASQ has a cache size of 1500. These are held in memory. Dnsmasq default is a cache size of 150 and you are warned that increasing this can effect performance. Pi-Hole has a Dnsmasq cache size of 10,000 which should cache plenty of your gaming queries for faster response. I use a Pi-Hole on a Pi3B+ to do extra malware site protection that Quad9 might miss. So far .05% of daily queries are blocked by the Pi-Hole and my DNS response is great!
Oh, DNS does not have an effect on ping
So 192.168.x.x is labeled as local name server in the dns bench test. That would be “the fastest”
 
So 192.168.x.x is labeled as local name server in the dns bench test. That would be “the fastest”
Why do a bench test? something 10 feet away will give a faster response than something 100 miles away! Not rocket science here. Spend some bucks on a Pi3B+ and see what it does. Oh, you can do the same with Linux on an old PC.
 
Why do a bench test? something 10 feet away will give a faster response than something 100 miles away! Not rocket science here. Spend some bucks on a Pi3B+ and see what it does. Oh, you can do the same with Linux on an old PC.
Should I be enabling the wan - Dns cache local name server option in Merlin then?
 
The simple quick means to speed up your DNS queries (and it's going to have an infinitesimally small effect on your in-game latency). is to set fast (and maybe safe) DNS servers in WAN> Internet Connection> WAN DNS Setting. Do this, leaving the DNS settings in LAN> DHCP Server blank, and the router will via DHCP advertise itself as the system DNS server, and Dnsmasq will do that little bit of caching for you - this is the default set up and works damn pretty well!

My reason for suggesting you try DNS Bench is so that you could see the results for yourself. At the top of that list next to the local Router DNS should hopefully be the DNS servers provided by your ISP.
 
If you have an external USB flash drive and are willing to install Entware, you could always use Unbound on the router and tweak cache settings quite a bit. There is a utility created by @Martineau and others that make installation easy.

Unbound_manager can be installed using amtm.

 
If you have an external USB flash drive and are willing to install Entware, you could always use Unbound on the router and tweak cache settings quite a bit. There is a utility created by @Martineau and others that make installation easy.

Unbound_manager can be installed using amtm.

@Xrsenal - this (unbound) is how I get most of the DNS queries on my LAN to be 0-1usec fast...that's a millionth of a second...
it may take ~30ms the first time once you've set it up, but from that point on, it'll be significantly quicker
 
The simple quick means to speed up your DNS queries (and it's going to have an infinitesimally small effect on your in-game latency). is to set fast (and maybe safe) DNS servers in WAN> Internet Connection> WAN DNS Setting. Do this, leaving the DNS settings in LAN> DHCP Server blank, and the router will via DHCP advertise itself as the system DNS server, and Dnsmasq will do that little bit of caching for you - this is the default set up and works damn pretty well!

My reason for suggesting you try DNS Bench is so that you could see the results for yourself. At the top of that list next to the local Router DNS should hopefully be the DNS servers provided by your ISP.
Router is on top however ISP dns is not :(

Other forms of my isp dns is on top however
 
If there is third-party DNS - THAT YOU TRUST - which is faster than your ISPs DNS then use those in WAN > Internet Connection > WAN DNS Settings. *The benefits and ethics (this would be a whole long post all on its own) are going to be personal, not one size fits all.

If you want absolute DNS speed then, as others have mentioned moving to a configuration that involves "unbound" is probably a good way to go - but it's still going to make an imperceptible difference to game lobbies, and zero difference to in-game latency!
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top