2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 22:15:23 +00:00

Merge branch 'trac3020'

This commit is contained in:
Mukund Sivaraman
2013-07-31 14:51:39 +05:30
2 changed files with 62 additions and 13 deletions

View File

@@ -2609,21 +2609,26 @@ can use various data source backends.
&gt; <userinput>config set data_sources/classes/IN[1]/params { "example.org": "/path/to/example.org", "example.com": "/path/to/example.com" }</userinput> &gt; <userinput>config set data_sources/classes/IN[1]/params { "example.org": "/path/to/example.org", "example.com": "/path/to/example.com" }</userinput>
&gt; <userinput>config commit</userinput></screen> &gt; <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 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 empty map. After that, key/value pairs can be added with
add' and keys can be removed with 'config remove'. The initial <command>config add</command> and keys can be removed with
value may be an empty map, but it has to be set before zones are <command>config remove</command>. The initial value may be an
added or removed. empty map, but it has to be set before zones are added or
removed.
<screen> <screen>
&gt; <userinput>config set data_sources/classes/IN[1]/params {}</userinput> &gt; <userinput>config set data_sources/classes/IN[1]/params {}</userinput>
&gt; <userinput>config add data_sources/classes/IN[1]/params another.example.org /path/to/another.example.org</userinput> &gt; <userinput>config add data_sources/classes/IN[1]/params another.example.org /path/to/another.example.org</userinput>
&gt; <userinput>config add data_sources/classes/IN[1]/params another.example.com /path/to/another.example.com</userinput> &gt; <userinput>config add data_sources/classes/IN[1]/params another.example.com /path/to/another.example.com</userinput>
&gt; <userinput>config remove data_sources/classes/IN[1]/params another.example.org</userinput> &gt; <userinput>config remove data_sources/classes/IN[1]/params another.example.org</userinput>
</screen> &gt; <userinput>config commit</userinput></screen>
<command>bindctl</command>. To reload a zone, you the same command
as above.
</para> </para>
</section> </section>
@@ -2642,6 +2647,50 @@ can use various data source backends.
</para> </para>
</note> </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>&gt; <userinput>config add data_sources/classes CH</userinput>
&gt; <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>&gt; <userinput>config add data_sources/classes/CH</userinput>
&gt; <userinput>config set data_sources/classes/CH[0]/type MasterFiles</userinput>
&gt; <userinput>config set data_sources/classes/CH[0]/cache-enable true</userinput>
&gt; <userinput>config set data_sources/classes/CH[0]/params {"BIND": "/usr/local/bind10/share/bind10/static.zone"}</userinput>
&gt; <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>&gt; <userinput>dig @localhost -c CH -t TXT version.bind</userinput>
&gt; <userinput>dig @localhost -c CH -t TXT authors.bind</userinput></screen>
</para>
</section>
</section> </section>
<section> <section>

View File

@@ -1,10 +1,10 @@
;; This is the content of the BIND./CH zone. It contains the version and ;; This file contains records for the BIND./CH zone. It contains version
;; authors (called VERSION.BIND. and AUTHORS.BIND.). You can add more or ;; (VERSION.BIND.) and authors (AUTHORS.BIND.) information. You can add
;; modify the zone. Then you can reload the zone by issuing the command ;; 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 ;; Auth loadzone CH BIND
;;
;; in the bindctl.
;; This is here mostly for technical reasons. ;; This is here mostly for technical reasons.
BIND. 0 CH SOA bind. authors.bind. 0 28800 7200 604800 86400 BIND. 0 CH SOA bind. authors.bind. 0 28800 7200 604800 86400