DNS (Domain Name Server, domain name server) is a server that converts a domain name (domain name) and its corresponding IP address (IP address). A table of domain names and corresponding IP addresses (IP addresses) is stored in DNS to resolve the domain names of messages.
Because the mimic storage system implemented in the laboratory needs to dynamically change the ip address, a dns server needs to be built, and the servers that need to query and change the ip address are bound to the same dns server. Usually in RedHat series (eg: Fedora, Centos) systems, when we need to change the dns server is a very simple matter, you can directly modify the corresponding /etc/resolv.conf file. Just add or modify the ip address behind the nameserver. But I stupidly thought that this is the same setting under the Debian series (eg: Ubuntu, Mint), and it seems that it can be used even if it is changed, so I didn't study it carefully.
After a power outage and restart one day, the DNS service on the Ubuntu system collectively failed, and then the investigation found that the /etc/resolv.conf file was overwritten, and the originally configured dns information disappeared. As shown below:
Screenshot from 2017-11-13 08:24:46.png
囧rz! Ubuntu told you, DO NOT EDIT THIS FILE BY HAND - YOUR CHANGES WILL BE OVERWRITTEN.
System platform: Ubuntu 14.04
Let's sort through the editing rules of resolv.conf under Ubuntu, and then we can sum up how to prescribe the right medicine to deal with the problem of static DNS configuration restart failure.
Summary: The binding process of the Linux static DNS server under the Debian series of distributions has been sorted out in detail. We can use any of the above three methods. (囧rz, each method has a different syntax, cheating Linux) Of course, the RedHat series of distributions can refer to the above content, and the static configuration of the dns server process should be similar. If there are omissions, please give pointers.
Recommended Posts