DNS Cache

Document revision 16-Oct-2002
This document applies to the MikroTik RouterOS V2.6

Overview

DNS cache is used to minimize DNS-requests to an external DNS server as well as to minimize DNS resolution time. This is a simple recursive DNS server without any local items. DNS protocol is described in RFC1035 and related documents

Contents of the Manual

The following topics are covered in this manual:

Installation

The DNS cache feature is included in the dns-cache package. The package file dns-cache-2.6.x.npk can be downloaded from MikroTik’s web page www.mikrotik.com. To install the package, please upload it with ftp in BINARY mode to the router and reboot.

Use the /system package print command to see the list of installed packages.

Hardware Resource Usage

The feature uses a minimum of resources. But if you plan to use larger cache then it is by default, you should monitor RAM usage.

DNS Cache Description

The MikroTik router with DNS cache feature enabled can be set as primary DNS server for any DNS-compliant clients. Moreover, MikroTik router can be specified as primary DNS server under its dhcp-server settings. When the DNS cache is enabled, the MikroTik router responds to DNS requests on TCP and UDP ports 53. Make sure you do not block this port in the firewall setup!

DNS Cache Setup

DNS cache management can be accessed under the /ip dns-cache submenu. DNS client configuration (accessible under /ip dns submenu) is not required. To enable DNS cache, use the set command, for example:

[admin@MikroTik] ip dns-cache> set enabled=yes dns-server=159.148.60.2
[admin@MikroTik] ip dns-cache> print
       enabled: yes
          size: 512
    dns-server: 159.148.60.2
[admin@MikroTik] ip dns-cache>

Descriptions of settings:

enabled - defines whether DNS cache (TCP and UDP port 53) is enabled or not
size - maximum number of entries in the cache
dns-server - parent DNS server that is used to resolve requests absent in the cache

Monitoring DNS Cache

Currently no monitoring of DNS cache is available. Later versions of MikroTik RouterOS will have option of DNS cache static entries, as well as cache monitoring.

Additional Resources

Links to DNS documentation:

http://www.freesoft.org/CIE/Course/Section2/3.htm
http://www.networksorcery.com/enp/protocol/dns.htm
http://www.ietf.org/rfc/rfc1035.txt?number=1035


© Copyright 1999-2002, MikroTik