So I have Ubuntu 14.04 VMs running in an OpenStack environmnet. The DNS machine has an external IP (10.14.6.3) and an internal IP (192.168.1.3). I have two other machines within the same project [h1] that has an external ip (10.14.6.4) and an internal IP (192.168.1.4) and [n1] that has an external ip (10.14.6.5) and internal IP (192.168.1.5).
h1 and n1 have the DNS Machine's IP set in their resolv.conf, and can resolve correctly.
I have also set my local machine (outside openstack) to use 10.14.6.3 as my DNS server.
In the DNS machines Bind db file, I have the following entries:
h1 IN A 192.168.1.4 h1 IN A 10.14.6.4 n1 IN A 192.168.1.5 n1 IN A 10.14.6.5
the pointer file has the following:
1 IN PTR h1. 2 IN PTR h1. 3 IN PTR n1. 4 IN PTR n1.
My local machine only can talk to the 10.14 subnet. I want h1 and n1 to resolve each other via the 192.168 subnet (not the 10.14).
Most of the time, this works fine. If I ping h1 from n1, it resolves as 192.168.1.4 If I ping h1 from my local machine, it resolves as 10.14.6.4
Occasionally however, if I ping from either machine, the other IP will be used. Sometimes my local machine resolves h1 to 192.168.1.4, which won't work.
My question is, is there a way to force a sequential resolution without using a local host file? I want the machines inside openstack to resolve each other via local IP 192.168.x.x And I want machines external to openstack to resolve the names via the machines external IPs 10.14.x.x