Ngân hàng đề — Google Cloud Professional Cloud Network Engineer

Tìm thấy 247 câu.

Câu 101
You have just deployed your infrastructure on Google Cloud. You now need to configure the DNS to meet the following requirements:

•Your on-premises resources should resolve your Google Cloud zones.
•Your Google Cloud resources should resolve your on-premises zones.
•You need the ability to resolve “.internal” zones provisioned by Google Cloud.

What should you do?
  1. A Configure an outbound server policy, and set your alternative name server to be your on-premises DNS resolver. Configure your on-premises DNS resolver to forward Google Cloud zone queries to Google's public DNS 8.8.8.8.
  2. B Configure both an inbound server policy and outbound DNS forwarding zones with the target as the on-premises DNS resolver. Configure your on-premises DNS resolver to forward Google Cloud zone queries to Google Cloud's DNS resolver.
  3. C Configure an outbound DNS server policy, and set your alternative name server to be your on-premises DNS resolver. Configure your on-premises DNS resolver to forward Google Cloud zone queries to Google Cloud's DNS resolver.
  4. D Configure Cloud DNS to DNS peer with your on-premises DNS resolver. Configure your on-premises DNS resolver to forward Google Cloud zone queries to Google's public DNS 8.8.8.8.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi tập trung vào việc cấu hình DNS hybrid giữa môi trường on-premises (on-prem) và Google Cloud Platform (GCP) để đáp ứng 3 yêu cầu chính:
✅ On-prem resources resolve GCP zones: Tài nguyên on-prem có thể phân giải các zone DNS trên GCP (bao gồm cả ".internal" zones private).
✅ GCP resources resolve on-prem zones: Tài nguyên GCP có thể phân giải các zone DNS on-prem.
✅ Hỗ trợ resolve ".internal" zones trên GCP: Đây là các private DNS zones nội bộ của GCP (như VPC private zones).

🛠️ Bối cảnh: Sau khi deploy infra trên GCP, cần thiết lập mutual DNS resolution (hai chiều) mà không dùng public DNS (như 8.8.8.8) cho private zones, vì public DNS không resolve được private/internal zones. Giải pháp sử dụng Cloud DNS với Inbound Server Policy (cho on-prem query GCP) và Outbound DNS Forwarding Zones (cho GCP forward query đến on-prem). Kiến thức dựa trên Cloud DNS cập nhật 2024-2026 (hỗ trợ Private DNS authoritative, peering không dùng cho hybrid này).

📘 Tài liệu tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Configure both an inbound server policy and outbound DNS forwarding zones with the target as the on-premises DNS resolver. Configure your on-premises DNS resolver to forward Google Cloud zone queries to Google Cloud's DNS resolver.

Lý do:
🟢 Đây là giải pháp chuẩn hybrid DNS hai chiều của GCP:

  • Inbound server policy: Cho phép on-prem DNS resolver query trực tiếp Cloud DNS để resolve GCP zones (bao gồm ".internal").
  • Outbound DNS forwarding zones: GCP forward query on-prem zones đến on-prem DNS resolver.
  • On-prem forward GCP queries đến Cloud DNS resolver (IP như 35.199.128.0/17): Đảm bảo mutual resolution, hỗ trợ private zones.
    Hoàn hảo đáp ứng tất cả 3 yêu cầu mà không lộ private data ra public DNS. ✅

❌ Giải thích tất cả các phương án

Dưới đây là phân tích từng lựa chọn (giữ nguyên văn bản gốc tiếng Anh), đánh dấu đúng/sai với lý do chi tiết bằng tiếng Việt:

  • [SAI] Configure an outbound server policy, and set your alternative name server to be your on-premises DNS resolver. Configure your on-premises DNS resolver to forward Google Cloud zone queries to Google's public DNS 8.8.8.8.
    ❌ Sai vì:

    • "Outbound server policy" không tồn tại trong Cloud DNS (chỉ có inbound server policy hoặc outbound forwarding zones).
    • Forward đến 8.8.8.8 (public DNS) không resolve được ".internal" private zones của GCP (public DNS chỉ xử lý public domains).
    • Thiếu inbound policy nên on-prem không resolve được GCP zones. ❌
  • [ĐÚNG] Configure both an inbound server policy and outbound DNS forwarding zones with the target as the on-premises DNS resolver. Configure your on-premises DNS resolver to forward Google Cloud zone queries to Google Cloud's DNS resolver.
    ✅ Đúng vì: Như giải thích ở trên – hai chiều hoàn chỉnh, sử dụng đúng tính năng Cloud DNS (inbound cho on-prem → GCP, outbound forwarding cho GCP → on-prem), và on-prem forward đúng đến Cloud DNS resolver (private IP range). Hỗ trợ đầy đủ ".internal" zones. 🟢

  • [SAI] Configure an outbound DNS server policy, and set your alternative name server to be your on-premises DNS resolver. Configure your on-premises DNS resolver to forward Google Cloud zone queries to Google Cloud's DNS resolver.
    ❌ Sai vì:

    • "Outbound DNS server policy" tên sai và không chính xác (GCP dùng "outbound DNS forwarding zones", không phải "server policy").
    • Thiếu inbound server policy nên on-prem không thể resolve GCP zones trực tiếp.
    • "Alternative name server" không phải cách cấu hình chuẩn cho outbound. ❌
  • [SAI] Configure Cloud DNS to DNS peer with your on-premises DNS resolver. Configure your on-premises DNS resolver to forward Google Cloud zone queries to Google's public DNS 8.8.8.8.
    ❌ Sai vì:

    • "DNS peer" không tồn tại trong Cloud DNS cho hybrid (GCP dùng peering cho VPC, không phải DNS resolver peering như BIND).
    • Forward đến 8.8.8.8 lại sai lầm tương tự lựa chọn 1: Không resolve private ".internal" zones.
    • Không có cơ chế hai chiều đúng. ❌

🧠 Tóm tắt: Chỉ đáp án đúng mới sử dụng Inbound + Outbound forwarding chuẩn GCP để đạt mutual resolution hybrid an toàn! Nếu implement, test với dig từ cả hai bên. 🚀

