cancel
Showing results for 
Search instead for 
Did you mean: 

DNS with Two names

Ayanda
Occasional Contributor

DNS with Two names

Is it possible that a DNS server to have two names
e.g. Newschool.com
Oldschool.com

Because of the transition from the oldschool to the new scholl , and after a time (about 6 months) oldschool.com will disapear and newschool.com will remain for ever.
If anyone is in Christ , he is a new creature the Old has gone , The new has come
5 REPLIES
Stefan Farrelly
Honored Contributor

Re: DNS with Two names

sure, a DNS server could respond to either name, or you could have 2 DNS servers configured into your /etc/resolv.conf file. We have 2 in ours;

domain ipc.co.uk
nameserver 10.40.224.3
nameserver 10.40.224.1

So if 224.3 is down or not working then all our DNS requests go to 224.1 so our server should be unaffected.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Ravi_8
Honored Contributor

Re: DNS with Two names

Hi,

sure, you can have 3 DNS servers. More than 3 is not allowed, while adding the DNS server use SAM to add, just by entering in /etc/resolv.conf wouldn't work.
never give up
Jeff Schussele
Honored Contributor

Re: DNS with Two names

Hi Ayanda,

If you're asking if two distinct names can point to the same IP in DNS, then the answer would be yes.
If you're asking whether you can have two names for the DNS server itself, this I believe can be done. You'd have to select one of the names to be authoritative hostname for the domain DNS server & then in it's DNS entry you'd set it up to be the CNAME, or canonical name & the second name would be the alias to the CNAME. So that when the alias, or second name is used it would point to the CNAME, or the "official" name.
Then when you no longer need the second name, you can just remove the alias.
So in your case I'd make newschool the CNAME & oldschool the alias.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: DNS with Two names

It should be added that since one uses the IP in the resolv.conf file, you'd still be able to define 3 distinct IPs to attempt resolutions.
But in theory you could have 6 separate hostnames for these three servers.

Also it's advisable that you maintain the "official" & alias hostnames in the localhost's /etc/hosts file so that if you ever have to fall back to the file (BIND dies) it won't confuse itself or fail to recognize one of the hostnames. You should probably also maintain the alias' in other key servers /etc/hosts files that will need to communicate with this host, as well.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jordan Bean
Honored Contributor

Re: DNS with Two names

A DNS server will answer for any domains you defined. (By masquerading large domains you can control what your employees can find... but I digress.)

I do know that BIND 8 and 9 support duplicated zones with a shared data file.

Naturally you'll want the NS, MX, and PTR records to reflect the new domain.

In /etc/resolv.conf, set domain to the new one and search to both.

Oh yeah, assuming you're using Sendmail on HPUX as your mail relay, you'll need to ensure that it is aware of both domains by updating either /etc/mail/sendmail.cw (if used) or the Cw line in /etc/mail/sendmail.cf.

Anything else?