<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, Oct 25, 2016 at 2:04 AM,  <span dir="ltr"><<a href="mailto:HsuLiPing@itri.org.tw" target="_blank">HsuLiPing@itri.org.tw</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">




<div dir="ltr" style="font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255);font-family:calibri,arial,helvetica,sans-serif">
<p>From 9.1 ARM chapter 7 that mention</p>
<p>The EDNS Client Subnet (ECS) option is used by a recursive resolver to inform an authoritative<br>
name server of the network address block from which the original query was received, enabling<br>
authoritative servers to give different answers to the same resolver for different resolver clients.<br>
<b></b></p>
<p><b></b> </p>
<p><b style="color:rgb(255,0,0)"><span style="color:rgb(255,0,0)">An ACL containing an element of the form ecs prefix will match if a request arrives in containing</span></b><br style="color:rgb(255,0,0)">
<b style="color:rgb(255,0,0)"><span style="color:rgb(255,0,0)">an ECS option encoding an address within that prefix. If the request has no ECS option,</span></b><br style="color:rgb(255,0,0)">
<b style="color:rgb(255,0,0)"><span style="color:rgb(255,0,0)">then "ecs" elements are simply ignored</span></b>. Addresses in ACLs that are not prefixed with "ecs" are<br>
matched only against the source address.</p>
<p> </p>
<p>Now i was migrate DNS bint fro 9.10 to 9.11 and use ECS prefix on my allow-query entry but when i use dig
</p>
<p>test (not include +subnet) it not response but when i remvoe that ecs keyword every thing was OK.</p>
<p> </p>
<p>I was use bind 9.11 setup three dns server one for mydomain.idv and two are sub.mydomain.idv.</p>
<p>my sub.mydomain.idv has multi view but has same zone. </p>
<p>when i use dig query sub.mydomain.idv entry it always return last match view, it will not reponse by client subnet</p>
<p>following was my partial named.conf content </p>
<p> </p>
<p>====================sub.<wbr>mydomain.idv (Primary server -ip:a.b.c.d) =====================</p>
<p>acl "slave-ips" { a.b.c.d; };</p>
<p>server  a.b.c.d {<br>
        provide-ixfr yes;<br>
        request-nsid yes;<br>
        send-cookie yes;<br>
        edns-udp-size 4096;<br>
        max-udp-size 4096;<br>
        transfer-format many-answers;<br>
        };</p>
<p>server  a1.b1.c1.d1 {  // mydomain.idv primary server<br>
        request-nsid yes;<br>
        send-cookie yes;<br>
        edns-udp-size 4096;<br>
        max-udp-size 4096;<br>
        };</p>
<p>include "d:\isc bind 9\etc\ecs-acl-list.txt";<br>
include "d:\isc bind 9\etc\no-ecs-acl-list.txt";<br>
include "d:\isc bind 9\etc\KeyFiles.txt";<br>
include "d:\isc bind 9\etc\logging.conf";</p>
<p>options {<br>
  directory       "d:\isc bind 9\var\named";<br>
        allow-update {none;};  <br>
        notify explicit;<br>
        allow-transfer { none; };<br>
        allow-query { none; };  <br>
};</p>
<p>// End Options</p>
<p>view "area01" {<br>
    match-clients { area01; ecs-area01; !{!ecs-area01; any; } ; key Area01.mydomain.idv.;};<br>
    zone "sub.mydomain.idv" in {<br>
         type master;<br>
         allow-query { area01; ecs-area01; };<br>
  file "sub/area01.mydomain.idv.txt";<br>
         also-notify { a.b.c1.d key Area01.mydomain.idv.; };<br>
         allow-transfer { key Area01.mydomain.idv.; };<br>
     };<br>
}; // End View</p>
<p>view "area02" {<br>
    match-clients { area02; ecs-area02; !{!ecs-area02; any; } ; key Area02.mydomain.idv.; };<br>
    zone "sub.mydomain.idv" in {<br>
         type master;<br>
         allow-query { area02; ecs-area02; };<br>
  file "sub/area02.mydomain.idv.txt";<br>
         also-notify { a.b.c1.d key Area02.mydomain.idv.; };<br>
         allow-transfer { key Area02.mydomain.idv.; };<br>
     };<br>
}; // End View</p>
<p>view "area03" {<br>
    match-clients {  area03; ecs-area03; !{!ecs-area03; any; } ; key Area03.mydomain.idv.; };<br>
    zone "sub.mydomain.idv" in {<br>
         type master;<br>
         allow-query {  area03; ecs-area03; };<br>
  file "sub/area03.mydomain.idv.txt";<br>
  also-notify { a.b.c1.d key Area03.mydomain.idv.;};<br>
  allow-transfer { key Area03.mydomain.idv.; };<br>
     };<br>
}; // End View</p>
<p>view "deafult" {  // Default<br>
    match-clients {any; };<br>
    zone "sub.mydomain.idv" in {<br>
         type master;<br>
         allow-query { any; };<br>
  file "sub/default.mydomain.idv.txt"<wbr>;<br>
         also-notify { a.b.c1.d key Default.mydomain.idv.;};<br>
         allow-transfer { key Default.mydomain.idv.; };<br>
     };<br>
}; // End View</p>
<p>====================sub.<wbr>mydomain.idv (Slave server -ip:a.b.c1.d) =====================</p>
<p>server  a.b.c.d {<br>
        provide-ixfr yes;<br>
        request-nsid yes;<br>
        send-cookie yes;<br>
        edns-udp-size 4096;<br>
        max-udp-size 4096;<br>
        transfer-format many-answers;<br>
        };</p>
