Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > b24f4357c8479344be16703c233650c5 > files > 23

pdns-2.9.22-9.mga1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Bind zone file backend</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PowerDNS manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Backends in detail"
HREF="backends-detail.html"><LINK
REL="PREVIOUS"
TITLE="DB2 backend"
HREF="db2.html"><LINK
REL="NEXT"
TITLE="ODBC backend"
HREF="odbc.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PowerDNS manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="db2.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Appendix A. Backends in detail</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="odbc.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="BINDBACKEND"
>A.9. Bind zone file backend</A
></H1
><P
>	<DIV
CLASS="TABLE"
><A
NAME="AEN5242"
></A
><P
><B
>Table A-9. Bind zone file backend capabilities</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><TBODY
><TR
><TD
>Native</TD
><TD
>Yes</TD
></TR
><TR
><TD
>Master</TD
><TD
>Yes</TD
></TR
><TR
><TD
>Slave</TD
><TD
>Yes</TD
></TR
><TR
><TD
>Superslave</TD
><TD
>No</TD
></TR
><TR
><TD
>Autoserial</TD
><TD
>No</TD
></TR
><TR
><TD
>Module name</TD
><TD
>none (built in)</TD
></TR
><TR
><TD
>Launch</TD
><TD
>bind</TD
></TR
></TBODY
></TABLE
></DIV
>
      </P
><P
>	The BindBackend started life as a demonstration of the versatility of PDNS but quickly gained in importance when there appeared to be demand
	for a Bind 'workalike'.
      </P
><P
>	The BindBackend parses a Bind-style named.conf and extracts information about zones from it. It makes no attempt to honour other configuration flags,
	which you should configure (when available) using the PDNS native configuration.
      </P
><P
>	<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>--help=bind</DT
><DD
><P
>                Outputs all known parameters related to the bindbackend
	      </P
></DD
><DT
>bind-example-zones</DT
><DD
><P
>		Loads the 'example.com' zone which can be queried to determine if PowerDNS is functioning without configuring 
		database backends. This feature is no longer supported from 2.9.21 onwards.
	      </P
></DD
><DT
>bind-config=</DT
><DD
><P
>		Location of the Bind configuration file to parse.
	      </P
></DD
><DT
>bind-check-interval=</DT
><DD
><P
>		How often to check for zone changes. See 'Operation' section.
	      </P
></DD
><DT
>bind-enable-huffman</DT
><DD
><P
>		Enable Huffman compression on zone data. Currently saves around 20% of memory actually used, but slows down operation
		somewhat.
	      </P
></DD
></DL
></DIV
>
      </P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN5291"
>A.9.1. Operation</A
></H2
><P
>	  On launch, the BindBackend first parses the named.conf to determine which zones need to be loaded. These will then be parsed
	  and made available for serving, as they are parsed. So a named.conf with 100.000 zones may take 20 seconds to load, but after 10 seconds, 
	  50.000 zones will already be available. While a domain is being loaded, it is not yet available, to prevent incomplete answers.
	</P
><P
>	  Reloading is currently done only when a request for a zone comes in, and then only after <B
CLASS="COMMAND"
>bind-check-interval</B
> seconds have passed
	  after the last check. If a change occurred, access to the zone is disabled, the file is reloaded, access is restored, and the question is answered.
	  For regular zones, reloading is fast enough to answer the question which lead to the reload within the DNS timeout.
	</P
><P
>          If <B
CLASS="COMMAND"
>bind-check-interval</B
> is specified as zero, no checks will be performed until the <B
CLASS="COMMAND"
>pdns_control reload</B
>
	  is given.
        </P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="BIND-CONTROL-COMMANDS"
>A.9.2. Pdns_control commands</A
></H2
><P
>	  <P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>bind-domain-status <KBD
CLASS="USERINPUT"
>domain</KBD
> [<KBD
CLASS="USERINPUT"
>domain</KBD
>]</DT
><DD
><P
>		  Output status of domain or domains. Can be one of 'seen in named.conf, not parsed', 'parsed successfully at &lt;time;&gt;' or
		  'error parsing at line ... at &lt;time&gt;'.
		</P
></DD
><DT
>bind-list-rejects</DT
><DD
><P
>		  Lists all zones that have problems, and what those problems are.
		</P
></DD
><DT
>bind-reload-now <KBD
CLASS="USERINPUT"
>domain</KBD
></DT
><DD
><P
>		  Reloads a zone from disk NOW, reporting back results.
		</P
></DD
></DL
></DIV
>
	</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN5318"
>A.9.3. Performance</A
></H2
><P
>	  The BindBackend does not benefit from the packet cache as it is fast enough on its own. Furthermore, on most systems, there will
	  be no benefit in using multiple CPUs for the packetcache, so a noticeable speedup can be attained by specifying 
	  <B
CLASS="COMMAND"
>distributor-threads=1</B
> in <TT
CLASS="FILENAME"
>pdns.conf</TT
>.
	</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN5323"
>A.9.4. Master/slave configuration</A
></H2
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN5325"
>A.9.4.1. Master</A
></H3
><P
>	    Works as expected. At startup, no notification storm is performed as this is generally not useful. Perhaps in the future the Bind Backend
	    will attempt to store zone metadata in the zone, allowing it to determine if a zone has changed its serial since the last time
	    notifications were sent out.
	  </P
><P
>	    Changes which are discovered when reloading zones do lead to notifications however.
	  </P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN5329"
>A.9.4.2. Slave</A
></H3
><P
>	    Also works as expected. The Bind backend expects to be able to write to a directory where a slave domain lives. The incoming zone is stored
	    as 'zonename.RANDOM' and atomically renamed if it is retrieved successfully, and parsed only then.
	  </P
><P
>	    In the future, this may be improved so the old zone remains available should parsing fail.
	  </P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN5333"
>A.9.5. Commands</A
></H2
><P
>	  <B
CLASS="COMMAND"
>pdns_control</B
> offers commands to communicate instructions to PowerDNS. These are detailed here.
	  <P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>rediscover</DT
><DD
><P
>		  Reread the bind configuration file (<TT
CLASS="FILENAME"
>named.conf</TT
>). If parsing fails, the old configuration
		  remains in force and pdns_control reports the error. Any newly discovered domains are read, discarded domains 
		  are removed from memory.
		  <DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="90%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>		      Except that with 2.9.3, they are not removed from memory.
		    </P
></TD
></TR
></TABLE
></DIV
>
		</P
></DD
><DT
>reload</DT
><DD
><P
>		  All zones with a changed timestamp are reloaded at the next incoming query for them.
		</P
></DD
></DL
></DIV
>
	</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="db2.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="odbc.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>DB2 backend</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="backends-detail.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>ODBC backend</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>