em12? em = "embedded". Do you really have 12 NICs built into your motherboard?
I suspect you have saved ifcfg-* (specifically em12 as a copy of em1) files in /etc/sysconfig/network-scripts. It is important to note that on start of networking ALL ifcfg-* files are processed even the copies you save that start with that naming. Therefore if you want to (and should) save a copy before changing a file you should prepend something to it rather than doing an append like you normally would for other files. e.g.
DO cp -p ifcfg-em1 orig-ifcfg-em1
NOT cp -p ifcfg-em1 ifcfg-em1.orig
Before going further make sure you don't have multiple ifcfg-em* files all referring to the same name.
By default RHEL6/CentOS6 use "NetworkManager" though a lot of people disabled that in favor of the older networking stack.
Run "chkconfig --list NetworkManager" to see if it is set to "on" for run levels. If so you're using NetworkManager on boot.
NetworkManager reads DNS entries out of the ifcfg-* files to create /etc/resolv.conf. If it did that there should be text in resolv.conf showing it was created by NetworkManager. It is important you only put the DNS entries in ONE ifcfg-* file because otherwise the next one might override what the first one did.
You can prevent NetworkManager from updating /etc/resolv.conf by making sure you've commented out or removed all DNS servers from the ifcfg-* files then simply create your resolv.conf with your favorite editor.
Basic options in resolv.conf:
Code:
search <domain1> <domain2>
<dns server 1>
<dns server 2>
You can add more or less search domains and/or DNS servers. There are other options available as well. "man resolv.conf" will give full details.
The "search" isn't required and just tells it to try appending the domains you list to any short name until it gets a match. e.g. if you had "search ralph.com billybob.com" then did ran a lookup command like "host", "dig" or "nslookup" for the short name "myserver" it would first try to see if myserver.ralph.com existed then if not would try to see if myserver.billybob.com existed. If not it would fail. Note that it stops on first match. You can of course always use fully qualified domain name (FQDN) in searches so doing a lookup for myserver.vickysue.com is valid even though you didn't specify vickysue.com in "search" option. However lookup of shortname "myserver" would fail if it only existed in domain vickysue.com.
Note: In NetworkManager the way it processes secondary IPs on a NIC changed. Previously you could create a file called "ifcfg-em1:1" to do that but in NetWorkManager it expects the secondary IP on same NIC to be in ifcfg-em1 itself along with the primary IP.