Câu 102
Your organization uses a hub-and-spoke architecture with critical Compute Engine instances in your Virtual Private Clouds (VPCs). You are responsible for the design of Cloud DNS in Google Cloud. You need to be able to resolve Cloud DNS private zones from your on-premises data center and enable on-premises name resolution from your hub-and-spoke VPC design. What should you do?
  1. A 1. Configure a private DNS zone in the hub VPC, and configure DNS forwarding to the on-premises server.
    2. Configure DNS peering from the spoke VPCs to the hub VPC.
  2. B 1. Configure a DNS policy in the hub VPC to allow inbound query forwarding from the spoke VPCs.
    2. Configure the spoke VPCs with a private zone, and set up DNS peering to the hub VPC.
  3. C 1. Configure a DNS policy in the spoke VPCs, and configure your on-premises DNS as an alternate DNS server.
    2. Configure the hub VPC with a private zone, and set up DNS peering to each of the spoke VPCs.
  4. D 1. Configure a DNS policy in the hub VPC, and configure the on-premises DNS as an alternate DNS server.
    2. Configure the spoke VPCs with a private zone, and set up DNS peering to the hub VPC.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi mô tả một kiến trúc hub-and-spoke trong Google Cloud Platform (GCP), nơi có hub VPC làm trung tâm kết nối và các spoke VPC chứa các instance Compute Engine quan trọng. Bạn chịu trách nhiệm thiết kế Cloud DNS, với yêu cầu chính:

  • Cho phép on-premises data center resolve được Cloud DNS private zones (tức là các tên miền private trong GCP VPCs).
  • Đồng thời, enable on-premises name resolution từ các VPC trong hub-and-spoke (tức là các instance trong GCP có thể resolve tên miền từ on-premises DNS).

Mục tiêu cốt lõi: Tích hợp DNS giữa on-premises và GCP hub-spoke một cách hiệu quả, sử dụng các tính năng như private DNS zones, DNS forwarding, và DNS peering (dựa trên tài liệu GCP cập nhật đến 2026, Cloud DNS hỗ trợ peering cross-VPC và forwarding đến external DNS servers).

📘 Dẫn nguồn:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng là phương án đầu tiên:

  1. Configure a private DNS zone in the hub VPC, and configure DNS forwarding to the on-premises server.
  2. Configure DNS peering from the spoke VPCs to the hub VPC.

Lý do chọn đáp án này 🛠️:

  • Bước 1: Tạo private DNS zone ở hub VPC để tất cả VPCs (hub và spokes) có thể resolve chung một nơi. Đồng thời, cấu hình DNS forwarding từ hub VPC đến on-premises DNS server → Cho phép các instance trong GCP (hub/spokes) resolve được tên miền on-premises thông qua forwarding.
  • Bước 2: DNS peering từ spoke VPCs đến hub VPC → Spokes resolve private zones của hub (bao gồm cả forwarding đến on-prem), đảm bảo tính nhất quán trong hub-and-spoke mà không cần peering phức tạp từ on-prem.
  • Kết quả: On-premises resolve private zones GCP qua VPC peering/Native VPN/Interconnect (giả định đã kết nối), và GCP resolve on-premises qua forwarding. Đây là best practice cho hub-and-spoke theo GCP docs 2026.

❌ Phân tích tất cả các phương án

Dưới đây là phân tích chi tiết từng phương án, với text gốc giữ nguyên bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai dựa trên logic Cloud DNS GCP (không hỗ trợ một số config sai như peering ngược chiều hoặc policy không phù hợp).

  • Phương án 1 (ĐÚNG - ✅):

    1. Configure a private DNS zone in the hub VPC, and configure DNS forwarding to the on-premises server.
    2. Configure DNS peering from the spoke VPCs to the hub VPC.
      Giải thích: Như đã nêu ở phần đáp án đúng. Đây là cách tối ưu, tập trung private zone ở hub, forwarding outbound từ hub đến on-prem, và peering inbound từ spokes → Đáp ứng đầy đủ cả hai yêu cầu resolve. Không có config thừa hoặc sai.
  • Phương án 2 (SAI - ❌):

    1. Configure a DNS policy in the hub VPC to allow inbound query forwarding from the spoke VPCs.
    2. Configure the spoke VPCs with a private zone, and set up DNS peering to the hub VPC.
      Giải thích: DNS policy chỉ dùng để alternate DNS servers hoặc forwarding, không hỗ trợ "inbound query forwarding" từ spokes (GCP không có policy kiểu này cho inbound). Private zone ở spoke VPCs gây phân tán, không phù hợp hub-spoke (mỗi spoke cần sync zone riêng). Peering từ spoke đến hub đúng nhưng thiếu forwarding đến on-prem → Không enable on-premises resolution từ GCP.
  • Phương án 3 (SAI - ❌):

    1. Configure a DNS policy in the spoke VPCs, and configure your on-premises DNS as an alternate DNS server.
    2. Configure the hub VPC with a private zone, and set up DNS peering to each of the spoke VPCs.
      Giải thích: DNS policy ở spokes với on-prem làm alternate chỉ resolve on-prem từ spokes, nhưng không giúp on-prem resolve GCP private zones (alternate là inbound). DNS peering ngược (hub peer đến spokes) không hiệu quả trong hub-spoke (hub là trung tâm, peering nên từ spoke → hub). Private zone ở hub đúng nhưng peering sai hướng → Không scale và phức tạp hóa.
  • Phương án 4 (SAI - ❌):

    1. Configure a DNS policy in the hub VPC, and configure the on-premises DNS as an alternate DNS server.
    2. Configure the spoke VPCs with a private zone, and set up DNS peering to the hub VPC.
      Giải thích: On-prem làm alternate DNS ở hub policy chỉ resolve on-prem từ hub (không forwarding full), nhưng on-prem vẫn không resolve GCP zones dễ dàng. Private zone ở spoke VPCs lại phân tán, peering spoke → hub đúng nhưng thiếu tích hợp forwarding đúng cách → Không đáp ứng on-prem resolve GCP private zones một cách toàn diện.

Kết luận 🎯: Chỉ phương án 1 mới hoàn chỉnh, tuân thủ best practices hub-spoke của GCP Cloud DNS (cập nhật 2026). Nếu triển khai, kiểm tra VPC peering trước để on-prem truy cập được hub DNS!

