Hi,
Question as simple as title, how do you refresh the dns ( clear the cache, register...) on the esx hosts?
cp /etc/resolve.conf /etc/resolve.conf.bak
\- Make a backup copy of the file
echo "nameserver 10.10.10.13" >> /etc/resolv.conf
\- Use an editor to modify the resolv.conf file and add your hosts
service network restart
\- Restart network service to update/activate changes
service network stop
\- will stop network services, and when you restart this will purge the DNS cache
cp /etc/resolve.conf /etc/resolve.conf.bak
\- Make a backup copy of the file
echo "nameserver 10.10.10.13" >> /etc/resolv.conf
\- Use an editor to modify the resolv.conf file and add your hosts
service network restart
\- Restart network service to update/activate changes
service network stop
\- will stop network services, and when you restart this will purge the DNS cache
Hello, i have a question, the /etc/resolv.conf is for the DNS servers only?.
Because when you want to use a local DNS uses the /etc/hosts .
But, in my case, i use the etc/hosts, all the hosts are defined, but when i type >hosts 192.168.1.88 , it can resolve it.
Why? is necesary to put it into the resolv.conf? i think no.
Regards
The /etc/hosts file is a local mapping file that only works for static entries on that host. The /etc/resolv.conf is to configure centrally managed DNS servers. The /etc/hosts file is manually maintained, and those entries will override what you have in DNS. If you don't mind manually editing every /etc/hosts file in your environment for every host name modification or addition, then you are ok. Otherwise, you configure DNS and have the addresses modified/added/deleted in one place and have them dynamically updated everywhere.
-KjB
Hi,
I know this is a old thread however I have a question regarding restarting the network service - will this have any adverse effect on the VMs that are currently running? Especially as there is also VMotion invovled.
Restarting the network service wont interrupt any running VMs, but could impact an in progress VMotion.
--Matt
Thanks Matt!