I have a complex DNS environment, consisting of multiple DNS hosts (environment is not AD Integrated DNS) where I have 2 x CNAME records, in different DNS Zones, that both reference the same A record (in another zone, and hosted on a different DNS Server).
One of the CNAMES, when checked via nslookup, returns the A record name and its IP Address The other CNAME when checked via nslookup only returns the A record name. it does not return the IP Address of the A record. Due to company security reasons, I cannot provide actual DNS names or server IPs, so I have substituted the relevant details as per below examples.
eg: Hosted on DNS Server1 (Windows 2012R2) CNAME 1 - bart.domain.com (points to marshall.pawpatrol.nicjunior.nickelodeon.domain.com) CNAME 2 - bert.seasamestreet.domain.com (points to marshall.pawpatrol.nicjunior.nickelodeon.domain.com)
Hosted on F5 load balancer A Record - marshall.pawpatrol.nicjunior.nickelodeon.domain.com, IP 10.23.1.10, TTL is 5 minutes
DNS Zone domain.com, seasamestreet.domain.com are hosted on DNS Server1.
DNS Zone nickelodeon.domain.com is a delegated zone on a Linux server (I do not manage it) DNS Zone nicjunior.nickelodeon.domain.com is a delegated zone on another system (unknown OS as I do not manage it) DNS zone pawpatrol.nicjunior.nickelodeon.domain.com is a delegated zone on an F5 load balancer (I do not manage it)
If bart.domain.com is queried, it returns the A record name & IP
if bert.seasamestreet.domain.com is queried, it only returns the A record name.
This happens regardless if I use nslookup or dig. Queries of the A record directly all return the name & IP Address, regardless of what DNS server I query.
Is someone able to explain why one CNAME would return the A record and IP, but the other CNAME doesn't?
I believe I have determined the cause of the error. Found that in the domain.com.dns file (Windows server hosting the DNS record) that at the end of the A record the CNAME DNS record entry referenced was the characters "\012".
This is an ASCII character for Line Feed. Effectively the line read:
bert.seasamestreet.domain.com CNAME marshall.pawpatrol.nicjunior.nickelodeon.domain.com\012.
Removal of the characters "\012" and reloading the zone file resolved the issue.