<p>server  a1.b1.c1.d1 {  // mydomain.idv primary server<br>
        request-nsid yes;<br>
        send-cookie yes;<br>
        edns-udp-size 4096;<br>
        max-udp-size 4096;<br>
        };</p>
<p>include "d:\isc bind 9\etc\ecs-acl-list.txt";<br>
include "d:\isc bind 9\etc\no-ecs-acl-list.txt";<br>
include "d:\isc bind 9\etc\KeyFiles.txt";<br>
include "d:\isc bind 9\etc\logging.conf";</p>
<p>options {<br>
  directory       "d:\isc bind 9\var\named";<br>
        allow-update {none;};  <br>
        notify explicit;<br>
        allow-transfer { none; };<br>
        allow-query { none; };  <br>
};</p>
<p>// End Options</p>
<p>view "area01" {<br>
    match-clients { area01; ecs-area01; !{!ecs-area01; any; } ; key Area01.mydomain.idv.;};<br>
    zone "sub.mydomain.idv" in {<br>
         type slave;<br>
         allow-query { area01; ecs-area01; };<br>
  file "sub/<a href="http://area01.mydomain.idv.ca" target="_blank">area01.mydomain.idv.ca</a>";<br>
         masters { a.b.c.d key Area01.mydomain.idv.; }; <br>
     };<br>
}; // End View</p>
<p>view "area02" {<br>
    match-clients { area02; ecs-area02; !{!ecs-area02; any; } ; key Area02.mydomain.idv.;};<br>
    zone "sub.mydomain.idv" in {<br>
         type slave;<br>
         allow-query { area02; ecs-area02; };<br>
  file "sub/<a href="http://area02.mydomain.idv.ca" target="_blank">area02.mydomain.idv.ca</a>";<br>
         masters { a.b.c.d key Area02.mydomain.idv.; };<br>
}; // End View</p>
<p>view "area03" {<br>
    match-clients { area03; ecs-area03; !{!ecs-area03; any; } ; key Area03.mydomain.idv.;};<br>
    zone "sub.mydomain.idv" in {<br>
         type slave;<br>
         allow-query { area03; ecs-area03; };<br>
  file "sub/<a href="http://area03.mydomain.idv.ca" target="_blank">area03.mydomain.idv.ca</a>";<br>
         masters { a.b.c.d key Area03.mydomain.idv.; };<br>
}; // End View</p>
<p>view "deafult" {  // Default<br>
    match-clients { any; };<br>
    zone "sub.mydomain.idv" in {<br>
         type slave;<br>
         allow-query { any; };<br>
  file "sub/<a href="http://default.mydomain.idv.ca" target="_blank">default.mydomain.idv.ca</a>";<br>
         masters { a.b.c.d key default.mydomain.idv.; };<br>
     };<br>
}; // End View</p>
<p> </p>
<p>My dns server was install windows 2012 r2.</p>
<p>My client pc at area02 subnet so when i use dig test (if not area02 - ACL entry) then it willget default view</p>
<p>enrty record. But from above red word it means it query packet not include ecs it will ignore ecs function.</p>

<p> </p>
<p>when i use dig query sub.mydomain.idv entry through mydomain.idv then it alway return default view entry not view area02 entry.</p>
<p> </p><p>Did anyone can help me where was wrong...........</p><p>use ecs prefix </p>
</div></blockquote></div>I cannot answer your question, but I have some questions, if you would be so kind as to answer.<br><br></div><div class="gmail_extra">I did not know that you could use sub-groups {...} inside and acl list - thanks for that!<br><br></div><div class="gmail_extra">I don't understand  "!{!ecs-area03; any; }" - is that really the same as just "ecs-area03" ?<br><br></div><div class="gmail_extra">Could you try "ecs-area03" without "!{!ecs-area03; any; }" ?<br><br>-- <br></div><div class="gmail_extra">Bob Harold<br><br></div></div>