Câu 103
You have a Cloud Storage bucket in Google Cloud project XYZ. The bucket contains sensitive data. You need to design a solution to ensure that only instances belonging to VPCs under project XYZ can access the data stored in this Cloud Storage bucket. What should you do?
  1. A Configure Private Google Access to privately access the Cloud Storage service using private IP addresses.
  2. B Configure a VPC Service Controls perimeter around project XYZ, and include storage.googleapis.com as a restricted service in the service perimeter.
  3. C Configure Cloud Storage with projectPrivate Access Control List (ACL) that gives permission to the project team based on their roles.
  4. D Configure Private Service Connect to privately access Cloud Storage from all VPCs under project XYZ.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào bảo mật dữ liệu nhạy cảm trong một Cloud Storage bucket thuộc Google Cloud project XYZ. Yêu cầu thiết kế giải pháp đảm bảo chỉ các instances (máy ảo) thuộc các VPC trong project XYZ mới có thể truy cập dữ liệu.

  • Mục tiêu chính: Ngăn chặn truy cập từ bên ngoài project XYZ, tránh rò rỉ dữ liệu (data exfiltration).
  • Bối cảnh: Bucket chứa dữ liệu nhạy cảm, cần kiểm soát chặt chẽ dựa trên project boundary và VPC scope.
  • Thách thức: Các giải pháp mạng thông thường (như Private IP) không đủ để giới hạn theo project, cần công cụ bảo mật cao cấp hơn để tạo "perimeter" (ranh giới bảo vệ).

✅ Đáp án đúng: Configure a VPC Service Controls perimeter around project XYZ, and include storage.googleapis.com as a restricted service in the service perimeter.
Lý do chọn: VPC Service Controls (VPC-SC) tạo perimeter bảo vệ quanh project XYZ, chỉ cho phép tài nguyên bên trong perimeter (bao gồm instances trong VPCs của project) giao tiếp với dịch vụ storage.googleapis.com (Cloud Storage API). Điều này ngăn chặn truy cập từ project khác hoặc bên ngoài, phù hợp hoàn hảo với yêu cầu. Đây là giải pháp best practice cho data protection theo tài liệu Google Cloud mới nhất (cập nhật 2024-2026).
📘 Nguồn tham khảo: VPC Service Controls Overview và Protecting Cloud Storage.

🛠️ Giải thích chi tiết tất cả các phương án

  • Phương án 1: Configure Private Google Access to privately access the Cloud Storage service using private IP addresses.
    ❌ Sai vì: Private Google Access chỉ cho phép instances trong VPC sử dụng private IP để truy cập Google APIs (như Cloud Storage) mà không cần public IP hoặc NAT. Tuy nhiên, nó không giới hạn theo project – bất kỳ VPC nào (kể cả project khác) kích hoạt tính năng này đều có thể truy cập bucket nếu có IAM permission. Không giải quyết được yêu cầu "chỉ VPCs dưới project XYZ".

  • Phương án 2: Configure a VPC Service Controls perimeter around project XYZ, and include storage.googleapis.com as a restricted service in the service perimeter.
    ✅ Đúng vì: Như đã giải thích ở trên, VPC-SC tạo drydock perimeter bảo vệ project XYZ, chặn mọi giao tiếp với storage.googleapis.com từ ngoài perimeter. Instances trong VPCs của project XYZ (bên trong) vẫn truy cập bình thường. Hỗ trợ service perimeter với restricted services, cập nhật mới nhất hỗ trợ Cloud Storage đầy đủ (phiên bản 2026 vẫn giữ nguyên).

  • Phương án 3: Configure Cloud Storage with projectPrivate Access Control List (ACL) that gives permission to the project team based on their roles.
    ❌ Sai vì: Cloud Storage không có "projectPrivate ACL" (khái niệm không tồn tại). ACL đã deprecated từ 2021, thay bằng IAM hoặc Uniform Bucket-Level Access. Ngay cả IAM cũng chỉ kiểm soát user/role-based, không bind theo VPC/project boundary. Không ngăn instances ngoài project XYZ nếu chúng có service account permission.

  • Phương án 4: Configure Private Service Connect to privately access Cloud Storage from all VPCs under project XYZ.
    ❌ Sai vì: Private Service Connect (PSC) cho phép private endpoint đến Google services từ VPC, nhưng nó không restrict truy cập – chỉ làm private hóa kết nối. Bất kỳ VPC nào (kể cả project khác) với PSC endpoint và IAM phù hợp đều truy cập được. Không tạo boundary theo project như yêu cầu.

🛡️ Kết luận: VPC Service Controls là giải pháp an toàn nhất cho enterprise security, kết hợp với IAM để hoàn thiện. Nếu triển khai, cần kiểm tra bridge/drydock mode để tránh downtime! 📘 Nguồn bổ sung: Google Cloud Security Best Practices.

Câu 104
You are maintaining a Shared VPC in a host project. Several departments within your company have infrastructure in different service projects attached to the Shared VPC and use Identity and Access Management (IAM) permissions to manage the cloud resources in those projects. VPC Network Peering is also set up between the Shared VPC and a common services VPC that is not in a service project. Several users are experiencing failed connectivity between certain instances in different Shared VPC service projects and between certain instances and the internet. You need to validate the network configuration to identify whether a misconfiguration is the root cause of the problem. What should you do?
  1. A Review the VPC audit logs in Cloud Logging for the affected instances.
  2. B Use Secure Shell (SSH) to connect to the affected Compute Engine instances, and run a series of PING tests to the other affected endpoints and the 8.8.8.8 IPv4 address.
  3. C Run Connectivity Tests from Network Intelligence Center to check connectivity between the affected endpoints in your network and the internet.
  4. D Enable VPC Flow Logs for all VPCs, and review the logs in Cloud Logging for the affected instances.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi mô tả tình huống bạn đang quản lý một Shared VPC trong host project trên Google Cloud. Nhiều bộ phận công ty có hạ tầng trong các service projects kết nối với Shared VPC này, sử dụng IAM permissions để quản lý tài nguyên. Ngoài ra, có VPC Network Peering giữa Shared VPC và một common services VPC (không thuộc service project).
Vấn đề: Một số người dùng gặp lỗi kết nối giữa các instances ở các service projects khác nhau trong Shared VPC, và giữa instances với internet.
Nhiệm vụ: Xác thực cấu hình mạng để kiểm tra xem misconfiguration (lỗi cấu hình) có phải nguyên nhân gốc rễ không.
📌 Mục tiêu chính: Tìm cách validate network configuration hiệu quả nhất, tập trung vào troubleshoot connectivity issues trong môi trường phức tạp với Shared VPC và peering (cập nhật theo Google Cloud 2024-2026: Network Intelligence Center là công cụ khuyến nghị chính thức cho các vấn đề này).

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Run Connectivity Tests from Network Intelligence Center to check connectivity between the affected endpoints in your network and the internet.
Lý do:
🛠️ Connectivity Tests trong Network Intelligence Center (NIC) là công cụ chuyên dụng để mô phỏng luồng traffic giữa các endpoints (như VM instances, internet), kiểm tra toàn diện firewall rules, routes, NAT, peering configs, và các vấn đề Shared VPC-specific (như IAM-bound firewalls hoặc service project isolation). Nó cung cấp root cause analysis tự động, xác định chính xác misconfiguration mà không cần truy cập thủ công vào instances hay logs. Đây là best practice theo tài liệu Google Cloud mới nhất (2024+), lý tưởng cho môi trường multi-project Shared VPC với peering.
📘 Tài liệu tham khảo:

