The esxcli network ip dns command lists and specifies the DNS configuration of your ESXi host.

Important

If you try to change the host or domain name or the DNS server on hosts that use DHCP, an error results.

In network environments where a DHCP server and a DNS server are available, ESXi hosts are automatically assigned DNS names.

In network environments where automatic DNS is not available or you do not want to use automatic DNS, you can configure static DNS information, including a host name, primary name server, secondary name server, and DNS suffixes.

The esxcli network ip dns namespace includes two namespaces.

esxcli network ip dns search includes commands for DNS search domain configuration.

esxcli network ip dns server includes commands for DNS server configuration.