Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
8ddaa8da
Commit
8ddaa8da
authored
Jul 31, 2013
by
Mukund Sivaraman
Browse files
Merge branch 'trac3020'
parents
4bca9c53
979f2981
Changes
2
Hide whitespace changes
Inline
Side-by-side
doc/guide/bind10-guide.xml
View file @
8ddaa8da
...
...
@@ -2609,21 +2609,26 @@ can use various data source backends.
>
<userinput>
config set data_sources/classes/IN[1]/params { "example.org": "/path/to/example.org", "example.com": "/path/to/example.com" }
</userinput>
>
<userinput>
config commit
</userinput></screen>
Unfortunately, due to current technical limitations, the
params must be set as one JSON blob. To reload a zone, use the
same
<command>
Auth loadzone
</command>
command as above.
</para>
<para>
Initially, a map value has to be set, but this value may be an
empty map. After that, key/value pairs can be added with 'config
add' and keys can be removed with 'config remove'. The initial
value may be an empty map, but it has to be set before zones are
added or removed.
empty map. After that, key/value pairs can be added with
<command>
config add
</command>
and keys can be removed with
<command>
config remove
</command>
. The initial value may be an
empty map, but it has to be set before zones are added or
removed.
<screen>
>
<userinput>
config set data_sources/classes/IN[1]/params {}
</userinput>
>
<userinput>
config add data_sources/classes/IN[1]/params another.example.org /path/to/another.example.org
</userinput>
>
<userinput>
config add data_sources/classes/IN[1]/params another.example.com /path/to/another.example.com
</userinput>
>
<userinput>
config remove data_sources/classes/IN[1]/params another.example.org
</userinput>
</screen>
>
<userinput>
config commit
</userinput>
</screen>
<command>
bindctl
</command>
. To reload a zone, you the same command
as above.
</para>
</section>
...
...
@@ -2642,6 +2647,50 @@ can use various data source backends.
</para>
</note>
<section
id=
'datasrc-static'
>
<title>
Adding a static data source
</title>
<para>
BIND 10 includes a zone file named
<filename>
static.zone
</filename>
in the CH (Chaos) class for
providing information about the server via the AUTHORS.BIND
and VERSION.BIND TXT records. By default, this BIND zone is
configured and its records are served.
</para>
<para>
If you have removed this zone from the configuration (e.g., by
using the commands in the previous section to disable the
"built-in data source"), here is how you can add it back to
serve the zones in the
<filename>
static.zone
</filename>
file.
</para>
<para>
First, add the CH class if it doesn't exist:
<screen>
>
<userinput>
config add data_sources/classes CH
</userinput>
>
<userinput>
config commit
</userinput></screen>
Then, add a data source of type
<emphasis>
MasterFiles
</emphasis>
in the CH class to serve the zones in
<filename>
static.zone
</filename>
:
<screen>
>
<userinput>
config add data_sources/classes/CH
</userinput>
>
<userinput>
config set data_sources/classes/CH[0]/type MasterFiles
</userinput>
>
<userinput>
config set data_sources/classes/CH[0]/cache-enable true
</userinput>
>
<userinput>
config set data_sources/classes/CH[0]/params {"BIND": "/usr/local/bind10/share/bind10/static.zone"}
</userinput>
>
<userinput>
config commit
</userinput></screen>
Then, lookup the static data from
<filename>
static.zone
</filename>
to test it (assuming your
authoritative server is running on
<command>
localhost
</command>
):
<screen>
>
<userinput>
dig @localhost -c CH -t TXT version.bind
</userinput>
>
<userinput>
dig @localhost -c CH -t TXT authors.bind
</userinput></screen>
</para>
</section>
</section>
<section>
...
...
src/lib/datasrc/static.zone.pre
View file @
8ddaa8da
;; This is the content of the BIND./CH zone. It contains the version and
;; authors (called VERSION.BIND. and AUTHORS.BIND.). You can add more or
;; modify the zone. Then you can reload the zone by issuing the command
;; This file contains records for the BIND./CH zone. It contains version
;; (VERSION.BIND.) and authors (AUTHORS.BIND.) information. You can add
;; more records or modify this zone file like any other zone file. If
;; you modify this file, you can reload the zone by issuing the
;; following command in the bindctl program:
;;
;; loadzone CH BIND
;;
;; in the bindctl.
;; Auth loadzone CH BIND
;; This is here mostly for technical reasons.
BIND. 0 CH SOA bind. authors.bind. 0 28800 7200 604800 86400
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment