Tip

This is the documentation for the 20.10 version. Looking for the documentation of the latest version? Have a look here.

Basic System Information

The TNSR CLI can set several basic elements about the system itself, which also serves as a good introduction to making changes on TNSR. These settings are made in config mode.

Tip

These values are also propagated to SNMP, if configured. See Simple Network Management Protocol for information on setting up SNMP.

The following parameters are available:

system contact <text>:

System contact information, such as an e-mail address or telephone number (sysContact in SNMP).

system description <text>:

A brief description of this TNSR instance, for example its role or other identifying information (sysDescr in SNMP).

system location <text>:

The location of this TNSR instance, for example a physical location such as a building name, room number, rack number/position, or VM host (sysLocation in SNMP).

system name <text>:

The hostname of this TNSR instance (sysName in SNMP).

Warning

This setting also changes the hostname in the host operating system to match, replacing any previously configured hostname.

This example shows how to set the above parameters, starting from master mode:

gw tnsr# configure
gw tnsr(config)# system contact support@example.com
gw tnsr(config)# system description TNSR Lab Router
gw tnsr(config)# system location HQ MDF/Rack 2 Top
gw tnsr(config)# system name labrtr01
labrtr01 tnsr(config)# exit

To view the values of these parameters, along with uptime and memory usage, use the show system command from either master or config mode:

labrtr01 tnsr# show system
    description: TNSR Lab Router
    contact: support@example.com
    name: labrtr01
    location: HQ MDF/Rack 2 Top
System Parameters:
    object-id: 1.3.6.1.4.1.13644
    uptime: 1303615 seconds
    total-ram: 8004488 KiB
    free-ram: 3236820 KiB
    total-swap: 2932732 KiB
    free-swap: 2932732 KiB

Platform:
    os-name: Linux
    os-release: 3.10.0-957.21.3.el7.x86_64
    os-version: CentOS Linux release 7.6.1810 (Core)
    machine: x86_64

Product:
    product-vendor: Netgate
    product-name: TNSR
    product-model: x
    product-serial: 0

System DNS Resolution Behavior

The way TNSR and the host OS resolve hostnames via DNS can be fine-tuned if necessary. DNS resolution behavior has a separate configuration for each namespace (Networking Namespaces).

The default behavior in each namespace depends on the interface configuration. For example, if an interface is configured for DHCP, the DNS server supplied by the DHCP server will be used automatically.

DNS resolution behavior is configured using the system dns-resolver <namespace> command, which enters config-dns-resolver mode. In that mode, the following commands are available:

server <ip-addr>:

Configures a DNS server IP address to be used as a forwarding DNS server in this namespace. This command may be repeated multiple times to configure multiple servers.

search <domain>:

Configures a search domain, which is appended to hostnames without a domain name if a result is not found. This command may be repeated multiple times to configure multiple search domains.

DNS Resolution Examples

If Unbound is active and allows queries from 127.0.0.1, then the dataplane can be configured to use it as a DNS server:

tnsr(config)# system dns-resolver dataplane
tnsr(config-dns-resolver)# server 127.0.0.1
tnsr(config-dns-resolver)# exit

Since the host namespace cannot access unbound running in the dataplane namespace, it must use a different external DNS server. Configure the host operating system namespace to use specific forwarding DNS servers directly as follows:

tnsr(config)# system dns-resolver host
tnsr(config-dns-resolver)# server 8.8.8.8
tnsr(config-dns-resolver)# server 8.8.4.4
tnsr(config-dns-resolver)# exit