第1章. 概要

目次

この文書の対象範囲
この文書の構成
この文書で用いられるルール
ドメイン名システム(DNS
DNSの基本
ドメインとドメイン名
ゾーン
権威ネームサーバ
キャッシュネームサーバ
複数の役割を持つネームサーバ

インターネットドメイン名システム(Internet Domain Name System、DNS)は、階層的な方法によるインターネット上で機器の名前を特定するための構文、名前の権限を移譲する際に用いられる規則、実際にインターネット上のアドレスを名前に対応づけるためのシステム実装により構成されています。DNSデータは分散型の階層構造を持つデータベース群によって維持されています。

この文書の対象

バークレーインターネットネームドメイン(BIND)は多くのオペレーティングシステムで動作するドメイン名サーバを実装したものです。 この文書ではインストールに関する基本的なことと、システム管理者がインターネットシステムコンソーシアム(ISCBINDバージョン9ソフトウェアパッケージを運営する方法について説明します。

このマニュアルはBINDバージョン9.8に関して記したものです。

この文書の構成

この文書において、第1章ではDNSBINDに関する基本的な考え方について紹介します。第2章ではBINDをさまざまな環境で実行するために必要な環境について記しています。 第3章には、タスクを基準として機能ごとに記されており、BIND 9ソフトウェアのインストールを行う上で助けになります。 タスク志向の内容は第4章に続き、ここにはシステム管理者があるオプションを実装する時に必要となるより詳細な考え方について記しています。 第5章ではBIND 9軽量リゾルバについて説明します。 第6章の内容はソフトウェアの管理を行っていく上で助けとなる参照マニュアルになっています。 第7章はセキュリティについて考えておくべきことについて、第8章はトラブルシューティングのヘルプが書かれています。 この文書の本文には、書物やBINDとドメイン名に関する歴史的情報といった役に立つ参照情報が書かれた付録がついています。

この文書で用いられるルール

この文書において、以下のルールで表記を行います。

記述対象:

表記様式:

パス名、ファイル名、URL、ホスト名、メーリングリスト名、新たな単語や考え方

固定幅

ユーザ入力

固定幅太字

プログラムの出力

固定幅

BIND設定ファイル中での記述には以下の表記法を用います。

記述対象:

表記スタイル:

キーワード

固定幅

変数

固定幅

任意入力項目

[角かっこで囲んだ文字列]

ドメイン名システム(DNS

この文書はBIND(バークレーインターネットネームドメイン)ソフトウェアパッケージのインストールと管理の方法について説明することを目的としています。 BINDに関係するドメイン名システム(DNS)の基本についておさらいするところから始めることにしましょう。

DNSの基本

ドメイン名システム(DNS)は階層的な分散型データベースです。 インターネット上のホスト名とIPアドレスとを互いに対応させる情報、メールの転送先情報、その他インターネットアプリケーションが使うその他の情報を提供します。

クライアントはクエリを1つ以上のネームサーバに送り返ってきた応答を解釈するレゾルバライブラリを呼び出して、DNSにある情報の中から必要なものを探し出します。 配布しているBIND 9ソフトウェアにはネームサーバのnamedとレゾルバライブラリのliblwresが同梱されています。 旧版のレゾルバライブラリであるlibbindもISCから個別にダウンロードすることができます。

ドメインとドメイン名

DNSに登録されたデータは、組織や管理の上での境界にしたがって構築された樹状構造をとるドメイン名で識別されます。 樹形構造を構成する各要素(ノード)はドメインと呼ばれ、何らかの名前(ラベル)が付与されます。 各ノードのドメイン名は最上位のノードからの経路上にあるすべてのラベルをつなげたもので、右から左へ点で区切って並べた書式で表現されます。ラベルは親ドメインの配下で重複しないユニークな値である必要があります。

例えば、Example, Inc.社のホスト名にourhost.example.comがあったとします。この中にある、comourhost.example.comが属する最上位のドメインで、examplecomのサブドメイン、そしてourhostはホスト名です。

管理のため、名前空間はゾーンと呼ばれる領域に分割されます。これはあるノードの開始点から始まり、子ノードへと拡張されたり、他のゾーンの開始点となったりします。 各ゾーンのデータは、DNSプロトコルを使ってゾーンに関する問い合わせに答えを返すネームサーバに保存されます。

各ドメイン名に関するデータはリソースレコードRR)の形で保存されます。 Some of the supported resource record types are described in the section called “Types of Resource Records and When to Use Them”.

For more detailed information about the design of the DNS and the DNS protocol, please refer to the standards documents listed in the section called “Request for Comments (RFCs)”.

ゾーン

To properly operate a name server, it is important to understand the difference between a zone and a domain.

As stated previously, a zone is a point of delegation in the DNS tree. A zone consists of those contiguous parts of the domain tree for which a name server has complete information and over which it has authority. It contains all domain names from a certain point downward in the domain tree except those which are delegated to other zones. A delegation point is marked by one or more NS records in the parent zone, which should be matched by equivalent NS records at the root of the delegated zone.

For instance, consider the example.com domain which includes names such as host.aaa.example.com and host.bbb.example.com even though the example.com zone includes only delegations for the aaa.example.com and bbb.example.com zones. A zone can map exactly to a single domain, but could also include only part of a domain, the rest of which could be delegated to other name servers. Every name in the DNS tree is a domain, even if it is terminal, that is, has no subdomains. Every subdomain is a domain and every domain except the root is also a subdomain. The terminology is not intuitive and we suggest that you read RFCs 1033, 1034 and 1035 to gain a complete understanding of this difficult and subtle topic.

Though BIND is called a "domain name server", it deals primarily in terms of zones. The master and slave declarations in the named.conf file specify zones, not domains. When you ask some other site if it is willing to be a slave server for your domain, you are actually asking for slave service for some collection of zones.

権威ネームサーバ

Each zone is served by at least one authoritative name server, which contains the complete data for the zone. To make the DNS tolerant of server and network failures, most zones have two or more authoritative servers, on different networks.

Responses from authoritative servers have the "authoritative answer" (AA) bit set in the response packets. This makes them easy to identify when debugging DNS configurations using tools like dig (the section called “Diagnostic Tools”).

プライマリマスター

The authoritative server where the master copy of the zone data is maintained is called the primary master server, or simply the primary. Typically it loads the zone contents from some local file edited by humans or perhaps generated mechanically from some other local file which is edited by humans. This file is called the zone file or master file.

In some cases, however, the master file may not be edited by humans at all, but may instead be the result of dynamic update operations.

スレーブサーバ

The other authoritative servers, the slave servers (also known as secondary servers) load the zone contents from another server using a replication process known as a zone transfer. Typically the data are transferred directly from the primary master, but it is also possible to transfer it from another slave. In other words, a slave server may itself act as a master to a subordinate slave server.

ステルスサーバ

Usually all of the zone's authoritative servers are listed in NS records in the parent zone. These NS records constitute a delegation of the zone from the parent. The authoritative servers are also listed in the zone file itself, at the top level or apex of the zone. You can list servers in the zone's top-level NS records that are not in the parent's NS delegation, but you cannot list servers in the parent's delegation that are not present at the zone's top level.

A stealth server is a server that is authoritative for a zone but is not listed in that zone's NS records. Stealth servers can be used for keeping a local copy of a zone to speed up access to the zone's records or to make sure that the zone is available even if all the "official" servers for the zone are inaccessible.

A configuration where the primary master server itself is a stealth server is often referred to as a "hidden primary" configuration. One use for this configuration is when the primary master is behind a firewall and therefore unable to communicate directly with the outside world.

キャッシュネームサーバ

The resolver libraries provided by most operating systems are stub resolvers, meaning that they are not capable of performing the full DNS resolution process by themselves by talking directly to the authoritative servers. Instead, they rely on a local name server to perform the resolution on their behalf. Such a server is called a recursive name server; it performs recursive lookups for local clients.

To improve performance, recursive servers cache the results of the lookups they perform. Since the processes of recursion and caching are intimately connected, the terms recursive server and caching server are often used synonymously.

The length of time for which a record may be retained in the cache of a caching name server is controlled by the Time To Live (TTL) field associated with each resource record.

転送

Even a caching name server does not necessarily perform the complete recursive lookup itself. Instead, it can forward some or all of the queries that it cannot satisfy from its cache to another caching name server, commonly referred to as a forwarder.

There may be one or more forwarders, and they are queried in turn until the list is exhausted or an answer is found. Forwarders are typically used when you do not wish all the servers at a given site to interact directly with the rest of the Internet servers. A typical scenario would involve a number of internal DNS servers and an Internet firewall. Servers unable to pass packets through the firewall would forward to the server that can do it, and that server would query the Internet DNS servers on the internal server's behalf.

複数の役割を持つネームサーバ

The BIND name server can simultaneously act as a master for some zones, a slave for other zones, and as a caching (recursive) server for a set of local clients.

However, since the functions of authoritative name service and caching/recursive name service are logically separate, it is often advantageous to run them on separate server machines. A server that only provides authoritative name service (an authoritative-only server) can run with recursion disabled, improving reliability and security. A server that is not authoritative for any zones and only provides recursive service to local clients (a caching-only server) does not need to be reachable from the Internet at large and can be placed inside a firewall.