Configure DNS in ESXi using the cli

List DNS servers

~ # esxcli network ip dns server list
   DNSServers: 192.168.76.2
~ #

Add DNS server

~ # esxcli network ip  dns server add -s 8.8.8.8
~ # esxcli network ip dns server list
   DNSServers: 192.168.76.2, 8.8.8.8
~ #

Remove DNS server

~ # esxcli network ip  dns server remove -s 8.8.8.8
~ # esxcli network ip dns server list
   DNSServers: 192.168.76.2
~ #

List DNS search list

~ # esxcli network ip dns search list
 DNSSearch Domains: localdomain
 ~ #

Add DNS search list

~ # esxcli network ip dns search add -d intra.rtfmp.com
~ # esxcli network ip dns search list
DNSSearch Domains: localdomain, intra.rtfmp.com
~ #

Remove DNS search list

~ # esxcli network ip dns search remove -d intra.rtfmp.com
~ # esxcli network ip dns search list
DNSSearch Domains: localdomain
~ #
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s