

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 AWS Managed Microsoft AD 和內部部署 Microsoft Active Directory 集中 DNS 解析
<a name="centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory"></a>

*Brian Westmoreland，Amazon Web Services*

## 總結
<a name="centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory-summary"></a>

此模式提供使用 AWS Directory Service for Microsoft Active Directory (AWS Managed Microsoft AD) 和 Amazon Route 53 在 AWS 多帳戶環境中集中 DNS 解析的指引。在此模式中， AWS DNS 命名空間是內部部署 DNS 命名空間的子網域。此模式也提供有關如何設定現場部署 DNS 伺服器，以在現場部署 DNS 解決方案使用 Microsoft Active Directory AWS 時將查詢轉送至 的指引。 

## 先決條件和限制
<a name="centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory-prereqs"></a>

**先決條件**
+ 使用 設定的 AWS 多帳戶環境 AWS Organizations。
+ 之間建立的網路連線 AWS 帳戶。
+ 在 AWS 和內部部署環境之間建立的網路連線 （使用 AWS Direct Connect 或任何類型的 VPN 連線）。
+ AWS Command Line Interface 在本機工作站上設定的 (AWS CLI)。
+ AWS Resource Access Manager (AWS RAM) 用於在帳戶之間共用 Route 53 規則。因此，共享必須在 AWS Organizations 環境中啟用，如 [Epics](#centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory-epics) 一節所述。

**限制**
+ AWS Managed Microsoft AD Standard Edition 有 5 個共用的限制。
+ AWS Managed Microsoft AD Enterprise Edition 有 125 個共用的限制。
+ 此模式中的解決方案僅限於支援透過 AWS 區域 共用的 AWS RAM。

**產品版本**
+ 在 Windows Server 2008、2012、2012 R2 或 2016 上執行的 Microsoft Active Directory。

## Architecture
<a name="centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory-architecture"></a>

**目標架構**

![AWS 上集中式 DNS 解析的架構。](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/images/pattern-img/91430e2a-f7f6-4dbe-9fe7-8abed1f764a7/images/9b5fc51d-590b-468f-80f7-1949f3b3b258.png)


在此設計中， AWS Managed Microsoft AD 安裝在共用服務中 AWS 帳戶。雖然這不是必要項目，但此模式會採用此組態。如果您在不同的 AWS Managed Microsoft AD 中設定 AWS 帳戶，您可能需要相應地修改 [Epics](#centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory-epics) 區段中的步驟。

此設計使用 Route 53 解析程式，透過使用 Route 53 規則來支援名稱解析。如果內部部署 DNS 解決方案使用 Microsoft DNS，為 AWS 命名空間 (`aws.company.com`) 建立條件式轉送規則，這是公司 DNS 命名空間 (`company.com`) 的子網域，並不直接。如果您嘗試建立傳統條件式轉送器，將導致錯誤。這是因為 Microsoft Active Directory 已被視為 任何子網域的授權`company.com`。若要解決此錯誤，您必須先為 建立委派，`aws.company.com`以委派該命名空間的授權。然後，您可以建立條件式轉寄站。

每個發言帳戶的虛擬私有雲端 (VPC) 可以根據根命名空間擁有自己的唯一 DNS AWS 命名空間。在此設計中，每個輪輻帳戶都會將帳戶名稱的縮寫附加到基本 AWS 命名空間。建立發言帳戶中的私有託管區域後，區域會與發言帳戶中的本機 VPC 以及中央 AWS 網路帳戶中的 VPC 建立關聯。這可讓中央 AWS 網路帳戶回答與輪輻帳戶相關的 DNS 查詢。如此一來，Route 53 和 都會 AWS Managed Microsoft AD 共同分擔管理 AWS 命名空間 () 的責任`aws.company.com`。

**自動化和擴展**

此設計使用 Route 53 Resolver 端點，在 AWS 和您的內部部署環境之間擴展 DNS 查詢。每個 Route 53 Resolver 端點包含多個彈性網路介面 （分散在多個可用區域），而且每個網路介面每秒最多可以處理 10，000 個查詢。Route 53 Resolver 支援每個端點最多 6 個 IP 地址，因此此設計支援每秒最多 60，000 個 DNS 查詢分散到多個可用區域，以實現高可用性。 

此外，此模式會自動考慮內部的未來成長 AWS。在內部部署設定的 DNS 轉送規則不需要修改，即可支援新增的新 VPCs 及其相關聯的私有託管區域 AWS。 

## 工具
<a name="centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory-tools"></a>

**AWS 服務**
+ [AWS Directory Service for Microsoft Active Directory](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/directory_microsoft_ad.html) 可讓您的目錄感知工作負載 AWS 和資源在 中使用 Microsoft Active Directory AWS 雲端。
+ [AWS Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_introduction.html) 是一種帳戶管理服務，可協助您將多個 合併 AWS 帳戶 到您建立並集中管理的組織。
+ [AWS Resource Access Manager (AWS RAM)](https://docs.aws.amazon.com/ram/latest/userguide/what-is.html) 可協助您安全地跨 共用資源 AWS 帳戶 ，以減少營運開銷並提供可見性和可稽核性。
+ [Amazon Route 53](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/Welcome.html) 是一種可用性高、可擴展性強的 DNS Web 服務。

**工具**
+ [AWS Command Line Interface (AWS CLI)](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html) 是一種開放原始碼工具，可協助您 AWS 服務 透過命令列 shell 中的命令與 互動。在此模式中， AWS CLI 用於設定 Route 53 授權。

## 史詩
<a name="centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory-epics"></a>

### 建立和共用 AWS Managed Microsoft AD 目錄
<a name="create-and-share-an-managed-ad-directory"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 部署 AWS Managed Microsoft AD。 | [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory.html) | AWS 管理員 | 
| 共用 目錄。 | 建置目錄之後，請將其與 AWS 帳戶 AWS 組織中的其他 共用。如需說明，請參閱《 *AWS Directory Service 管理指南*》中的[共用您的目錄](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/step2_share_directory.html)。 AWS Managed Microsoft AD Standard Edition 有 5 個共用的限制。Enterprise Edition 有 125 個共用的限制。 | AWS 管理員 | 

### 設定路由 53
<a name="configure-r53"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 建立 Route 53 解析程式。 | Route 53 Resolvers 可協助解決 AWS 和內部部署資料中心之間的 DNS 查詢。 [See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory.html)雖然使用中央 AWS 網路帳戶 VPC 並非必要，但其餘步驟會採用此組態。 | AWS 管理員 | 
| 建立 Route 53 規則。 | 您的特定使用案例可能需要大量的 Route 53 規則，但您需要將下列規則設定為基準：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory.html)<br />如需詳細資訊，請參閱 *Route 53 開發人員指南*中的[管理轉送規則](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver-rules-managing.html)。 | AWS 管理員 | 
| 設定 Route 53 設定檔。 | Route 53 設定檔用於與發言帳戶共用規則。[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory.html) | AWS 管理員 | 

### 設定內部部署 Active Directory DNS
<a name="configure-on-premises-active-directory-dns"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 建立委派。 | 使用 Microsoft DNS 嵌入 (`dnsmgmt.msc`) 為 Active Directory 中的`company.com`命名空間建立新的委派。委派網域的名稱應為 `aws`。這會使委派 的完整網域名稱 (FQDN)`aws.company.com`。使用 AWS Managed Microsoft AD 網域控制站的 IP 地址做為名稱伺服器 IP 值，並使用 `server.aws.company.com`做為名稱。（此委派僅用於備援，因為會為此命名空間建立條件式轉送器，優先於委派。) | Active Directory | 
| 建立條件式轉送器。 | 使用 Microsoft DNS 嵌入 (`dnsmgmt.msc`) 為 建立新的條件式轉送器`aws.company.com`。 針對條件式轉送器 AWS 帳戶 的目標，在中央 DNS 中使用 AWS 傳入 Route 53 解析程式的 IP 地址。   | Active Directory | 

### 建立發言的 Route 53 私有託管區域 AWS 帳戶
<a name="create-r53-private-hosted-zones-for-spoke-aws-accounts"></a>


| 任務 | Description | 所需的技能 | 
| --- | --- | --- | 
| 建立 Route 53 私有託管區域。 | 在每個發言帳戶中建立 Route 53 私有託管區域。將此私有託管區域與發言帳戶 VPC 建立關聯。如需詳細步驟，請參閱 *Route 53 開發人員指南*中的[建立私有託管區域](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zone-private-creating.html)。 | AWS 管理員 | 
| 建立授權。 | 使用 AWS CLI 建立中央 AWS 網路帳戶 VPC 的授權。從每個語音的內容執行此命令 AWS 帳戶：<pre>aws route53 create-vpc-association-authorization --hosted-zone-id <hosted-zone-id> \<br />   --vpc VPCRegion=<region>,VPCId=<vpc-id></pre><br />其中：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory.html) | AWS 管理員 | 
| 建立關聯。 | 使用 為中央 AWS 網路帳戶 VPC 建立 Route 53 私有託管區域關聯 AWS CLI。從中央 AWS 網路帳戶的內容執行此命令：<pre>aws route53 associate-vpc-with-hosted-zone --hosted-zone-id <hosted-zone-id> \<br />   --vpc VPCRegion=<region>,VPCId=<vpc-id></pre><br />其中：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_tw/prescriptive-guidance/latest/patterns/centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory.html) | AWS 管理員 | 

## 相關資源
<a name="centralize-dns-resolution-by-using-aws-managed-microsoft-ad-and-on-premises-microsoft-active-directory-resources"></a>
+ [使用 Route 53 Resolver 簡化多帳戶環境中的 DNS 管理](https://aws.amazon.com/blogs/security/simplify-dns-management-in-a-multiaccount-environment-with-route-53-resolver/) (AWS 部落格文章）
+ [建立 AWS Managed Microsoft AD](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/ms_ad_getting_started_create_directory.html)(AWS Directory Service 文件）
+ [共用 AWS Managed Microsoft AD 目錄 ](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/step2_share_directory.html)(AWS Directory Service 文件）
+ [什麼是 Amazon Route 53 Resolver？](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resolver.html) (Amazon Route 53 文件）
+ [建立私有託管區域](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zone-private-creating.html) (Amazon Route 53 文件）
+ [什麼是 Amazon Route 53 設定檔？](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/profiles.html) (Amazon Route 53 文件）