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

Tìm thấy 247 câu.

Câu 201
Your organization has a subset of applications in multiple regions that require internet access. You need to control internet access from applications to URLs, including hostnames and paths. The compute instances that run these applications have an associated secure tag. What should you do?
  1. A Deploy a Cloud NAT gateway. Use fully qualified domain name (FQDN) objects in the firewall policy rules to filter outgoing traffic to specific domains from machines that match a service account.
  2. B Deploy a Cloud NAT gateway. Use fully qualified domain name (FQDN) objects in the firewall policy rules to filter outgoing traffic to specific domains from machines that match the secure tag.
  3. C Deploy a single Secure Web Proxy instance with global access enabled. Apply a Secure Web Proxy policy to allow access from machines that match the secure tag to the URLs defined in a URL list.
  4. D Deploy a Secure Web Proxy instance in each region. Apply a Secure Web Proxy policy to allow access from machines that match the secure tag to the URLs defined in a URL list.
Xem giải thích

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

Câu hỏi mô tả một tổ chức có một số ứng dụng chạy trên các compute instances (như VM trong Compute Engine) nằm ở nhiều vùng (regions) khác nhau, và các ứng dụng này cần truy cập internet. Yêu cầu chính là kiểm soát truy cập internet từ các ứng dụng đến các URL cụ thể, bao gồm cả hostnames (tên miền) và paths (đường dẫn). Các compute instances này được gắn secure tag (nhãn bảo mật) để dễ dàng nhận diện và áp dụng chính sách.

Mục tiêu là triển khai giải pháp cho phép lọc traffic outbound một cách chính xác dựa trên tag, hỗ trợ kiểm soát chi tiết đến mức path trong URL, và phù hợp với môi trường multi-region. Đây là tình huống điển hình trong Google Cloud Platform (GCP), liên quan đến các tính năng như firewall rules, Cloud NAT, và Secure Web Proxy (một tính năng preview mới từ năm 2023-2024, cập nhật đến 2026 vẫn giữ nguyên cơ chế chính).

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

✅ Đáp án đúng

Deploy a Secure Web Proxy instance in each region. Apply a Secure Web Proxy policy to allow access from machines that match the secure tag to the URLs defined in a URL list.

