The esxcli network ip dns command lists and specifies the DNS configuration of your ESXi host.
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.The following example illustrates setting up a DNS server. Specify one of the options listed in Connection Options in place of <conn_options>.
2 Add a server by running esxcli network ip dns server add and specifying the server IPv4 address or IPv6 address.
3 Change the settings with esxcli network ip dns.
■ Specify the DNS server using the --dns option and the DNS host.
■
■
2 If the DNS properties are set, and you want to change the DHCP settings, you must specify the virtual network adapter to use when overriding the system DNS. Override the existing DHCP setting as follows:The vicfg-dns command lists and specifies the DNS configuration of your ESXi host. Call the command without command-specific options to list the existing DNS configuration. You can also use esxcli network ip dns for DNS management.
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 not desirable, you can configure static DNS information, including a host name, primary name server, secondary name server, and DNS suffixes.The following example illustrates setting up a DNS server. Specify one of the options listed in Connection Options in place of <conn_options>.
1 Run vicfg-dns without command-specific options to display DNS properties for the specified server.
2
■ Specify the DNS server by using the --dns option and a comma-separated list of hosts, in order of preference.
■
■
3 To turn on DHCP, use the --DHCP option.
1 Run vicfg-dns without command-specific options to display DNS properties for the specified server.The information includes the host name, domain name, DHCP setting (true or false), and DNS servers on the ESXi host.
2 If the DNS properties are set, and you want to change the DHCP settings, you must specify the virtual network adapter to use when overriding the system DNS. v_nic must be one of the VMkernel network adapters.