SmartDNS

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search

Mile-Lile (Talk | contribs)
(New page: =Introduction= SmartDNS is a local DNS server. SmartDNS accepts DNS query requests from local clients, obtains DNS query results from multiple upstream DNS servers, and returns the fastest...)
Next diff →

Current revision

Contents

[edit] Introduction

SmartDNS is a local DNS server. SmartDNS accepts DNS query requests from local clients, obtains DNS query results from multiple upstream DNS servers, and returns the fastest access results to clients. Avoiding DNS pollution and improving network access speed, supports high-performance ad filtering. Unlike dnsmasq's all-servers, smartdns returns the fastest access resolution.

[edit] Features

  • Multiple upstream DNS servers

Support configuring multiple upstream DNS servers and query at the same time. The query will not be affected, even if there is a DNS server exception.

  • Return the fastest IP address

Supports finding the fastest access IP address from the IP address list of the domain name and returning it to the client to avoid DNS pollution and improve network access speed. A dns entry can return multiple ip addresses (youtube returns about 8). Normally the ip is selected by round robin (dnsmasq). Smartdns checks in the cache which is the fastest by tcp on a configured port (default 80), pings and returns the fastest ip by dns. It also optionally has the possibility to ignore ipv6 if its slower and returns just the fastest ipv4 address. It does constant performance checks in all entries stored in cache to return the best ip without delay.

  • Domain IP address specification

Support configuring IP address of specific domain to achieve the effect of advertising filtering, and avoid malicious websites.

  • Domain name high performance rule filtering

Support domain name suffix matching mode, simplify filtering configuration, filter 200,000 recording and take time <1ms.

  • Support IPV4, IPV6 dual stack

Support IPV4, IPV6 network, support query A, AAAA record, dual-stack IP selection, and disale IPV6 AAAA record.

  • High performance, low resource consumption

Multi-threaded asynchronous IO mode, cache cache query results.

[edit] Instructions

To enable SmartDNS go to <router_ip>/Services.asp and simply set SmartDNS Resolver to Enable.

  • Prefetch Domain

Enable pre-fetching of domain names with prefetch-domain yes to improve query hit rate. by default, Smartdns will send domain query request again before cache expire, and cache the result for the next query. Frequently accessed domain names will continue to be cached. This feature will consume more CPU when idle.

  • Serve Expired

Enable cache serve expired feature with serve-expired yes to improve the cache hit rate and reduce the CPU consumption. This feature will return TTL = 0 to the client after the TTL timeout, and send a new query request again at the same time, and cache the new results for later query.

  • Dualstack IP Selection

At present, IPV6 network is not as fast as IPV4 in some cases. In order to get a better experience in the dual-stack network, SmartDNS provides a dual-stack IP optimization mechanism, the same domain name, and the speed of IPV4. Far faster than IPV6, then SmartDNS will block the resolution of IPV6, let the PC use IPV4, the feature is enabled by dualstack-ip-selection yes, dualstack-ip-selection-threshold [time] is for threshold. if you want to disable IPV6 AAAA record complete, please try force-AAAA-SOA yes


Instructions
Instructions
Instructions
Instructions

[edit] FAQs

What is the difference between SmartDNS and DNSMASQ? Smartdns is not designed to replace DNSMASQ. The main function of Smartdns is focused on DNS resolution enhancements.

[edit] Troubleshooting

Configuration is placed at:

cat /tmp/smartdns.conf

you can use dnsutils and 'dig' directive from client machine, before and after enabling SmartDNS, to check if dns query time decreased (which is better)

[edit] Reference

Git Repository
Changeset