Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CNAME --> A Record --> Why?

Status
Not open for further replies.

mjpearson

Technical User
Dec 13, 2002
196
US
I've been reading and reading about DNS and now attempting to apply. Slow going but I'm making progress. I still don't have it running full but hope to do so soon.

I read somewhere that CNAME should only point to A-Record. It should not point to CNAME. Why? Is it a technical limitation or is it for convention only?

I have a production server that is old and can only handle 8-char host-names. It needs to push data to PCs in the field. My corporation sends PCs into the fied that are configured with 8+char host-names. Thus, I'd like to use some sort of translation so I think I need to do CNAME --> CNAME translation but I'm not sure it can be done.

Here is my idea:

Set up my local server with DNS. Have my local server be the primary local zone like this mydomain.corpdomain.com. The corporate folks will look like this corpdomain.com. I configure my DNS with CName --> CName like this:

mycomputer.mydomain.corpdomain.com IN CNAME theirname.corpdomain.com

When my server pushs data out, it'll use myname (<8char) name. It'll get translated by my DNS system to the new theirname (>8char) name. The new name theirname.corpdomain.com will then be sent to the corporate DNS for translation to IP.

Can this be done?

mike
 
As far as I know, there is no limitation to CNAME->CNAME.
The example you give doesn't seem to be a CNAME->CNAME (unless theirname.corpdomain.com is a CNAME)

Operationally, a CNAME chain can be hard to unravel, or someone could accidentally unlink something in the middle, creating chaos. It sometimes requires an extra query.

Sometimes you don't have any control of the target. Suppose I add a CNAME pointing to a valid A record, but I don't control that domain. And they decide to change that A record to point to a CNAME. Now my CNAME points to a CNAME. Does that make it fail? No.


 
Thanks EGP,

Yes, it gets a bit convoluted and trying to explain it in writing is difficult.

I think you get the idea. Effectively, I'm trying to put a single machine in to two different domains BUT, each name/domain is getting resolved by two different DNS systems. Each DNS believes they own the same machine but under different name(s)/domain(s).

The first DNS server (mine) does the CName.mydomain.com -> CName.corpdomain.com alias conversion. (The first DNS will convert the 8char name to 8+char name and append a different domain name). On the second pass through my DNS (with the new name and domain), my DNS should recognize that the name has a different domain that is outside of it's scope and should now pass the request to the corporate DNS. I'll be sending the new 8char name/domain to the corporate DNS to resolve. The corporate will then resolve the DHCP address and return the IP address to me.

>>The example you give doesn't seem to be a
>>CNAME->CNAME (unless theirname.corpdomain.com
>>is a CNAME)

theirname.corpdomain.com is a DHCP address and I don't know enough about DHCP and DNS to answer. But I would venture to to say that it probably is a CName by virtue of the DHCP.

Thanks for your insight. I guess I need to finalize my DNS, get it running and test.

Thanks again,

mike

 
You can determine (with nslookup or dig) if the target is a cname or a record. I would say it most likely is an a record.

Like so:

$ nslookup theirname.corpdomain.com

Server: a.b.c.d
Address: a.b.c.d#53

theirname.corpdomain.com canonical name = theirothername.corpdomain.com.
Name: theirothername.corpdomain.com
Address: f.e.g.h
>

Would like like a CNAME (canonical name) or
this would like like an A:

$ nslookup theirname.corpdomain.com

Server: a.b.c.d
Address: a.b.c.d#53

Name: theirothername.corpdomain.com
Address: f.e.g.h
>



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top