2017-06-07 15:07:52 +00:00
|
|
|
DNS caching
|
2016-12-30 16:22:22 +00:00
|
|
|
===========
|
2017-06-07 15:07:52 +00:00
|
|
|
|
2017-01-28 23:15:00 +00:00
|
|
|
User experience may be greatly improved when dns is accelerated. Also, it
|
|
|
|
seems like a good idea to keep the number of packages being exchanged
|
2016-12-30 16:22:22 +00:00
|
|
|
between node and gateway as small as possible. In order to do this, a
|
2017-06-07 15:07:52 +00:00
|
|
|
DNS cache may be used on a node. The dnsmasq instance listening on port
|
2017-01-28 23:15:00 +00:00
|
|
|
53 on the node will be reconfigured to answer requests, use a list of
|
|
|
|
upstream servers and a specific cache size if the options listed below are
|
2017-04-26 17:02:22 +00:00
|
|
|
added to site.conf. Upstream servers are the DNS servers which are normally
|
|
|
|
used by the nodes to resolve hostnames (e.g. gateways/supernodes).
|
2016-12-30 16:22:22 +00:00
|
|
|
|
2017-04-26 17:02:22 +00:00
|
|
|
There are the following settings:
|
|
|
|
servers
|
|
|
|
cacheentries
|
2017-06-07 15:07:52 +00:00
|
|
|
|
2017-12-26 23:21:08 +00:00
|
|
|
To use the node's DNS server, both options should be set. The node will cache at
|
|
|
|
most 'cacheentries' many DNS records in RAM. The 'servers' list will be used to
|
|
|
|
resolve the received DNS queries if the request cannot be answered from
|
|
|
|
cache. Gateways should announce the "next node" address via DHCP and RDNSS (if
|
|
|
|
any). Note that not setting 'servers' here will lead to DNS not working: Once
|
|
|
|
the gateways all announce the "next node" address for DNS, there is no way for
|
|
|
|
nodes to automatically determine DNS servers. They have to be baked into the
|
|
|
|
firmware.
|
|
|
|
|
|
|
|
If these settings do not exist, the cache is not initialized and RAM usage will
|
|
|
|
not increase.
|
2017-06-07 15:07:52 +00:00
|
|
|
|
|
|
|
When next_node.name is set, an A record and an AAAA record for the
|
|
|
|
next-node IP address are placed in the dnsmasq configuration. This means that the content
|
2017-08-25 21:04:32 +00:00
|
|
|
of next_node.name may be resolved even without upstream connectivity. It is suggested to use
|
|
|
|
the same name as the DNS server provides: e.g nextnode.yourdomain.net (This way the name also
|
|
|
|
works if client uses static DNS Servers). Hint: If next_node.name does not contain a dot some
|
|
|
|
browsers would open the searchpage instead.
|
2016-12-30 16:22:22 +00:00
|
|
|
|
|
|
|
::
|
|
|
|
|
|
|
|
dns = {
|
|
|
|
cacheentries = 5000,
|
|
|
|
servers = { '2001:db8::1', },
|
|
|
|
},
|
2017-06-07 15:07:52 +00:00
|
|
|
|
2016-12-30 16:22:22 +00:00
|
|
|
next_node = {
|
2017-08-25 21:04:32 +00:00
|
|
|
name = 'nextnode.yourdomain.net',
|
2016-12-30 16:22:22 +00:00
|
|
|
ip6 = '2001:db8:8::1',
|
|
|
|
ip4 = '198.51.100.1',
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-01-28 23:15:00 +00:00
|
|
|
The cache will be initialized during startup.
|
|
|
|
Each cache entry will occupy about 90 bytes of RAM.
|