![]() |
mail us
|
mail this page products | company | support | downloads | isp services | contact us |
$INCLUDE allows inclusion in-situ of an external file containing additional directives. It is typically used to assist in maintenance of larger DNS files e.g. you can distribute the maintenance of individual zone files to clients without exposing the global parameters or other client zones to inspection.
$INCLUDE is a standard directive defined in RFC 1035.
The RFC is silent on the topic of embedded $INCLUDEs in $INCLUDEd files - BIND 9 documentation is similarly silent. Assume they are not permitted.
RFC 1035 defines the format as:
$INCLUDE <filename> [domain-name]The filename may be relative (to the location of the zone files) or absolute. The optional domain-name may be used to set an $explicit ORIGIN for the included file.
An included file can also contain one or more $ORIGIN directives. The scope of the $ORIGIN directives in included files is limited to the included file. $ORIGIN will revert to its value before the $INCLUDE directive.
Examples - no $ORIGIN in included file:
$ORIGIN uk.example.com. @ IN NS ns2.example.com. ; ns2.example.com services uk.example.com $INCLUDE /var/named/uk.example.com ; absolute path ... ftp IN A 192.168.35.16 ; expands to ftp.uk.example.comThe next fragments shows the contents of the included file and how they expand.
; file statements in /var/named/uk.example.com www IN A 192.168.23.15 ; expands to www.uk.example.com ... ; end of included fileExample with ORIGIN directive:
$ORIGIN uk.example.com. @ IN NS ns2.example.com. ; ns2.example.com services uk.example.com $INCLUDE french.subdomain ; relative path file ; ORIGIN reverts to value before the $INCLUDE directive ftp IN A 192.168.35.16 ; expands to ftp.uk.example.comIncluded file contents containing $ORIGIN.
$ORIGIN fr.example.com. www IN A 192.168.23.15 ; expands to www.fr.example.com ... ; end of included fileExample of explicit ORIGIN with $INCLUDE:
$ORIGIN uk.example.com. @ IN NS ns2.example.com. ; ns2.example.com services uk.example.com $INCLUDE french.subdomain fr.example.com ; relative path ; ORIGIN reverts to value before the $INCLUDE directive ftp IN A 192.168.35.16 ; expands to ftp.uk.example.comIncluded file uses $INCLUDE explicit $ORIGIN.
; no $ORIGIN directive www IN A 192.168.23.15 ; expands to www.fr.example.com ... ; end of included file
tech info
guides home
intro
contents
1 objectives
big picture
2 concepts
3 reverse map
4 dns types
quickstart
5 install bind
6 samples
reference
7 named.conf
8 dns records
operations
9 howtos
10 tools
11 trouble
programming
12 bind api's
security
13 dns security
bits & bytes
15 messages
resources
notes & tips
registration FAQ
dns resources
dns rfc's
change log

This work is licensed under a
Creative Commons License.
If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C STANDARDS COMPLIANT browser such as Mozilla
FreeBSD
NetBSD
OpenBSD
DragonFlyBSD
Linux
OpenOffice
Mozilla
SourceForge
GNU-Free SW Foundation
Open Source Initiative
Creative Commons
Ibiblio - Library
Open Book Project
Open Directory
Wikipedia
|
Copyright © 1994 - 2008 ZyTrax, Inc. All rights reserved. Legal and Privacy |
site by zytrax![]() |
web-master at zytrax Page modified: July 06 2006. |