Skip to content

DNS, NTP and Static Hosts

This page covers three name and time settings of the System tab: the NTP servers the router synchronises its clock with, the upstream DNS servers it uses, and static DNS entries (IP hosts). For where the System tab is and how its tick boxes work, see System Settings.


NTP Time Servers

The router synchronises its clock with up to two NTP servers. Correct time matters more than it seems: log timestamps, certificate checks (RadSec, VPN), scheduled jobs and reports all depend on it.

GUI Configuration

Tick NTP Time Servers and enter the servers in the list. Click the red button on a row to remove it.

NTP and DNS servers

Field Example Description
NTP Server time1.google.com IP address or host name of an NTP server. The first row is the primary server, the second the secondary. A host name needs working DNS.

CLI Configuration

ip ntp-server time1.google.com time2.google.com
!

On firmware with the system block, the same setting is stored and shown as:

system
 ntp-server time1.google.com time2.google.com
!

Add the keyword local (ntp-server <ntp1> <ntp2> local) to also serve the router's time to NTP clients on its networks. This option is set in the CLI only.

Tip

Use NTP servers that the router can always reach. If the router reaches the internet only through a VPN, point it to an NTP server inside your network, or allow NTP (UDP 123) out through the WAN.


DNS Name Servers

The router uses these upstream DNS servers for its own lookups and forwards queries from its DHCP clients to them. Enter up to two servers.

GUI Configuration

Tick DNS Name Servers and enter the servers in the list (see the screenshot above).

Field Example Description
Name Server 8.8.8.8 IP address of an upstream DNS server. The first row is the primary server, the second the secondary.

Note

Unticking DNS Name Servers does not remove the servers from the router: a router without DNS cannot resolve update servers, NTP host names or mFusion. To change the servers, tick the setting and enter the new ones.

CLI Configuration

ip name-server 8.8.8.8 8.8.4.4
!

On firmware with the system block:

system
 name-server 8.8.8.8 8.8.4.4
!

For how DHCP clients receive DNS servers, see DHCP & DNS and DNS & DNS Rewrite.


Static FQDN-IP Mapping

Static host entries (IP hosts) answer DNS queries for a name with a fixed address. They are used to override a public name for internal clients (split DNS), to give a local server a name, or to switch a name to a backup server when the primary is down.

GUI Configuration

Tick Static FQDN-IP Mapping (IP Host), then click Add IP Host, fill in the form, and click Continue.

Add an IP host

Field Example Description
FQDN (Host Name) nas.example.com The name to answer for. Required.
Host IP 192.168.10.20 The address returned for the name.
Rewrite On On: the router returns this address to all clients that use it as their DNS server (DNS override). Off: the entry is used only for the router's own lookups.
Enable Tracking Off Serve the entry only while a tracked host is reachable, and switch to a backup address (or remove the entry) when it is not. The tracking fields appear when ticked; see Tracked DNS Entry.

The entry appears in the list. Use the edit and delete buttons on a row to change or remove it.

IP host list

CLI Configuration

ip host nas.example.com 192.168.10.20 rewrite
!

On firmware with the system block:

system
 host nas.example.com 192.168.10.20 rewrite
!
Form Behaviour
ip host <fqdn> <ip> rewrite All clients that query the router get <ip> for <fqdn>
ip host <fqdn> <ip> Only the router's own lookups use the entry
ip host <fqdn> reject Clients get 0.0.0.0: the name is blocked (CLI only)
ip host <fqdn> <ip> rewrite track icmp <target> <interval> backup <ip2> Tracked entry: <ip2> is returned while <target> is unreachable

Warning

A rewrite affects only clients that use the router as their DNS server. Clients with a hard-coded public DNS server bypass it. To force all DNS queries through the router, redirect them with a DNAT rule. See DNS & DNS Rewrite.


Verification

Items to Test Command Expected Outcome
NTP servers configured show running-config ntp-server (under system) or ip ntp-server lists the configured servers
Clock synchronised show clock The time matches a reference clock within a second
DNS servers in use ping www.ransnet.com The router resolves the name to an address and gets replies
Static entry for clients From a LAN client: nslookup nas.example.com <router-LAN-IP> Answer 192.168.10.20
Static entry on the router ping nas.example.com The router pings 192.168.10.20

Troubleshooting

Symptom Likely Cause Solution
Clock is wrong after a reboot NTP servers unreachable, or a host name that does not resolve Use IP addresses or reachable servers; check that UDP 123 is allowed out; run show clock after a few minutes
Log times are off by whole hours Wrong time zone Set Timezone on the System tab, see Hostname and Timezone
Router cannot resolve names DNS servers unreachable through the active WAN Test with ping 8.8.8.8; choose DNS servers reachable from every WAN
Clients still get the public address of an overridden name Rewrite off, or the client uses another DNS server Turn Rewrite on; check the client's DNS server; redirect DNS with DNAT
A tracked entry returns the backup address The tracked host failed two consecutive probes Check the tracked host; the primary address returns as soon as one probe succeeds

Best Practices

  • Configure two NTP and two DNS servers so that one failure does not affect the router.
  • Prefer IP addresses for NTP on routers whose DNS depends on a tunnel that needs correct time to come up.
  • Keep overrides in one place. Put fleet-wide static entries in the System template and only site-specific ones on Local System.

Security Best Practices

  • Use trusted DNS servers. The router forwards client queries to them; a resolver you control, or a filtering resolver, protects all clients behind the router.
  • Do not expose the router's DNS to the WAN. Allow DNS (UDP/TCP 53) to the router only from internal networks in the firewall-input rules.
  • For hardening guidance, see Device Hardening.