Multiple CNAMEs - howto?

Andy Shellam (Mailing Lists) andy.shellam-lists at mailnetwork.co.uk
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 
possible.

I have 3 SMTP servers -
uk1.exchange.mailnetwork.co.uk
uk2.exchange.mailnetwork.co.uk
uk3.exchange.mailnetwork.co.uk

Either:
a) Users choose the SMTP server closest to them and relay messages 
through it
b) Users connect to exchange.mailnetwork.co.uk and relay through that.

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

$ORIGIN mailnetwork.co.uk.
uk1   A   84.45.66.158
uk2   A   80.175.28.46
uk3   A   80.175.29.73

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

$ORIGIN mailnetwork.co.uk.
exchange   IN   A   84.45.66.158
exchange   IN   A   80.175.28.46
exchange   IN   A   80.175.29.73

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:

$ORIGIN mailnetwork.co.uk.
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?

Thanks,

Andy Shellam
the Mail Network.



More information about the bind-users mailing list