I have a CentOS 6.4 box.
As with all the other boxes in this rack, it has two NICs: one internal (192.168.1.x) and one external (visible to the world).
We run our own cacheing resolver (using Unbound) on one of the servers in our rack (192.168.1.11), and it has some local DNS entries configured (mario.local, luigi.local, etc.) so that we can simply ping/ssh/ftp to "hostname" FROM any local box TO any other local box without going over one of the external switches (which incurs charges from our ISP).
If my /etc/resolv.conf looks like this:
search local nameserver 192.168.1.11 nameserver 220.127.116.11 nameserver 18.104.22.168
and I ping "mario" I get:
# ping mario PING mario.local (192.168.1.3) 56(84) bytes of data. 64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.738 ms
However, the local DNS server is much slower than the Google public DNS server, so I'd prefer to have that one first in the list. So if I change /etc/resolve.conf to this:
search local nameserver 22.214.171.124 nameserver 192.168.1.11 nameserver 126.96.36.199
I would expect a ping to "mario" to attempt resolution of mario.local on 188.8.131.52, fail, then query the 2nd DNS server in the list (192.168.1.11) and resolve. But instead, I get:
# ping mario ping: unknown host mario
Any idea what I'm doing wrong - or am I misunderstanding how resolve.conf is supposed to work? I'm wondering if it could it be related to routing.
My expectation is that if the first DNS server can't resolve an IP, the second resolv.conf entry gets a shot, but that's not working. Help!