Lý do lựa chọn:
Giải pháp này hoàn hảo vì Secure Web Proxy (tính năng mới của GCP Network Intelligence Center) được thiết kế chuyên biệt để kiểm soát truy cập web dựa trên URL lists chi tiết, bao gồm hostnames và paths (ví dụ: allow example.com/api/v1/* nhưng block example.com/admin/*). Proxy instance phải triển khai riêng ở mỗi region để đảm bảo latency thấp, traffic egress regional, và policy áp dụng chính xác cho instances ở multi-region. Policy Secure Web Proxy hỗ trợ match dựa trên instance tags (như secure tag), cho phép chỉ các máy có tag này truy cập URL được phép. Đây là cách tối ưu, scalable cho môi trường phân tán vùng miền (theo docs GCP 2026). 🛠️

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

  • ❌ Deploy a Cloud NAT gateway. Use fully qualified domain name (FQDN) objects in the firewall policy rules to filter outgoing traffic to specific domains from machines that match a service account.
    Phân tích sai: Cloud NAT chỉ cung cấp NAT outbound cho private instances, không kiểm soát URL paths (FQDN chỉ match hostnames cơ bản như example.com, không hỗ trợ paths chi tiết). Firewall rules match service account (tài khoản dịch vụ) chứ không phải secure tag (instance tag). Không phù hợp cho kiểm soát URL đầy đủ và multi-region.

  • ❌ Deploy a Cloud NAT gateway. Use fully qualified domain name (FQDN) objects in the firewall policy rules to filter outgoing traffic to specific domains from machines that match the secure tag.
    Phân tích sai: Mặc dù match secure tag đúng hơn (firewall rules hỗ trợ tag-based filtering), nhưng FQDN trong VPC Firewall chỉ lọc hostnames, không hỗ trợ paths trong URL. Cloud NAT không phải proxy lọc web, chỉ NAT traffic, nên không đáp ứng yêu cầu kiểm soát chi tiết URL. Không lý tưởng cho multi-region phức tạp.

  • ❌ Deploy a single Secure Web Proxy instance with global access enabled. Apply a Secure Web Proxy policy to allow access from machines that match the secure tag to the URLs defined in a URL list.
    Phân tích sai: Secure Web Proxy hỗ trợ URL lists chi tiết (hostnames + paths) và match tag hoàn hảo, nhưng không có "global access enabled" cho single instance (theo docs GCP 2024-2026, proxy instances là regional, traffic phải route đến proxy gần nhất để tránh latency cao và đảm bảo egress policy regional). Single instance không scale tốt cho apps ở multiple regions.

  • ✅ Deploy a Secure Web Proxy instance in each region. Apply a Secure Web Proxy policy to allow access from machines that match the secure tag to the URLs defined in a URL list.
    Phân tích đúng: Như đã giải thích ở trên, đây là giải pháp chính xác nhất, tận dụng tính năng Secure Web Proxy mới với per-region deployment để hỗ trợ multi-region, kiểm soát URL đầy đủ, và policy dựa trên tag. Hoàn toàn khớp yêu cầu! 🚀

Câu 202
You are implementing hybrid connectivity between your company's data center and Google Cloud. You've already deployed redundant Dedicated Interconnect connections, and are now deploying VLAN attachments in us-central1. You want to use an active/passive approach, where interconnect-1 is active and interconnect-2 is a passive backup. You need to deploy a Cloud Router to enable BGP connectivity. You want to follow Google-recommended practices. What should you do?
  1. A 1. Configure the primary interconnect-1 BGP session on the Cloud Router with priority 0 and ASN 65101.
    2. Configure the secondary interconnect-2 BGP session on the Cloud Router with priority 200 and ASN 65102.
    3. Configure the on-premises ASN as 65000.
  2. B 1. Configure the primary interconnect-1 BGP session on the Cloud Router with priority 0.
    2. Configure the secondary interconnect-2 BGP session on the Cloud Router with priority 200.
    3. Configure both Google-side BGP ASNs as 65100.
    4. Configure the on-premises ASN as 65000.
  3. C 1. Configure the primary and secondary interconnects of the BGP sessions on the Cloud Router with priority 100 and ASN 16550.
    2. Configure the on-premises ASN as 65001 for primary interconnect-1.
    3. Configure the on-premises ASN as 65002 for secondary interconnect-2.
  4. D 1. Configure the primary and secondary interconnects of the BGP sessions on the Cloud Router with priority 100 and ASN 4200000001.
    2. Configure the on-premises ASN as 4200000010.
    3. Disable the BGP session on the on-premises router for the secondary interconnect-2.
Xem giải thích

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

📖 Nội dung câu hỏi:
Câu hỏi xoay quanh việc triển khai kết nối hybrid giữa data center on-premises của công ty và Google Cloud, sử dụng redundant Dedicated Interconnect (kết nối vật lý trực tiếp dự phòng). Bạn đã triển khai hai kết nối Dedicated Interconnect dư thừa, và hiện đang tạo VLAN attachments tại vùng us-central1. Mục tiêu là áp dụng mô hình active/passive (interconnect-1 là active chính, interconnect-2 là passive backup). Bạn cần triển khai Cloud Router để kích hoạt kết nối BGP, và phải tuân thủ best practices được Google khuyến nghị.

🛠️ Các khái niệm chính cần nắm:

  • Dedicated Interconnect: Kết nối tốc độ cao trực tiếp từ data center đến Google Cloud edge, hỗ trợ redundancy qua nhiều kết nối.
  • VLAN attachments: Điểm gắn kết ảo trên mỗi kết nối Interconnect, dùng để thiết lập BGP peering.
  • Cloud Router: Router ảo quản lý BGP sessions giữa Google Cloud VPC và on-premises. Một Cloud Router có ASN duy nhất (Autonomous System Number) cho tất cả BGP peers.
  • Active/Passive BGP: Sử dụng BGP priority để failover (priority thấp hơn = ưu tiên cao hơn; ví dụ: 0 > 200). Primary session priority 0 (active), secondary priority 200 (passive).
  • ASN khuyến nghị: Google-side (Cloud Router) dùng private ASN như 65100 (16-bit private range 64512-65534). On-premises dùng ASN riêng như 65000, giống nhau cho cả hai sessions để tránh loop.
  • Best practices Google (cập nhật 2024-2026): Sử dụng một Cloud Router với ASN Google-side giống nhau cho cả hai VLAN attachments; priority khác nhau; on-premises ASN thống nhất. Không dùng 32-bit ASN hoặc public ASN 16550 cho hybrid private interconnect trừ khi cần public prefixes.

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

✅ Đáp án đúng

Phương án đúng: [ĐÚNG] 1. Configure the primary interconnect-1 BGP session on the Cloud Router with priority 0.
2. Configure the secondary interconnect-2 BGP session on the Cloud Router with priority 200.
3. Configure both Google-side BGP ASNs as 65100.
4. Configure the on-premises ASN as 65000.

Lý do chọn (chi tiết):
✅ Hoàn toàn khớp best practices Google: Một Cloud Router với ASN Google-side 65100 thống nhất cho cả hai BGP sessions (primary priority 0 - active cao nhất; secondary priority 200 - passive). On-premises ASN 65000 giống nhau cho cả hai, tránh routing loop và đảm bảo failover tự động qua BGP. Điều này cho phép traffic ưu tiên interconnect-1, chuyển sang interconnect-2 nếu fail. Không có cấu hình thừa như disable session.

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

  • Phương án 1:
    [SAI] 1. Configure the primary interconnect-1 BGP session on the Cloud Router with priority 0 and ASN 65101.
    2. Configure the secondary interconnect-2 BGP session on the Cloud Router with priority 200 and ASN 65102.
    3. Configure the on-premises ASN as 65000.
    ❌ Sai: Cloud Router chỉ hỗ trợ một ASN duy nhất cho tất cả BGP peers (không thể dùng 65101 cho primary và 65102 cho secondary). Dẫn đến lỗi cấu hình BGP peering. Priority đúng nhưng ASN khác nhau vi phạm nguyên tắc thống nhất Google-side ASN.

  • Phương án 2 (Đúng):
    [ĐÚNG] 1. Configure the primary interconnect-1 BGP session on the Cloud Router with priority 0.
    2. Configure the secondary interconnect-2 BGP session on the Cloud Router with priority 200.
    3. Configure both Google-side BGP ASNs as 65100.
    4. Configure the on-premises ASN as 65000.
    ✅ Đúng: Như giải thích ở trên - ASN Google-side thống nhất (65100), priority phân biệt rõ active/passive, on-premises ASN 65000 ổn định. Tuân thủ 100% docs Google cho redundant setup.

  • Phương án 3:
    [SAI] 1. Configure the primary and secondary interconnects of the BGP sessions on the Cloud Router with priority 100 and ASN 16550.
    2. Configure the on-premises ASN as 65001 for primary interconnect-1.
    3. Configure the on-premises ASN as 65002 for secondary interconnect-2.
    ❌ Sai toàn diện: Priority giống nhau (100) → không active/passive, traffic load-balance thay vì failover. ASN Google-side 16550 (public ASN) không khuyến nghị cho private hybrid interconnect. On-premises ASN khác nhau (65001/65002) gây routing issues và loop.

  • Phương án 4:
    [SAI] 1. Configure the primary and secondary interconnects of the BGP sessions on the Cloud Router with priority 100 and ASN 4200000001.
    2. Configure the on-premises ASN as 4200000010.
    3. Disable the BGP session on the on-premises router for the secondary interconnect-2.
    ❌ Sai: ASN 32-bit (4200000001/4200000010) không được khuyến nghị cho Interconnect (Google ưu tiên 16-bit private ASN để tương thích). Priority giống nhau (100) → không active/passive tự động. Disable BGP on-premises cho secondary là manual failover, vi phạm best practices tự động của Google.

Câu 203
Your organization has multiple VMs running on Google Cloud within a VPC. The VMs require connectivity to certain Google APIs. You need to enable Private Google Access for VM connectivity to Cloud Storage. What should you do?
  1. A Enable Private Google Access on the project, remove the default route that points to the default internet gateway, and enable the Cloud Storage API.
  2. B Enable Private Google Access on the VM, remove the default route that points to the default internet gateway, and enable the Cloud Storage API.
  3. C Enable Private Google Access on the VPC, create a default route that points to the default internet gateway, and enable the Cloud Storage API.
  4. D Enable Private Google Access on the subnet, create a default route that points to the default internet gateway, and enable the Cloud Storage API.
Xem giải thích

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

Câu hỏi gốc (bằng tiếng Anh để giữ nguyên):
"Your organization has multiple VMs running on Google Cloud within a VPC. The VMs require connectivity to certain Google APIs. You need to enable Private Google Access for VM connectivity to Cloud Storage. What should you do?"

Giải thích câu hỏi một cách chi tiết:
📘 Câu hỏi tập trung vào việc cấu hình Private Google Access trong Google Cloud VPC để các máy ảo (VMs) có thể kết nối với các Google APIs, cụ thể là Cloud Storage, mà không cần địa chỉ IP công khai (public IP) trên VMs.
🛠️ Private Google Access là tính năng cho phép VMs trong subnet private (không có public IP) truy cập các dịch vụ Google như Cloud Storage qua các địa chỉ IP riêng tư của Google (private IPs như 199.36.153.4/30).
✅ Điều này rất quan trọng cho môi trường bảo mật cao, tránh lộ VMs ra internet.
🔍 Các yếu tố cần thiết theo tài liệu Google Cloud mới nhất (cập nhật đến 2026):

  • Enable Private Google Access ở mức subnet (không phải project, VM hay VPC).
  • Giữ nguyên default route (0.0.0.0/0) trỏ đến internet gateway để hỗ trợ routing nội bộ.
  • Enable Cloud Storage API trên project để sử dụng dịch vụ.
    ❌ Không cần xóa default route, vì Private Google Access vẫn yêu cầu routing cơ bản đến Google's endpoints.

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

Đáp án đúng: Enable Private Google Access on the subnet, create a default route that points to the default internet gateway, and enable the Cloud Storage API.

Lý do chi tiết:
✅ Enable Private Google Access on the subnet: Đây là bước cốt lõi, chỉ enable ở mức subnet mới cho phép VMs trong subnet đó truy cập Google APIs qua private IPs.
✅ Create a default route that points to the default internet gateway: Default route (0.0.0.0/0) phải tồn tại để VMs route traffic đến Google's private ranges (không cần public IP trên VM). Không xóa route này!
✅ Enable the Cloud Storage API: Bắt buộc để project có quyền sử dụng Cloud Storage.
🛠️ Theo docs Google Cloud (2026), cấu hình này đảm bảo VMs kết nối an toàn, private đến Cloud Storage mà không expose ra internet.

📋 Giải thích tất cả các phương án (đúng và 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 giá ✅ (đúng) hoặc ❌ (sai), kèm lý do bằng tiếng Việt rõ ràng:

  • Enable Private Google Access on the project, remove the default route that points to the default internet gateway, and enable the Cloud Storage API.
    ❌ Sai hoàn toàn: Private Google Access không enable ở mức project (chỉ ở subnet). Xóa default route sẽ phá hủy routing đến Google APIs, VMs không kết nối được gì. Enable API đúng nhưng không cứu vãn được.

  • Enable Private Google Access on the VM, remove the default route that points to the default internet gateway, and enable the Cloud Storage API.
    ❌ Sai: Không có tùy chọn enable Private Google Access trên từng VM (chỉ ở subnet). Xóa default route làm gián đoạn toàn bộ traffic, kể cả private access đến Cloud Storage.

  • Enable Private Google Access on the VPC, create a default route that points to the default internet gateway, and enable the Cloud Storage API.
    ❌ Sai: Private Google Access không enable ở mức VPC (phải ở subnet cụ thể). Default route và API đúng, nhưng thiếu enable subnet-level dẫn đến VMs không private access được.

  • Enable Private Google Access on the subnet, create a default route that points to the default internet gateway, and enable the Cloud Storage API.
    ✅ Đúng 100%: Enable đúng ở subnet, giữ default route để routing, và enable API. Hoàn hảo cho yêu cầu!

📚 Tài liệu tham khảo (cập nhật mới nhất 2026)

  • Google Cloud Documentation: Private Google Access – Hướng dẫn enable ở subnet.
  • VPC Networking Best Practices: Configure Private Google Access – Xác nhận default route cần thiết.
  • Cloud Storage API: Enable APIs – Bắt buộc enable trước sử dụng.
    🛡️ Là Google Cloud Professional Cloud Network Engineer, tôi khuyên kiểm tra console VPC > Subnets để enable ngay! Nếu cần lab thực hành, dùng Qwiklabs. 🚀
Câu 204
You are configuring the final elements of a migration effort where resources have been moved from on-premises to Google Cloud. While reviewing the deployed architecture, you noticed that DNS resolution is failing when queries are being sent to the on-premises environment. You login to a Compute Engine instance, try to resolve an on-premises hostname, and the query fails. DNS queries are not arriving at the on-premises DNS server. You need to use managed services to reconfigure Cloud DNS to resolve the DNS error. What should you do?
  1. A Ensure that the operating systems of the Compute Engine instances are configured to send DNS queries to the on-premises DNS servers directly.
  2. B Validate that there is network connectivity to the on-premises environment and that the Compute Engine instances can reach other on-premises resources. If errors persist, remove the VPC Network Peerings and recreate the peerings after validating the routes.
  3. C Validate that the Compute Engine instances are using the Metadata Service IP address as their resolver. Configure an outbound forwarding zone for the on-premises domain pointing to the on-premises DNS server. Configure Cloud Router to advertise the Cloud DNS proxy range to the on-premises network.
  4. D Review the existing Cloud DNS zones, and validate that there is a route in the VPC directing traffic destined to the IP address of the DNS servers. Recreate the existing DNS forwarding zones for . to forward all queries to the on-premises DNS servers.
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 trong quá trình di chuyển tài nguyên từ on-premises sang Google Cloud (GCP), sau khi triển khai kiến trúc, phát hiện lỗi phân giải DNS khi truy vấn hostname từ on-premises. Cụ thể:

  • Từ Compute Engine instance trong GCP, thử resolve hostname on-premises → thất bại.
  • Truy vấn DNS không đến được máy chủ DNS on-premises.
  • Yêu cầu sử dụng managed services (Cloud DNS) để cấu hình lại và khắc phục lỗi.

Vấn đề cốt lõi: DNS queries từ GCP không forward đúng đến on-premises DNS server, thường do thiếu forwarding zone hoặc route quảng bá cho DNS resolver IP range (Cloud DNS proxy). Giải pháp cần tích hợp hybrid DNS giữa GCP VPC và on-premises qua VPC peering/Cloud Router, đảm bảo queries được forward và response quay về.

📘 Kiến thức cập nhật (tính đến 2026): Theo tài liệu GCP mới nhất (Cloud DNS v2, Compute Engine metadata DNS), Compute Engine mặc định dùng Metadata Service IP (169.254.169.254) làm resolver, forward qua VPC DNS (35.199.192.0/19). Để hybrid, dùng Outbound Forwarding Zone cho domain cụ thể và Cloud Router BGP advertise resolver range.

Nguồn tham khảo:

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

Đáp án đúng: Validate that the Compute Engine instances are using the Metadata Service IP address as their resolver. Configure an outbound forwarding zone for the on-premises domain pointing to the on-premises DNS server. Configure Cloud Router to advertise the Cloud DNS proxy range to the on-premises network.

Lý do 🛠️:

  • Validate Metadata IP (169.254.169.254): Đảm bảo instance dùng resolver mặc định của GCP (managed), không override thủ công.
  • Outbound Forwarding Zone: Tạo zone riêng cho domain on-premises trong Cloud DNS, forward queries đến IP on-premises DNS → Queries đến đúng đích.
  • Cloud Router advertise proxy range (35.199.192.0/19): On-premises cần route back response từ Cloud DNS proxy → BGP advertise qua peering/Cloud VPN/Interconnect.

Đây là giải pháp chuẩn hybrid DNS, sử dụng fully managed Cloud DNS, khắc phục chính xác vấn đề "queries not arriving" và đảm bảo bidirectional traffic.

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

  • Validate that the Compute Engine instances are using the Metadata Service IP address as their resolver. Configure an outbound forwarding zone for the on-premises domain pointing to the on-premises DNS server. Configure Cloud Router to advertise the Cloud DNS proxy range to the on-premises network.
    ✅ Đúng (như phân tích trên). 🧩 Hoàn chỉnh, managed, và khớp best practice hybrid DNS GCP 2026.

  • Ensure that the operating systems of the Compute Engine instances are configured to send DNS queries to the on-premises DNS servers directly.
    ❌ Sai. 🛠️ Không dùng managed service (Cloud DNS), phải chỉnh OS thủ công (/etc/resolv.conf) → Không scalable, dễ lỗi khi instance restart/rebuild, vi phạm yêu cầu "use managed services".

  • Validate that there is network connectivity to the on-premises environment and that the Compute Engine instances can reach other on-premises resources. If errors persist, remove the VPC Network Peerings and recreate the peerings after validating the routes.
    ❌ Sai. 🔍 Chỉ check connectivity chung (ping/ssh), không giải quyết DNS-specific (forwarding/resolver). Recreate peering không fix DNS route/proxy advertise, có thể làm gián đoạn migration.

  • Review the existing Cloud DNS zones, and validate that there is a route in the VPC directing traffic destined to the IP address of the DNS servers. Recreate the existing DNS forwarding zones for . to forward all queries to the on-premises DNS servers.
    ❌ Sai. 🛑 Forward "." (root domain) forward tất cả queries → Lỗi lớn, break public DNS (google-public-dns). Chỉ cần forward domain cụ thể, không phải recreate toàn bộ; thiếu advertise proxy range cho response back.

Câu 205
Your organization's security team recently discovered that there is a high risk of malicious activities originating from some of your VMs connected to the internet. These malicious activities are currently undetected when TLS communication is used. You must ensure that encrypted traffic to the internet is inspected. What should you do?
  1. A Enable Cloud Armor TLS inspection policy, and associate the policy with the backend VMs.
  2. B Use Cloud NGFW Essentials. Create a firewall rule for egress traffic, and enable VPC Flow Logs with the TLS inspect option. Analyze the output logs content and block the outputs that have malicious activities.
  3. C Configure a TLS agent on every VM to intercept TLS traffic before it reaches the internet. Configure Sensitive Data Protection to analyze and allow/deny the content.
  4. D Use Cloud NGFW Enterprise. Create a firewall rule for egress traffic with the --tls-inspect flag, and associate the firewall rules with the VMs.
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: Nhóm bảo mật của tổ chức bạn phát hiện rủi ro cao từ các hoạt động độc hại xuất phát từ một số VM kết nối internet. Những hoạt động này chưa bị phát hiện khi sử dụng giao thức TLS (mã hóa). Nhiệm vụ là đảm bảo kiểm tra (inspect) lưu lượng mã hóa TLS hướng ra internet (egress traffic).

📌 Yêu cầu chính: Cần giải pháp inspect TLS decryption để phát hiện và chặn hoạt động độc hại từ VM ra internet, mà không ảnh hưởng đến lưu lượng thông thường. Đây là vấn đề về TLS inspection cho egress traffic trong Google Cloud Platform (GCP), sử dụng các công cụ native như firewall để decrypt và phân tích gói tin TLS mà không cần agent trên VM. (Lưu ý: Dù đề cập "AWS" nhưng nội dung hoàn toàn thuộc GCP với các dịch vụ như Cloud NGFW, Cloud Armor).

🛠️ Bối cảnh kỹ thuật: TLS encryption che giấu nội dung gói tin, nên cần TLS decryption proxy hoặc firewall hỗ trợ inspect. Giải pháp phải scalable, không can thiệp thủ công vào VM, và tuân thủ best practices GCP đến năm 2026 (NGFW Enterprise hỗ trợ TLS 1.3 inspection đầy đủ từ 2024).

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

Đáp án đúng: Use Cloud NGFW Enterprise. Create a firewall rule for egress traffic with the --tls-inspect flag, and associate the firewall rules with the VMs.

Lý do chọn 🏆:

  • Cloud NGFW Enterprise (không phải Essentials) là giải pháp chuyên dụng cho TLS inspection trên egress traffic trong GCP. Flag --tls-inspect kích hoạt TLS decryption trực tiếp trên firewall rule, cho phép inspect nội dung mã hóa trước khi ra internet.
  • Áp dụng cho VMs qua regional firewall policies, chặn/allow dựa trên threat intelligence (IPS/Threat Prevention).
  • Hỗ trợ cập nhật 2026: TLS 1.3, QUIC, certificate management tự động, performance cao (up to 100 Gbps decryption).
  • Ưu điểm: Cloud-native, không cần agent VM, tích hợp VPC Flow Logs cho monitoring.

📘 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 tiếng Anh. Mỗi phương án được đánh giá với lý do cụ thể dựa trên docs GCP mới nhất (2026).

  • ❌ [SAI] Enable Cloud Armor TLS inspection policy, and associate the policy with the backend VMs.
    Giải thích sai: Cloud Armor là WAF (Web Application Firewall) chỉ inspect ingress HTTP/S traffic đến load balancer (như backend services), không hỗ trợ TLS inspection cho egress từ VMs. Không có "TLS inspection policy" cho Armor, và nó không áp dụng cho traffic ra internet. (Nguồn: GCP Cloud Armor docs).

  • ❌ [SAI] Use Cloud NGFW Essentials. Create a firewall rule for egress traffic, and enable VPC Flow Logs with the TLS inspect option. Analyze the output logs content and block the outputs that have malicious activities.
    Giải thích sai: Cloud NGFW Essentials chỉ hỗ trợ Layer 4/7 filtering cơ bản, không có TLS inspection (chỉ Enterprise mới có). VPC Flow Logs không decrypt TLS (chỉ log metadata, không nội dung), nên không thể "analyze output logs content" để block malicious. Phải manual analysis, không real-time. (Nguồn: GCP NGFW Essentials vs Enterprise).

  • ❌ [SAI] Configure a TLS agent on every VM to intercept TLS traffic before it reaches the internet. Configure Sensitive Data Protection to analyze and allow/deny the content.
    Giải thích sai: Cài TLS agent trên từng VM là giải pháp non-scalable, high-maintenance (phải update agent, manage certs thủ công, tăng CPU VM). DLP (Sensitive Data Protection) chỉ scan stored data hoặc unencrypted streams, không decrypt TLS real-time cho egress. Vi phạm best practices cloud-native. (Nguồn: GCP DLP docs).

  • ✅ [ĐÚNG] Use Cloud NGFW Enterprise. Create a firewall rule for egress traffic with the --tls-inspect flag, and associate the firewall rules with the VMs.
    Giải thích đúng (tóm tắt lại): Như phần trên, đây là giải pháp chính xác, full-featured với TLS decryption native, hỗ trợ threat detection tự động. Deploy qua gcloud: gcloud compute network-firewall-policies rules create ... --tls-inspect. (Nguồn: GCP NGFW TLS Inspection Guide, updated 2025-2026 features).

📚 Tài liệu tham khảo chính

🛡️ Khuyến nghị triển khai: Test trong sandbox VPC trước, enable logging để monitor false positives!

Câu 206
Your organization has a hub and spoke architecture with VPC Network Peering, and hybrid connectivity is centralized at the hub. The Cloud Router in the hub VPC is advertising subnet routes, but the on-premises router does not appear to be receiving any subnet routes from the VPC spokes. You need to resolve this issue. What should you do?
  1. A Create custom routes at the Cloud Router in the spokes to advertise the subnets of the VPC spokes.
  2. B Create custom routes at the Cloud Router in the hub to advertise the subnets of the VPC spokes.
  3. C Create a BGP route policy at the Cloud Router, and ensure the subnets of the VPC spokes are being announced towards the on-premises environment.
  4. D Create custom learned routes at the Cloud Router in the hub to advertise the subnets of the VPC spokes.
Xem giải thích

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

📖 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) sử dụng VPC Network Peering để kết nối các VPC spoke với VPC hub. Kết nối hybrid (từ GCP đến on-premises) được tập trung hóa tại hub VPC. Cloud Router ở hub đang quảng bá (advertise) các subnet routes (của hub), nhưng router on-premises không nhận được bất kỳ subnet routes nào từ các VPC spoke. Nhiệm vụ là giải quyết vấn đề này để on-premises có thể nhận và định tuyến đến các subnet ở spoke VPCs.

Vấn đề cốt lõi: Trong mô hình hub-spoke với peering và dynamic routing (BGP), các routes từ spoke không tự động được propagate qua Cloud Router hub đến on-premises. Cloud Router hub cần được cấu hình thêm để explicitly advertise các subnet routes từ spokes ra hybrid connection (như Cloud VPN hoặc Dedicated Interconnect). Điều này dựa trên cơ chế custom routes của Cloud Router trong GCP (cập nhật đến năm 2026, theo docs GCP Network Connectivity).

✅ Đáp án đúng:
Create custom routes at the Cloud Router in the hub to advertise the subnets of the VPC spokes.

🛠️ Lý do chọn đáp án đúng:
Trong hub-spoke topology, Cloud Router ở hub quản lý kết nối hybrid. Để advertise subnets từ spokes ra on-premises:

  • Các spoke VPC peering với hub và export routes (qua BGP).
  • Cloud Router hub học (learn) routes từ spokes qua peering.
  • Nhưng để quảng bá ra on-premises, cần tạo custom routes (advertised routes) trên Cloud Router hub, chỉ định rõ các subnet CIDR của spokes. Điều này đảm bảo BGP sessions với on-premises router nhận đúng routes. Không cần thay đổi ở spokes vì hybrid centralized tại hub. Giải pháp này khớp với best practices GCP cho dynamic routing trong peering (xem tài liệu dưới).

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

  • ❌ [SAI] Create custom routes at the Cloud Router in the spokes to advertise the subnets of the VPC spokes.
    Phương án này sai vì Cloud Router ở spokes không kết nối trực tiếp với on-premises (hybrid centralized tại hub). Tạo custom routes ở spokes chỉ advertise nội bộ peering đến hub, không propagate ra hybrid. Spokes chỉ cần export routes qua peering; hub mới chịu trách nhiệm advertise ra ngoài. Làm vậy tạo overhead không cần thiết và không giải quyết vấn đề gốc.

  • ✅ [ĐÚNG] Create custom routes at the Cloud Router in the hub to advertise the subnets of the VPC spokes.
    (Đã giải thích ở trên). Đây là giải pháp chuẩn, cho phép Cloud Router hub explicitly push spoke subnets qua BGP đến on-premises router, khắc phục tình trạng "không nhận routes".

  • ❌ [SAI] Create a BGP route policy at the Cloud Router, and ensure the subnets of the VPC spokes are being announced towards the on-premises environment.
    Phương án sai vì BGP route policy (như route filters, AS-path prepend) dùng để kiểm soát routes đã học/advertise, không tạo routes mới. Spoke subnets có thể đã được học bởi hub nhưng không advertise do thiếu custom config. Policy chỉ filter, không "ensure announce" subnets chưa được định nghĩa – cần custom routes trước. (GCP BGP policy không thay thế custom advertised routes).

  • ❌ [SAI] Create custom learned routes at the Cloud Router in the hub to advertise the subnets of the VPC spokes.
    Phương án sai vì "custom learned routes" không tồn tại trong GCP. Cloud Router chỉ có custom advertised routes (để advertise ra) và learned routes (tự động từ BGP peers, không custom). "Learned routes" là passive (học từ peers như spokes), không dùng để advertise. Sai thuật ngữ và logic.

📘 Tài liệu tham khảo (cập nhật GCP 2026)

Hy vọng phân tích này giúp bạn ôn thi hiệu quả! 🚀

Câu 207
Your organization has a legacy VPN device that uses IKEv1 and does not support BGP. Connectivity from your on-premises environment to Google Cloud needs to be established. You are using 172.16.100.0/24, 172.16.101.0/24, and 172.16.102.0/24 in your on-premises environment, and 192.168.100.0/24, 192.168.101.0/24, and 192.168.102.0/24 in your Google Cloud environment. You have configured a VPN gateway and you need to configure a policy-based VPN tunnel. What should you do?
  1. A Configure the tunnel with LOCAL_TS set to 172.16.100.0/22 and REMOTE_TS set to 192.168.100.0/22.
  2. B Configure the tunnel with LOCAL_TS set to 192.168.100.0/22 and REMOTE_TS set to 172.16.100.0/22.
  3. C Configure the tunnel with LOCAL_TS set to 172.16.100.0/24, 172.16.101.0/24, and 172.16.102.0/24, and REMOTE_TS set to 192.168.100.0/24,192.168.101.0/24, and 192.168.102.0/24.
  4. D Configure the tunnel with LOCAL_TS set to 172.16.100.0/24, 172.16.101.0/24, and 172.16.102.0/24, and REMOTE_TS set to 0.0.0.0/0.
Xem giải thích

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

Câu hỏi xoay quanh việc thiết lập kết nối VPN giữa môi trường on-premises (premises của tổ chức) và Google Cloud sử dụng thiết bị VPN legacy chỉ hỗ trợ IKEv1 và không hỗ trợ BGP.

  • Mạng on-premises: Sử dụng các subnet 172.16.100.0/24, 172.16.101.0/24, 172.16.102.0/24 (có thể tổng hợp thành 172.16.100.0/22 vì chúng liền kề).
  • Mạng Google Cloud: Sử dụng các subnet 192.168.100.0/24, 192.168.101.0/24, 192.168.102.0/24 (tương tự, tổng hợp thành 192.168.100.0/22).
  • Yêu cầu: Đã cấu hình VPN gateway trên Google Cloud, cần thiết lập policy-based VPN tunnel (phù hợp với IKEv1 không BGP, vì route-based VPN yêu cầu BGP để dynamic routing).

Policy-based VPN trên Google Cloud sử dụng traffic selectors (LOCAL_TS và REMOTE_TS) để định nghĩa các luồng traffic được mã hóa, thay vì dynamic routes. Đây là cách static routing cho legacy devices. 🛠️

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

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

Đáp án đúng: Configure the tunnel with LOCAL_TS set to 192.168.100.0/22 and REMOTE_TS set to 172.16.100.0/22.

Lý do:

  • Trong policy-based VPN của Google Cloud, LOCAL_TS phải là các subnet của Google Cloud (192.168.100.0/22), đại diện cho "phía local" từ góc nhìn của Google VPN gateway.
  • REMOTE_TS phải là các subnet on-premises (172.16.100.0/22), đại diện cho "phía peer/remote".
  • Việc tổng hợp thành /22 là hợp lý vì các subnet liền kề (100-102/24), giúp đơn giản hóa cấu hình traffic selector mà không mất tính chính xác (không overlap với subnet khác). Điều này tuân thủ best practice cho legacy IKEv1. 🟢 Hoàn hảo!

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

  • [SAI] Configure the tunnel with LOCAL_TS set to 172.16.100.0/22 and REMOTE_TS set to 192.168.100.0/22.
    ❌ Sai vì đảo ngược traffic selectors: LOCAL_TS phải là subnet Google Cloud (192.168...), không phải on-premises (172.16...). Nếu cấu hình vậy, tunnel sẽ không match traffic đúng hướng, dẫn đến không thiết lập được kết nối. Google Cloud docs quy định rõ LOCAL_TS = Google subnets.

  • [ĐÚNG] Configure the tunnel with LOCAL_TS set to 192.168.100.0/22 and REMOTE_TS set to 172.16.100.0/22.
    ✅ Đúng hoàn toàn như đã giải thích ở trên. Phù hợp chính xác với quy tắc policy-based VPN, hỗ trợ IKEv1 legacy và tổng hợp subnet hiệu quả.

  • [SAI] Configure the tunnel with LOCAL_TS set to 172.16.100.0/24, 172.16.101.0/24, and 172.16.102.0/24, and REMOTE_TS set to 192.168.100.0/24,192.168.101.0/24, and 192.168.102.0/24.
    ❌ Sai vì LOCAL_TS sai (lại là on-premises subnets): LOCAL_TS phải là Google Cloud subnets. Ngoài ra, liệt kê từng /24 thay vì tổng hợp /22 có thể hoạt động nhưng không optimal; tuy nhiên, lỗi chính là đảo LOCAL/REMOTE, gây phase 2 negotiation fail.

  • [SAI] Configure the tunnel with LOCAL_TS set to 172.16.100.0/24, 172.16.101.0/24, and 172.16.102.0/24, and REMOTE_TS set to 0.0.0.0/0.
    ❌ Sai kép: (1) LOCAL_TS lại là on-premises (sai quy tắc). (2) REMOTE_TS = 0.0.0.0/0 (any-to-any) không an toàn, không match chính xác traffic, và legacy IKEv1 thường không hỗ trợ wildcard lớn như vậy – dễ gây security risk hoặc negotiation fail. Không khuyến nghị cho policy-based.

🛡️ Lưu ý cuối: Để triển khai, sử dụng gcloud compute vpn-tunnels create với --local-traffic-selector và --remote-traffic-selector. Test bằng ping cross-subnet sau khi up tunnel! 🚀

Câu 208
You plan to deploy Google Cloud Armor web application firewall (WAF) policies that use the preconfigured WAF rules. You want all Google Cloud Armor logs to be sent to Cloud Logging with the highest level of detail possible. You have enabled Cloud Load Balancing logs for all the backend services where Cloud Armor WAF policies are applied. What should you do?
  1. A Set the sample rate of the Cloud Load Balancing logs to 0.5.
  2. B Set the Google Cloud Armor logging option to VERBOSE.
  3. C Enable Google Cloud Armor logging for all the backend services where Cloud Armor WAF policies are applied. Set the Google Cloud Armor logging option to VERBOSE.
  4. D Set the sample rate of the Cloud Load Balancing logs to 1.0.
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 triển khai Google Cloud Armor (một dịch vụ WAF - Web Application Firewall) trên Google Cloud Platform (GCP), sử dụng các quy tắc WAF được cấu hình sẵn (preconfigured rules). Mục tiêu là gửi tất cả logs của Google Cloud Armor đến Cloud Logging với mức độ chi tiết cao nhất có thể (highest level of detail).

📌 Bối cảnh quan trọng:

  • Bạn đã kích hoạt logs của Cloud Load Balancing cho tất cả các backend services nơi áp dụng chính sách Cloud Armor WAF.
  • Cloud Armor logs không phụ thuộc hoàn toàn vào Cloud Load Balancing logs; chúng có cơ chế logging riêng biệt, được cấu hình trực tiếp trên Cloud Armor policy.
  • Logging levels của Cloud Armor bao gồm: NORMAL (chi tiết cơ bản) và VERBOSE (chi tiết cao nhất, bao gồm metadata đầy đủ, request/response details, và lý do block/allow).
  • Theo tài liệu GCP mới nhất (cập nhật đến 2026), để đạt "highest level of detail", phải set logging option của policy thành VERBOSE, và logs sẽ tự động gửi đến Cloud Logging mà không cần cấu hình thêm trên backend services.

🛠️ Vấn đề cần giải quyết: Làm thế nào để đảm bảo tất cả logs Cloud Armor (không chỉ sample) được ghi với chi tiết tối đa, tận dụng việc đã enable Cloud LB logs.

✅ Đáp án đúng

Set the Google Cloud Armor logging option to VERBOSE.

Lý do lựa chọn:

  • Đây là hành động đơn giản, trực tiếp và chính xác nhất. Khi tạo hoặc chỉnh sửa Cloud Armor policy (qua Console, gcloud CLI hoặc API), bạn set loggingLevel: VERBOSE trong phần security policy.
  • VERBOSE cung cấp highest level of detail, bao gồm toàn bộ request headers, body snippets (nếu có), rule matches, và threat intelligence info – vượt trội hơn NORMAL.
  • Logs sẽ được gửi 100% (không sample) đến Cloud Logging, tích hợp với Cloud LB logs đã enable.
  • Không cần enable logging riêng trên backend services vì Cloud Armor logging được quản lý tại policy level, và policy được attach vào backend service hoặc HTTP(S) LB frontend.
  • Theo GCP docs 2026: "VERBOSE mode logs all evaluated requests with full metadata" (không sample, full detail).

📋 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. Tôi đánh dấu ✅ đúng hoặc ❌ sai, kèm lý do cụ thể dựa trên tài liệu GCP mới nhất:

  • ❌ Set the sample rate of the Cloud Load Balancing logs to 0.5.
    Sai vì: Sample rate 0.5 chỉ ảnh hưởng đến Cloud Load Balancing logs (ghi 50% requests ngẫu nhiên), không liên quan trực tiếp đến Cloud Armor logs. Cloud Armor có logging riêng, và câu hỏi yêu cầu tất cả logs (không sample) với highest detail. Việc thay đổi sample rate LB logs không tăng chi tiết Cloud Armor logs, chỉ làm giảm lượng LB logs.

  • ✅ Set the Google Cloud Armor logging option to VERBOSE.
    Đúng vì: Như đã giải thích ở trên. Đây là cách chính thức để enable full, verbose logging cho tất cả Cloud Armor evaluations. Logs tự động route đến Cloud Logging, kết hợp hoàn hảo với LB logs đã enable. Hiệu quả cao, không dư thừa bước.

  • ❌ Enable Google Cloud Armor logging for all the backend services where Cloud Armor WAF policies are applied. Set the Google Cloud Armor logging option to VERBOSE.
    Sai vì: Cloud Armor logging không được enable trực tiếp trên backend services; nó chỉ cấu hình trên security policy (Cloud Armor policy). Backend services chỉ attach policy, không có tùy chọn "enable Google Cloud Armor logging" riêng. Phần sau (set VERBOSE) đúng nhưng phần đầu sai/mô tả không chính xác, làm lựa chọn này thừa và không khả thi.

  • ❌ Set the sample rate of the Cloud Load Balancing logs to 1.0.
    Sai vì: Sample rate 1.0 (100%) chỉ đảm bảo full Cloud Load Balancing logs, nhưng không ảnh hưởng đến Cloud Armor logs chi tiết. Cloud Armor cần VERBOSE riêng để có highest detail (như rule matches, threats). Câu hỏi nhấn mạnh "Google Cloud Armor logs", không phải chỉ LB logs.

📘 Tài liệu tham khảo

Hy vọng phân tích này giúp bạn ôn thi chứng chỉ Professional Cloud Network Engineer hiệu quả! 🚀 Nếu cần thêm ví dụ code, hỏi nhé!

Câu 209
Your organization has implemented Vertex AI online prediction in your Google Cloud environment, which is in the us-central1 region. Online prediction is available through private services access by using the IP CIDR range of 172.16.53.0/24. You need to configure access to Vertex AI without affecting the existing routes. You want to use the VLAN attachments that are located in the us-west1 region as primary. The interconnect VLAN attachments in the us-west2 region can only be used as a backup. What should you do?
  1. A Create a custom route advertisement on VLAN attachments in the us-west1 region for prefix 172.16.53.0/24. Create a custom route advertisement on VLAN attachments in the us-west2 region for prefix 172.16.53.0/24.
  2. B Create a custom learned route on VLAN attachments in the us-west1 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 100. Create a custom route advertisement on VLAN attachments in the us-west2 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 200.
  3. C Create a custom route advertisement on VLAN attachments in the us-west1 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 100. Create a custom route advertisement on VLAN attachments in the us-west2 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 200.
  4. D Create a custom route advertisement on VLAN attachments in the us-west1 region for prefix 172.16.53.0/24, and create a BGP route-policy to set the multi-exit discriminator (MED) to 100. Create a custom route advertisement on VLAN attachments in the us-west2 region for prefix 172.16.53.0/24, and create a BGP route-policy to set the multi-exit discriminator (MED) to 200.
Xem giải thích

✅ Giải thích nội dung câu hỏi một cách chi tiết

🛤️ Bối cảnh vấn đề:
Tổ chức của bạn đang sử dụng Vertex AI online prediction (dịch vụ dự đoán trực tuyến của Vertex AI) trong môi trường Google Cloud, được triển khai tại vùng us-central1. Dịch vụ này được truy cập qua Private Services Access (truy cập dịch vụ riêng tư), sử dụng dải địa chỉ IP CIDR 172.16.53.0/24 (dải IP riêng được cấp phát trong VPC của khách hàng, kết nối peering với VPC do Google quản lý cho Vertex AI).

🧩 Yêu cầu cụ thể:

  • Cấu hình truy cập đến Vertex AI (thường từ môi trường hybrid/on-premises qua kết nối Interconnect).
  • Không ảnh hưởng đến các route hiện có (không thêm static route hoặc thay đổi bảng định tuyến chung trong VPC/Cloud Router).
  • Sử dụng VLAN attachments (các kết nối VLAN cho Dedicated Interconnect hoặc Partner Interconnect) tại us-west1 làm primary (ưu tiên chính, đường đi tốt nhất với độ trễ thấp hơn).
  • us-west2 chỉ làm backup (dự phòng, chỉ sử dụng khi primary thất bại, ví dụ BGP session down).

🔍 Phân tích kỹ thuật:

  • Private Services Access cho Vertex AI yêu cầu advertise dải IP dịch vụ (172.16.53.0/24) từ Cloud Router qua BGP đến router on-premises để định tuyến traffic từ on-premises → Vertex AI mà không dùng public IP.
  • Với nhiều VLAN attachments ở các vùng khác nhau (multi-region HA setup), cần custom route advertisement để chỉ advertise prefix cụ thể này qua BGP session tương ứng.
  • Để ưu tiên primary (us-west1): Sử dụng cơ chế BGP như route priority trên BGP session (giá trị thấp hơn = ưu tiên cao hơn) hoặc MED (Multi-Exit Discriminator, thấp hơn = ưu tiên cao hơn). Điều này đảm bảo on-premises router chọn đường primary khi nhận route advertisement từ cả hai BGP sessions.
  • Không ảnh hưởng existing routes: Custom advertisement chỉ áp dụng cho prefix cụ thể, không động toàn bộ bảng route VPC.
    (Kiến thức cập nhật đến 2026: Vertex AI hỗ trợ Private Service Connect beta/full từ 2023, tích hợp chặt với Interconnect VLAN cho hybrid access - theo docs GCP 2025+).

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

✅ Phương án đúng (thứ 3):
Create a custom route advertisement on VLAN attachments in the us-west1 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 100. Create a custom route advertisement on VLAN attachments in the us-west2 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 200.

Lý do chọn (chi tiết):
🛠️ Tạo custom route advertisement trên VLAN attachments cho prefix 172.16.53.0/24 để advertise chính xác dải IP Vertex AI qua BGP mà không ảnh hưởng routes khác.
📊 Set route priority trên BGP session (100 cho us-west1 < 200 cho us-west2): Giá trị priority thấp hơn được ưu tiên cao hơn trong BGP route selection (theo thuật toán GCP Cloud Router BGP). On-premises router sẽ ưu tiên đường us-west1 (primary) do priority tốt hơn, us-west2 chỉ dùng làm backup khi session primary down.
✨ Hoàn hảo cho HA multi-region, tuân thủ best practice GCP Interconnect (không cần static routes, tự động failover qua BGP).

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

  • Phương án 1: Create a custom route advertisement on VLAN attachments in the us-west1 region for prefix 172.16.53.0/24. Create a custom route advertisement on VLAN attachments in the us-west2 region for prefix 172.16.53.0/24.
    ❌ Sai: Chỉ tạo custom advertisement cho prefix mà không set priority/MED, dẫn đến cả hai đường (us-west1 và us-west2) có preference bằng nhau. On-premises sẽ load-balance traffic thay vì ưu tiên primary, không đáp ứng yêu cầu backup-only cho us-west2.

  • Phương án 2: Create a custom learned route on VLAN attachments in the us-west1 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 100. Create a custom route advertisement on VLAN attachments in the us-west2 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 200.
    ❌ Sai: Custom learned route dùng để import routes TỪ on-premises VÀO VPC (học route từ BGP peer), không phải advertise RA ngoài. Prefix 172.16.53.0/24 là của dịch vụ GCP (không phải từ on-premises), nên sai ngữ cảnh. Kết hợp learned + advertisement lẫn lộn, không hiệu quả.

  • Phương án 3 (ĐÚNG): Create a custom route advertisement on VLAN attachments in the us-west1 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 100. Create a custom route advertisement on VLAN attachments in the us-west2 region for prefix 172.16.53.0/24, and set the route priority on the BGP session as 200.
    ✅ Đúng: Như giải thích ở phần trên. Custom advertisement + route priority BGP session thấp hơn cho primary (100 < 200) đảm bảo ưu tiên chính xác, failover tự động, không ảnh hưởng existing routes. Best practice cho Vertex AI hybrid access.

  • Phương án 4: Create a custom route advertisement on VLAN attachments in the us-west1 region for prefix 172.16.53.0/24, and create a BGP route-policy to set the multi-exit discriminator (MED) to 100. Create a custom route advertisement on VLAN attachments in the us-west2 region for prefix 172.16.53.0/24, and create a BGP route-policy to set the multi-exit discriminator (MED) to 200.
    ❌ Sai: BGP route-policy set MED (100 < 200, lower MED preferred) có thể hoạt động, nhưng phức tạp hơn (yêu cầu config export policy với communities hoặc matchers trên Cloud Router). GCP ưu tiên route priority trên BGP session đơn giản hơn cho trường hợp này. MED chỉ so sánh nếu AS_PATH bằng nhau, không đảm bảo 100% như priority trực tiếp; không phải cách tối ưu theo docs mới nhất.

📘 Tài liệu tham khảo (cập nhật 2026)

Câu 210
As part of your organization's modernization efforts, the application teams are migrating services to GKE on Google Cloud (GKE). The GKE clusters will live in service projects. The teams have validated the applications and configurations in their sandbox projects. When moving to production, you noticed that GKE nodes were not being created. Users were able to create Compute Engine instances, but the operation failed when they tried to create a GKE cluster. You need to enable the application teams so they can create said GKE clusters. What should you do?
  1. A Ensure that the service project's GKE service account has the compute.securityAdmin, container.hostServiceAgentUser and compute.networkUser IAM permissions in the host project.
  2. B Ensure that the service project's GKE service account has the compute.securityAdmin, container.hostserviceAgentUser and compute.networkUser IAM permissions in the service project.
  3. C Ensure that the service project's GKE service account has the compute.networkUser IAM permission in the service project.
  4. D Review the firewall rules configuration in the VPC. Identify what rule is blocking node creation.
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 trong quá trình hiện đại hóa ứng dụng của tổ chức, các đội ngũ đang di chuyển dịch vụ sang GKE (Google Kubernetes Engine) trên Google Cloud. Các cluster GKE được đặt trong service projects, trong khi các ứng dụng và cấu hình đã được kiểm tra thành công ở môi trường sandbox. Tuy nhiên, khi triển khai lên production, node của GKE không được tạo ra (failed khi tạo cluster), mặc dù người dùng vẫn có thể tạo Compute Engine instances bình thường.

📌 Vấn đề cốt lõi: Đây là lỗi liên quan đến quyền IAM khi sử dụng Shared VPC (VPC được chia sẻ từ host project sang service project). GKE yêu cầu quyền đặc biệt để tạo node pools trong service project, nhưng quyền phải được cấp trên host project (nơi chứa VPC chính). Người dùng cần kích hoạt quyền cho các đội ngũ ứng dụng để tạo GKE cluster thành công.

🛠️ Ngữ cảnh kỹ thuật (cập nhật đến 2026): Theo tài liệu Google Cloud mới nhất, khi GKE cluster trong service project sử dụng Shared VPC từ host project, GKE service account của service project phải có các quyền cụ thể trên host project để quản lý node (tạo VM, attach network, security policies). Không có quyền này, Compute Engine VM cá nhân tạo được nhưng GKE node fail.

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

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

Đáp án đúng: Ensure that the service project's GKE service account has the compute.securityAdmin, container.hostServiceAgentUser and compute.networkUser IAM permissions in the host project.

Lý do:
🟢 Trong mô hình Shared VPC, GKE service account (tự động tạo trong service project) cần 3 quyền chính trên host project để tạo node:

  • compute.securityAdmin: Quản lý firewall rules và security policies cho node.
  • container.hostServiceAgentUser: Cho phép GKE service agent attach node vào cluster và host project resources.
  • compute.networkUser: Quản lý network attachments (VPC, subnets) từ host project.
    Các quyền này phải cấp trên host project (không phải service project), vì node sử dụng resources từ host VPC. Sandbox thành công vì không dùng Shared VPC hoặc quyền đã có, nhưng production fail do thiếu quyền này. Giải pháp này khớp chính xác với best practice Google Cloud.

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

  • Ensure that the service project's GKE service account has the compute.securityAdmin, container.hostServiceAgentUser and compute.networkUser IAM permissions in the host project.
    ✅ Đúng 🟢: Như giải thích trên, đây là bộ quyền đầy đủ và vị trí chính xác (host project). Áp dụng ngay sẽ fix lỗi node creation.

  • Ensure that the service project's GKE service account has the compute.securityAdmin, container.hostserviceAgentUser and compute.networkUser IAM permissions in the service project.
    ❌ Sai 🔴: Quyền đúng nhưng cấp nhầm vị trí (service project thay vì host project). Service project chỉ quản lý cluster metadata, không đủ quyền truy cập VPC resources từ host project → node vẫn fail. Lưu ý: "hostserviceAgentUser" có lỗi chính tả nhỏ (thiếu space), nhưng vấn đề chính là scope.

  • Ensure that the service project's GKE service account has the compute.networkUser IAM permission in the service project.
    ❌ Sai 🔴: Chỉ 1 quyền duy nhất (compute.networkUser) và nhầm vị trí (service project). Thiếu 2 quyền kia (securityAdmin, hostServiceAgentUser), nên không đủ để tạo node an toàn và attach cluster. Compute Engine instance tạo được vì quyền cơ bản khác.

  • Review the firewall rules configuration in the VPC. Identify what rule is blocking node creation.
    ❌ Sai 🔴: Không phải vấn đề firewall. Lỗi là IAM permissions (node creation failed ở bước provisioning VM cho GKE), không phải traffic blocking (vì Compute Engine VM tạo được). Kiểm tra firewall chỉ là troubleshoot phụ, không giải quyết gốc rễ.

🧐 Kết luận: Áp dụng đáp án đúng sẽ enable teams tạo GKE cluster ngay lập tức. Nếu gặp lỗi tương tự, dùng gcloud projects get-iam-policy kiểm tra quyền trên host project! 🚀