Setup guide
Notes
If the property use-peer-dns under /ip dhcp-client is set to yes then primary-dns under /ip dns
will change to a DNS address given by DHCP Server.
Example
To set 159.148.60.2 as the primary DNS server, do the following:
[admin@Wandy] ip dns> set primary-dns=159.148.60.2
[admin@Wandy] ip dns> print
resolve-mode: remote-dns
primary-dns: 159.148.60.2
secondary-dns: 0.0.0.0
[admin@Wandy] ip dns>
Cache Monitoring
ip dns cache
Property Description
name (read-only: name) - DNS name of the host
address (read-only: IP address) - IP address of the host
ttl (time) - remaining time-to-live for the record
Static DNS Entries
ip dns static
Description
The Wandy RouterOS has an embedded DNS server feature in DNS cache. It allows you to link
the particular domain names with the respective IP addresses and advertize these links to the DNS
clients using the router as their DNS server.
Property Description
name (text) - DNS name to be resolved to a given IP address
address (IP address) - IP address to resolve domain name with
Example
To add a static DNS entry for www.example.com to be resolved to 10.0.0.1 IP address:
[admin@Wandy] ip dns static> add name www.example.com address=10.0.0.1
[admin@Wandy] ip dns static> print
# NAME ADDRESS TTL
0 aaa.aaa.a 123.123.123.123 1d
1 www.example.com 10.0.0.1 1d
[admin@Wandy] ip dns static>