❌ Phân tích tất cả các phương án (đúng/sai)

Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc tiếng Anh. Mỗi phương án được đánh giá dựa trên hiệu quả validate network config trong Shared VPC phức tạp:

  • [SAI] Review the VPC audit logs in Cloud Logging for the affected instances.
    ❌ Lý do sai: VPC audit logs (trong Cloud Logging) chủ yếu ghi admin actions (như tạo/delete VPC, firewall changes), không ghi network traffic hoặc connectivity failures. Chúng không giúp troubleshoot packet-level issues giữa instances/service projects/internet, dễ bỏ lỡ misconfigs như route blackholes hoặc firewall denies. Không phải công cụ phù hợp cho validation connectivity.

  • [SAI] Use Secure Shell (SSH) to connect to the affected Compute Engine instances, and run a series of PING tests to the other affected endpoints and the 8.8.8.8 IPv4 address.
    ❌ Lý do sai: SSH + ping chỉ kiểm tra end-to-end connectivity từ instance cụ thể, nhưng bị hạn chế bởi OS firewalls, không phát hiện network-level misconfigs (ví dụ: Shared VPC firewall policies, peering route adsorptions, hoặc IAM restrictions ở service projects). Ping ICMP có thể bị block, và không scale cho multi-project environments. Không cung cấp root cause analysis toàn diện.

  • [ĐÚNG] Run Connectivity Tests from Network Intelligence Center to check connectivity between the affected endpoints in your network and the internet.
    ✅ Lý do đúng (như đã giải thích ở trên): Công cụ mạnh mẽ nhất, zero-touch simulation, hỗ trợ Shared VPC + peering, xác định chính xác misconfigs như "Firewall rule deny" hoặc "No route to internet".

  • [SAI] Enable VPC Flow Logs for all VPCs, and review the logs in Cloud Logging for the affected instances.
    ❌ Lý do sai: VPC Flow Logs ghi traffic flows (accept/reject), hữu ích cho post-mortem analysis, nhưng phải enable trước (có thể mất thời gian, chi phí cao cho "all VPCs"), và review thủ công logs trong môi trường lớn (Shared VPC + peering) rất tốn kém, không targeted. Không simulate traffic hay chỉ rõ root cause như NIC; chỉ reactive, không proactive validation.

Câu 105
Your organization has Compute Engine instances in us-east1, us-west2, and us-central1. Your organization also has an existing Cloud Interconnect physical connection in the East Coast of the United States with a single VLAN attachment and Cloud Router in us-east1. You need to provide a design with high availability and ensure that if a region goes down, you still have access to all your other Virtual Private Cloud (VPC) subnets. You need to accomplish this in the most cost-effective manner possible. What should you do?
  1. A 1. Configure your VPC routing in regional mode.
    2. Add an additional Cloud Interconnect VLAN attachment in the us-east1 region, and configure a Cloud Router in us-east1.
  2. B 1. Configure your VPC routing in global mode.
    2. Add an additional Cloud Interconnect VLAN attachment in the us-east1 region, and configure a Cloud Router in us-east1.
  3. C 1. Configure your VPC routing in global mode.
    2. Add an additional Cloud Interconnect VLAN attachment in the us-west2 region, and configure a Cloud Router in us-west2.
  4. D 1. Configure your VPC routing in regional mode.
    2. Add additional Cloud Interconnect VLAN attachments in the us-west2 and us-central1 regions, and configure Cloud Routers in us-west2 and us-central1.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi tập trung vào việc thiết kế mạng high availability (HA) cho kết nối Cloud Interconnect trong Google Cloud Platform (GCP). Tổ chức có các Compute Engine instances nằm ở 3 vùng (regions): us-east1, us-west2, và us-central1. Hiện tại, đã có một kết nối vật lý Cloud Interconnect ở East Coast (Mỹ) với một VLAN attachment duy nhất và Cloud Router ở us-east1.

Yêu cầu chính:

  • Đảm bảo HA: Nếu một region bị downtime (sụt giảm), vẫn truy cập được tất cả các VPC subnets khác từ on-premises qua Interconnect.
  • Cost-effective nhất: Giảm thiểu chi phí (tránh thêm quá nhiều tài nguyên).

🛠️ Các khái niệm cốt lõi (cập nhật đến 2026):

  • Cloud Interconnect: Kết nối dedicated/partner từ on-premises đến GCP VPC, qua VLAN attachments (gắn với region cụ thể) và Cloud Router (quản lý BGP dynamic routing).
  • Cloud Router modes (tính năng Global Router từ 2021, cập nhật 2024-2026):
    • Regional mode (mặc định): Routes chỉ propagate trong region của Router.
    • Global mode: Một Cloud Router duy nhất advertise routes toàn cầu đến tất cả regions trong VPC network, hỗ trợ HA multi-region mà không cần nhiều Router riêng lẻ.
  • VPC network: Là global scope, subnets regional, nhưng dynamic routes từ Cloud Router (global mode) sẽ reachable từ mọi region.
  • HA design: Cần redundant VLAN attachments ở regions khác nhau để tránh single point of failure (nếu region attachment down, path khác vẫn hoạt động). Thêm attachment ở cùng region không HA. Cost-effective: Chỉ thêm 1 attachment ở region có workload (us-west2).

📘 Nguồn tham khảo:

✅ Đáp án đúng (Option 3)

1. Configure your VPC routing in global mode.
2. Add an additional Cloud Interconnect VLAN attachment in the us-west2 region, and configure a Cloud Router in us-west2.

Lý do chọn (chi tiết):

  • Global mode cho phép dynamic routes từ on-premises propagate toàn cầu đến tất cả VPC subnets ở us-east1, us-west2, us-central1. Nếu us-east1 down, routes vẫn available qua attachment mới ở us-west2 (diverse region).
  • Thêm 1 VLAN attachment ở us-west2 (có instances, tận dụng workload) + Cloud Router mới: Tạo 2 paths redundant, HA mà cost-effective (không cần thêm ở us-central1, tránh phí thừa).
  • Phù hợp best practice GCP 2026: Global Router + multi-region attachments cho HA low-cost.

