Introduction to DNS service:
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:
囧rz! Ubuntu has told you, DO NOT EDIT THIS FILE BY HAND — YOUR CHANGES WILL BE OVERWRITTEN.
**System environment: **
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.
Process analysis:
dns-nameservers 180.76.76.76//Support, Baidu's DNS server
dns=119.29.29.29//Tencent's DNS server
nameserver=223.5.5.5//Ali's DNS server
Static IP configuration
Ubuntu's network configuration information is placed in /etc/network/interfaces. If the configuration is configured to obtain ip dynamically, add the following content to the above file:
Use the following command to open the network configuration information file:
sudo gedit /etc/network/interfaces
Edit the file (pay attention to check if your getway is correct.):
auto eth0
iface eth0 inet static
address 192.168.8.119
netmask 255.255.255.0
gateway 192.168.8.1
After the configuration is complete, restart the network:
sudo /etc/init.d/networking restart
At this time, the modified configuration information is viewed
to sum up
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, the static configuration of the dns server process should be similar.
Well, the above is the entire content of this article. I hope that the content of this article has a certain reference learning value for everyone's study or work. If you have any questions, you can leave a message and communicate. Thank you for your support to ZaLou.Cn.
Recommended Posts