Fortinet white logo
Fortinet white logo

CLI Reference

config system dns

config system dns

Configure DNS.

config system dns
    Description: Configure DNS.
    set primary {ipv4-address}
    set secondary {ipv4-address}
    set domain {string}
    set ip6-primary {ipv6-address}
    set ip6-secondary {ipv6-address}
    set dns-cache-limit {integer}
    set dns-cache-ttl {integer}
    set cache-notfound-responses [disable|enable]
    set source-ip {ipv4-address}
    set server-select-method [least-rtt|failover]
    set alt-primary {ipv4-address}
    set alt-secondary {ipv4-address}
    set log [disable|error|...]
end

config system dns

Parameter

Description

Type

Size

primary

Primary DNS server IP address.

ipv4-address

Not Specified

secondary

Secondary DNS server IP address.

ipv4-address

Not Specified

domain

Domain name suffix for the IP addresses of the DNS server.

string

Maximum length: 127

ip6-primary

Primary DNS server IPv6 address.

ipv6-address

Not Specified

ip6-secondary

Secondary DNS server IPv6 address.

ipv6-address

Not Specified

dns-cache-limit

Maximum number of records in the DNS cache.

integer

Minimum value: 0 Maximum value: 4294967295

dns-cache-ttl

Duration in seconds that the DNS cache retains information.

integer

Minimum value: 60 Maximum value: 86400

cache-notfound-responses

Enable/disable response from the DNS server when a record is not in cache.

option

-

Option

Description

disable

Disable cache NOTFOUND responses from DNS server.

enable

Enable cache NOTFOUND responses from DNS server.

source-ip

IP address used by the DNS server as its source IP.

ipv4-address

Not Specified

server-select-method

Specify how configured servers are prioritized.

option

-

Option

Description

least-rtt

Select servers based on least round trip time.

failover

Select servers based on the order they are configured.

alt-primary

Alternate primary DNS server. (This is not used as a failover DNS server.)

ipv4-address

Not Specified

alt-secondary

Alternate secondary DNS server. (This is not used as a failover DNS server.)

ipv4-address

Not Specified

log

Local DNS log setting.

option

-

Option

Description

disable

Disable.

error

Enable local DNS error log.

all

Enable local DNS log.

config system dns

config system dns

Configure DNS.

config system dns
    Description: Configure DNS.
    set primary {ipv4-address}
    set secondary {ipv4-address}
    set domain {string}
    set ip6-primary {ipv6-address}
    set ip6-secondary {ipv6-address}
    set dns-cache-limit {integer}
    set dns-cache-ttl {integer}
    set cache-notfound-responses [disable|enable]
    set source-ip {ipv4-address}
    set server-select-method [least-rtt|failover]
    set alt-primary {ipv4-address}
    set alt-secondary {ipv4-address}
    set log [disable|error|...]
end

config system dns

Parameter

Description

Type

Size

primary

Primary DNS server IP address.

ipv4-address

Not Specified

secondary

Secondary DNS server IP address.

ipv4-address

Not Specified

domain

Domain name suffix for the IP addresses of the DNS server.

string

Maximum length: 127

ip6-primary

Primary DNS server IPv6 address.

ipv6-address

Not Specified

ip6-secondary

Secondary DNS server IPv6 address.

ipv6-address

Not Specified

dns-cache-limit

Maximum number of records in the DNS cache.

integer

Minimum value: 0 Maximum value: 4294967295

dns-cache-ttl

Duration in seconds that the DNS cache retains information.

integer

Minimum value: 60 Maximum value: 86400

cache-notfound-responses

Enable/disable response from the DNS server when a record is not in cache.

option

-

Option

Description

disable

Disable cache NOTFOUND responses from DNS server.

enable

Enable cache NOTFOUND responses from DNS server.

source-ip

IP address used by the DNS server as its source IP.

ipv4-address

Not Specified

server-select-method

Specify how configured servers are prioritized.

option

-

Option

Description

least-rtt

Select servers based on least round trip time.

failover

Select servers based on the order they are configured.

alt-primary

Alternate primary DNS server. (This is not used as a failover DNS server.)

ipv4-address

Not Specified

alt-secondary

Alternate secondary DNS server. (This is not used as a failover DNS server.)

ipv4-address

Not Specified

log

Local DNS log setting.

option

-

Option

Description

disable

Disable.

error

Enable local DNS error log.

all

Enable local DNS log.