Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Our organization (with a domain, say, a.com) just bought a new domain (b.com), and we would like to set up the DNS so that we have a second identity as b.com while keeping a.com.

We are running named, and would like to find the most painless (and elegant) way to replicate all the subdomains as well as IP addresses from a.com to b.com, so that sub1.b.com starts to point automatically to the CNAME entry next to sub1 in zone file of a.com.

Is there an easy way of telling bind that all the info about b.com is also in the same zone file which was, so far, serving a.com? (Is it just about creating another entry in the .conf file for b.com and pointing it to the same file?)

Thanks

share|improve this question
    
I'm not the expert on this, but I found this. If it helps, great: dinakumar12.wordpress.com/2010/04/22/… –  TheCleaner May 3 '12 at 23:21
    
Well, if you defined $ORIGIN in your a.com zone file, then changing the value from a.com to b.com would, in essence, replicate the a.com zone to b.com without using CNAMES. Alternatively, you could use a simple regex (or wordpad) find/replace function to edit the zone files. –  bangdang May 3 '12 at 23:49
1  
The easiest way is to craft the zone file such that you can use exactly the same zone file for both zones. –  David Schwartz May 3 '12 at 23:51
    
Thanks guys, I fixed it by not setting a $ORIGIN in my zone file, and then referring to it from each of my domain's entries in named.conf. If you could post your response as an "answer", I'd be happy to mark it as the accepted answer. –  Animesh May 9 '12 at 14:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.