Multiple CNAMEs - howto?

Andy Shellam (Mailing Lists) andy.shellam-lists at
Fri Oct 27 11:58:49 UTC 2006

I have 2 nameservers running BIND 9.3.2-p1.
I'm trying to achieve the following in the easiest, most efficient way 

I have 3 SMTP servers -

a) Users choose the SMTP server closest to them and relay messages 
through it
b) Users connect to and relay through that.

The SMTP servers are set up in my zone as follows:

uk1   A
uk2   A
uk3   A

However, my issues comes with the round-robin.
What I could do, is this:

exchange   IN   A
exchange   IN   A
exchange   IN   A

However, if a machine changes it's IP address, I then have to remember 
to edit 2 records (and because my zones file's in alphabetical order, 
they're at opposite ends of the file.)
The obvious solution (well obvious to a novice ;) ) would be to do:

exchange   IN   CNAME   uk1
exchange   IN   CNAME   uk2
exchange   IN   CNAME   uk3

to return uk1, uk2 or uk3 in a random order.
But of course - CNAME is a single-ton type, so BIND fails the zone for this.

Is there an easier way to do this, other than using double-A records?


Andy Shellam
the Mail Network.

More information about the bind-users mailing list