split DNS?
Sky Me
snowmountainflyfox at gmail.com
Fri May 25 02:03:02 UTC 2007
Hello list,
Given the case there're two ISPs exist,and some clients belong to ISP
A,some clients belong to ISP B.Accessing from ISP A to ISP B is very
slow,then we need to put services on both ISPs.Given the server host
ip on ISP A is: 11.11.11.11,and the server host ip on ISP B is:
22.22.22.22,surely they run the same service.
Ok when clients in ISP A access the service (given the service name is
foo.example.com),their requests would be brought to
11.11.11.11.Otherwise when clients in ISP B access the same
service,they would go to 22.22.22.22.
How to do it?The way currently I used is:
Set a CNAME for 'foo.example.com' to 'foo.split.example.com' in main
DNS.Here 'split.example.com' is a seperate domain,it has its own NS
server,which is different from main DNS,let me call it split-dns.When
querying for 'foo.split.example.com' reach split-dns,it answer
different CNAME results based on which ISPs clients' IPs belong to.
For example,if client's IP is ISP A's,then split-dns answer the result:
ispa.foo.example.com
if client's IP is ISP B's,it answer the result:
ispb.foo.example.com
Then in main DNS,'ispa.foo.exampe.com' would finally be pointed to
11.11.11.11,and 'ispb.foo.example.com' would finally be pointed to
22.22.22.22.
The whole process for ISP A is:
foo.example.com CNAME foo.split.example.com #1
foo.split.example.com CNAME ispa.foo.example.com #2
ispa.foo.example.com A 11.11.11.11 #3
The whole process for ISP B is:
foo.example.com CNAME foo.split.example.com #1
foo.split.example.com CNAME ispb.foo.example.com #2
ispb.foo.example.com A 22.22.22.22 #3
The #1 and #3 were happend on main DNS,the #2 was happened on split-dns.
For main DNS we use BIND 9,the split-dns was written by me,based on
Stanford::DNSserver framework.All these work properly.
My question is, is this the best way?Is there any way can do it using
BIND's own features?Thanks guys.
--Sky
More information about the bind-users
mailing list