Bv9ARM.ch12.html revision c313914d0e66b20969215e519bbf2ab4ecf39512
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder - Copyright (C) 2000-2018 Internet Systems Consortium, Inc. ("ISC")
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder - This Source Code Form is subject to the terms of the Mozilla Public
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder - License, v. 2.0. If a copy of the MPL was not distributed with this
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder - file, You can obtain one at http://mozilla.org/MPL/2.0/.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
d8c71aacc9f1c8cd40a8ad8dcdad9be8854b849fChristian Maeder<title>Appendix�D.�BIND 9 DNS Library Support</title>
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<link rel="home" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<link rel="up" href="Bv9ARM.html" title="BIND 9 Administrator Reference Manual">
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<link rel="prev" href="Bv9ARM.ch11.html" title="Appendix�C.�General DNS Reference Information">
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder<link rel="next" href="Bv9ARM.ch13.html" title="Manual pages">
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder<table width="100%" summary="Navigation header">
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder<tr><th colspan="3" align="center">Appendix�D.�BIND 9 DNS Library Support</th></tr>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<a accesskey="p" href="Bv9ARM.ch11.html">Prev</a>�</td>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<td width="20%" align="right">�<a accesskey="n" href="Bv9ARM.ch13.html">Next</a>
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder<div class="titlepage"><div><div><h1 class="title">
c0c2380bced8159ff0297ece14eba948bd236471Christian Maeder<a name="Bv9ARM.ch12"></a>BIND 9 DNS Library Support</h1></div></div></div>
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder<dt><span class="section"><a href="Bv9ARM.ch12.html#bind9.library">BIND 9 DNS Library Support</a></span></dt>
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder<dt><span class="section"><a href="Bv9ARM.ch12.html#id-1.13.2.5">Installation</a></span></dt>
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian Maeder<dt><span class="section"><a href="Bv9ARM.ch12.html#id-1.13.2.6">Known Defects/Restrictions</a></span></dt>
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder<dt><span class="section"><a href="Bv9ARM.ch12.html#id-1.13.2.7">The dns.conf File</a></span></dt>
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder<dt><span class="section"><a href="Bv9ARM.ch12.html#id-1.13.2.8">Sample Applications</a></span></dt>
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder<dt><span class="section"><a href="Bv9ARM.ch12.html#id-1.13.2.9">Library References</a></span></dt>
d4892fa7401ceef014ea59d2d900773eaf88fcbdChristian Maeder<div class="titlepage"><div><div><h2 class="title" style="clear: both">
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder<a name="bind9.library"></a>BIND 9 DNS Library Support</h2></div></div></div>
eee4b2ee739f163e09d6af6e45c025681e6c01a0Christian Maeder This version of BIND 9 "exports" its internal libraries so
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich that they can be used by third-party applications more easily (we
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder call them "export" libraries in this document). Certain library
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder functions are altered from specific BIND-only behavior to more generic
55adfe57a4de1f36adc3e3bfc16f342e44a7d444Christian Maeder behavior when used by other applications; to enable this generic behavior,
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder the calling program initializes the libraries by calling
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder <span class="command"><strong>isc_lib_register()</strong></span>.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder In addition to DNS-related APIs that are used within BIND 9, the
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder libraries provide the following features:
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder The "DNS client" module. This is a higher level API that
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder provides an interface to name resolution, single DNS transaction
a2d6702f18737cc5fff8e8631c08f221f8375c4bChristian Maeder with a particular server, and dynamic update. Regarding name
c6fcd42c6d6d9dae8c7835c24fcb7ce8531a9050Christian Maeder resolution, it supports advanced features such as DNSSEC validation
31c49f2fa23d4ac089f35145d80a224deb6ea7e4Till Mossakowski and caching. This module supports both synchronous and asynchronous
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder The "IRS" (Information Retrieval System) library. It provides an
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder interface to parse the traditional <code class="filename">resolv.conf</code>
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder file and more advanced, DNS-specific configuration file for the
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder rest of this package (see the description for the
d3ae0072823e2ef0d41d4431fcc768e66489c20eChristian Maeder <code class="filename">dns.conf</code> file below).
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder As part of the IRS library, the standard address-name
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder mapping functions, <span class="command"><strong>getaddrinfo()</strong></span> and
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder <span class="command"><strong>getnameinfo()</strong></span>, are provided. They use the
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder DNSSEC-aware validating resolver backend, and could use other
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder advanced features of the BIND 9 libraries such as caching. The
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder <span class="command"><strong>getaddrinfo()</strong></span> function resolves both A
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder and AAAA RRs concurrently when the address family is
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder An experimental framework to support other event
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder libraries than BIND 9's internal event task system.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<div class="titlepage"><div><div><h3 class="title">
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<a name="id-1.13.2.5"></a>Installation</h3></div></div></div>
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder$ <strong class="userinput"><code>make install</code></strong>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Normal installation of BIND will also install library object
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder and header files. Root privilege is normally required.
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder To see how to build your own application after the installation, see
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder <code class="filename">lib/samples/Makefile-postinstall.in</code>.
6ff7a91875597d6e4dfaa68c79187d01473e8341Christian Maeder<div class="titlepage"><div><div><h3 class="title">
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder<a name="id-1.13.2.6"></a>Known Defects/Restrictions</h3></div></div></div>
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder The "fixed" RRset order is not (currently) supported in the export
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder library. If you want to use "fixed" RRset order for, e.g.
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder <span class="command"><strong>named</strong></span> while still building the export library
88318aafc287e92931dceffbb943d58a9310001dChristian Maeder even without the fixed order support, build them separately:
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$ <strong class="userinput"><code>/configure --enable-fixed-rrset <em class="replaceable"><code>[other flags, but not --enable-exportlib]</code></em></code></strong>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$ <strong class="userinput"><code>make</code></strong>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$ <strong class="userinput"><code>/configure --enable-exportlib <em class="replaceable"><code>[other flags, but not --enable-fixed-rrset]</code></em></code></strong>
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder$ <strong class="userinput"><code>cd lib/export</code></strong>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder$ <strong class="userinput"><code>make</code></strong>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder RFC 5011 is not supported in the validating stub resolver of the
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder export library. In fact, it is not clear whether it should: trust
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder anchors would be a system-wide configuration which would be managed
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder by an administrator, while the stub resolver will be used by
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder ordinary applications run by a normal user.
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder Not all common <code class="filename">/etc/resolv.conf</code> options are
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder supported in the IRS library. The only available options in this
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder version are <span class="command"><strong>debug</strong></span> and <span class="command"><strong>ndots</strong></span>.
f1541d4a151dbd08002dbd14e7eb1d5dde253689Christian Maeder<div class="titlepage"><div><div><h3 class="title">
431d34c7007a787331c4e5ec997badb0f8190fc7Christian Maeder<a name="id-1.13.2.7"></a>The dns.conf File</h3></div></div></div>
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich The IRS library supports an "advanced" configuration file related to
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder the DNS library for configuration parameters that would be beyond the
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder capability of the <code class="filename">resolv.conf</code> file.
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich Specifically, it is intended to provide DNSSEC related configuration
f4505a64a089693012a3f5c3b1f12a82cd7a2a5aKlaus Luettich parameters. By default the path to this configuration file is
6b6773cf587b74259178641d811746a235faf056Christian Maeder <code class="filename">/etc/dns.conf</code>. This module is very experimental
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder and the configuration syntax or library interfaces may change in
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian Maeder future versions. Currently, only the <span class="command"><strong>trusted-keys</strong></span>
2c619a4dfdc1df27573eba98e81ed1ace906941dChristian Maeder statement is supported, whose syntax is the same as the same
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder statement in <code class="filename">named.conf</code>. (See
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <a class="xref" href="Bv9ARM.ch06.html#trusted-keys" title="trusted-keys Statement Grammar">the section called “<span class="command"><strong>trusted-keys</strong></span> Statement Grammar”</a> for details.)
0cfef6179a1bfec4f07f460686dd629a27b4b778Christian Maeder<div class="titlepage"><div><div><h3 class="title">
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<a name="id-1.13.2.8"></a>Sample Applications</h3></div></div></div>
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Some sample application programs using this API are provided for
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder reference. The following is a brief description of these
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder applications.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<div class="titlepage"><div><div><h4 class="title">
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<a name="id-1.13.2.8.3"></a>sample: a simple stub resolver utility</h4></div></div></div>
010c56c4cf12dd7977ca36efe85219b91e265ee3Christian Maeder Sends a query of a given name (of a given optional RR type) to a
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich specified recursive server and prints the result as a list of RRs.
5b818f10e11fc79def1fdd5c8a080d64a6438d87Christian Maeder It can also act as a validating stub resolver if a trust anchor is
8b0f493ae42bad8b94918cc0957f1af57096cda4Felix Reckers given via a set of command line options.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder Usage: sample [options] server_address hostname
9e748851c150e1022fb952bab3315e869aaf0214Christian Maeder Options and Arguments:
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder <div class="variablelist"><dl class="variablelist">
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder<dt><span class="term">-t RRtype</span></dt>
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder specify the RR type of the query. The default is the A RR.
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder<dt><span class="term">[-a algorithm] [-e] -k keyname -K keystring</span></dt>
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder specify a command-line DNS key to validate the answer. For
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder example, to specify the following DNSKEY of example.com:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder ��������������example.com.�3600�IN�DNSKEY�257�3�5�xxx<br>
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder specify the options as follows:
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<strong class="userinput"><code>-e -k example.com -K "xxx"</code></strong>
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder -e means that this key is a zone's "key signing key" (also known
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder as "secure entry point").
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder When -a is omitted rsasha1 will be used by default.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<dt><span class="term">-s domain:alt_server_address</span></dt>
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich specify a separate recursive server address for the specific
fb328c4f646dd3dd78a9391c5cb58450a3dd0aa9Klaus Luettich "domain". Example: -s example.com:2001:db8::1234
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich<dt><span class="term">server_address</span></dt>
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder an IP(v4/v6) address of the recursive server to which queries
18a4d5cb6828f080db9c5f9551785c5151027271Christian Maeder the domain name for the query
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder<div class="titlepage"><div><div><h4 class="title">
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder<a name="id-1.13.2.8.4"></a>sample-async: a simple stub resolver, working asynchronously</h4></div></div></div>
e8896c7bb416c4ced255a4d500808c2ea5a6869aChristian Maeder Similar to "sample", but accepts a list
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder of (query) domain names as a separate file and resolves the names
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder asynchronously.</p>
63e50b4c36074d5fb9de872c4007b688b4bce534Christian Maeder Usage: sample-async [-s server_address] [-t RR_type] input_file</p>
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Options and Arguments:
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder <div class="variablelist"><dl class="variablelist">
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder<dt><span class="term">-s server_address</span></dt>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder an IPv4 address of the recursive server to which queries are sent.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder (IPv6 addresses are not supported in this implementation)
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<dt><span class="term">-t RR_type</span></dt>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder specify the RR type of the queries. The default is the A
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<dt><span class="term">input_file</span></dt>
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder a list of domain names to be resolved. each line consists of a
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder single domain name. Example:
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<div class="titlepage"><div><div><h4 class="title">
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder<a name="id-1.13.2.8.5"></a>sample-request: a simple DNS transaction client</h4></div></div></div>
1f63599faaa311cd024d6413f82bff8caae8de24Christian Maeder Sends a query to a specified server, and prints the response with
857992065be4ed40a72c6296b6c0aec62ab4c5b9Christian Maeder minimal processing. It doesn't act as a "stub resolver": it stops
fdb2d618144159395f7bf8ce3327b3c112a17dd3Till Mossakowski the processing once it gets any response from the server, whether
7c99e334446bb97120e30e967baeeddfdd1278deKlaus Luettich it's a referral or an alias (CNAME or DNAME) that would require
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder further queries to get the ultimate answer. In other words, this
4017ebc0f692820736d796af3110c3b3018c108aChristian Maeder utility acts as a very simplified <span class="command"><strong>dig</strong></span>.
b49276c9f50038e0bd499ad49f7bd6444566a834Christian Maeder Usage: sample-request [-t RRtype] server_address hostname
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder Options and Arguments:
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder <div class="variablelist"><dl class="variablelist">
fa21fba9ceb1ddf7b3efd54731a12ed8750191d8Christian Maeder<dt><span class="term">-t RRtype</span></dt>
ed9207cf24e96b0d6f59985822054ae28cb69b2eChristian Maeder specify the RR type of the queries. The default is the A RR.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<dt><span class="term">server_address</span></dt>
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich an IP(v4/v6) address of the recursive server to which
c7ec85d1103173e089aa5048fd7afb2f9b505124Klaus Luettich the query is sent.
5ea9168eddbfbfe2282ed46dfe107a8962d6727bChristian Maeder the domain name for the query
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<div class="titlepage"><div><div><h4 class="title">
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder<a name="id-1.13.2.8.6"></a>sample-gai: getaddrinfo() and getnameinfo() test code</h4></div></div></div>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder This is a test program to check <span class="command"><strong>getaddrinfo()</strong></span> and
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder <span class="command"><strong>getnameinfo()</strong></span> behavior. It takes a host name as an
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder argument, calls <span class="command"><strong>getaddrinfo()</strong></span> with the given host
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder name, and calls <span class="command"><strong>getnameinfo()</strong></span> with the resulting
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich IP addresses returned by <span class="command"><strong>getaddrinfo()</strong></span>. If the
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich dns.conf file exists and defines a trust anchor, the underlying
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich resolver will act as a validating resolver, and
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich <span class="command"><strong>getaddrinfo()</strong></span>/<span class="command"><strong>getnameinfo()</strong></span>
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich will fail with an EAI_INSECUREDATA error when DNSSEC validation
c4ef79587a902327f36277c45a8d91d1e67bd6d5Klaus Luettich Usage: sample-gai hostname
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich<div class="titlepage"><div><div><h4 class="title">
b905126bab9454b89041f92b3c50bb9efc85e427Klaus Luettich<a name="id-1.13.2.8.7"></a>sample-update: a simple dynamic update client program</h4></div></div></div>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Accepts a single update command as a command-line argument, sends
33d042fe6a9eb27a4c48f840b80838f3e7d98e34Christian Maeder an update request message to the authoritative server, and shows
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder the response from the server. In other words, this is a simplified
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder <span class="command"><strong>nsupdate</strong></span>.
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder Usage: sample-update [options] (add|delete) "update data"
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder Options and Arguments:
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder <div class="variablelist"><dl class="variablelist">
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder<dt><span class="term">-a auth_server</span></dt>
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder An IP address of the authoritative server that has authority
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich for the zone containing the update name. This should
dbe752ee940baae7f9f231f29c62284bb0f90a25Christian Maeder normally be the primary authoritative server that accepts
ef67402074be14deb95e4ff564737d5593144130Klaus Luettich dynamic updates. It can also be a secondary server that is
462d9dc583444aab82732e14a75610684d2dc7e9Christian Maeder configured to forward update requests to the primary server.
d784803f9c752667b4fcf7393d698002bedf3f89Klaus Luettich A TSIG key file to secure the update transaction. The
1323eba62fc519b068f5aaec4f9d2be05ffabea9Klaus Luettich keyfile format is the same as that for the nsupdate utility.
1f8a7f8343f7df719768d2b1d7e3077ee291a1caChristian Maeder<dt><span class="term">-p prerequisite</span></dt>
5d39c60274aaa76506292d2d9e885fccd27e1eabChristian Maeder A prerequisite for the update (only one prerequisite can be
462d9dc583444aab82732e14a75610684d2dc7e9Christian Maeder specified). The prerequisite format is the same as that is
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder accepted by the nsupdate utility.
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder<dt><span class="term">-r recursive_server</span></dt>
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich An IP address of a recursive server that this utility will
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich use. A recursive server may be necessary to identify the
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder authoritative server address to which the update request is
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder<dt><span class="term">-z zonename</span></dt>
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder The domain name of the zone that contains
2e2094a642e3775b0d76b890556407941d3a53b6Christian Maeder<dt><span class="term">(add|delete)</span></dt>
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder Specify the type of update operation. Either "add" or
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder "delete" must be specified.
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder<dt><span class="term">"update data"</span></dt>
c22d75ec3ea1306219d1c09a5b3e8ff04f753ad6Christian Maeder Specify the data to be updated. A typical example of the
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder data would look like "name TTL RRtype RDATA".
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
5bb7eeaca10ea76595229375f907a5a388b7c882Christian Maeder In practice, either -a or -r must be specified. Others can be
94d3aa05411444596b44ede4531f05dd7ac20fdfChristian Maeder optional; the underlying library routine tries to identify the
ac0bbbcb2774629bb87986e69cf53d3402c5f575Christian Maeder appropriate server and the zone name for the update.
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder Examples: assuming the primary authoritative server of the
5d522dff4d0fabf57dd476d4c3de15d354a89f62Christian Maeder dynamic.example.com zone has an IPv6 address 2001:db8::1234,
8410667510a76409aca9bb24ff0eda0420088274Christian Maeder$ <strong class="userinput"><code>sample-update -a sample-update -k Kxxx.+nnn+mmmm.key add "foo.dynamic.example.com 30 IN A 192.168.2.1"</code></strong></pre>
ac43fa22d2d3f91a17674ac164cba3cf39a17795Klaus Luettich adds an A RR for foo.dynamic.example.com using the given key.
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder$ <strong class="userinput"><code>sample-update -a sample-update -k Kxxx.+nnn+mmmm.key delete "foo.dynamic.example.com 30 IN A"</code></strong></pre>
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder removes all A RRs for foo.dynamic.example.com using the given key.
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder$ <strong class="userinput"><code>sample-update -a sample-update -k Kxxx.+nnn+mmmm.key delete "foo.dynamic.example.com"</code></strong></pre>
6fe9628743562678acf97d6730ebcfee5e9e50c2Christian Maeder removes all RRs for foo.dynamic.example.com using the given key.
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder<div class="titlepage"><div><div><h4 class="title">
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder<a name="id-1.13.2.8.8"></a>nsprobe: domain/name server checker in terms of RFC 4074</h4></div></div></div>
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Checks a set of domains to see the name servers of the domains
61fa0ac06ede811c7aad54ec4c4202346727368eChristian Maeder behave correctly in terms of RFC 4074. This is included in the set
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder of sample programs to show how the export library can be used in a
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder DNS-related application.
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder Usage: nsprobe [-d] [-v [-v...]] [-c cache_address] [input_file]
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder <div class="variablelist"><dl class="variablelist">
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich Run in "debug" mode. With this option nsprobe will dump
abf2487c3aece95c371ea89ac64319370dcb6483Klaus Luettich every RRs it receives.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder Increase verbosity of other normal log messages. This can be
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder specified multiple times.
a80c28bb8b7a23ccdf7e08d0fe216fc19cc97273Klaus Luettich<dt><span class="term">-c cache_address</span></dt>
6a79849bed67264c396dddb3e9c184bdfc1a1bc9Christian Maeder Specify an IP address of a recursive (caching) name server.
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder nsprobe uses this server to get the NS RRset of each domain
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder and the A and/or AAAA RRsets for the name servers. The
b9625461755578f3eed04676d42a63fd2caebd0cChristian Maeder default value is 127.0.0.1.
d0652648f9879c67a194f8b03baafe2700c68eb4Christian Maeder<dt><span class="term">input_file</span></dt>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder A file name containing a list of domain (zone) names to be
8b4c68db8b465107cabef8b9cd5b6bc216e1b156Till Mossakowski probed. when omitted the standard input will be used. Each
23ab8855c58adfbd03a0730584b917b24c603901Christian Maeder line of the input file specifies a single domain name such as
d0652648f9879c67a194f8b03baafe2700c68eb4Christian Maeder "example.com". In general this domain name must be the apex
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder name of some DNS zone (unlike normal "host names" such as
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder "www.example.com"). nsprobe first identifies the NS RRsets
26f228bf3a3fea810223396e5794c217a79a8d5bChristian Maeder for the given domain name, and sends A and AAAA queries to
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder these servers for some "widely used" names under the zone;
ba904a15082557e939db689fcfba0c68c9a4f740Christian Maeder specifically, adding "www" and "ftp" to the zone name.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<div class="titlepage"><div><div><h3 class="title">
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder<a name="id-1.13.2.9"></a>Library References</h3></div></div></div>
83394c6b6e6de128e71b67c9251ed7a84485d082Christian Maeder As of this writing, there is no formal "manual" for the libraries,
96646aed2ae087b942ae23f15bbe729a8f7c43d3Christian Maeder except this document, header files (some of which provide pretty
ca074a78b8dcccbb8c419586787882f98d0c6163Christian Maeder detailed explanations), and sample application programs.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<table width="100%" summary="Navigation footer">
470ca7a2797069ae4b27c34c1b71419f67be1f84Christian Maeder<a accesskey="p" href="Bv9ARM.ch11.html">Prev</a>�</td>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<td width="40%" align="right">�<a accesskey="n" href="Bv9ARM.ch13.html">Next</a>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<td width="40%" align="left" valign="top">Appendix�C.�General <acronym class="acronym">DNS</acronym> Reference Information�</td>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<td width="20%" align="center"><a accesskey="h" href="Bv9ARM.html">Home</a></td>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<td width="40%" align="right" valign="top">�Manual pages</td>
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder<p xmlns:db="http://docbook.org/ns/docbook" style="text-align: center;">BIND 9.11.3 (Extended Support Version)</p>