📋 Phân tích tất cả các phương án

  • ❌ Phương án 1:
    1. Configure your VPC routing in regional mode.
    2. Add an additional Cloud Interconnect VLAN attachment in the us-east1 region, and configure a Cloud Router in us-east1.
    Giải thích sai: Regional mode chỉ propagate routes trong us-east1, không đến us-west2/us-central1. Thêm VLAN thứ 2 ở cùng us-east1 không HA (nếu us-east1 down, cả 2 paths mất). Không đáp ứng "access all VPC subnets" khi region down, và kém HA.

  • ❌ Phương án 2:
    1. Configure your VPC routing in global mode.
    2. Add an additional Cloud Interconnect VLAN attachment in the us-east1 region, and configure a Cloud Router in us-east1.
    Giải thích sai: Global mode tốt (routes toàn cầu), nhưng thêm VLAN ở cùng us-east1 tạo single region failure (us-east1 down → mất connectivity). Không diverse, vi phạm yêu cầu HA multi-region.

  • ✅ Phương án 3 (Đúng - như trên):
    1. Configure your VPC routing in global mode.
    2. Add an additional Cloud Interconnect VLAN attachment in the us-west2 region, and configure a Cloud Router in us-west2.
    Giải thích đúng: Kết hợp global propagation + diverse region (us-west2) tạo HA tối ưu, cost thấp (chỉ +1 attachment). Đảm bảo truy cập tất cả subnets dù region nào down.

  • ❌ Phương án 4:
    1. Configure your VPC routing in regional mode.
    2. Add additional Cloud Interconnect VLAN attachments in the us-west2 and us-central1 regions, and configure Cloud Routers in us-west2 and us-central1.
    Giải thích sai: Regional mode giới hạn routes per-region, không guarantee access cross-region khi failure. Thêm 2 attachments mới (tổng 3) → đắt đỏ, không cost-effective dù HA tốt hơn.

Câu 106
You recently configured Google Cloud Armor security policies to manage traffic to your application. You discover that Google Cloud Armor is incorrectly blocking some traffic to your application. You need to identity the web application firewall (WAF) rule that is incorrectly blocking traffic. What should you do?
  1. A Enable firewall logs, and view the logs in Firewall Insights.
  2. B Enable HTTP(S) Load Balancing logging with sampling rate equal to 1, and view the logs in Cloud Logging.
  3. C Enable VPC Flow Logs, and view the logs in Cloud Logging.
  4. D Enable Google Cloud Armor audit logs, and view the logs on the Activity page in the Google Cloud Console.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi tập trung vào tình huống bạn đã cấu hình Google Cloud Armor (một dịch vụ Web Application Firewall - WAF của Google Cloud) để quản lý lưu lượng truy cập đến ứng dụng. Tuy nhiên, Cloud Armor đang chặn nhầm một số traffic hợp lệ. Nhiệm vụ là xác định chính xác quy tắc WAF (rule) nào đang chặn sai traffic đó.

🛠️ Bối cảnh kỹ thuật:

  • Google Cloud Armor hoạt động như một lớp bảo mật trước HTTP(S) Load Balancer (cụ thể là External HTTP(S) LB hoặc Application Load Balancer).
  • Để debug và xác định rule cụ thể gây block, bạn cần logs chi tiết về request bị chặn, bao gồm thông tin rule ID, action (như deny), và lý do match rule.
  • Kiến thức cập nhật đến 2026: Theo tài liệu GCP mới nhất (Google Cloud Armor documentation, cập nhật 2024-2026), logs từ HTTP(S) Load Balancing là nguồn chính để xem chi tiết WAF enforcement, không phải các logs firewall thông thường.

📘 Dẫn nguồn tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Enable HTTP(S) Load Balancing logging with sampling rate equal to 1, and view the logs in Cloud Logging.

Lý do 🏆:

  • Cloud Armor chỉ enforce rules khi traffic đi qua HTTP(S) Load Balancer. Do đó, access logs của HTTP(S) LB (với sampling rate = 1, tức 100% logs) sẽ ghi chi tiết jsonLog chứa thông tin cloudArmor như defenseRuleMatched, securityPolicyId, rulePriority, và action (deny).
  • Xem logs trong Cloud Logging cho phép filter theo rule cụ thể (ví dụ: jsonPayload.enforcedSecurityPolicy.name hoặc jsonPayload.securityPolicyOutcome). Đây là cách chính thức để identify rule block sai traffic, theo best practices GCP 2026.

🔍 Giải thích tất cả các phương án (đúng/sai)

Dưới đây là phân tích từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh dấu ✅ (đúng) hoặc ❌ (sai), kèm giải thích chi tiết bằng tiếng Việt:

  • Enable firewall logs, and view the logs in Firewall Insights.
    ❌ Sai: Firewall logs (từ VPC Firewall Rules) chỉ ghi L3/L4 traffic (IP/port), không chứa chi tiết WAF rules của Cloud Armor (lớp L7). Firewall Insights chỉ visualize firewall traffic tổng quát, không hỗ trợ debug WAF cụ thể. Không giúp identify rule block.

  • Enable HTTP(S) Load Balancing logging with sampling rate equal to 1, and view the logs in Cloud Logging.
    ✅ Đúng: Như giải thích ở trên, đây là cách chuẩn. Sampling rate = 1 đảm bảo 100% logs (không miss traffic), và Cloud Logging cho phép query chi tiết Cloud Armor fields như cloudArmorAction và matchedRule.

  • Enable VPC Flow Logs, and view the logs in Cloud Logging.
    ❌ Sai: VPC Flow Logs ghi L3/L4 flows (packet-level, ACCEPT/REJECT), không capture L7 details từ Cloud Armor (WAF rules). Không có thông tin về HTTP request hay rule match, nên không dùng để debug WAF blocking.

  • Enable Google Cloud Armor audit logs, and view the logs on the Activity page in the Google Cloud Console.
    ❌ Sai: Audit logs chỉ ghi admin actions (tạo/sửa policy), không ghi runtime enforcement (request bị block). Activity page hiển thị audit logs, không có data về traffic cụ thể hay rule match. Không hỗ trợ identify rule block sai.

🧠 Lưu ý bổ sung: Để tối ưu, sau khi enable logs, dùng Log Explorer filter query như resource.type="http_load_balancer" AND jsonPayload.cloudArmorAction="deny" để nhanh chóng tìm rule. Nếu traffic cao, cân nhắc sampling <1 sau debug!

Câu 107
You are the Organization Admin for your company. One of your engineers is responsible for setting up multiple host projects across multiple folders and sharing subnets with service projects. You need to enable the engineer's Identity and Access Management (IAM) configuration to complete their task in the fewest number of steps. What should you do?
  1. A Set up the engineer with Compute Shared VPC Admin IAM role at the folder level.
  2. B Set up the engineer with Compute Shared VPC Admin IAM role at the organization level.
  3. C Set up the engineer with Compute Shared VPC Admin IAM role and Project IAM Admin role at the folder level.
  4. D Set up the engineer with Compute Shared VPC Admin IAM role and Project IAM Admin role at the organization level.
