dns

This command allows specifying a list of DNS servers. The list is saved in the /etc/systemd/resolved.conf file (if the systemd-resolved service is started) or in the /etc/resolv.conf file (if the systemd-resolved service is not installed or started). The servers are used in the order in which they are specified. The previously configured list of DNS servers is deleted.

If you also want to configure DHCP (the dhcp command) and use a manually specified DNS server, run the dns command after running the dhcp command and restarting the SVM or the network service (the manageservices restart network command).

If obtaining DNS servers via DHCP is configured, this command disables it.

Settings

[<Server1>] [<Server2>] [<Server3>]

where <Server> is the IP address of the DNS server (optional parameter). You can specify up to three IP addresses.

If the command is run without options (no address is specified), all DNS records in the /etc/systemd/resolved.conf file (if the systemd-resolved service is started) or in the /etc/resolv.conf file (if the systemd-resolved service is not installed or started) are deleted.

Example:

> ssh klconfig@192.0.2.17 dns 192.0.2.45 198.51.100.7

> klconfig@192.0.2.17's password:

KLCONFIG OK

Specific errors

Wrong IP address format <address>. IP address not specified or does not meet the requirements.

Page top