Copyright statement: This article is an original article of hard work, and all major self-media platforms are updated simultaneously. Welcome to reprint, please indicate the source, thank you.
The virtualization project has recently come to an end. Our virtualization platform is based on the underlying system of Ubuntu customized Linux. Today a service needs to use the DNS service of the external network, so it is necessary to configure the DNS address as a RHEL7-based operator Maintenance engineer, the previous method is not very effective. Configured in /etc/resolv.conf: nameserver 114.114.114.114, it is found to be invalid after the next restart, and it has to be reconfigured.
The Ubuntu version I use is:
root@Geeklp:~# cat /etc/issue
Ubuntu 12.04 LTS \n \l
After checking the information, the permanent configuration file for configuring the dns of the Ubuntu system is: /etc/network/interfaces. For example, to configure the DNS address for the network card vswitch0, add a line below, with the content:
dns-nameservers 114.114.114.114
After the configuration is complete, the configuration file of the entire network card is:
auto vswitch0
iface vswitch0 inet static
address 10.18.9.23
netmask 255.255.255.0
gateway 10.18.9.254
network 10.18.9.0
broadcast 10.18.9.255
dns-nameservers 114.114.114.114
Recommended Posts