Xem giải thích

🧩 Phân tích chi tiết nội dung câu hỏi

Câu hỏi này thuộc chủ đề Shared VPC (Virtual Private Cloud chia sẻ) trong Google Cloud Platform (GCP). Bạn là Organization Admin (quản trị viên tổ chức), và một kỹ sư (engineer) cần thực hiện nhiệm vụ:

  • Thiết lập nhiều host projects (dự án chủ chứa VPC và subnets) trải rộng trên nhiều folders (thư mục tổ chức).
  • Chia sẻ subnets từ các host projects này với service projects (dự án dịch vụ sử dụng tài nguyên chia sẻ).

Mục tiêu là cấp IAM (Identity and Access Management) cho kỹ sư để hoàn thành nhiệm vụ với số bước ít nhất (fewest number of steps).
🛠️ Yêu cầu chính: Kỹ sư cần quyền quản lý Shared VPC toàn diện, cross-folder và cross-project, mà không cần cấp quyền lẻ tẻ cho từng folder/project riêng lẻ. Role phù hợp là Compute Shared VPC Admin (roles/compute.sharedVPCAdmin), cho phép:

  • Tạo và quản lý host projects.
  • Liên kết (attach) service projects.
  • Chia sẻ subnets mà không cần quyền owner riêng trên từng project.

📘 Kiến thức cập nhật đến 2026: Theo tài liệu GCP mới nhất (Shared VPC Admin guide, cập nhật 2024-2026), quyền tại organization level sẽ kế thừa (inherit) xuống tất cả folders/projects con, giúp thực hiện nhanh chóng cho multi-folder setup. Không cần thêm role khác như Project IAM Admin vì Shared VPC Admin đã đủ cho task này.

Nguồn tham khảo:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Set up the engineer with Compute Shared VPC Admin IAM role at the organization level.

Lý do:

  • Cấp role Compute Shared VPC Admin tại organization level là cách ít bước nhất (chỉ 1 lần grant). Quyền này kế thừa xuống tất cả folders và projects trong org, cho phép kỹ sư:
    ✅ Tạo multiple host projects ở bất kỳ folder nào.
    ✅ Chia sẻ subnets với service projects cross-folder.
  • Không cần thêm role khác, tránh phức tạp hóa. Đây là best practice cho scale lớn theo GCP 2026.

🧩 Giải thích tất cả các phương án (đúng/sai)

  • Set up the engineer with Compute Shared VPC Admin IAM role at the folder level.
    ❌ Sai: Nếu cấp tại folder level, quyền chỉ áp dụng trong folder đó và projects con bên dưới. Kỹ sư không thể quản lý host projects ở các folder khác mà không cần cấp thêm nhiều lần (nhiều bước hơn). Không đạt "fewest steps" cho multi-folder.

  • Set up the engineer with Compute Shared VPC Admin IAM role at the organization level.
    ✅ Đúng: Như đã giải thích ở trên. Quyền tại organization level bao phủ toàn bộ hierarchy (folders/projects), chỉ 1 bước grant là đủ cho mọi host/service projects cross-folder. Tối ưu nhất!

  • Set up the engineer with Compute Shared VPC Admin IAM role and Project IAM Admin role at the folder level.
    ❌ Sai:

    • Thừa role Project IAM Admin (roles/resourcemanager.projectIamAdmin) – không cần thiết cho Shared VPC (chỉ dùng để quản lý IAM trên project cụ thể).
    • Vẫn giới hạn ở folder level, không cross-folder.
    • Tăng bước (grant 2 roles + nhiều folder) → Không "fewest steps".
  • Set up the engineer with Compute Shared VPC Admin IAM role and Project IAM Admin role at the organization level.
    ❌ Sai:

    • Thừa Project IAM Admin tại org level (quá mạnh, cho phép chỉnh IAM toàn org, rủi ro security cao).
    • Shared VPC Admin đã đủ, thêm role làm phức tạp và không cần thiết. Không phải cách "fewest steps" tối ưu.

🛠️ Tóm tắt best practice: Luôn ưu tiên grant quyền cao nhất cần thiết (organization/folder) để kế thừa, giảm steps và quản lý dễ dàng!

Câu 108
You recently deployed Compute Engine instances in regions us-west1 and us-east1 in a Virtual Private Cloud (VPC) with default routing configurations. Your company security policy mandates that virtual machines (VMs) must not have public IP addresses attached to them. You need to allow your instances to fetch updates from the internet while preventing external access. What should you do?
  1. A Create a Cloud NAT gateway and Cloud Router in both us-west1 and us-east1.
  2. B Create a single global Cloud NAT gateway and global Cloud Router in the VPC.
  3. C Change the instances’ network interface external IP address from None to Ephemeral.
  4. D Create a firewall rule that allows egress to destination 0.0.0.0/0.
Xem giải thích

🧩 Phân tích chi tiết câu hỏi trắc nghiệm

📖 Nội dung câu hỏi:
Câu hỏi mô tả tình huống bạn đã triển khai các instance Compute Engine ở hai vùng us-west1 và us-east1 trong một Virtual Private Cloud (VPC) với cấu hình định tuyến mặc định. Chính sách bảo mật của công ty yêu cầu các máy ảo (VMs) không được gắn địa chỉ IP công khai. Tuy nhiên, bạn cần cho phép các instance này truy cập internet để tải cập nhật (outbound traffic), đồng thời ngăn chặn truy cập từ bên ngoài (no inbound traffic).
🛠️ Vấn đề cốt lõi: VPC mặc định không cho phép outbound internet nếu VMs không có public IP. Giải pháp phải đảm bảo NAT (Network Address Translation) để VMs dùng private IP outbound, mà không expose public IP cho inbound.

✅ Đáp án đúng:
Create a Cloud NAT gateway and Cloud Router in both us-west1 and us-east1.

Lý do lựa chọn (chi tiết):

  • Cloud NAT là dịch vụ NAT được quản lý bởi Google Cloud, cho phép VMs với private IP truy cập internet outbound mà không cần public IP (chỉ outbound, inbound bị block tự động).
  • Cloud Router cần thiết để quảng bá (advertise) các route từ Cloud NAT đến các subnet ở từng region, đảm bảo traffic outbound được route đúng qua NAT gateway.
  • Vì VPC spanning multi-region (us-west1 và us-east1), bạn phải tạo Cloud NAT + Cloud Router riêng ở từng region (regional resources), không phải global. VPC peering/default subnet sẽ tự sync routes giữa regions.
  • Điều này tuân thủ chính sách no public IP, cho phép fetch updates (ví dụ: apt-get update) mà block external access hoàn toàn.
    🆕 Cập nhật mới nhất (đến 2026): Cloud NAT vẫn là regional (không hỗ trợ global NAT duy nhất), theo GCP NAT docs v2.x.

