【Active Directory】DCの「優先DNSサーバー」設定として127.0.0.1にしてもいいかの説

記事タイトルとURLをコピーする

こんにちは!技術1課のイーゴリです。

1台のドメインコントローラーの構成の場合、どのDNSを優先DNSとして設定するか疑問に思う方は非常に少ないと思いますが、もし既存ドメインに2台目以降のドメインコントローラを構築する場合、「優先DNSサーバーに何を設定すればいいか」と疑問に思う方は非常に多いと思いますので、本件の記事では、マイクロソフトの公式ページに基づいて僕だったらどのように設定するかをご説明したいと思います。

f:id:swx-korotkov:20220217145953p:plain

まずは結論

ネットの記事で「[優先DNSサーバー]の欄に127.0.0.1を入力する」という記事を何度か見かけたことがあります。十人十色ですが、DCが2台以上存在する場合、下記の理由で[優先DNSサーバー]の欄に「127.0.0.1」を設定することはおすすめ致しません。※

※本件の記事ではWindows環境の話となります。非Windows環境でloopback(127.0.0.1)がPrimary DNSとして使われているケースがあります。

その理由

IT業界に入った頃に「[優先DNSサーバー]としての欄に127.0.0.1を設定しないで」という明確な下記のマイクロソフトの記事がありました。

Configure network adapters on this DNS server to use the loopback address (127.0.0.1, 0:0:0:0:0:0:0:1, or ::1) as one of the DNS servers, but not as the first DNS server on the list. If the loopback address is configured as the first DNS server, then configure another DNS server first.

docs.microsoft.com

上記の記事が古い(2010年代)ため、2022年現在では何か変わったのか、念の為に調べてみましたところ、明確な記事はありませんでしたが、下記の2021年の記事を見つけました。 但し、「Applies to: Windows Server 2012 R2」と記載がありました。

Configuring domain controllers to point to a single DNS server's IP address, including the 127.0.0.1 loopback address, represents a single point of failure. This setting is tolerable in a forest with only one domain controller, but not in forests with multiple domain controllers.

及び

Branch site domain controllers should configure the preferred DNS server IP address to point to a hub-site DNS server, the alternate DNS server IP address to point to an in-site DNS server or one in the closest available site, and finally to itself using the 127.0.0.1 loopback address or current static IP address.

docs.microsoft.com

なお、2021年のDellページの記事に下記の文章があります。

If multiple DCs are configured as DNS servers, they should be configured to use each other for resolution first and themselves second. Each DC's list of DNS servers should include its own address, but not as the first server in the list. If a DC uses only itself for resolution, it may stop replicating with other DCs. This is obviously not an issue in a domain with only one DC.

www.dell.com

私の考え

マイクロソフトのページで更新がないため、(「優先DNSサーバーとして127.0.0.1を入力してください」というような文章がないため)、DCが2台以上存在する場合、僕は127.0.0.1を優先DNSサーバーとして設定しませんが、そこの判断はお任せ致します。

例外あり

マイクロソフトのページには書かれていませんが、ケース・バイ・ケースで例外があると思います。例えば、DC1の廃止予定があり、代わりにDC2を構築する場合(他のDNSの役割を持っているDCがない場合)、個人的には優先DNSサーバー設定として127.0.0.1を指定しても問題ないと思います。

以上、御一読ありがとうございました。

本田 イーゴリ (記事一覧)

カスタマーサクセス部

・AWS SAP, DOP, SCS, DBS, SAA, DVA, CLF
・Azure AZ-900
・EC-Council CCSE

趣味:日本国内旅行(47都道府県制覇)・ドライブ・音楽