請使用伺服器政策設定 DNS 解析的混合式部署作業。您可以根據 DNS 解析方向設定傳入伺服器政策。如果工作負載預計使用內部部署的 DNS 解析工具,您可以使用傳出連線伺服器政策來設定 DNS 轉送區域。另一方面,如果您希望內部部署的工作負載能夠解析Google Cloud上的名稱,可以設定傳入伺服器政策。
使用回應政策新增自訂規則,修改網路中 DNS 查詢的處理方式。DNS 解析器會在 DNS 查詢期間參照這些規則。回應政策可讓您使用規則 (而非記錄) 自訂私人區域中的 DNS 管理。如果回應政策中的規則會影響傳入的查詢,系統會處理該規則;否則,查詢會照常進行。使用這些規則可獲得類似 DNS 回應政策區域 (RPZ) 草稿概念的結果 (IETF)。如要瞭解如何管理回應政策,請參閱「管理回應政策和規則」。
回應政策與 RPZ 不同,後者是使用特殊格式資料的一般 DNS 區域,可讓相容的解析工具針對查詢提供不同的回應。回應政策不是 DNS 可用區,因此必須分開管理。詳情請參閱「管理回應政策和規則」。
路由政策
針對資源記錄集使用 DNS 轉送政策,根據查詢和其他因素 (例如加權輪替 (WRR)、地理位置或備援) 導引流量。您可以透過 DNS 轉送政策執行下列操作:
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-09 (世界標準時間)。"],[[["Cloud DNS offers server policies for configuring private DNS in a Virtual Private Cloud (VPC), including DNS forwarding and logging."],["Response policies allow for the customization of DNS query handling within a network by overriding private DNS responses based on the query name."],["Routing policies direct traffic based on various factors, such as round robin and geolocation, to steer traffic to specific locations or services."],["All three types of policies (server, response, and routing) can be implemented simultaneously to fit the specific needs of your network setup."]]],[]]