ガイド一覧

Guide List

mDNkitのガイドは以下のドキュメントから構成されています。

The mDNkit guide is comprised of the following documents.

一般ユーザの方はまずmDNkitの紹介をご覧ください。 そのあと、使用する多言語ドメイン処理方式 (あなたのシステムで 利用できる処理方式についてはシステム管理者にお尋ねください) に応じて bind9 パッチrunmdnmDN Wrapperdnsproxy のいずれかをご覧ください。

Ordinary users should refer to Introduction to mDNkit. Depending on the method of processing multilingual domain names (ask the system administrator which method your system uses) refer to bind9 patch, runmdn, mDN Wrapper、or dnsproxy.

本キットをインストールするシステム管理者の方はすべてのガイドに 一通り目を通しておくことをお勧めします。

It is recommended that the system administrator that installs this kit carefully reads through all the guides.

本キットはフリーソフトウェアです。本キットの使用、再配布等に関する 条件については LICENSE.txt を ご覧ください。

This kit is free software. Read the LICENSE.txt for information on the redistribution conditions of this kit.


mDNkit の紹介

Introduction to mDNkit

mDNkitは、既存のDNSサーバ(bind8/9)、既存のクライアントで、 多言語ドメイン名を使うために提案されている各種の方式を試験的に 評価してみることができるようにするための パッチ、ツール、ライブラリをまとめたものです。

The mDNkit comprises all the patches, tools and libraries to experimentally assess the variety of systems that enable existing DNS servers (bind8, bind9) to use multilingual domain names with current clients.

従来、ドメイン名には、英字、数字(およびハイフン)しか使えませんでした。 多言語化されたドメイン名とは、ドメイン名としてこれらに加えて日本語など いろいろな言語の文字を使えるようにしたものです。 その実現方式として、現在インターネットドラフトでいくつかの 提案がなされています。(参考文献 参照)

Traditional domain names can only use alphabetic characters, numerics and hyphe ns. In addition to these characters, multilingual domain names can also handle Japanese and a great number of characters from other languages. A number of recommendations for how these are to be implemented are offered in the form of drafts on the Internet. See (Reference.)

エンコーディング変換

Encoding Conversion

DNS で多言語ドメイン名を使えるようにするには、まず DNS サーバ間で 多言語ドメイン名として使用する標準エンコーディング (コードセット) を 決める必要があります。 現在提案されている方式は、いずれもISO10646 をベースとした エンコーディングで、大きく次の2つに分けられます。

First, the standard encoding (code set) to be used for multilingual domain names between DNS servers must be determined to enable use of multilingual names in DNS. Currently recommended systems are all based on ISO10646 encoding and are basically of the following two types.

  1. 従来のドメイン名として使うことのできる文字だけを使ったエンコーディング
    Encoding that uses only characters that can be used in traditional domain names
  2. UTF-8 のように、従来のドメイン名としては正しくない文字列となる エンコーディング
    Encoding that uses characters that are not legal in traditional domain names such as UTF-8

1. の方法は、エンコード結果が従来のドメイン名としても使える文字列になるので、 多言語ドメイン名を既存のDNSが受付けることができる文字列で 表現することができます。この場合、DNSサーバ自体は 既存のものがそのまま使えます。

With method 1, the encoded result are character strings that could also be used in traditional domain names, allowing you to use a multilingual domain name in the existing DNS server. Existing DNS servers can be used with this method.

2.の方法では、DNS サーバをそのエンコーディングに対応するように 改造する必要があります。

With method 2, the DNS server has to be modified to support the encoding.

いずれの方式に関しても、DNS サーバの持つドメイン名のデータはあらかじめ そのエンコーディングで用意する必要があります。

Whichever method is selected, the domain name data held by a DNS server has to be prepared in that encoding.

一方、アプリケーションは一般的には SJIS 等のローカルエンコーディングを 使用するので、多言語ドメイン名を使えるようにするためにはどこかで エンコーディングの相互変換をする必要があります。

On the other hand, applications normally use SJIS or other local encoding so some type of interconversion must be performed at some point to enable the use of multilingual domain names.

