Bv9ARM.4.html revision 77071cec207e44f7ef91f0af03830ec3cd00294d
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML EXPERIMENTAL 970324//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 5.5/HTML Export Filter">
<LINK REL="STYLESHEET" HREF="Bv9ARM.css">
<TITLE> Section 4. Advanced Concepts</TITLE></HEAD>
<BODY BGCOLOR="#ffffff">
<OL>
<H1 CLASS="1Level">
<A NAME="pgfId=997350">
</A>
Section 4. Advanced Concepts</H1>
</OL>
<DIV>
<OL>
<H3 CLASS="2Level">
<A NAME="pgfId=997351">
</A>
4.1 Dynamic Update</H3>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997352">
</A>
Dynamic update is the term used for the ability under certain specified conditions to add, modify or delete records or RRsets in the master zone files. Dynamic update is fully described in RFC 2136.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997353">
</A>
Dynamic update is enabled on a zone-by-zone basis, by including an <CODE CLASS="Program-Process">
allow-update</CODE>
or <CODE CLASS="Program-Process">
update-policy</CODE>
clause in the <CODE CLASS="Program-Process">
zone</CODE>
statement.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1008560">
</A>
Updating of secure zones (zones using DNSSEC) works as specified in the <EM CLASS="Emphasis">
simple-secure-update</EM>
proposal. SIG and NXT records affected by updates are automatically regenerated by the server using an online zone key. Update authorization is based on transaction signatures and an explicit server policy.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1008576">
</A>
The zone files of dynamic zones must not be edited by hand. The zone file on disk at any given time may not contain the latest changes performed by dynamic update. The zone file is written to disk only periodically, and changes that have occurred since the zone file was last written to disk are stored only in the zone's journal (<EM CLASS="pathname">
.jnl</EM>
) file. BINDv9 currently does not update the zone file when it exits like BIND 8 does, so editing the zone file manually is unsafe even when the server has been shut down. </P>
</DIV>
<DIV>
<OL>
<H3 CLASS="2Level">
<A NAME="pgfId=997356">
</A>
4.2 <A NAME="19780">
</A>
Incremental Zone Transfers (IXFR)</H3>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1008466">
</A>
The incremental zone transfer protocol (IXFR, RFC1995--see the list of proposed standards on in Appendix C on <A HREF="Bv9ARM.7.html#17631" CLASS="XRef">
Proposed Standards</A>
) is a way for slave servers to transfer only changed data, instead of having to transfer the entire zone every time it changes.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1008471">
</A>
When acting as a master, BINDv9 supports IXFR for those zones where the necessary change history information is available. These include master zones maintained by dynamic update and slave zones whose data was obtained by IXFR, but not manually maintained master zones nor slave zones obtained by AXFR.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1008502">
</A>
When acting as a slave, BINDv9 will attempt to use IXFR unless it is explicitly disabled. For more information about disabling IXFR, see the description of the <CODE CLASS="Program-Process">
request-ixfr</CODE>
clause of the <CODE CLASS="Program-Process">
server</CODE>
statement.</P>
</DIV>
<DIV>
<OL>
<H3 CLASS="2Level">
<A NAME="pgfId=997360">
</A>
4.3 Split DNS</H3>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997361">
</A>
Setting up different views, or visibility, of DNS space to internal, as opposed to external, resolvers is usually referred to as a &quot;Split DNS&quot; or &quot;Split Brain DNS&quot; setup. There are several reasons an organization would want to set its DNS up this way.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997362">
</A>
One common reason for setting up a DNS system this way is to hide &quot;internal&quot; DNS information from &quot;external&quot; clients on the Internet. There is some debate as to whether or not this is actually useful. Internal DNS information leaks out in many ways (via e-mail headers, for example) and most savvy &quot;attackers&quot; can find the information they need using other means.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997363">
</A>
Another common reason for setting up a Split DNS system is to allow internal networks that are behind filters or RFC1918 space (reserved IP space, as documented in RFC 1918) to resolve DNS on the Internet. Split DNS can also be used to allow mail from outside back in to the internal network.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997364">
</A>
Here is an example of a split DNS setup:</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997365">
</A>
Let's say a company named <EM CLASS="Emphasis">
Example, Inc.</EM>
(example.com) has several corporate sites that have an internal network with reserved IP space and an external DMZ (the demilitarized zone, or &quot;outside&quot; section of a network) that is available to the public.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997366">
</A>
<EM CLASS="Emphasis">
Example, Inc.</EM>
wants its internal clients to be able to resolve external hostnames and to exchange mail with people on the outside. The company also wants its internal resolvers to have access to certain internal-only zones that are not available at all outside of the internal network.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997367">
</A>
In order to accomplish this, the company will set up two sets of nameservers. One set will be on the inside network (in the reserved IP space) and the other set will be on bastion hosts, which are &quot;proxy&quot; hosts that can talk to both sides of its network, in the DMZ.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997368">
</A>
The internal servers will be configured to forward all queries, except queries for <EM CLASS="pathname">
site1.example</EM>
, <EM CLASS="pathname">
site2.example</EM>
, <EM CLASS="pathname">
site1.example.com</EM>
, and <EM CLASS="pathname">
site2.example.com</EM>
, to the servers in the DMZ. These internal servers will have complete sets of information for <EM CLASS="pathname">
site1.example.com</EM>
, <EM CLASS="pathname">
site2.example.com</EM>
,<EM CLASS="Emphasis">
</EM>
<EM CLASS="pathname">
site1.internal</EM>
, and <EM CLASS="pathname">
site2.internal</EM>
.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997369">
</A>
To protect the<EM CLASS="pathname">
site1.interna</EM>
<EM CLASS="Emphasis">
l</EM>
and<EM CLASS="Emphasis">
</EM>
<EM CLASS="pathname">
site2.internal</EM>
domains, the internal nameservers must be configured to disallow all queries to these domains from any external hosts, including the bastion hosts.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997370">
</A>
The external servers, which are on the bastion hosts, will be configured to serve the &quot;public&quot; version of the <EM CLASS="pathname">
site1</EM>
and <EM CLASS="pathname">
site2.example.com</EM>
zones. This could include things such as the host records for public servers (<EM CLASS="pathname">
www.example.com</EM>
, <EM CLASS="pathname">
ftp.example.com</EM>
), and mail exchanger records (<EM CLASS="pathname">
a.mx.example.com</EM>
and <EM CLASS="pathname">
b.mx.example.com</EM>
).</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997371">
</A>
In addition, the public <EM CLASS="pathname">
site1</EM>
and <EM CLASS="pathname">
site2.example.com</EM>
zones should have special MX records that contain wildcard (&quot;*&quot;) records pointing to the bastion hosts. This is needed because external mail servers do not have any other way of looking up how to deliver mail to those internal hosts. With the wildcard records, the mail will be delivered to the bastion host, which can then forward it on to internal hosts.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997372">
</A>
Here's an example of a wildcard MX record:</P>
<PRE CLASS="2Level-fixed"><A NAME="pgfId=997373"> </A>
* IN MX 10 external1.example.com.</PRE>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997374">
</A>
Now that they accept mail on behalf of anything in the internal network, the bastion hosts will need to know how to deliver mail to internal hosts. In order for this to work properly, the resolvers on the bastion hosts will need to be configured to point to the internal nameservers for DNS resolution.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997375">
</A>
Queries for internal hostnames will be answered by the internal servers, and queries for external hostnames will be forwarded back out to the DNS servers on the bastion hosts.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997376">
</A>
In order for all this to work properly, internal clients will need to be configured to query <EM CLASS="Emphasis">
only</EM>
the internal nameservers for DNS queries. This could also be enforced via selective filtering on the network.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997377">
</A>
If everything has been set properly, <EM CLASS="Emphasis">
Example, Inc.</EM>
's internal clients will now be able to:</P>
<UL>
<LI CLASS="2Level-bullet1">
<A NAME="pgfId=997378">
</A>
Look up any hostnames in the <EM CLASS="pathname">
site1</EM>
and <EM CLASS="pathname">
site2.example.com</EM>
zones.</LI>
<LI CLASS="2Level-bullet2">
<A NAME="pgfId=997379">
</A>
Look up any hostnames in the <EM CLASS="pathname">
site1.internal</EM>
and <EM CLASS="pathname">
site2.internal</EM>
domains.</LI>
<LI CLASS="2Level-bullet2">
<A NAME="pgfId=997380">
</A>
Look up any hostnames on the Internet.</LI>
<LI CLASS="2Level-bullet2">
<A NAME="pgfId=997381">
</A>
Exchange mail with internal AND external people.</LI>
</UL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997382">
</A>
Hosts on the Internet will be able to:</P>
<UL>
<LI CLASS="2Level-bullet1">
<A NAME="pgfId=997383">
</A>
Look up any hostnames in the <EM CLASS="pathname">
site1</EM>
and <EM CLASS="pathname">
site2.example.com </EM>
zones.</LI>
<LI CLASS="2Level-bullet2">
<A NAME="pgfId=997384">
</A>
Exchange mail with anyone in the <EM CLASS="pathname">
site1</EM>
and <EM CLASS="pathname">
site2.example.com</EM>
zones.</LI>
</UL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997385">
</A>
Here is an example configuration for the setup we just described above. Note that this is only configuration information; for information on how to configure your zone files, see <A HREF="Bv9ARM.3.html#30164" CLASS="XRef">
See Sample Configuration and Logging.</A>
</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997389">
</A>
Internal DNS server config:</P>
<PRE CLASS="2Level-fixed"><A NAME="pgfId=997390"> </A>
<CODE>
acl internals { 172.16.72.0/24; 192.168.1.0/24; };
acl externals { bastion-ips-go-here; };
options {
...
...
forward only;
forwarders { <VAR>bastion-ips-go-here</VAR>; }; //forward to external servers
allow-transfer { <VAR>none</VAR>; }; // sample allow-transfer (no one)
allow-query { <VAR>internals</VAR>; <VAR>externals</VAR>; }; // restrict query access
allow-recursion { <VAR>internals</VAR>; }; // restrict recursion
...
...
};
zone &quot;<EM>site1.example.com</EM>&quot; { // sample slave zone
type <VAR>master</VAR>;
file &quot;<EM>m/site1.example.com</EM>&quot;;
forwarders { }; // do normal iterative resolution (do not forward)
allow-query { <VAR>internals</VAR>; <VAR>externals</VAR>; };
allow-transfer { <VAR>internals</VAR>; };
};
zone &quot;<EM>site2.example.com</EM>&quot; {
type <VAR>slave</VAR>;
file &quot;<EM>s/site2.example.com</EM>&quot;;
masters { 172.16.72.3; };
forwarders { };
allow-query { <VAR>internals</VAR>; <VAR>externals</VAR>; };
allow-transfer { <VAR>internals</VAR>; };
};
zone &quot;<EM>site1.internal</EM>&quot; {
type <VAR>master</VAR>;
file &quot;<EM>m/site1.internal</EM>&quot;;
forwarders { };
allow-query { <VAR>internals</VAR>; };
allow-transfer { <VAR>internals</VAR>; }
};
zone &quot;<EM>site2.internal</EM>&quot; {
type <VAR>slave</VAR>;
file &quot;<EM>s/site2.internal</EM>&quot;;
masters { 172.16.72.3; };
forwarders { };
allow-query { <VAR>internals</VAR> };
allow-transfer { <VAR>internals</VAR>; }
};
</CODE>
External (bastion host) DNS server config:
<CODE>
acl internals { 172.16.72.0/24; 192.168.1.0/24; };
acl externals { bastion-ips-go-here; };
options {
...
...
allow-transfer { <VAR>none</VAR>; }; // sample allow-transfer (no one)
allow-query { <VAR>internals</VAR>; <VAR>externals</VAR>; }; // restrict query access
allow-recursion { <VAR>internals</VAR>; <VAR>externals</VAR>; }; // restrict recursion
...
...
};
zone &quot;<EM>site1.example.com</EM>&quot; { // sample slave zone
type <VAR>master</VAR>;
file &quot;<EM>m/site1.foo.com</EM>&quot;;
allow-query { <VAR>any</VAR>; };
allow-transfer { <VAR>internals</VAR>; <VAR>externals</VAR>; };
};
zone &quot;<EM>site2.example.com</EM>&quot; {
type <VAR>slave</VAR>;
file &quot;<EM>s/site2.foo.com</EM>&quot;;
masters { a<VAR>nother_bastion_host_maybe</VAR>; };
allow-query { <VAR>any</VAR>; };
allow-transfer { <VAR>internal</VAR>; <VAR>externals</VAR>; }
};
</CODE>
In the <EM>resolv.conf</EM> (or equivalent) on the bastion host(s):
<CODE>search ...
nameserver 172.16.72.2
nameserver 172.16.72.3
nameserver 172.16.72.4</CODE>
</PRE>
</DIV>
<DIV>
<OL>
<H3 CLASS="2Level">
<A NAME="pgfId=997461">
</A>
4.4 TSIG</H3>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997462">
</A>
This is a short guide to setting up TSIG based transaction security in BIND. It describes changes to the configuration file as well as what changes are required for different features, including the process of creating transaction keys and using transaction signatures with BIND.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997463">
</A>
BIND primarily supports TSIG for server-server communication. This includes zone transfer, notify, and recursive query messages. The resolver bundled with BIND 8.2 has limited support for TSIG, but it is doubtful that support will be integrated into any client applications.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=997464">
</A>
TSIG might be most useful for dynamic update. A primary server for a dynamic zone should use access control to control updates, but IP-based access control is insufficient. Key-based access control is far superior (see <EM CLASS="pathname">
draft-ietf-dnsext-simple-secure-update-00.txt</EM>
in Appendix C on <A HREF="Bv9ARM.7.html#42144" CLASS="XRef">
Request for Comments (RFCs)</A>
). The <CODE CLASS="Program-Process">
nsupdate</CODE>
program that is shipped with BIND 8 supports TSIG via the<BR>
&quot;<CODE CLASS="Program-Process">
-k</CODE>
&quot; command line option.</P>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997465">
</A>
4.4.1 Generate Shared Keys for Each Pair of Hosts</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997466">
</A>
A shared secret is generated to be shared between host1 and host2. The key name is chosen to be &quot;host1-host2.&quot;, which is arbitrary. The key name must be the same on both hosts.</P>
<DIV>
<OL>
<H5 CLASS="4Level">
<A NAME="pgfId=997467">
</A>
4.4.1.1 Automatic Generation</H5>
</OL>
<P CLASS="4LevelContinued">
<A NAME="pgfId=997468">
</A>
The following command will generate a 128 bit (16 byte) HMAC-MD5 key as described above. Longer keys are better, but shorter keys are easier to read. Note that the maximum key length is 512 bits; keys longer than that will be digested with MD5 to produce a 128 bit key.</P>
<PRE CLASS="4Level-fixed"><A NAME="pgfId=997469"></A>
src/bin/dnskeygen/dnskeygen -H 128 -h -n host1-host2.</PRE>
<P CLASS="4LevelContinued">
<A NAME="pgfId=997470">
</A>
The key is in the file &quot;Khost1-host2.+157+00000.private&quot;. Nothing actually uses this file, but the base64 encoded string following &quot;Key:&quot; can be extracted:</P>
<PRE CLASS="4Level-fixed"><A NAME="pgfId=997471"></A>
La/E5CjG9O+os1jq0a2jdA==</PRE>
<P CLASS="4LevelContinued">
<A NAME="pgfId=997472">
</A>
This string represents a shared secret.</P>
</DIV>
<DIV>
<OL>
<H5 CLASS="4Level">
<A NAME="pgfId=997473">
</A>
4.4.1.2 Manual Generation</H5>
</OL>
<P CLASS="4LevelContinued">
<A NAME="pgfId=997474">
</A>
The shared secret is simply a random sequence of bits, encoded in base64. Most ASCII strings are valid base64 strings (assuming the length is a multiple of 4 and only valid characters are used), so the shared secret can be manually generated.</P>
<P CLASS="4LevelContinued">
<A NAME="pgfId=997475">
</A>
Also, a known string can be run through <CODE CLASS="Program-Process">
mmencode</CODE>
or a similar program to generate base64 encoded data.</P>
</DIV>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997476">
</A>
4.4.2 Copying the Shared Secret to Both Machines</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997477">
</A>
This is beyond the scope of DNS. A secure transport mechanism should be used. This could be secure FTP, ssh, telephone, etc.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997478">
</A>
4.4.3 Informing the Servers of the Key's Existence</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997479">
</A>
Imagine <EM CLASS="Emphasis">
host1</EM>
and <EM CLASS="Emphasis">
host 2</EM>
are both servers. The following is added to each server's <CODE CLASS="Program-Process">
named.conf</CODE>
file:</P>
<PRE>
<CODE>
key host1-host2. {
algorithm hmac-md5;
secret &quot;La/E5CjG9O+os1jq0a2jdA==&quot;;
};
</CODE>
</PRE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997484">
</A>
The algorithm, hmac-md5, is the only one supported by BIND. The secret is the one generated above. Since this is a secret, it is recommended that either <CODE CLASS="Program-Process">
named.conf</CODE>
be non-world readable, or the key directive be added to a non-world readable file that's included by named.conf.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997485">
</A>
At this point, the key is recognized. This means that if the server receives a message signed by this key, it can verify the signature. If the signature succeeds, the response is signed by the same key.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997486">
</A>
4.4.4 Instructing the Server to Use the Key</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997487">
</A>
Since keys are shared between two hosts only, the server must be told when keys are to be used. The following is added to the <CODE CLASS="Program-Process">
named.conf</CODE>
file for <EM CLASS="Emphasis">
host1</EM>
, if the IP address of <EM CLASS="Emphasis">
host2</EM>
is 10.1.2.3:</P>
<PRE>
<CODE>
server 10.1.2.3 {
keys {host1-host2.;};
};</CODE>
</PRE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997491">
</A>
Multiple keys may be present, but only the first is used. This directive does not contain any secrets, so it may be in a world-readable file.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997492">
</A>
If host1 sends a message that is a response to that address, the message will be signed with the specified key. host1 will expect any responses to signed messages to be signed with the same key.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997493">
</A>
A similar statement must be present in host2's configuration file (with host1's address) for host2 to sign non-response messages to host1.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997494">
</A>
4.4.5 TSIG Key Based Access Control</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997495">
</A>
BIND allows IP addresses and ranges to be specified in ACL definitions and <CODE CLASS="Program-Process">
allow-{ query </CODE>
<EM CLASS="Optional-meta-syntax">
| </EM>
<CODE CLASS="Program-Process">
transfer </CODE>
<EM CLASS="Optional-meta-syntax">
| </EM>
<CODE CLASS="Program-Process">
update }</CODE>
directives. This has been extended to allow TSIG keys also. The above key would be denoted <CODE CLASS="Program-Process">
key host1-host2</CODE>
.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997496">
</A>
An example of an allow-update directive would be:</P>
<PRE>
<CODE>allow-update {key host1-host2.;};
</CODE>
</PRE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997498">
</A>
This allows dynamic updates to succeed only if the request was signed by a key named &quot;<CODE CLASS="Program-Process">
host1-host2.</CODE>
&quot;</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997499">
</A>
4.4.6 Errors</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997500">
</A>
The processing of TSIG signed messages can result in several errors. If a signed message is sent to a non-TSIG aware server, a FORMERR will be returned, since the server will not understand the record. This is a result of misconfiguration, since the server must be explicitly configured to send a TSIG signed message to a specific server.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997501">
</A>
If a TSIG aware server receives a message signed by an unknown key, the response will be unsigned with the TSIG extended error code set to BADKEY. If a TSIG aware server receives a message with a signature that does not validate, the response will be unsigned with the TSIG extended error code set to BADSIG. If a TSIG aware server receives a message with a time outside of the allowed range, the response will be signed with the TSIG extended error code set to BADTIME, and the time values will be adjusted so that the response can be successfully verified. In any of these cases, the message's rcode is set to NOTAUTH.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997502">
</A>
TSIG verification errors are logged by the server as</P>
<PRE>
<CODE>
&quot;ns_req: TSIG verify failed - (reason)&quot;
</CODE>
</PRE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997504">
</A>
which is printed at debug level 1.</P>
</DIV>
</DIV>
<DIV>
<OL>
<H3 CLASS="2Level">
<A NAME="pgfId=997505">
</A>
4.5 TKEY</H3>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1021941">
</A>
<CODE CLASS="Program-Process">
TKEY</CODE>
is a mechanism for automatically generating a shared secret between two hosts. There are several &quot;modes&quot; of <CODE CLASS="Program-Process">
TKEY</CODE>
that specify how the key is generated or assigned. BIND implements only one of these modes, the Diffie-Hellman key exchange. Both hosts are required to have a Diffie-Hellman KEY record (although this record is not required to be present in a zone). The <CODE CLASS="Program-Process">
TKEY</CODE>
process must use signed messages, signed either by TSIG or SIG(0). The result of <CODE CLASS="Program-Process">
TKEY</CODE>
is a shared secret that can be used to sign messages with TSIG. <CODE CLASS="Program-Process">
TKEY</CODE>
can also be used to delete shared secrets that it had previously generated.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1021952">
</A>
The <CODE CLASS="Program-Process">
TKEY</CODE>
process is initiated by a client or server by sending a signed <CODE CLASS="Program-Process">
TKEY</CODE>
query (including any appropriate KEYs) to a TKEY-aware server. The server response, if it indicates success, will contain a <CODE CLASS="Program-Process">
TKEY</CODE>
record and any appropriate keys. After this exchange, both participants have enough information to determine the shared secret; the exact process depends on the <CODE CLASS="Program-Process">
TKEY</CODE>
mode. When using the Diffie-Hellman <CODE CLASS="Program-Process">
TKEY</CODE>
mode, Diffie-Hellman keys are exchanged, and the shared secret is derived by both participants.</P>
</DIV>
<DIV>
<OL>
<H3 CLASS="2Level">
<A NAME="pgfId=1021928">
</A>
4.6 DNSSEC Secured Zones</H3>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039857">
</A>
Cryptographic authentication of DNS information is made possible through the DNS Security (<EM CLASS="Emphasis">
DNSSEC</EM>
) extension to the domain system. This describes the processing of creating and using DNSSEC signed zones.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039810">
</A>
In order to set up a DNSSEC secure zone, there are a series of steps which must be followed. BINDv9 ships with several tools that are used in this process, which are explained in more detail below. In all cases, the &quot;<CODE CLASS="Program-Process">
-h</CODE>
&quot; option prints a full list of parameters.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039811">
</A>
There must also be communication with the administrators of the parent and/or child zone to transmit keys and signatures. A zone's security status must be indicated by the parent zone for a DNSSEC capable resolver to trust its data.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039812">
</A>
For other servers to trust data in this zone, they must either be statically configured with this zone's zone key or the zone key of another zone above this one in the DNS tree.</P>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=1039813">
</A>
4.6.1 Generating Keys</H4>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039814">
</A>
The <CODE CLASS="Program-Process">
dnssec-keygen</CODE>
program is used to generate keys.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039815">
</A>
A secure zone must contain one or more zone keys. The zone keys will sign all other records in the zone, as well as the zone keys of any secure delegated zones. Zone keys must have the same name as the zone, a name type of <CODE CLASS="Program-Process">
ZONE</CODE>
, and must be usable for authentication. It is recommended that zone keys be mandatory to implement a cryptographic algorithm; currently the only key mandatory to implement an algorithm is DSA.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039816">
</A>
The following command will generate a 768 bit DSA key for the <EM CLASS="pathname">
child.example</EM>
zone:</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039817">
</A>
<EM CLASS="grammar_literal">
dnssec-keygen</EM>
<EM CLASS="grammar_literal">
-a</EM>
<EM CLASS="variable">
DSA</EM>
<EM CLASS="grammar_literal">
-b</EM>
<EM CLASS="variable">
768</EM>
<EM CLASS="grammar_literal">
-n</EM>
<EM CLASS="variable">
ZONE</EM>
<EM CLASS="pathname">
child.example</EM>
.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039818">
</A>
Two output files will be produced: <EM CLASS="pathname">
Kchild.example.+003+12345.key</EM>
and <EM CLASS="pathname">
Kchild.example.+003+12345.private</EM>
(where 12345 is an example of a key identifier). The key file names contain the key name (<EM CLASS="pathname">
child.example</EM>
), algorithm (3 is DSA, 1 is RSA, etc.), and the key identifier (12345 in this case). The private key (in the <EM CLASS="pathname">
.private</EM>
file) is used to generate signatures, and the public key (in the <EM CLASS="pathname">
.key</EM>
file) is used for signature verification.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039819">
</A>
To generate another key with the same properties, repeat the above command.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039820">
</A>
The public keys should be inserted into the zone file with $<CODE CLASS="Program-Process">
INCLUDE</CODE>
statements.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=1039821">
</A>
4.6.2 Creating a Keyset</H4>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039822">
</A>
The <CODE CLASS="Program-Process">
dnssec-makekeyset</CODE>
program is used to create a key set from one or more keys.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039823">
</A>
Once the zone keys have been generated, a key set must be built for transmission to the administrator of the parent zone, so that the parent zone can sign the keys with its own zone key and correctly indicate the security status of this zone. When building a key set, the list of keys to be included and the TTL of the set must be specified, and the desired signature validity period of the parent's signature may also be specified.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039824">
</A>
The list of keys to be inserted into the key set may also included non-zone keys present at the apex. <CODE CLASS="Program-Process">
dnssec-makekeyset</CODE>
may also be used at non-apex names.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039825">
</A>
The following command generates a key set containing the above key and another key similarly generated, with a TTL of 3600 and a signature validity period of 10 days starting from now.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039826">
</A>
<EM CLASS="grammar_literal">
dnssec-makekeyset</EM>
<EM CLASS="grammar_literal">
-t</EM>
<EM CLASS="variable">
3600</EM>
<EM CLASS="grammar_literal">
-s</EM>
<EM CLASS="variable">
now</EM>
<EM CLASS="grammar_literal">
-e</EM>
<EM CLASS="variable">
now+864000</EM>
<EM CLASS="pathname">
Kchild.example.+003+12345</EM>
<EM CLASS="Optional-meta-syntax">
\</EM>
<EM CLASS="pathname">
Kchild.example.+003+23456</EM>
</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039827">
</A>
One output file is produced: <EM CLASS="pathname">
child.example.keyset</EM>
. This file should be transmitted to the parent to be signed. It includes the keys, as well as signatures over the key set generated by the zone keys themselves, which are used to prove ownership of the private keys and encode the desired validity period.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=1039828">
</A>
4.6.3 Signing the Child's Keyset</H4>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039829">
</A>
The <CODE CLASS="Program-Process">
dnssec-signkey</CODE>
program is used to sign one child's keyset.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039830">
</A>
If the <EM CLASS="pathname">
child.example</EM>
zone has any delegations which are secure, for example, <EM CLASS="pathname">
grand.child.example</EM>
, the <EM CLASS="pathname">
child.example</EM>
administrator should receive keyset files for each secure subzone. These keys must be signed by this zone's zone keys.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039831">
</A>
The following command signs the child's key set with the zone keys:</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039832">
</A>
<EM CLASS="grammar_literal">
dnssec-signkey</EM>
<EM CLASS="pathname">
grand.child.example.keyset</EM>
<EM CLASS="pathname">
Kchild.example.+003+12345 </EM>
<EM CLASS="Optional-meta-syntax">
\ </EM>
<EM CLASS="pathname">
Kchild.example.+003+23456</EM>
</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039833">
</A>
One output file is produced: <EM CLASS="pathname">
grand.child.example.signedkey</EM>
. This file should be both transmitted back to the child and retained. It includes all keys (the child's keys) from the keyset file and signatures generated by this zone's zone keys.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=1040038">
</A>
4.6.4 Signing the Zone</H4>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1040039">
</A>
The <CODE CLASS="Program-Process">
dnssec-signzone</CODE>
program is used to sign a zone.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1040040">
</A>
Any <EM CLASS="pathname">
signedkey</EM>
files corresponding to secure subzones should be present, as well as a <EM CLASS="pathname">
signedkey</EM>
file for this zone generated by the parent (if there is one). The zone signer will generate <CODE CLASS="Program-Process">
NXT</CODE>
and <CODE CLASS="Program-Process">
SIG</CODE>
records for the zone, as well as incorporate the zone key signature from the parent and indicate the security status at all delegation points.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039837">
</A>
The following command signs the zone, assuming it is in a file called <EM CLASS="pathname">
zone.child.example</EM>
. By default, all zone keys which have an available private key are used to generate signatures.:</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039838">
</A>
<EM CLASS="grammar_literal">
dnssec-signzone</EM>
<EM CLASS="grammar_literal">
-o</EM>
<EM CLASS="pathname">
child.example zone.child.example</EM>
</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039839">
</A>
One output file is produced: <EM CLASS="pathname">
zone.child.example.signed</EM>
. This file should be referenced by <CODE CLASS="Program-Process">
named.conf</CODE>
as the input file for the zone.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=1039840">
</A>
4.6.5 Configuring Servers</H4>
</OL>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039841">
</A>
Unlike in BIND 8, data is not verified on load in BINDv9, so zone keys for authoritative zones do not need to be specified in the configuration file.</P>
<P CLASS="2LevelContinued">
<A NAME="pgfId=1039842">
</A>
The public key for any security root must be present in the configuration file's trusted-keys statement, as described later in this document. </P>
</DIV>
</DIV>
<DIV>
<OL>
<H3 CLASS="2Level">
<A NAME="pgfId=997563">
</A>
4.7 IPv6</H3>
</OL>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997564">
</A>
4.7.1 IPv6 addresses (A6)</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997565">
</A>
IPv6 addresses are 128-bit identifiers for interfaces and sets of interfaces which were introduced in the DNS to facilitate scalable Internet routing. There are three types of addresses: <EM CLASS="Emphasis">
Unicast</EM>
, an identifier for a single interface; <EM CLASS="Emphasis">
Anycast</EM>
, an identifier for a set of interfaces; and <EM CLASS="Emphasis">
Multicast</EM>
, an identifier for a set of interfaces. Here we describe the global Unicast address scheme. For more information, see RFC 2374.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997566">
</A>
The aggregatable global Unicast address format is as follows:</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997628">
</A>
&nbsp;</P>
<TABLE>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997569">
</A>
3</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997571">
</A>
13</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997573">
</A>
8</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997575">
</A>
24</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997577">
</A>
16</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997579">
</A>
64 bits</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997581">
</A>
FP</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997583">
</A>
TLA ID</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997585">
</A>
RES</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997587">
</A>
NLA ID</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997589">
</A>
SLA ID</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997591">
</A>
Interface ID</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="4">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997593">
</A>
&lt;------ Public Topology ------&gt;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997601">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997603">
</A>
&nbsp;</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997605">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997607">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997609">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997611">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997613">
</A>
&lt;-Site Topology-&gt;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997615">
</A>
&nbsp;</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997617">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997619">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997621">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997623">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997625">
</A>
&nbsp;</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedfontLG">
<A NAME="pgfId=997627">
</A>
&lt;------ Interface Identifier ------&gt;</P>
</TD>
</TR>
</TABLE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997666">
</A>
Where</P>
<TABLE>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997631">
</A>
FP</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997633">
</A>
=</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997635">
</A>
Format Prefix (001)</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997637">
</A>
TLA ID</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997639">
</A>
=</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997641">
</A>
Top-Level Aggregation Identifier</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997643">
</A>
RES</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997645">
</A>
=</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997647">
</A>
Reserved for future use</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997649">
</A>
NLA ID</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997651">
</A>
=</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997653">
</A>
Next-Level Aggregation Identifier</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997655">
</A>
SLA ID</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997657">
</A>
=</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997659">
</A>
Site-Level Aggregation Identifier</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997661">
</A>
INTERFACE ID</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997663">
</A>
=</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997665">
</A>
Interface Identifier</P>
</TD>
</TR>
</TABLE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997667">
</A>
The <EM CLASS="Emphasis">
Public Topology</EM>
is provided by the upstream provider or ISP, and (roughly) corresponds to the IPv4 <EM CLASS="Emphasis">
network</EM>
section of the address range. The <EM CLASS="Emphasis">
Site Topology</EM>
is where you can subnet this space, much like subnetting an IPv4 class A or B network into class Cs. The <EM CLASS="Emphasis">
Interface Identifier</EM>
is the address of an individual interface on a given network. (With IPv6, addresses belong to interfaces rather than machines.)</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997668">
</A>
The subnetting capability of IPv6 is much more flexible than that of IPv4: subnetting can now be carried out on bit boundaries, in much the same way as Classless InterDomain Routing (CIDR).</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997669">
</A>
The internal structure of the Public Topology for an A6 global unicast address consists of:</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997687">
</A>
&nbsp;</P>
<TABLE>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997672">
</A>
3</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997674">
</A>
13</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997676">
</A>
8</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997678">
</A>
24</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997680">
</A>
FP</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997682">
</A>
TLA ID</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997684">
</A>
RES</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId=997686">
</A>
NLA ID</P>
</TD>
</TR>
</TABLE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997688">
</A>
A 3 bit FP (Format Prefix) of 001 indicates this is a global unicast address. FP lengths for other types of addresses may vary.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997689">
</A>
13 TLA (Top Level Aggregator) bits give the prefix of your top-level IP backbone carrier.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997690">
</A>
8 Reserved bits</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997691">
</A>
24 bits for Next Level Aggregators. This allows organizations with a TLA to hand out portions of their IP space to client organizations, so that the client can then split up the network further by filling in more NLA bits, and hand out IPv6 prefixes to their clients, and so forth.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997692">
</A>
There is no particular structure for the Site topology section. Organizations can allocate these bits in any way they desire, in the same way as they would subnet an IPv4 class A (8 bit prefix) network.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997693">
</A>
The Interface identifier must be unique on that network. On ethernet networks, one way to ensure this is to set the address to the first three bytes of the hardware address, &quot;FFFE&quot;, then the last three bytes of the hardware address. The lowest significant bit of the first byte should then be complemented. Addresses are written as 32-bit blocks separated with a colon, and leading zeros of a block may be omitted, for example:</P>
<PRE>
<CODE>3ffe:8050:201:9:a00:20ff:fe81:2b32
</CODE>
</PRE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997695">
</A>
IPv6 address specifications are likely to contain long strings of zeros, so the architects have included a shorthand for specifying them. The double colon (&quot;::&quot;) indicates the longest possible string of zeros that can fit, and can be used only once in an address.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997696">
</A>
4.7.2 Name to Address Lookup</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997697">
</A>
Forward name lookups (host name to IP address) under IPv6 do not necessarily return the complete IPv6 address of the host. Because the provider-assigned prefix may change, the A6 record can simply specify the locally assigned portion of the name, and refer to the provider for the remainder.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997698">
</A>
A complete IPv6 A6 record that provides the full 128 bit address looks like:</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997730">
</A>
&nbsp;</P>
<TABLE>
<TR>
<TD ROWSPAN="1" COLSPAN="5">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997701">
</A>
$ORIGIN example.com.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997711">
</A>
; NAME</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997713">
</A>
TTL TYPE</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997715">
</A>
BITS IN REFERRAL</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997717">
</A>
ADDRESS</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997719">
</A>
REFERRAL</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997721">
</A>
host.example.com.</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997723">
</A>
1h IN A6</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997725">
</A>
0</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997727">
</A>
3ffe:8050:201:9:a00:20ff:fe81:2b32</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997729">
</A>
.</P>
</TD>
</TR>
</TABLE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997731">
</A>
Note that the number preceding the address is the number of bits to be provided via the referral. This is probably the easiest way to roll out an IPv6 installation, though you may wish to provide a reference to your provider assigned prefix:</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997763">
</A>
&nbsp;</P>
<TABLE>
<TR>
<TD ROWSPAN="1" COLSPAN="5">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997734">
</A>
$ORIGIN example.com.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997744">
</A>
; NAME</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997746">
</A>
TTL TYPE</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997748">
</A>
BITS IN REFERRAL</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997750">
</A>
ADDRESS</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997752">
</A>
REFERRAL</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997754">
</A>
host.example.com.</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997756">
</A>
1h IN A6</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997758">
</A>
48</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997760">
</A>
::9:a00:20ff:fe81:2b32</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997762">
</A>
prefix.example2.com.</P>
</TD>
</TR>
</TABLE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997764">
</A>
Then, in example2.com's zone:</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997796">
</A>
&nbsp;</P>
<TABLE>
<TR>
<TD ROWSPAN="1" COLSPAN="5">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997767">
</A>
$ORIGIN example.com.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997777">
</A>
; NAME</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997779">
</A>
TTL TYPE</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997781">
</A>
BITS IN REFERRAL</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997783">
</A>
ADDRESS</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997785">
</A>
REFERRAL</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997787">
</A>
prefix.example2.com.</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997789">
</A>
1h IN A6</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997791">
</A>
0</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997793">
</A>
3ffe:8050:201::</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody-fixedFontMed">
<A NAME="pgfId=997795">
</A>
.</P>
</TD>
</TR>
</TABLE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997797">
</A>
The referral where there are no more bits is to &quot;.&quot;, the root zone. Be warned that excessive use of this chaining can lead to extremely poor name resolution for people trying to access your hosts.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997798">
</A>
4.7.3 Address to Name Lookup</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997799">
</A>
Reverse IPv6 addresses may appear as one or more hex strings, known as &quot;bitstring labels,&quot; each followed by a number of valid bits. A full 128 bits may be specified at the ip6.int top level, or more likely, the provider will delegate you a smaller chunk of addresses for which you will need to supply reverse DNS.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997800">
</A>
The address can be split up along arbitrary boundaries, and is written with hex numbers in forward order, rather than in reverse order as IPv4 PTR records are written. The sections between dot separators are reversed as usual. If the number of valid bits in the hex string is less than the string specifies, it is the <EM CLASS="Emphasis-underline">
first N bits</EM>
that are counted. Thus, \[x2/3] gives a bit pattern of 0010, the first three bits of which, 001, are valid.</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997801">
</A>
The address above, then, is:</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997802">
</A>
<EM CLASS="pathname">
\[x3FFE8050020100090A0020FFFE812B32/128].ip6.int.</EM>
(not divided)</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997803">
</A>
<EM CLASS="pathname">
\[x00090A0020FFFE812B32/80].\[xFFF402801008/45].\[x2/3].ip6.int.</EM>
(divided into FP, TLA/RES/NLA, and local)</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997807">
</A>
<EM CLASS="pathname">
\[x00090A0020FFFE812B32/80].\[x80500201/32].\[xFFF0/13].\[x2/3].ip6.int.</EM>
(divided into FP, TLA, RES/NLA, and local)</P>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997808">
</A>
These strings are all equivalent. The combined TLA/RES/NLA in the second example bears no resemblance to any string in the address because it is offset by three bits.</P>
</DIV>
<DIV>
<OL>
<H4 CLASS="3Level">
<A NAME="pgfId=997809">
</A>
4.7.4 Using DNAME for Delegation of IPv6 Reverse Addresses</H4>
</OL>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997810">
</A>
Delegation of reverse addresses is done through the new DNAME RR. In the example above, where <EM CLASS="Emphasis">
\[x2/3].ip6.int.</EM>
needs to delegate<CODE CLASS="Program-Process">
</CODE>
<EM CLASS="Emphasis">
\[xFFF0]</EM>
<CODE CLASS="Program-Process">
</CODE>
to an organization (<EM CLASS="Emphasis">
example2.com</EM>
), the domain administrator would insert a line similar to the following in the <EM CLASS="Emphasis">
\[x2/3].ip6.int.</EM>
zone:</P>
<PRE>
CODE>
$ORIGIN \[x2/3].ip6.int.
\[xFFF0/13] 1h IN DNAME ip6.example2.com.
</CODE>
</PRE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997813">
</A>
<EM CLASS="Emphasis">
example2.com</EM>
would then place into the <EM CLASS="Emphasis">
ip6 </EM>
zone:</P>
<PRE>
<CODE>
$ORIGIN ip6.example.com.
\[x80500201/32] 1h IN DNAME ip6.example.com.
</CODE>
</PRE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997816">
</A>
Finally, <EM CLASS="Emphasis">
example.com </EM>
needs to include in the <EM CLASS="Emphasis">
ip6.example.com</EM>
zone:</P>
<PRE>
<CODE>
$ORIGIN ip6.example.com.
\[x00090A0020FFFE812B32/80] 1h IN PTR host.example.com.</CODE>
</PRE>
<P CLASS="3LevelContinued">
<A NAME="pgfId=997819">
</A>
We suggest that the top of your administrative control (<EM CLASS="Emphasis">
example.com</EM>
, in this case) provide all the bits required for reverse and forward resolution to allow name resolution even if the network is disconnected from the Internet. This will also allow operation with DNSSEC if you set up a false trusted server for &quot;.&quot; containing only delegations for your forward and reverse zones directly to the top of your administrative control. This should be signed with a key trusted by all of your clients, equivalent to the real key for &quot;.&quot;. </P>
</DIV>
</DIV>
<p>Return to <A href="Bv9ARM.HTML">BINDv9 Administrator Reference Manual</A>
</BODY>
</HTML>