📘 Tài liệu tham khảo:

🔍 Giải thích tất cả các phương án (đúng/sai)

  • ✅ [ĐÚNG] Create a Cloud NAT gateway and Cloud Router in both us-west1 and us-east1.
    Phương án này hoàn hảo vì Cloud NAT cung cấp outbound NAT mà không cần public IP, và Cloud Router advertise routes cần thiết cho multi-region. Đảm bảo VMs fetch updates từ internet (0.0.0.0/0 outbound) mà block inbound 100%. Không vi phạm chính sách bảo mật.

  • ❌ [SAI] Create a single global Cloud NAT gateway and global Cloud Router in the VPC.
    Sai vì Cloud NAT là regional resource, không hỗ trợ "global" NAT gateway duy nhất. Cloud Router cũng regional (dùng cho dynamic routing per region). Một NAT global không tồn tại trong GCP, dẫn đến traffic từ region kia không route đúng, VMs ở us-east1 không outbound được.

  • ❌ [SAI] Change the instances’ network interface external IP address from None to Ephemeral.
    Sai hoàn toàn vì vi phạm chính sách bảo mật "VMs must not have public IP". Ephemeral public IP cho phép cả inbound/outbound, expose VMs cho external access (scan, attack). Không giải quyết outbound an toàn mà cần NAT.

  • ❌ [SAI] Create a firewall rule that allows egress to destination 0.0.0.0/0.
    Sai vì firewall rule chỉ kiểm soát traffic flow, không tạo khả năng outbound nếu VMs thiếu public IP hoặc NAT. Default VPC cho phép egress 0.0.0.0/0 nhưng traffic sẽ drop ở internet gateway nếu no public IP. Không ngăn inbound và không đủ cho multi-region.

🎯 Kết luận: Giải pháp đúng tận dụng Cloud NAT + Cloud Router per region là best practice GCP cho private VMs truy cập internet outbound an toàn! 🚀

Câu 109
You are designing a new global application using Compute Engine instances that will be exposed by a global HTTP(S) load balancer. You need to secure your application from distributed denial-of-service and application layer (layer 7) attacks. What should you do?
  1. A Configure VPC Service Controls and create a secure perimeter. Define fine-grained perimeter controls and enforce that security posture across your Google Cloud services and projects.
  2. B Configure a Google Cloud Armor security policy in your project, and attach it to the backend service to secure the application.
  3. C Configure VPC firewall rules to protect the Compute Engine instances against distributed denial-of-service attacks.
  4. D Configure hierarchical firewall rules for the global HTTP(S) load balancer public IP address at the organization level.
Xem giải thích

🧩 Phân tích nội dung câu hỏi

Câu hỏi yêu cầu thiết kế một ứng dụng toàn cầu mới sử dụng các instance Compute Engine (máy ảo trên Google Cloud Platform - GCP), được expose qua global HTTP(S) load balancer. Mục tiêu là bảo vệ ứng dụng khỏi các cuộc tấn công phân tán từ chối dịch vụ (DDoS) và tấn công lớp ứng dụng (Layer 7 - L7).
✅ Đây là tình huống phổ biến trong GCP, nơi global HTTP(S) Load Balancer xử lý traffic toàn cầu, và cần giải pháp bảo mật chuyên biệt để chống DDoS (tấn công volume lớn ở L3/L4) cũng như L7 attacks (như SQL injection, XSS).
🛠️ Kiến thức cập nhật đến 2026: Google Cloud Armor (nay tích hợp với Cloud Armor Policies và Edge Security) là giải pháp chính thức được khuyến nghị cho các LB này, hỗ trợ adaptive protection và threat intelligence từ Google (theo tài liệu GCP 2024-2026).

📘 Nguồn tham khảo chính:

✅ Đáp án đúng và lý do lựa chọn

Đáp án đúng: Configure a Google Cloud Armor security policy in your project, and attach it to the backend service to secure the application.

Lý do:
🛡️ Google Cloud Armor là dịch vụ bảo mật chuyên dụng cho các backend service của HTTP(S) Load Balancer, bảo vệ trực tiếp chống DDoS (L3/L4) và L7 attacks (như OWASP Top 10). Bạn tạo policy trong project, attach vào backend service để filter traffic tại edge của Google, sử dụng rules tùy chỉnh, adaptive protection, và threat intel tự động. Đây là cách tối ưu, scalable cho global LB, không ảnh hưởng hiệu suất instance. Theo best practices GCP 2026, đây là giải pháp đầu tiên được recommend.

📋 Giải thích tất cả các phương án

Dưới đây là phân tích chi tiết từng lựa chọn, giữ nguyên văn bản gốc bằng tiếng Anh. Mỗi phương án được đánh dấu ✅ (đúng) hoặc ❌ (sai), kèm giải thích rõ ràng:

  • ❌ [SAI] Configure VPC Service Controls and create a secure perimeter. Define fine-grained perimeter controls and enforce that security posture across your Google Cloud services and projects.
    VPC Service Controls dùng để bảo vệ dữ liệu nội bộ (data exfiltration prevention) giữa các services/projects qua perimeter fencing. Nó không xử lý DDoS hay L7 attacks từ internet public, vì không filter traffic tại LB edge. Phù hợp cho internal access control, không phải external threats.

  • ✅ [ĐÚNG] Configure a Google Cloud Armor security policy in your project, and attach it to the backend service to secure the application.
    Như đã giải thích ở trên: Hoàn hảo cho global HTTP(S) LB, bảo vệ DDoS/L7 trực tiếp tại backend service với policies linh hoạt (pre-configured rules, custom regex, rate limiting). Hiệu quả cao, tích hợp Threat Intelligence từ Google (cập nhật real-time đến 2026).

  • ❌ [SAI] Configure VPC firewall rules to protect the Compute Engine instances against distributed denial-of-service attacks.
    VPC Firewall rules chỉ hoạt động ở L3/L4 intra-VPC, không chặn DDoS lớn từ internet (Google tự mitigate volumetric DDoS cho public IP). Chúng không xử lý L7 attacks (vì LB đã terminate HTTP). Attach rules vào instance sẽ overload và không scalable cho global traffic.

  • ❌ [SAI] Configure hierarchical firewall rules for the global HTTP(S) load balancer public IP address at the organization level.
    GCP không hỗ trợ hierarchical firewall rules cho public IP của LB (LB IP managed bởi Google, không expose trực tiếp cho VPC rules). Organization-level policies (như Folders/Org Policies) dùng cho compliance/access, không filter DDoS/L7 traffic. Google tự bảo vệ LB IP cơ bản, nhưng cần Cloud Armor cho advanced protection.

