Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

Cannot get DNS to use 2 hosts for the same IP

I'll try to keep this simple. I want hostname "MAIL" and hostname "TRAVERSE" to resolve to the same IP: 192.168.0.2. My zone file has the following (partial):
                        A       192.168.0.2
:
:
$TTL 1200       ; 20 minutes
TRAVERSE                A       192.168.0.2
COMMON                  A       192.168.0.58

Open in new window

Unfortunately, I have a VirtualBox virtual machine named "traverse", It is somehow overriding what I have in the zone file and interjection the IP of the virtual machine so I get:
$ host traverse
TRAVERSE.hprs.local has address 10.0.2.15

Open in new window

Does anyone know how to get `host traverse` to return 192.168.0.2? I've been researching this for days with no joy.
Avatar of mbkitmgr
mbkitmgr
Flag of Australia image

What DNS are you using e.g. Server 2012 R2
ASKER CERTIFIED SOLUTION
Avatar of Chris Jones
Chris Jones
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Shaun Vermaak
Maybe I do not understand question correctly... Why not use a CNAME?
Avatar of Mark
Mark

ASKER

mbkitmgr:
What DNS are you using ...
Linux, BIND 9.10.4.-P6 (named)

Chris Jones:
Have you ensured that the serial number of the configuration file is different when you reload the configuration?
Yes. Just did so again and no change.

Shaun Vermaak :
Maybe I do not understand question correctly... Why not use a CNAME?
I'm no DNS guru, but I believe an CNAME record is used to specify that a domain name is an alias for another domain, which is the "canonical" domain. I'm not trying to do anything with aliasing domains. I simply want `host traverse` to return 192.168.0.2, not 10.0.2.15. My understanding that that should be handled by an 'A' record, but I'm having no luck.
Avatar of Mark

ASKER

Part of issue resolved. The serial numbers on the zone file were not correct because named was looking in /etc/samba/private/dns instead of the ones I modified in /var/lib/samba/private/dns. This was a result of Slackware changing the location of samba files from Samba version 4.2.14 to 4.4.8. This bit me before. I corrected the location of the zone files. Now when I restart named I do get the correct serial number in the log. And, I get the correct host:
$ host traverse
TRAVERSE.hprs.local has address 192.168.0.2

Open in new window

However, I have not yet restarted the VM to see if it clobbers this IP. Will do so ASAP, but I'm having other problems at the moment.
Serial numbers have caught me out more than once.

It's worth double checking the configuration points towards the right file as you found out. It's also worth making sure that the reload has completely gracefully, sometimes lock files and other service/process issues have also caught me out.
Avatar of Mark

ASKER

I started the VM and now can access the SQLServer remotely using traverse:1433! That was the problem, I was looking at the wrong zone files. I thought I had fixed all those references when Samba got updated, but obviously not.