Using DNS entries to determine location
        Posted  
        
            by 
                Raphink
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Raphink
        
        
        
        Published on 2012-03-20T20:42:48Z
        Indexed on 
            2012/04/02
            11:32 UTC
        
        
        Read the original article
        Hit count: 290
        
dns
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?
© Server Fault or respective owner