つまりアプリケーションは多言語ドメイン名をローカルエンコーディングで 扱い、DNS サーバは標準エンコーディングで扱うので、 クライアントと DNS サーバの間のどこかでアプリケーションの指定した ローカルエンコーディングのドメイン名を標準エンコーディングのドメイン名へ 変換し、 また DNS サーバからの応答に含まれる標準エンコーディングのドメイン名を クライアントで表示可能なローカルエンコーディングに戻さなければなりません。

Thus applications handle multilingual domain names in local encoding, whereas the DNS server handles them in standard encoding. This requires that at some point between the client and the DNS server that domain names in local encoding specified by an application be converted to domain names in standard encoding, and that domain names in standard encoding in the response from the DNS server be returned to local encoding that can be displayed by the client.

このためには次の3種類の方法が考えられます。

The following three methods have been proposed to implement this.

a. クライアントでの変換
クライアントでエンコーディングを変換する。
a. Conversion is performed by the client
Encoding is converted by the client. client-side conversion

b. DNS サーバでの変換
DNS サーバでエンコーディングを変換する。
b. Conversion is performed by the DNS server
Encoding is converted by the DNS server. server-side conversion

c. プロキシサーバでの変換
クライアントと DNS サーバの間にエンコーディング変換用の中継サーバを 設ける。
c. Conversion is performed by a proxy server
An intermediate server is set up between the client and the DNS server to handle encoding conversions. proxy conversion

ただし b. の方式は DNS サーバに不必要に複雑な機構を持ち込むこと、負 荷を高めることなどの問題があり好ましくないため、本キットでは a. と c. の2通りの方法を提供します。
System b. unduly increases the complexity of DNS server configuration and thereby its load making it less desirable, therefore, methods a. and c. are recommended for use with this kit.

mDNkitは、既存のDNSサーバ、クライアントを、最小限の改造で 複数の方式の多言語ドメイン名を 実際に試してみることができるようにするものです。

mDNkit requires a minimum of modifications to allow experimental use of multiple multilingual domain name systems with existing DNS servers and clients.

正規化

Normalization

多言語ドメイン名を扱うためには、エンコーディング変換の他にも重要な 機能があります。それはドメイン名の正規化です。

In addition to encoding conversion, normalization is another vital function to enable handling of multilingual domain names.

すでに述べたように、DNS サーバ間で使用されるドメイン名のエンコーディング として提案されている方式はいずれも ISO10646 をベースとしていますが、 ISO10646 では見かけ上全く同一の文字を表す方法が複数ある場合があります。 このような文字に対してその表現方法を1つに統一しないと、ユーザが 正しい (と思える) ドメイン名を入力したにも関わらず、名前解決ができない という不都合が生じることになります。

As stated above, the recommended encoding of domain names to be used between DNS servers are all based on ISO10646, the problem is that a number of characters that look identical can be denoted in a number of different ways. Unless a single unique method of notation is found for such characters, what a user thinks is a correctly entered domain name may not be possible to resolve.

また、従来の ASCII ドメイン名では、ドメイン名のマッチングの際に大文字と 小文字は同一視されていました。これをそのまま多言語ドメイン名にも適用する ことは、マッチングの処理効率などの点で問題があり、あらかじめすべて小文字 あるいは大文字に統一するのがより効率的だと考えられます。

Another problem is that upper case and lower case characters in domain name matching of traditional ASCII domain names are handled as equivalents. If this method is carried over to the handling of multilingual domain names in its present form, the matching process will be slowed down. To ensure higher efficiency, it may a good idea to use only lower case or upper case letters.

このようにドメイン名をあらかじめ設定した基準にしたがって標準形に変換するのが 正規化です。基本的には正規化はエンコーディング変換と同時に行われるので、 エンコーディング変換と同じく

Normalization is the method used to convert domain names to standard encoding using a set standard. Normalization is normally performed simultaneous with encoding conversion and just like encoding conversion there are the following three types.

の3種類の方法が考えられます。そして2番目の方式が好ましくないことも エンコーディング変換と同じです。

