Specify a Different Nameserver in /etc/resolv.conf When Using DHCP in CentOS 7
Using dhcp within a ifcfg network configuration file you may want to specify a different nameserver instead of using the nameserver assigned by the DHCP server. Use the PEERDNS, DNS1 and DNS2 options. To check that it all works grep ^nameserver /etc/resolv.conf If you want to use the nameservers that are provided by DHCP server […]