Re: Overriding Included Zone File Entries

2013-03-05 Thread Barry Margolin
In article mailman.1607.1362510489.11945.bind-us...@lists.isc.org,
 Pat Suwalski p...@suwalski.net wrote:

 Hello everyone,
 
 I have a question about using the $INCLUDE directive in my zone files.
 
 We run DNS for a moderately large number of domains, largely pointing at 
 the same servers. So, I'd really like to have the following setup:
 
 db.common.inc:
 
  mail IN A n.n.n.n
  mail2 IN A n.n.n.n
  www IN A n.n.n.n
  @ IN TXT v=spf1...
 
 And then have individual zone files be able to override the various values:
 
 db.special.domain.com:
 
  $INCLUDE db.common.inc
  www IN A x.x.x.x
 
 Of course, this just round-robins the A record for the www entry.
 
 Does anyone know if it is possible to make the new entry override the 
 previously included one rather than add to it?
 
 If not, is there a typical config structure that has worked for someone 
 trying to do a similar setup?

Instead of one include file for everything, use separate include files:

$INCLUDE db.common.mail.inc
$INCLUDE db.common.www.inc
$INCLUDE db.common.spf.inc

Then you can omit some $INCLUDE directives in the zones that have more 
specific records.

-- 
Barry Margolin
Arlington, MA
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Overriding Included Zone File Entries

2013-03-05 Thread Barry S. Finkel

On 3/5/2013 1:08 PM, Pat Suwalskip...@suwalski.net wrote:


Hello everyone,

I have a question about using the $INCLUDE directive in my zone files.

We run DNS for a moderately large number of domains, largely pointing at
the same servers. So, I'd really like to have the following setup:

db.common.inc:

  mail IN A n.n.n.n
  mail2 IN A n.n.n.n
  www IN A n.n.n.n
  @ IN TXT v=spf1...

And then have individual zone files be able to override the various values:

db.special.domain.com:

  $INCLUDE db.common.inc
  www IN A x.x.x.x

Of course, this just round-robins the A record for the www entry.

Does anyone know if it is possible to make the new entry override the
previously included one rather than add to it?

If not, is there a typical config structure that has worked for someone
trying to do a similar setup?

Many thanks,
--Pat


What you need to do is have the common piece in an $INCLUDE file
and put changed items (such as www in your example) in each view.
If www changes in each view, then do not include it in the common
file.  If, for example, you have three views, and www is the same
in two views and different in the third, then you still have to
have www in each view and not in the common file.
--Barry Finkel
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Overriding Included Zone File Entries

2013-03-05 Thread Pat Suwalski

On 13-03-05 02:51 PM, Barry S. Finkel wrote:

What you need to do is have the common piece in an $INCLUDE file
and put changed items (such as www in your example) in each view.
If www changes in each view, then do not include it in the common
file.  If, for example, you have three views, and www is the same
in two views and different in the third, then you still have to
have www in each view and not in the common file.


That then becomes quite painful when a customer asks for a single server 
to change over a single server, and then 80-or-so other files have to 
change to accommodate that. Essentially, as much work as not having the 
include in the first place, for everyday operations.


Really wishing for a $OVERRIDE flag, that replaces entries from this 
point on in the zone file.


Thanks for the insight.

--Pat
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Overriding Included Zone File Entries

2013-03-05 Thread Mark Andrews

In message 513654f9.4060...@suwalski.net, Pat Suwalski writes:
 On 13-03-05 02:44 PM, Barry Margolin wrote:
  Instead of one include file for everything, use separate include files:
 
  $INCLUDE db.common.mail.inc
  $INCLUDE db.common.www.inc
  $INCLUDE db.common.spf.inc
 
  Then you can omit some $INCLUDE directives in the zones that have more
  specific records.
 
 I guess this is the most balanced approach. It's still a little 
 cumbersome for if a client asks to override a specific entry in mail.inc 
 or www.inc. But it will have to do.

Well then have db.common.inc which is just

$INCLUDE db.common.mail.inc
$INCLUDE db.common.www.inc
$INCLUDE db.common.spf.inc

You then do

$INCLUDE db.common.inc

or

$INCLUDE db.common.mail.inc
$INCLUDE db.common.spf.inc
www IN Avalue
IN  value

-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742 INTERNET: ma...@isc.org
___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users


Re: Overriding Included Zone File Entries

2013-03-05 Thread Doug Barton

On 03/05/2013 11:08 AM, Pat Suwalski wrote:

Hello everyone,

I have a question about using the $INCLUDE directive in my zone files.

We run DNS for a moderately large number of domains, largely pointing at
the same servers. So, I'd really like to have the following setup:

db.common.inc:

 mail IN A n.n.n.n
 mail2 IN A n.n.n.n
 www IN A n.n.n.n
 @ IN TXT v=spf1...

And then have individual zone files be able to override the various values:

db.special.domain.com:

 $INCLUDE db.common.inc
 www IN A x.x.x.x


You already have the answer that you can't do that. What you could do is 
create separate $INCLUDE files that contain the different elements that 
may need to be overridden.


Doug

___
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe 
from this list

bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users