Like encode conversion, the second option is not desirable.

クライアントでの変換・正規化

Conversiona and normalization performed by the client

多言語ドメイン名を扱う方法のあるべき姿は、クライアント側の リゾルバライブラリなどにエンコーディングの変換や正規化の機能を 持たせることによって、DNS プロトコルにはローカルエンコーディングの データを一切載せないことだと考えられます。 この処理方法を実現するために mDNkit ではいくつかの方式を提供しています。

The ideal method of handling multilingual domain names is thought to be to leave the conversion and normalization of encoding to resolver libraries and other features on the client side and let no local encoding data be handled by the DNS protocol. mDNkit provides a number of methods to implement this type of processing.

bind9 に対するパッチ
bind9 patch
このパッチは bind9 のリゾルバにエンコーディングの変換および 正規化の機能を持たせるものです。 アプリケーションはこのパッチを適用した bind9 のリゾルバライブラリを リンクすることにより、多言語ドメイン名を扱うことが可能になります。

This patch enables the bind9 resolver to convert and normalize encoding. An application can handle multilingual domain names by linking to a bind9 resolver library where this patch has been installed.

conversion/normalization by bind9 patch

runmdn コマンド
runmdn command
このコマンドは、bind4 あるいは bind8 ベースのリゾルバライブラリを持つ Unix アプリケーションを、再コンパイルなしに多言語ドメイン名を扱えるように します。これは共有ライブラリの動的リンク機構を利用して、リゾルバライブラリの 提供する一部の関数を多言語ドメイン名の処理を付加したバージョンに 動的に置き換えることで実現されます。

This command allows Unix applications with bind4 or bind8 based resolver libraries to handle multilingual domain names without the need for recompiling. The command does this by utilizing the dynamic link of shared libraries to dynamically replace some of the functions of the resolver library with versions added to enable multilingual domain name processing.

conversion/normalization by runmdn

mDN Wrapper
これは Windows クライアントを、やはり再コンパイルなしに多言語ドメイン名を 扱えるようにするものです。DLL の機構を利用して、名前解決を行う WINSOCK の一部の関数に多言語ドメイン名の処理を付加することで実現されています。

This function is provided to enable Windows clients handle multilingual domain names without the need for recompiling. It utilizes the DLL mechanism to add multilingual domain name processing capability to some of the functions of WINSOCK, the name resolver.

conversion/normalization by winsock wrapper

runmdn コマンドと mDN Wrapper は、既存のアプリケーションを変更せずに 多言語ドメイン名の機能を付加しようとするものですが、実際にはいくつかの 制限事項があり、どのようなアプリケーションにも適用できるものではありません。 詳しくはそれぞれの解説をご覧ください。

The rundmdn command and mDN Wrapper attempt to add multilingual domain name functions to existing applications without making any modifications, but there are a number of limitations and they cannot be used with any application. Refer to respective instructions for details.

また bind9 パッチといえども、例えばアプリケーションが独自に ドメイン名の文字チェックを実行して英数字とハイフン以外の文字を含む ドメイン名をエラーにしていたりする場合には無力です。

For example if the application checks domain name characters, characters other than alphanumerics and hyphens will generate an error regardless of the bind9 patch.

プロキシサーバでの変換・正規化

Conversion and Normalization via a proxy server

すでに述べたように、エンコーディング変換や正規化は クライアント側で実行するのが理想的だと考えられますが、 実際問題としてソースが公開されていないためそのような改良のできない クライアントや、特殊なリゾルバを持っていて runmdn が適用できないクライアントが 存在します。

As stated above, conversion and normalization of encoding should ideally be performed on the client side. The problem is that there are clients that do not admit to such modifications because the source is not made public or it uses special resolvers that do not allow the use of runmdn.

そこで mDNkit では、クライアントからローカルエンコードされた 多言語ドメイン名を含むDNS要求を受け取り、多言語化対応した DNS サーバが受付けられる標準エンコーディングのドメイン名に変換し、 また逆に DNS サーバからの応答の多言語ドメイン名を クライアント側で認識できる形式に戻す DNS proxy サーバを 用意しました。

