This is a discussion on Re: BIND to give different response for different AS/source IP - DNS ; Jacek Ska=BCnik wrote: >Hi, > >In my company we have 2 FR links to different ISPs, but we're unable to=20 >get BGP. As far as we know our local customers (let's say from 30 or so=20 >ASes) get better response ...
Jacek Ska=BCnik wrote:
>In my company we have 2 FR links to different ISPs, but we're unable to=20
>get BGP. As far as we know our local customers (let's say from 30 or so=20
>ASes) get better response time (ping, hops) via Link1, but all the=20
>others get better response via Link2. Is there a way to configure Bind=20
>to respond one IP for some AS/source ip address and different IP for=20
>another source AS/IP address? It would be just like round-robin in a=20
>way, but should check in some external DB/file which IP address should=20
>be resolved from a domain name for particular source.
If you don't mind some occasional "crossflow" you could define the=20
name(s) with all addresses and then use a sortlist to sort the responses=20
according to the query source address. This will only work, however, if=20
you control all of the nameservers that are answering these queries for=20
clients, or you can tolerate really tiny TTL values -- and therefore a=20
much higher query volume -- to prevent intermediate nameservers from=20
rearranging the order of the records when answering from cache. Another=20
requirement is that the nameserver actually sees the client source=20
addresses (as opposed to the address of a intermediate proxy,=20
load-balancer or whatever).
Failing that, you could have separate "view"s configured for each link,=20
where each view's version of the zone in question has different=20
contents. But this is a maintenance issue since you would need to define=20
*every* zone served by the nameservers in each view (although include=20
files and other tricks can ease this burden somewhat).