Using DNS entries to determine location
- by Raphink
I'm trying to think of a clean way to determine the location of machines (mainly, which datacenter they belong to) based on their network settings.
I would like it to be dynamic, and I'm thinking of using special DNS records that would be specific to the DNS server in each datacenter.
For example, you could have:
root@machine1# dig TXT mysite
...
mysite 3600 IN TXT "DC1"
...
root@machine2# dig TXT mysite
...
mysite 3600 IN TXT "DC2"
...
etc.
I know that DNS has a special LOC record for location, but it takes coordinates, so it doesn't help in my case. Is there a standard way of addressing this issue, another special type of record for it, or some standard entries in TXT records?