This is the documentation for the latest (main) development branch of Zephyr. If you are looking for the documentation of previous releases, use the drop-down menu on the left and select the desired version.

CONFIG_DNS_SERVER1

DNS server 1

Type: string

Help

DNS server IP address 1. The address can be either IPv4 or IPv6
address. An optional port number can be given.
Following syntax is supported:
192.0.2.1
192.0.2.1:5353
2001:db8::1
[2001:db8::1]:5353
It is not mandatory to use this Kconfig option at all.
The one calling dns_resolve_init() can use this option or not
to populate the server list. If the DNS server addresses are
set here, then we automatically create default DNS context
for the user.

Direct dependencies

DNS_SERVER_IP_ADDRESSES && DNS_RESOLVER && NETWORKING

(Includes any dependencies from ifs and menus.)

Defaults

No defaults. Implicitly defaults to the empty string.

Kconfig definition

At subsys/net/lib/dns/Kconfig:72

Included via Kconfig:8Kconfig.zephyr:42subsys/Kconfig:39subsys/net/Kconfig:89subsys/net/lib/Kconfig:8

Menu path: (Top) → Sub Systems and OS Services → Networking → Link layer and IP networking support → Network Protocols → DNS resolver → Set DNS server IP addresses

config DNS_SERVER1
    string "DNS server 1"
    depends on DNS_SERVER_IP_ADDRESSES && DNS_RESOLVER && NETWORKING
    help
      DNS server IP address 1. The address can be either IPv4 or IPv6
      address. An optional port number can be given.
      Following syntax is supported:
      192.0.2.1
      192.0.2.1:5353
      2001:db8::1
      [2001:db8::1]:5353
      It is not mandatory to use this Kconfig option at all.
      The one calling dns_resolve_init() can use this option or not
      to populate the server list. If the DNS server addresses are
      set here, then we automatically create default DNS context
      for the user.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)