<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Verdana; font-size: 8pt; color: #000000'>Thanks Kevin and Jeff for your answers.<div><br></div><div>I will try adding logging so that I can see exactly what view is matched.</div><div><br></div><div>Also, yes, mydomain.com is listed in the include files that I did not provide.  It is listed in each of the different views.  This is how it had to be set up, because Bind does not provide more than one view per query (ie.  If the domain doesn't exist in "office" view, it will not go to the "datacenter" view to look next).  Each view potentially has a different address for mydomain.com depending on whether that is local to them or not.  In my case, mydomain.com should be a public address for the "office" view, and an internal address for the "datacenter" view</div><div><br></div><div>I have experienced this issue myself here at our office which falls in the 166.x.x.88/29 (office) view.  Somehow, I ended up getting a result from the 10.x.x.0/24 (datacenter) view.  The only possible IP address that comes from our office lies in the 166.x.x.88/29 view range.  Yes, I know that it isn't terribly efficient for my DNS servers to not be local to my office, but I haven't gotten around to adding caching servers locally yet.</div><div><br></div><div><br></div><div><br><div><div><div><div><div>_____________________<br>Corey<br></div></div></div></div></div><div><br></div><div><br></div><br>----- Original Message -----<br>From: "Kevin Darcy" <kcd@chrysler.com><br>To: bind-users@lists.isc.org<br>Sent: Tuesday, June 9, 2009 1:49:54 PM GMT -07:00 US/Canada Mountain<br>Subject: Re: Clients sometimes get wrong view<br><br>Note that the newer versions of querylog format include not only the <br>source address of the client, but also what view was *actually* matched <br>by the query. It should be useful to turn on the querylog for <br>troubleshooting this particular issue, if the volume of queries isn't so <br>huge that you'd run into capacity issues...<br><br>- Kevin<br><br>Jeff Lightner wrote:<br>><br>> It seems the mydomain.com isn’t in the view but presumably in one of <br>> the includes.<br>><br>> So the most likely issues seem to be:<br>><br>> 1) You have defined mydomain.com in more than one of the includes <br>> which we can’t tell since you didn’t provide them.<br>><br>> –OR-<br>><br>> 2) The client actually has an unexpected IP (that is you think they <br>> are in the 10.x when they are actually in 192.x or vice-versa or they <br>> don’t have an IP in either of the ranges you specified.<br>><br>> ------------------------------------------------------------------------<br>><br>> *From:* bind-users-bounces@lists.isc.org <br>> [mailto:bind-users-bounces@lists.isc.org] *On Behalf Of *Corey Shaw<br>> *Sent:* Tuesday, June 09, 2009 1:56 PM<br>> *To:* bind-users@lists.isc.org<br>> *Subject:* Clients sometimes get wrong view<br>><br>> OS: Gentoo<br>><br>> Bind Version: 9.6.0-p1<br>><br>> I currently have my Bind server set up with 3 views. It seems that <br>> every now and then I have clients in the "office" view that try to go <br>> to www.mydomain.com (which should be a public address), but instead <br>> they get the internal address that is defined in the "datacenter" view <br>> (10.x.x.x). As a result, they can't get to www.mydomain.com. My views <br>> are configured as shown below (yes, all the include files exist and <br>> load properly). They are ordered in my configuration as shown below as <br>> well. Any ideas on why this may be happening?<br>><br>> view "datacenter" {<br>><br>> match-clients { 10.x.x.0/24; };<br>><br>> recursion yes;<br>><br>> include "/etc/bind/includes/datacenterincludes.conf";<br>><br>> allow-recursion { 10.x.x.0/24; };<br>><br>> zone "." IN {<br>><br>> type hint;<br>><br>> file "named.ca";<br>><br>> };<br>><br>> zone "localhost" IN {<br>><br>> type master;<br>><br>> file "pri/localhost.zone";<br>><br>> allow-update { none; };<br>><br>> notify no;<br>><br>> };<br>><br>> zone "127.in-addr.arpa" IN {<br>><br>> type master;<br>><br>> file "pri/127.zone";<br>><br>> allow-update { none; };<br>><br>> notify no;<br>><br>> };<br>><br>> };<br>><br>> view "office" {<br>><br>> match-clients { 166.x.x.88/29; };<br>><br>> recursion yes;<br>><br>> include "/etc/bind/includes/officeincludes.conf";<br>><br>> allow-recursion { 166.x.x.88/29; };<br>><br>> zone "." IN {<br>><br>> type hint;<br>><br>> file "named.ca";<br>><br>> };<br>><br>> zone "localhost" IN {<br>><br>> type master;<br>><br>> file "pri/localhost.zone";<br>><br>> allow-update { none; };<br>><br>> notify no;<br>><br>> };<br>><br>> zone "127.in-addr.arpa" IN {<br>><br>> type master;<br>><br>> file "pri/127.zone";<br>><br>> allow-update { none; };<br>><br>> notify no;<br>><br>> };<br>><br>> };<br>><br>> view "public" {<br>><br>> match-clients { any; };<br>><br>> recursion no;<br>><br>> include "/etc/bind/includes/publicincludes.conf";<br>><br>> allow-recursion { none; };<br>><br>> zone "." IN {<br>><br>> type hint;<br>><br>> file "named.ca";<br>><br>> };<br>><br>> zone "localhost" IN {<br>><br>> type master;<br>><br>> file "pri/localhost.zone";<br>><br>> allow-update { none; };<br>><br>> notify no;<br>><br>> };<br>><br>> zone "127.in-addr.arpa" IN {<br>><br>> type master;<br>><br>> file "pri/127.zone";<br>><br>> allow-update { none; };<br>><br>> notify no;<br>><br>> };<br>><br>> };<br>><br>> _____________________<br>> Corey Shaw<br>><br>> /Please consider our environment before printing this e-mail or <br>> attachments./<br>> ----------------------------------<br>> CONFIDENTIALITY NOTICE: This e-mail may contain privileged or <br>> confidential information and is for the sole use of the intended <br>> recipient(s). If you are not the intended recipient, any disclosure, <br>> copying, distribution, or use of the contents of this information is <br>> prohibited and may be unlawful. If you have received this electronic <br>> transmission in error, please reply immediately to the sender that you <br>> have received the message in error, and delete it. Thank you.<br>> ----------------------------------<br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> bind-users mailing list<br>> bind-users@lists.isc.org<br>> https://lists.isc.org/mailman/listinfo/bind-users<br><br>_______________________________________________<br>bind-users mailing list<br>bind-users@lists.isc.org<br>https://lists.isc.org/mailman/listinfo/bind-users<br></div></div></body></html>