To cope with such situations, the mDNkit provides a DNS proxy server that receives DNS queries that include multilingual domain names in local encoding from a client and converts these to standard encoding acceptable to a DNS server supporting multilingual domain names, and conversly, returns multilingual domain names in the DNS server response to a format that is understood by the client.

dnsproxyを使うと、 クライアント側がドメイン名のチェックや変換を 行なっていなければ、クライアント側のローカルコードで記述された ドメイン名を、そのまま多言語ドメイン名として使うことができる ようになります。

When dnsproxyis used, the domain names in the local code of the client side can be used as multilingual domain names without modification if domain names are checked and converted on the client side.

mDNkit - DNS Proxy Server

DNS側でのドメイン名の変換

Domain Name Conversion on the DNS Side

DNS サーバ側のゾーンマスタファイルや named.conf ファイル上のドメイン名は、 あらかじめ、規定されたエンコーディングに変換されている必要があります (前述の理由により DNS サーバに変換機能を持たせる方法はここでは考えません)。

The domain names in the zone master file and named.conf file on the DNS server side must be converted to the prescribed encoding. (the above reason i.e. adding conversion functionality to the DNS server is not considered here).

mDNkitでは、管理者はこれらのファイルをローカルエンコーディングで 作成して必要に応じて変換して使うものと想定し、 ローカルエンコーディングから 多言語ドメイン名で必要とするエンコーディングへの 変換ツールmdnconvを提供します。

mDNkit assumes that the administrator generate these files in local encoding and only convert them as need dictates and to this end provides mdnconv, a conversion tool to handle conversion from local encoding to multilingual domain names.

mDNkit - mDN converter
注: ローカルエンコーディングで記述されたゾーンマスタ ファイルを多言語エンコーディングへ変換することはできますが、 多言語エンコーディングによっては逆変換が できないことがあります。 これは、エンコーディングによってはそのエンコーディングで エンコードされた文字列と通常の ASCII 文字列が 区別できず、ファイルのどの部分を逆変換すべきか判定できない ものがあるためです。 しかし、DNSの管理のためには、 逆方向の変換も必要になると思いますので、一部のエンコーディングに 対しては逆変換をサポートしています。
Note: Zone master fils in local encoding can be converted to multilingual encoding, but some multilingual encoding may not be possible to return to local encoding. This is because the encoded character strings in some encoding schemes it cannot be distinguished from normal ASCII character strings making it impossible to know which part of the file should be converted back to local encoding. Still, since backward conversion is regarded as essential for the sake of DNS management, backward conversion is supported for some encoding.

DNS自体の多言語化

Multilingual support by DNS

DNS サーバの使用するエンコーディングによっては、 DNSサーバ自体がドメイン名を8ビット透過で扱うことを 要求するものもあります。 このようなエンコーディングへの対処のために mDNkitにはbind8を8ビット透過にするためのパッチが 含まれています。このパッチはbind8に含まれている nslookup、resolverについても8ビット透過にします。

Some encoding used by DNS servers requires that the DNS server itself handles domain names as 8-bit through. To handle such encoding, mDNkit is provided with a patch that makes bind8 8-bit through. This patch also turns nslookup and resolver provided with bind8 into 8-bit through.

bind9 の DNS サーバは本来8ビット透過になっていますが、 ドメイン名を内部形式からテキスト形式に変換する際、8ビット文字を `\DDD' という表現に変換してしまうので、これを抑制して UTF-8 文字は そのまま透過するようにする機能が bind9 パッチには含まれています。

Although bind9 DNS servers are 8-bit through, when domain names are converted from the internal format to text format, 8-bit characters are converted to "\DDD". To suppress this and allow UTF-8 characters through, a bind9 patch has been provided.

補足

Notes

実際にmDNkitを使用するには、以下のドキュメントを参照してください。
Refer to the following documents for information on mDNkit usage. それぞれのプログラム、ライブラリ、および設定ファイルの仕様については 以下のドキュメントをご覧になってください。
Refer to the documents listed below for the specifications of these programs, libraries and configuration files.