Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Cloud DNS hỗ trợ nhiều loại chính sách. Trang này cung cấp thông tin chi tiết về các loại chính sách và thời điểm bạn có thể sử dụng một trong hai loại chính sách đó.
Chính sách máy chủ áp dụng cấu hình DNS riêng tư cho mạng Virtual Private Cloud (VPC) (chuyển tiếp DNS, ghi nhật ký).
Chính sách phản hồi ghi đè các phản hồi DNS riêng dựa trên tên truy vấn.
Chính sách định tuyến điều hướng lưu lượng truy cập dựa trên truy vấn (ví dụ: luân phiên, vị trí địa lý).
Bạn có thể sử dụng cả 3 chính sách cùng lúc tuỳ theo nhu cầu của mình.
Chính sách về máy chủ
Sử dụng chính sách máy chủ để thiết lập các bản triển khai kết hợp cho việc phân giải DNS. Bạn có thể thiết lập chính sách máy chủ đến tuỳ thuộc vào hướng phân giải DNS. Nếu khối lượng công việc của bạn dự định sử dụng trình phân giải DNS tại chỗ, bạn có thể thiết lập các vùng chuyển tiếp DNS bằng cách sử dụng chính sách máy chủ gửi đi. Mặt khác, nếu muốn các khối lượng công việc trên máy chủ cục bộ phân giải tên trênGoogle Cloud, bạn có thể thiết lập chính sách máy chủ đến.
Sử dụng chính sách phản hồi để thêm các quy tắc tuỳ chỉnh giúp sửa đổi cách xử lý truy vấn DNS trong mạng của bạn. Trình phân giải DNS tham khảo các quy tắc này trong quá trình truy vấn DNS. Chính sách phản hồi cho phép bạn tuỳ chỉnh hoạt động quản lý DNS trong một vùng riêng bằng cách sử dụng các quy tắc thay vì bản ghi. Nếu một quy tắc trong chính sách phản hồi ảnh hưởng đến truy vấn đến, thì quy tắc đó sẽ được xử lý; nếu không, quá trình tra cứu sẽ diễn ra bình thường.
Hãy sử dụng các quy tắc này để đạt được kết quả tương tự như khái niệm bản thảo vùng chính sách phản hồi (RPZ) của DNS (IETF). Để biết thông tin về cách quản lý chính sách phản hồi, hãy xem bài viết Quản lý chính sách và quy tắc phản hồi.
Chính sách phản hồi khác với RPZ. RPZ là một vùng DNS thông thường có dữ liệu được định dạng đặc biệt, khiến trình phân giải tương thích cung cấp nhiều phản hồi cho các truy vấn. Chính sách phản hồi không phải là vùng DNS và được quản lý riêng. Để biết thêm thông tin, hãy xem bài viết Quản lý chính sách và quy tắc phản hồi.
Chính sách định tuyến
Sử dụng chính sách định tuyến DNS cho một bản ghi tài nguyên được đặt để điều hướng lưu lượng truy cập dựa trên truy vấn và các yếu tố khác, chẳng hạn như vòng quay cân bằng theo trọng số (WRR), vị trí địa lý hoặc dự phòng. Chính sách định tuyến DNS cho phép bạn làm những việc sau:
Chuyển hướng lưu lượng truy cập từ một vị trí địa lý đến một nhà cung cấp mạng phân phối nội dung (CDN).
Chuyển hướng lưu lượng truy cập tại chỗ đến trình cân bằng tải Google Cloud dựa trên
khu vực nguồn của truy vấn.
Chỉ định rằng lưu lượng truy cập bắt nguồn từ một lục địa cụ thể sẽ được phân phát bởi các dịch vụ ở cùng lục địa đó.
Định tuyến lưu lượng truy cập đến các nhà cung cấp dịch vụ khác nhau dựa trên WRR.
Triển khai các dịch vụ mới theo tỷ lệ phần trăm tổng lưu lượng truy cập.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Khó hiểu","hardToUnderstand","thumb-down"],["Thông tin hoặc mã mẫu không chính xác","incorrectInformationOrSampleCode","thumb-down"],["Thiếu thông tin/mẫu tôi cần","missingTheInformationSamplesINeed","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-06-27 UTC."],[[["\u003cp\u003eCloud DNS offers server policies for configuring private DNS in a Virtual Private Cloud (VPC), including DNS forwarding and logging.\u003c/p\u003e\n"],["\u003cp\u003eResponse policies allow for the customization of DNS query handling within a network by overriding private DNS responses based on the query name.\u003c/p\u003e\n"],["\u003cp\u003eRouting policies direct traffic based on various factors, such as round robin and geolocation, to steer traffic to specific locations or services.\u003c/p\u003e\n"],["\u003cp\u003eAll three types of policies (server, response, and routing) can be implemented simultaneously to fit the specific needs of your network setup.\u003c/p\u003e\n"]]],[],null,["# DNS policies overview\n\nCloud DNS supports different types of policies. This page provides\ndetails about the different policy types and when you can use one or the other.\n\n- **Server policies** apply private DNS configuration to a Virtual Private Cloud (VPC) network (DNS forwarding, logging).\n- **Response policies** override private DNS responses based on the query name.\n- **Routing policies** steer traffic based on the query (for example, round robin, geolocation).\n\nYou can use all three policies at the same time depending on your needs.\n\nServer policies\n---------------\n\nUse server policies to set up hybrid deployments for DNS resolutions. You\ncan set up an inbound server policy depending on the direction of DNS\nresolutions. If your workloads plan to use an on-premises DNS resolver, you can\nset up DNS forwarding zones by using an outbound server policy. On the\nother hand, if you want your on-premises workloads to resolve names on\nGoogle Cloud, you can set up an inbound server policy.\n\nFor more information, see the\n[Server policies overview](/dns/docs/server-policies-overview).\n\nResponse policies\n-----------------\n\nUse response policies to add custom rules that modify how DNS queries are\nhandled within your network. The DNS resolver consults these rules during DNS\nlookups. Response policies let you customize DNS management within a private\nzone by using rules instead of records. If a rule in the response policy affects\nthe incoming query, it is processed; otherwise, the lookup proceeds normally.\nUse these rules to achieve results similar to the DNS [response policy zone\n(RPZ)](https://wikipedia.org/wiki/Response_policy_zone) draft concept\n([IETF](https://datatracker.ietf.org/doc/draft-ietf-dnsop-dns-rpz/)). For\ninformation about how to manage response policies, see [Manage response policies\nand rules](/dns/docs/zones/manage-response-policies).\n\nA response policy is different from an RPZ, which is an otherwise normal DNS\nzone with specially formatted data that causes compatible resolvers to\nprovide different responses to queries. Response policies aren't DNS zones\nand are managed separately. For more information, see\n[Manage response policies and rules](/dns/docs/zones/manage-response-policies).\n\nRouting policies\n----------------\n\nUse DNS routing policies for a resource record set to steer traffic based on\nthe query and other factors, such as weighted round robin (WRR), geolocation,\nor failover. DNS routing policies lets you do the following:\n\n- Steer traffic from a geographical location to a content delivery network (CDN) provider.\n- Route your on-premises traffic to Google Cloud load balancers based on the query's source region.\n- Specify that traffic that originated from a specific continent is served by services in the same continent.\n- Route traffic to different service providers on WRR basis.\n- Onboard new services with a percentage of the total traffic.\n\nFor more information, see [DNS routing policies and health checks](/dns/docs/routing-policies-overview).\n\nWhat's next\n-----------\n\n- [Apply DNS server policies](/dns/docs/policies)\n- [Manage response policies and\n rules](/dns/docs/zones/manage-response-policies)\n- [Manage DNS routing policies and health\n checks](/dns/docs/routing-policies-overview)"]]