🧠 Kết luận: Chọn Cloud Armor để bảo mật toàn diện, dễ implement và cost-effective! Nếu cần thiết kế sâu hơn, hãy cung cấp thêm chi tiết về workload. 🚀

Câu 110
Your organization's security policy requires that all internet-bound traffic return to your on-premises data center through HA VPN tunnels before egressing to the internet, while allowing virtual machines (VMs) to leverage private Google APIs using private virtual IP addresses 199.36.153.4/30. You need to configure the routes to enable these traffic flows. What should you do?
  1. A Configure a custom route 0.0.0.0/0 with a priority of 500 whose next hop is the default internet gateway. Configure another custom route 199.36.153.4/30 with priority of 1000 whose next hop is the VPN tunnel back to the on-premises data center.
  2. B Configure a custom route 0.0.0.0/0 with a priority of 1000 whose next hop is the internet gateway. Configure another custom route 199.36.153.4/30 with a priority of 500 whose next hop is the VPN tunnel back to the on-premises data center.
  3. C Announce a 0.0.0.0/0 route from your on-premises router with a MED of 1000. Configure a custom route 199.36.153.4/30 with a priority of 1000 whose next hop is the default internet gateway.
  4. D Announce a 0.0.0.0/0 route from your on-premises router with a MED of 500. Configure another custom route 199.36.153.4/30 with a priority of 1000 whose next hop is the VPN tunnel back to the on-premises data center.
Xem giải thích

🧩 Giải thích nội dung câu hỏi

Câu hỏi tập trung vào việc cấu hình routes trong Google Cloud VPC để tuân thủ chính sách bảo mật của tổ chức:

  • ✅ Tất cả traffic hướng ra internet (internet-bound) phải quay về on-premises data center qua HA VPN tunnels trước khi egress ra internet (centralized egress inspection).
  • ✅ Đồng thời, các VMs phải truy cập private Google APIs (như googleapis.com) bằng private virtual IP addresses 199.36.153.4/30 (dải IP dành cho Private Services Access - PSA đến Google APIs, giúp traffic giữ nguyên private mà không đi public internet).

Thách thức chính:

  • Sử dụng longest prefix match (prefix dài hơn ưu tiên) và priority (số thấp hơn = ưu tiên cao hơn, mặc định 1000) trong VPC routing table.
  • HA VPN hỗ trợ BGP dynamic routing, routes học từ BGP có priority 100 (cao hơn default internet route priority 1000).
  • Traffic đến 199.36.153.4/30 cần next-hop default internet gateway để GCP xử lý private routing nội bộ (không thực sự đi public net).
  • Nếu chỉ có default route 0.0.0.0/0 qua VPN (BGP), traffic đến /30 cũng sẽ bị route sai vào VPN, phá vỡ private access.

Giải pháp cần thiết: Announce default route từ on-premises để override default internet, nhưng except /30 bằng route cụ thể hơn (longest prefix thắng priority).
📘 Kiến thức cập nhật 2026: Dựa trên GCP VPC routing (routes ưu tiên longest prefix > priority), HA VPN BGP (MED kiểm soát path preference trong multi-tunnel), Private Services Access (PSA cho APIs dùng allocated IPs như 199.36.153.4/30, traffic proxy qua default-internet-gateway privately). Không thay đổi lớn từ 2024.

✅ Đáp án đúng

Lựa chọn C: Announce a 0.0.0.0/0 route from your on-premises router with a MED of 1000. Configure a custom route 199.36.153.4/30 with a priority of 1000 whose next hop is the default internet gateway.

Lý do lựa chọn:

  • 🛤️ Announce 0.0.0.0/0 MED=1000 từ on-premises: Cloud Router học BGP route /0 priority 100 (cao hơn default 1000), hướng internet traffic về HA VPN. MED=1000 (cao = less preferred) đảm bảo cân bằng nếu multi-tunnel, tránh loop hoặc over-preference (theo BGP best-path: low MED ưu tiên).
  • 🛠️ Custom route 199.36.153.4/30 priority 1000 → default internet gateway: Prefix /30 dài hơn /0 → longest prefix match ưu tiên, traffic private APIs đi đúng (GCP proxy privately qua gateway). Không ảnh hưởng bởi BGP priority 100.
  • Kết quả: Internet về on-prem ✅, private APIs private ✅.

📋 Phân tích tất cả các phương án

  • A: Configure a custom route 0.0.0.0/0 with a priority of 500 whose next hop is the default internet gateway. Configure another custom route 199.36.153.4/30 with priority of 1000 whose next hop is the VPN tunnel back to the on-premises data center.
    ❌ Sai: Custom /0 priority 500 (cao) → tất cả internet traffic đi trực tiếp internet gateway (vi phạm policy phải về on-prem). Route /30 → VPN làm private APIs đi on-prem (phá vỡ private access).

  • B: Configure a custom route 0.0.0.0/0 with a priority of 1000 whose next hop is the internet gateway. Configure another custom route 199.36.153.4/30 with a priority of 500 whose next hop is the VPN tunnel back to the on-premises data center.
    ❌ Sai: /0 priority 1000 tương đương default → internet traffic vẫn đi gateway (không về on-prem). /30 priority 500 → VPN → private APIs bị route sai.

  • C: Announce a 0.0.0.0/0 route from your on-premises router with a MED of 1000. Configure a custom route 199.36.153.4/30 with a priority of 1000 whose next hop is the default internet gateway.
    ✅ Đúng: Như giải thích trên. BGP /0 (MED 1000) override default cho internet → VPN; /30 cụ thể → gateway cho private APIs. Longest prefix đảm bảo flow đúng.

  • D: Announce a 0.0.0.0/0 route from your on-premises router with a MED of 500. Configure another custom route 199.36.153.4/30 with a priority of 1000 whose next hop is the VPN tunnel back to the on-premises data center.
    ❌ Sai: BGP /0 MED=500 (thấp = highly preferred) đúng hướng internet về VPN, nhưng /30 → VPN → private APIs bị gửi về on-prem (vi phạm yêu cầu private IP access).

📘 Tài liệu tham khảo