Bv9ARM.ch03.html revision 5b5f4cca7833343cac382387ad86ff573b185d17
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson>Name Server Configuration</TITLE
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonNAME="GENERATOR"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonTITLE="BIND 9 Administrator Reference Manual"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonTITLE="BIND Resource Requirements"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonTITLE="Advanced DNS Features"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="chapter"
dd796c4d62cfd6ad04198537ceaeba385ed3ef4eMark AndrewsBGCOLOR="#FFFFFF"
dd796c4d62cfd6ad04198537ceaeba385ed3ef4eMark AndrewsTEXT="#000000"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonVLINK="#840084"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonALINK="#0000FF"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="NAVHEADER"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonSUMMARY="Header navigation table"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCELLPADDING="0"
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas GustafssonCELLSPACING="0"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>BIND 9 Administrator Reference Manual</TH
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas GustafssonVALIGN="bottom"
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas GustafssonVALIGN="bottom"
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas GustafssonVALIGN="bottom"
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas GustafssonCLASS="chapter"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>Chapter 3. Name Server Configuration</H1
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>Table of Contents</B
a1747570262ed336c213aaf6bd31bc91993a46deAndreas GustafssonHREF="Bv9ARM.ch03.html#sample_configuration"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>Sample Configurations</A
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>Load Balancing</A
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>Name Server Operations</A
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>In this section we provide some suggested configurations along
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafssonwith guidelines for their use. We also address the topic of reasonable
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafssonoption setting.</P
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas GustafssonNAME="sample_configuration"
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas Gustafsson>3.1. Sample Configurations</A
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas Gustafsson>3.1.1. A Caching-only Name Server</A
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas Gustafsson>The following sample configuration is appropriate for a caching-only
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas Gustafssonname server for use by clients internal to a corporation. All queries
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas Gustafssonfrom outside clients are refused using the <B
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas GustafssonCLASS="command"
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas Gustafsson>allow-query</B
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas Gustafssonoption. Alternatively, the same effect could be achieved using suitable
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas Gustafssonfirewall rules.</P
7693d4de8fca501dfe6989a7f30d8d3c86fe096aAndreas GustafssonCLASS="programlisting"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson> // Two corporate subnets we wish to allow queries from.
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonacl corpnets { 192.168.4.0/24; 192.168.7.0/24; };
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson directory "/etc/namedb"; // Working directory
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson allow-query { corpnets; };
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson// Provide a reverse mapping for the loopback address 127.0.0.1
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson>3.1.2. An Authoritative-only Name Server</A
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson>This sample configuration is for an authoritative-only server
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonthat is the master server for "<TT
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="filename"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonand a slave for the subdomain "<TT
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="filename"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="programlisting"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson> options {
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson directory "/etc/namedb"; // Working directory
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson allow-query { any; }; // This is the default
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson recursion no; // Do not provide recursive service
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson// Provide a reverse mapping for the loopback address 127.0.0.1
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson// We are the master server for example.com
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson // IP addresses of slave servers allowed to transfer example.com
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson allow-transfer {
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson// We are a slave server for eng.example.com
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson // IP address of eng.example.com master server
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson masters { 192.168.4.12; };
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson>3.2. Load Balancing</A
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>A primitive form of load balancing can be achieved in
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="acronym"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson> by using multiple A records for one name.</P
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafsson>For example, if you have three WWW servers with network addresses
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonof 10.0.0.1, 10.0.0.2 and 10.0.0.3, a set of records such as the
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonfollowing means that clients will connect to each machine one third
6017f424ee3c02d7f22132c77576ea38542fa949Andreas Gustafssonof the time:</P
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="informaltable"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCELLPADDING="3"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="CALSTABLE"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>Resource Record (RR) Data</P
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
6017f424ee3c02d7f22132c77576ea38542fa949Andreas GustafssonCLASS="literal"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas GustafssonCLASS="literal"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>When a resolver queries for these records, <ACRONYM
a1747570262ed336c213aaf6bd31bc91993a46deAndreas GustafssonCLASS="acronym"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson them and respond to the query with the records in a different
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson order. In the example above, clients will randomly receive
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson records in the order 1, 2, 3; 2, 3, 1; and 3, 1, 2. Most clients
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson will use the first record returned and discard the rest.</P
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>For more detail on ordering responses, check the
a1747570262ed336c213aaf6bd31bc91993a46deAndreas GustafssonCLASS="command"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson>rrset-order</B
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson> substatement in the
a1747570262ed336c213aaf6bd31bc91993a46deAndreas GustafssonCLASS="command"
a1747570262ed336c213aaf6bd31bc91993a46deAndreas Gustafsson> statement, see
a1747570262ed336c213aaf6bd31bc91993a46deAndreas GustafssonHREF="Bv9ARM.ch06.html#rrset_ordering"
HREF="Bv9ARM.ch06.html#controls_statement_definition_and_usage"
> statement in named.conf.
HREF="Bv9ARM.ch02.html"
HREF="Bv9ARM.html"
HREF="Bv9ARM.ch04.html"