Linux, a small note about dns configuration

One,

As FIG.

I was card configuration file is a static mode, then DNS1 = 114.114.114.114.

Is wondering, this is why

Subsequently, I was the network card configuration file, modify the DNS1 = 114.114.114.113.

Check again after the restart service resolv.conf file, along with my configuration is changed, then I wonder, if the file is only mapped network card configuration on dns, then, why the existence of this document, what is its raison d'etre .

two,

The resolv.conf configuration file, although they can be modified to add or remove, but once restart the network service, your modifications will be fully cleared.

DNS is that you finally take effect in dhcp mode or static mode specified in the ifcfg-ens ** This file DNS. If you are in DHCP mode, and, as you yourself configured on your computer: DNS1 = 114.114.114.114; after you restart the network service, you see in the resolv.conf file is eventually you specify, and DHCP assigned to the two sources of dns dns.

Then there is no need to tangle, how to keep yourself resolv.conf file is always free to modify.

three,

When we resolve domain names, to find the machine there is no mapping hosts; then, according to the specified DNS server card profile; subsequent, according to the configuration file to resolve requests for DNS resolution respective server

Clear understanding, we configure the DNS network card configuration file has the highest priority, followed by a DHCP server

Guess you like

Origin www.cnblogs.com/joinbestgo/p/10959924.html