Wrong IP Lookup

Kevin Darcy kcd at daimlerchrysler.com
Sat Dec 4 01:23:31 UTC 2004


Norman Zhang wrote:

>Kevin Darcy wrote:
>  
>
>>>>Try the "sortlist" config statement.
>>>>        
>>>>
>>>Thanks Nicolas. I'm currently away from the box. I'll try to do 
>>>something like the following. Will this do?
>>>
>>>view "LAN1" {
>>> match-clients { 192.168.11.0/24; };
>>>
>>> sortlist { 192.168.11.0/24; };
>>>
>>> zone "hq.arkonnetworks.com" {
>>>    type master;
>>>    file "db.hq.arkonnetworks.com";
>>>    allow-update { 192.168.11.0/24; 192.168.22.0/24; };
>>>};
>>>
>>>...
>>>      
>>>
>>If sortlist works for you, why bother with the views?
>>    
>>
>
>I used sortlist in options and it worked. But now I have a more 
>interesting situation. I've a VLAN (192.168.99.0/24) which looks up DNS 
>from 192.168.11.0/24. Thus when it resolves a multihomed host, the IPs 
>again returned in random fashion (sometimes 192.168.11.21 first and 
>somtimes 192.168.22.21 first).
>
And you want it to sort the 192.168.11.* address first, I assume? I'd 
recommend associating the relevant ranges with "acl"s -- sortlist 
maintenance becomes rather insane otherwise. So you could do something like:

acl foo { 192.168.11/24; 192.168.99/24; };

options {
    sortlist { foo; foo; };

Now any client coming from either the 192.168.11/24 or 192.168.99/24 
range will get an A record in the 192.168.11/24 or 192.168.99/24 range 
sorted to the top of any response.

>I'm wondering do I really need to use views now?
>
Probably not. My question above was mostly rhetorical.

                                                                         
                                 - Kevin




More information about the bind-users mailing list