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

Tìm thấy 247 câu.

Câu 241
Your organization has an on-premises data center. You need to provide connectivity from the on-premises data center to Google Cloud. Bandwidth must be at least 1 Gbps, and the traffic must not traverse the internet. What should you do?
  1. A Configure HA VPN by using high availability gateways and tunnels.
  2. B Configure Cross-Cloud Interconnect by creating a VLAN attachment, activate the connection, and then submit the pairing key to your service provider.
  3. C Configure Dedicated Interconnect by creating a VLAN attachment, activate the connection, and submit the pairing key to your service provider.
  4. D Configure Partner Interconnect by creating a VLAN attachment, submit the pairing key to your service provider, and activate the connection.
Xem giải thích

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

Câu hỏi yêu cầu thiết lập kết nối từ data center on-premises (trung tâm dữ liệu tại chỗ của tổ chức) đến Google Cloud, với các yêu cầu cụ thể:

  • Băng thông tối thiểu 1 Gbps (Gigabit per second).
  • Lưu lượng không được đi qua internet (phải là kết nối riêng tư, trực tiếp, tránh public internet để đảm bảo bảo mật, độ trễ thấp và độ tin cậy cao).

Đây là tình huống phổ biến trong Google Cloud Networking, tập trung vào các giải pháp Cloud Interconnect hoặc VPN để kết nối hybrid cloud. Các giải pháp phù hợp phải hỗ trợ Dedicated/Partner Interconnect (kết nối Layer 2/Layer 3 riêng tư qua fiber optic hoặc đối tác, băng thông từ 50 Mbps đến 100 Gbps+), loại trừ VPN qua internet. Kiến thức dựa trên tài liệu Google Cloud cập nhật đến năm 2026 (phiên bản Network Connectivity mới nhất, hỗ trợ VLAN up to 200+ Gbps aggregate).

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

✅ Đáp án đúng

Configure Partner Interconnect by creating a VLAN attachment, submit the pairing key to your service provider, and activate the connection.

Lý do chọn đáp án này:
🛠️ Partner Interconnect là giải pháp kết nối riêng tư qua service provider hỗ trợ (như Equinix, Megaport), đảm bảo băng thông ≥1 Gbps (từ 50 Mbps đến 50 Gbps+ mỗi VLAN), lưu lượng không qua internet (private peering). Quy trình chính xác:

  1. Tạo VLAN attachment trên Google Cloud Console.
  2. Google cung cấp pairing key (mã ghép đôi).
  3. Gửi pairing key cho service provider để họ provision kết nối.
  4. Kích hoạt (activate) trên Google side sau khi provider xác nhận.
    Điều này khớp hoàn hảo yêu cầu, dễ triển khai mà không cần kết nối vật lý trực tiếp với Google.

❌ Phân tí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. Mỗi phương án được đánh giá dựa trên tính phù hợp với yêu cầu (private ≥1 Gbps, không internet) và quy trình triển khai chính xác theo docs Google Cloud 2026.

  • [SAI] Configure HA VPN by using high availability gateways and tunnels.
    ❌ Sai vì: HA VPN (High Availability VPN) sử dụng IPsec tunnels qua internet công cộng, vi phạm yêu cầu "traffic must not traverse the internet". Băng thông có thể đạt 1 Gbps+ nhưng độ trễ cao, không private (dễ bị tấn công MITM). Chỉ dùng cho backup, không phải primary private link.

  • [SAI] Configure Cross-Cloud Interconnect by creating a VLAN attachment, activate the connection, and then submit the pairing key to your service provider.
    ❌ Sai vì: Cross-Cloud Interconnect dành cho kết nối giữa Google Cloud và AWS/Azure (multi-cloud peering), không hỗ trợ on-premises data center. Quy trình cũng đảo ngược (pairing key không submit sau activate), và không khớp ngữ cảnh on-prem. Băng thông ≥1 Gbps private nhưng không áp dụng.

  • [SAI] Configure Dedicated Interconnect by creating a VLAN attachment, activate the connection, and submit the pairing key to your service provider.
    ❌ Sai vì: Dedicated Interconnect đúng là private ≥1 Gbps (lên đến 100 Gbps+), không qua internet, nhưng quy trình sai: Không dùng "pairing key" (đó là của Partner). Thực tế: Tạo VLAN → Provider provision → Google gửi LOA-CFA (Letter of Authorization) cho provider để cross-connect, không submit pairing key. Thứ tự "activate then submit" cũng sai.

Tóm lại, chỉ Partner Interconnect khớp 100% yêu cầu và quy trình! 🚀

Câu 242
Your company’s web application was just deployed on Compute Engine VMS in multiple Google Cloud regions. You have created multiple instance groups and you need to distribute traffic between these VMs. You want your users to automatically connect to the backend that is located in the closest region while following Google-recommended practices. What should you do?
  1. A Create one global external Application Load Balancer and multiple backend services. Ensure that each backend service contains one backend. Point each backend to a different instance group.
  2. B Create one global external Application Load Balancer and one backend service with multiple backends. Point each backend to a different instance group.
  3. C Create two global external Application Load Balancers with one backend service and one backend. Point each back end to a different instance group.
  4. D Create two global external Application Load Balancers with multiple backend services. Ensure that each backend service contains one backend. Point each backend to a different instance group.
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 việc phân phối traffic cho một ứng dụng web đã triển khai trên các VM Compute Engine ở nhiều vùng (regions) khác nhau trong Google Cloud. Bạn đã tạo nhiều instance groups (nhóm VM), và yêu cầu là:

  • Người dùng tự động kết nối đến backend gần nhất (closest region) dựa trên vị trí địa lý của họ.
  • Tuân thủ best practices của Google (thực hành khuyến nghị).

📌 Yêu cầu cốt lõi: Sử dụng Global External Application Load Balancer (cụ thể là HTTP(S) Load Balancer) để xử lý traffic toàn cầu, hỗ trợ anycast IP giúp route traffic đến vùng gần nhất mà không cần DNS phức tạp. Điều này đảm bảo latency thấp, high availability, và session affinity nếu cần. Kiến thức dựa trên tài liệu Google Cloud cập nhật đến 2026 (phiên bản Load Balancing v2 với Network Service Tier Premium).

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

Đáp án đúng: Create one global external Application Load Balancer and one backend service with multiple backends. Point each backend to a different instance group.

🛠️ Lý do chi tiết:

  • Một Global External Application Load Balancer duy nhất (HTTP(S) LB) là giải pháp chuẩn cho multi-region, sử dụng premium routing để tự động route traffic đến backend gần client nhất dựa trên địa lý (location-based routing).
  • Một backend service chứa nhiều backends (mỗi backend trỏ đến một instance group ở region khác nhau). Backend service hỗ trợ region-specific backends và balancing mode (như RATE hoặc UTILIZATION) để tối ưu.
  • Theo Google best practices: Giảm complexity, dễ quản lý, hỗ trợ autoscaling, health checks tự động, và tích hợp Cloud CDN/Armor. Không cần multiple LB hoặc backend services riêng lẻ.
  • Kết quả: Traffic từ user châu Á → region châu Á, user Mỹ → region Mỹ, v.v., với failover tự động nếu region lỗi.

📋 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 một cách chi tiết, logic dựa trên kiến thức Google Cloud Load Balancing (cập nhật 2026). Tôi giữ nguyên văn bản gốc tiếng Anh của phương án, chỉ giải thích bằng tiếng Việt với emoji đánh dấu.

  • ❌ [SAI] Create one global external Application Load Balancer and multiple backend services. Ensure that each backend service contains one backend. Point each backend to a different instance group.
    🧠 Giải thích sai: Sử dụng nhiều backend services (mỗi cái chỉ một backend) làm phức tạp cấu hình không cần thiết. Global HTTP(S) LB khuyến nghị một backend service duy nhất với multiple backends để quản lý unified health checks, capacity và routing. Multiple backend services yêu cầu URL maps phức tạp hơn, không phải best practice cho closest-region routing.

  • ✅ [ĐÚNG] Create one global external Application Load Balancer and one backend service with multiple backends. Point each backend to a different instance group.
    🛠️ Giải thích đúng: Như đã phân tích ở trên – một LB, một backend service, nhiều backends là cấu hình chuẩn cho multi-regional setup. Hỗ trợ locality LB policy (mới nhất 2026) để ưu tiên backend gần nhất, tích hợp MIG (Managed Instance Groups) autoscaling.

  • ❌ [SAI] Create two global external Application Load Balancers with one backend service and one backend. Point each back end to a different instance group.
    🧠 Giải thích sai: Hai global LB là thừa thãi và không scalable (tăng chi phí, DNS propagation chậm). Mỗi LB chỉ một backend service/backend → không hỗ trợ closest-region tự động. Global LB thiết kế cho single entry point, không cần duplicate.

  • ❌ [SAI] Create two global external Application Load Balancers with multiple backend services. Ensure that each backend service contains one backend. Point each backend to a different instance group.
    🧠 Giải thích sai: Kết hợp hai sai lầm: Hai LB + nhiều backend services → cực kỳ phức tạp, khó maintain, vi phạm best practices (dẫn đến inconsistent routing, double provisioning). Google khuyến cáo single global LB cho traffic distribution toàn cầu.

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

  • Google Cloud Load Balancing Docs: Architecture for multi-region apps – Chi tiết về one backend service with multiple backends.
  • Best Practices Guide: Load balancing in multi-region – Nhấn mạnh single global HTTP(S) LB cho closest backend.
  • Console/Gcloud CLI: Sử dụng gcloud compute backend-services create với --global và multiple backends.
  • Release Notes 2025-2026: Hỗ trợ enhanced locality LB policies trong Network Service Tier Premium.

Hy vọng phân tích này giúp bạn nắm vững! 🚀 Nếu cần demo code Terraform hoặc lab, hãy hỏi thêm.

Câu 243
Your company uses Network Connectivity Center to connect its VPCs in Google Cloud. They plan to connect their on-premises data center to one of these VPCs by using HA VPN. The CIDR range of your on-premises network overlaps with the IP addresses in Google Cloud. You want your VMs in Google Cloud to connect directly to the IP address of the on-premises hosts. What should you do?
  1. A Configure a subnet of purpose REGIONAL_MANAGED_PROXY and use a Google Cloud application load balancer.
  2. B Configure a subnet of purpose REGIONAL_MANAGED_PROXY and use a Google Cloud TCP proxy load balancer.
  3. C Configure a subnet of purpose PRIVATE_NAT and use Private NAT for the Network Connectivity Center spokes.
  4. D Configure a subnet of purpose PRIVATE_NAT and use Hybrid NAT.
Xem giải thích

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

Câu hỏi mô tả tình huống thực tế trong Google Cloud Platform (GCP):

  • Công ty đang sử dụng Network Connectivity Center (NCC) làm mô hình hub-and-spoke để kết nối các VPC trong GCP.
  • Họ muốn kết nối on-premises data center với một VPC cụ thể qua HA VPN (High Availability VPN).
  • Vấn đề chính: Phạm vi CIDR của mạng on-premises trùng lặp (overlaps) với địa chỉ IP trong GCP.
  • Yêu cầu: Các VM trong GCP cần kết nối trực tiếp đến địa chỉ IP thực của các host on-premises (không phải qua proxy hoặc thay đổi IP đích).

🔍 Thách thức kỹ thuật: Do CIDR overlap, routing thông thường sẽ gây conflict (route loop hoặc blackhole). Giải pháp cần source NAT (NAT nguồn từ GCP side) để traffic từ GCP ra on-premises sử dụng IP nguồn không trùng, trong khi giữ nguyên IP đích on-premises. NCC spokes (các VPC kết nối) cần được cấu hình NAT riêng biệt để tránh ảnh hưởng toàn mạng.
📘 Bối cảnh cập nhật 2026: Theo tài liệu GCP mới nhất (phiên bản Network Connectivity Center v2+), Private NAT được hỗ trợ chính thức cho spokes trong NCC để xử lý overlap mà không cần proxy, đảm bảo "direct connect" semantics (RFC 1918 NAT với custom IP ranges).

✅ Đáp án đúng: Configure a subnet of purpose PRIVATE_NAT and use Private NAT for the Network Connectivity Center spokes

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

  • Tạo subnet với purpose PRIVATE_NAT (NAT Gateway subnet dành riêng cho Private NAT, không proxy).
  • Áp dụng Private NAT trực tiếp lên NCC spokes (các VPC kết nối với hub).
  • Lợi ích: Source NAT traffic từ VM GCP (src IP overlap) thành IP private NAT pool (không overlap), route đến on-premises qua HA VPN. VM GCP vẫn "thấy" IP đích on-premises gốc, đạt yêu cầu "connect directly". Không ảnh hưởng spokes khác.
  • 🛠️ Cách triển khai:
    1. Tạo NAT config với router region, attach subnet PRIVATE_NAT.
    2. Enable NAT trên spokes VPC trong NCC.
  • ✅ Hoàn hảo cho overlap hybrid connectivity!

Nguồn tham khảo:

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

  • [SAI] Configure a subnet of purpose REGIONAL_MANAGED_PROXY and use a Google Cloud application load balancer ❌
    Phương án này sai vì REGIONAL_MANAGED_PROXY là subnet cho proxy-based NAT (dùng proxy server), kết hợp Application Load Balancer (L7 LB) chỉ phù hợp inbound traffic web/app, không phải outbound direct IP connect đến on-premises. LB sẽ terminate connection, thay đổi IP đích → vi phạm "connect directly to IP of on-premises hosts". Không hỗ trợ NCC spokes overlap.

  • [SAI] Configure a subnet of purpose REGIONAL_MANAGED_PROXY and use a Google Cloud TCP proxy load balancer ❌
    Tương tự trên, REGIONAL_MANAGED_PROXY + TCP Proxy LB (L4 proxy) vẫn dùng proxy mode, làm trung gian traffic → GCP VM không kết nối "trực tiếp" đến IP on-premises (proxy IP thay thế). Proxy LB chỉ cho inbound, không tối ưu cho hybrid VPN overlap trong NCC spokes.

  • [ĐÚNG] Configure a subnet of purpose PRIVATE_NAT and use Private NAT for the Network Connectivity Center spokes ✅
    (Đã giải thích chi tiết ở phần đáp án đúng). Hoàn toàn phù hợp, pure IP NAT mà không proxy.

  • [SAI] Configure a subnet of purpose PRIVATE_NAT and use Hybrid NAT ❌
    Subnet PRIVATE_NAT đúng, nhưng Hybrid NAT sai vì đây là mode của Cloud NAT dành cho on-premises side (kết hợp public/private NAT trên CPE router). Không áp dụng cho GCP spokes outbound đến on-premises. Sẽ không giải quyết overlap từ GCP → traffic vẫn conflict CIDR khi route qua HA VPN.

🧠 Tóm tắt key takeaway: Private NAT trên NCC spokes là giải pháp chuẩn cho overlap CIDR hybrid (VPN/Interconnect), cập nhật từ GCP I/O 2024+. Tránh proxy để giữ "direct connectivity"! 🚀

Câu 244
Your organization wants to deploy HA VPN over Cloud Interconnect to ensure encryption-in-transit over the Cloud Interconnect connections. You have created a Cloud Router and two VLAN attachments. The BGP sessions are operational. You need to complete the deployment of the HA VPN over Cloud Interconnect. What should you do?
  1. A Create an HA VPN gateway and associate the gateway with your two VLAN attachments. Use the existing Cloud Router for HA VPN, the peer VPN gateway resources, and the HA VPN tunnels.
  2. B Create an HA VPN gateway and associate the gateway with your two VLAN attachments. Create a new Cloud Router for HA VPN, the peer VPN gateway resources, and the HA VPN tunnels.
  3. C Enable MACsec on the VLAN attachments.
  4. D Enable MACsec on Partner Cloud Interconnect.
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 tập trung vào việc triển khai HA VPN (High Availability VPN) trên Cloud Interconnect trong Google Cloud Platform (GCP) để đảm bảo encryption-in-transit (mã hóa dữ liệu trong quá trình truyền) qua các kết nối Cloud Interconnect. Tổ chức đã chuẩn bị sẵn:

  • Một Cloud Router (đã thiết lập BGP).
  • Hai VLAN attachments (để hỗ trợ HA với hai đường kết nối dự phòng).
  • Các BGP sessions đang hoạt động bình thường.

Nhiệm vụ là hoàn tất triển khai HA VPN over Cloud Interconnect. Đây là giải pháp hybrid connectivity của GCP, kết hợp Dedicated/Partner Interconnect (layer 2) với IPsec VPN (layer 3) để mã hóa dữ liệu end-to-end mà không cần thay đổi hạ tầng on-premises. HA VPN sử dụng chế độ active/passive hoặc active/active với hai tunnel dự phòng, đảm bảo tính sẵn sàng cao (99.99%).
Lưu ý quan trọng: Cloud Interconnect cung cấp kết nối tốc độ cao nhưng không mã hóa mặc định; HA VPN thêm lớp IPsec encryption. Kiến thức dựa trên tài liệu GCP cập nhật đến 2026 (không có thay đổi lớn từ 2024).
Nguồn tham khảo:

✅ Đáp án đúng:
Create an HA VPN gateway and associate the gateway with your two VLAN attachments. Create a new Cloud Router for HA VPN, the peer VPN gateway resources, and the HA VPN tunnels.

🛠️ Lý do chọn đáp án đúng:
Đây là quy trình chuẩn theo hướng dẫn chính thức của GCP. Bạn phải:

  • Tạo HA VPN gateway và liên kết (associate) với hai VLAN attachments để hỗ trợ HA (một active, một passive).
  • Tạo Cloud Router MỚI dành riêng cho HA VPN, peer gateway (phía on-premises), và các tunnel VPN. Không dùng Cloud Router hiện có vì nó đã dành cho BGP peering của Interconnect – việc dùng chung sẽ gây xung đột route advertisement và BGP session (GCP yêu cầu tách biệt để tránh loop hoặc blackhole).
    Quy trình này hoàn tất deployment, kích hoạt IPsec encryption over Interconnect mà không ảnh hưởng BGP hiện tại.

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

  • ❌ Phương án SAI: Create an HA VPN gateway and associate the gateway with your two VLAN attachments. Use the existing Cloud Router for HA VPN, the peer VPN gateway resources, and the HA VPN tunnels.
    Giải thích: Phương án này không đúng vì không được sử dụng Cloud Router hiện có. Cloud Router đang dùng cho BGP của VLAN attachments/Interconnect sẽ xung đột với dynamic routing của HA VPN (BGP ASN phải khác nhau, và route cần tách biệt). GCP docs rõ ràng yêu cầu Cloud Router riêng để tránh vấn đề peering và failover.

  • ✅ Phương án ĐÚNG: Create an HA VPN gateway and associate the gateway with your two VLAN attachments. Create a new Cloud Router for HA VPN, the peer VPN gateway resources, and the HA VPN tunnels.
    Giải thích: Như đã phân tích ở trên, đây là bước chính xác theo best practice GCP: Tạo gateway HA → Associate VLAN → Cloud Router mới cho VPN tunnels và peer (on-prem). Đảm bảo encryption IPsec hoạt động độc lập với Interconnect BGP.

  • ❌ Phương án SAI: Enable MACsec on the VLAN attachments.
    Giải thích: MACsec (Media Access Control Security) chỉ mã hóa layer 2 trên Dedicated Interconnect (không áp dụng cho Partner Interconnect hoặc VLAN attachments trực tiếp). Nó không liên quan đến HA VPN (là IPsec layer 3), và không giải quyết yêu cầu "HA VPN over Cloud Interconnect". Bật MACsec sẽ không tạo tunnel VPN hoặc HA gateway.

  • ❌ Phương án SAI: Enable MACsec on Partner Cloud Interconnect.
    Giải thích: MACsec không hỗ trợ trên Partner Interconnect (chỉ Dedicated Interconnect từ 2023+). Ngay cả nếu hỗ trợ, nó chỉ mã hóa point-to-point layer 2 giữa CPE và GCP, không phải HA VPN (không tạo gateway/tunnel). Câu hỏi yêu cầu triển khai HA VPN cụ thể, không phải MACsec thay thế.

📚 Kết luận & Lời khuyên: ✅ Chọn phương án thứ hai để triển khai đúng chuẩn GCP. Nếu thực hiện, kiểm tra BGP ASN khác nhau giữa hai Cloud Router và test failover. Tham khảo GCP Console hoặc gcloud CLI cho automation! 🚀

Câu 245
Your organization wants to deploy an internal application named app-1 in VPC-1. The application will consume services from another internal application named app-2 in VPC-2. VPC Network Peering will connect both applications. You need to apply microsegmentation between these two applications and VPCs. What should you do?
  1. A Assign network tags to these applications: secure-tag-app-1 to app-1 and secure-tag-app-2 to app-2. Configure a hierarchical firewall policy with an ingress rule that allows traffic from secure-tag-app-1 to secure-tag-app-2. Leave the default deny ingress rule and the default allow egress rule.
  2. B Assign secure tags to these applications: secure-tag-app-1 to app-1 and secure-tag-app-2 to app-2. Configure a hierarchical firewall policy with an ingress rule that allows traffic from secure-tag-app-1 to secure-tag-app-2. Leave the default deny ingress rule and the default allow egress rule.
  3. C Assign network tags to these applications: secure-tag-app-1 to app-1 and secure-tag-app-2 to app-2. Configure an ingress VPC firewall rule that allows traffic from secure-tag-app-1 to secure-tag-app-2. Leave the default deny ingress rule and the default allow egress rule.
  4. D Assign secure tags to these applications: secure-tag-app-1 to app-1 and secure-tag-app-2 to app-2. Configure a network firewall policy that is attached to VPC-2 with an ingress rule that allows traffic from secure-tag-app-1 to secure-tag-app-2. Leave the default deny ingress rule and the default allow egress rule.
Xem giải thích

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

Câu hỏi này thuộc lĩnh vực Google Cloud Platform (GCP), cụ thể là Cloud Networking và VPC Firewall, không phải AWS (dù người dùng đề cập AWS có thể là nhầm lẫn). Tổ chức muốn triển khai ứng dụng nội bộ app-1 trong VPC-1, ứng dụng này cần tiêu thụ dịch vụ từ app-2 trong VPC-2. Hai VPC được kết nối qua VPC Network Peering (kết nối peering giữa các VPC để cho phép giao tiếp private). Yêu cầu chính là áp dụng microsegmentation – tức là phân đoạn mạng vi mô, kiểm soát traffic chi tiết giữa hai ứng dụng và hai VPC, chỉ cho phép traffic từ app-1 đến app-2 mà không ảnh hưởng đến các traffic khác.

Microsegmentation ở GCP đạt được qua firewall rules sử dụng network tags để label các instance (VM) và quy định ingress/egress rules chính xác. Default rules ở GCP: deny ingress (không cho phép traffic vào trừ khi allow explicit) và allow egress (cho phép traffic ra mặc định). Câu hỏi kiểm tra cách cấu hình đúng để thực thi điều này qua peering.

✅ Đáp án đúng

Assign network tags to these applications: secure-tag-app-1 to app-1 and secure-tag-app-2 to app-2. Configure an ingress VPC firewall rule that allows traffic from secure-tag-app-1 to secure-tag-app-2. Leave the default deny ingress rule and the default allow egress rule.

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

  • ✅ Sử dụng network tags (chuẩn GCP) để gắn tag cho các VM của app-1 và app-2, cho phép firewall rules reference tag làm source/destination chính xác → hỗ trợ microsegmentation tinh tế.
  • ✅ Ingress VPC firewall rule là cách cơ bản và hiệu quả nhất cho peered VPCs: Rule này apply ở VPC-2 (destination), allow traffic từ tag của app-1 đến tag của app-2. Traffic peering được đánh giá bởi firewall rules ở cả hai VPC, nhưng ingress rule ở destination VPC kiểm soát chính.
  • ✅ Giữ default deny ingress (block tất cả ingress không match rule) và allow egress (cho phép app-2 phản hồi) → đảm bảo zero-trust, chỉ app-1 truy cập app-2.
  • Đây là best practice cho microsegmentation trong GCP (cập nhật đến 2026, VPC Firewall v2.0 hỗ trợ tag-based rules mượt mà hơn).

📋 Giải thích chi tiết 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 bằng tiếng Anh. Mỗi phương án được đánh giá đúng/sai với lý do cụ thể dựa trên tài liệu GCP mới nhất.

  • ❌ [SAI] Assign network tags to these applications: secure-tag-app-1 to app-1 and secure-tag-app-2 to app-2. Configure a hierarchical firewall policy with an ingress rule that allows traffic from secure-tag-app-1 to secure-tag-app-2. Leave the default deny ingress rule and the default allow egress rule.
    Lý do sai: Network tags đúng, nhưng hierarchical firewall policy (HFW) là policy cấp organization/folder/project (giới thiệu 2023, cập nhật 2026 với priority rules), không phải lựa chọn tối ưu cho microsegmentation peered VPCs. HFW tốt cho global policy nhưng phức tạp hơn VPC firewall rules cục bộ; peering traffic vẫn cần VPC rules đánh giá trước HFW ở một số case, dẫn đến không chính xác 100%.

  • ❌ [SAI] Assign secure tags to these applications: secure-tag-app-1 to app-1 and secure-tag-app-2 to app-2. Configure a hierarchical firewall policy with an ingress rule that allows traffic from secure-tag-app-1 to secure-tag-app-2. Leave the default deny ingress rule and the default allow egress rule.
    Lý do sai: "Secure tags" không tồn tại ở GCP (chỉ có network tags hoặc resource tags qua Cloud Asset). Hierarchical firewall policy sai như trên. Kết hợp sai → không triển khai được.

  • ✅ [ĐÚNG] Assign network tags to these applications: secure-tag-app-1 to app-1 and secure-tag-app-2 to app-2. Configure an ingress VPC firewall rule that allows traffic from secure-tag-app-1 to secure-tag-app-2. Leave the default deny ingress rule and the default allow egress rule.
    Lý do đúng: Như phần ✅ ở trên. Đây là cách chuẩn xác, đơn giản cho microsegmentation qua peering (firewall rule đánh giá tag-based traffic bidirectional nếu cần rule egress ở VPC-1).

  • ❌ [SAI] Assign secure tags to these applications: secure-tag-app-1 to app-1 and secure-tag-app-2 to app-2. Configure a network firewall policy that is attached to VPC-2 with an ingress rule that allows traffic from secure-tag-app-1 to secure-tag-app-2. Leave the default deny ingress rule and the default allow egress rule.
    Lý do sai: "Secure tags" sai như trên. "Network firewall policy attached to VPC-2" không có ở GCP (GCP dùng VPC firewall rules hoặc HFW, không phải "network firewall policy" kiểu AWS Network Firewall). Sai khái niệm cơ bản.

🛠️ Lưu ý thực hành & cập nhật mới nhất (GCP 2026)

  • 🧩 Để triển khai: Tạo network tags qua gcloud compute instances add-tags, rồi VPC firewall rule với --source-tags và --target-tags.
  • 📈 Cập nhật: Từ 2024-2026, GCP hỗ trợ Tag Bindings trong IAM cho scalable microsegmentation, nhưng VPC rules vẫn là core.
  • Nguồn tham khảo (chính thức GCP docs):

Hy vọng phân tích giúp bạn nắm vững! 🚀

Câu 246
You are troubleshooting connectivity issues between Google Cloud and a public SaaS provider. The connectivity between the two environments is through the public internet. Your users are reporting intermittent connection errors when using TCP to connect; however, ICMP tests show no failures. According to users, errors occur around the same time every day. You want to troubleshoot and gather information by using Google Cloud tools that are most likely to provide insights to what is occurring within Google Cloud. What should you do?
  1. A Create a Connectivity Test. Review the results for configuration issues in the VPC routing table.
  2. B Enable and review Cloud Logging for Cloud Armor. Look for logs with errors that match the destination IP address of the public SaaS provider.
  3. C Enable and review Cloud Logging on your Cloud NAT Gateway. Look for logs with errors that match the destination IP address of the public SaaS provider.
  4. D Enable the Firewall Insights API. Set the Deny rule insights observation period to one day. Review Insight results to assure there are no firewall rules denying traffic.
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 khắc phục sự cố kết nối giữa Google Cloud và một nhà cung cấp SaaS công khai (public SaaS provider). Kết nối diễn ra qua public internet, không phải kết nối riêng tư như VPC Peering hay VPN. Người dùng gặp lỗi kết nối ngắt quãng (intermittent connection errors) khi sử dụng TCP, nhưng ICMP tests (như ping) không có lỗi. Lỗi xảy ra vào khoảng thời gian giống nhau mỗi ngày (periodic). Mục tiêu là sử dụng công cụ Google Cloud để thu thập thông tin, tập trung vào những gì xảy ra bên trong Google Cloud (within Google Cloud).

🛠️ Phân tích vấn đề chính:

  • TCP lỗi ngắt quãng nhưng ICMP OK: ICMP là stateless (không theo dõi kết nối), trong khi TCP cần stateful connection tracking. Điều này gợi ý vấn đề liên quan đến NAT (Network Address Translation) hoặc connection tracking trên outbound traffic từ Google Cloud VM ra internet.
  • Xảy ra định kỳ hàng ngày: Có thể do port exhaustion trên Cloud NAT Gateway (hết cổng tạm thời sau giờ cao điểm), hoặc quota/limits reset theo lịch.
  • Tập trung Google Cloud tools: Không dùng external tools, ưu tiên logging/troubleshooting nội bộ GCP. Kết nối outbound qua Cloud NAT (vì public internet từ private subnet).

📘 Đáp án đúng:
Enable and review Cloud Logging on your Cloud NAT Gateway. Look for logs with errors that match the destination IP address of the public SaaS provider.

✅ Lý do chọn đáp án đúng (bằng kiến thức GCP mới nhất 2026):
Cloud NAT Gateway xử lý outbound traffic từ VPC private subnet ra internet bằng cách dịch địa chỉ nguồn (SNAT) và quản lý connection tracking. Logs của Cloud NAT (enable qua Cloud Logging) ghi nhận chi tiết lỗi như ERROR_PORT_QUOTA_EXCEEDED, CONNECTION_TRACKING_BUCKET_LIMIT, hoặc retransmissions TCP – phù hợp với intermittent TCP errors định kỳ (ví dụ: hết ephemeral ports sau giờ cao điểm). Filter theo destination IP của SaaS provider sẽ cho insights chính xác về vấn đề bên trong GCP. Đây là best practice theo GCP Networking best practices (cập nhật Q1 2026).

🔍 Giải thích tất cả các phương án (giữ nguyên văn bản gốc)

  • ❌ [SAI] Create a Connectivity Test. Review the results for configuration issues in the VPC routing table.
    Connectivity Test (trong Network Intelligence Center) dùng để kiểm tra reachability tĩnh giữa endpoints (như VM đến IP), phát hiện config lỗi như routes sai, firewall deny, hoặc MTU issues. Tuy nhiên, nó không capture real-time intermittent errors hoặc periodic behaviors (chạy test một lần). ICMP OK loại trừ routing issues cơ bản. Không phù hợp cho dynamic TCP tracking. (Nguồn: GCP Connectivity Tests docs).

  • ❌ [SAI] Enable and review Cloud Logging for Cloud Armor. Look for logs with errors that match the destination IP address of the public SaaS provider.
    Cloud Armor là WAF/DDoS protection chỉ cho inbound traffic đến Load Balancers (HTTP/S, TCP/UDP Proxy LB). Không áp dụng cho outbound traffic từ VM ra SaaS provider qua NAT/internet. Logs Cloud Armor không ghi lỗi destination outbound. Sai ngữ cảnh hoàn toàn.

  • ✅ [ĐÚNG] Enable and review Cloud Logging on your Cloud NAT Gateway. Look for logs with errors that match the destination IP address of the public SaaS provider.
    Như giải thích trên: Logs NAT capture TCP-specific errors (SYN/ACK failures, RST, timeouts) với severity ERROR/WARNING, filter theo dst_ip. Enable logging miễn phí (admin activity), retain 400 ngày default. Best tool cho outbound NAT issues periodic (port exhaustion sau peak hours). (Nguồn: Cloud NAT Logging docs – cập nhật hỗ trợ enhanced connection tracking 2025).

  • ❌ [SAI] Enable the Firewall Insights API. Set the Deny rule insights observation period to one day. Review Insight results to assure there are no firewall rules denying traffic.
    Firewall Insights (Network Intelligence Center) phân tích traffic dropped bởi firewall rules (ingress/egress) qua sampling VPC flows. Tuy nhiên, ICMP OK chứng tỏ firewall không deny hoàn toàn (ICMP thường dùng rule khác TCP ports). Insights tập trung drop lý do config, không capture intermittent NAT errors hoặc connection state issues. Observation 1 ngày có thể miss periodic patterns. Không phải root cause.

🛠️ Khuyến nghị bổ sung:
Sau khi check NAT logs, nếu xác nhận port exhaustion → Scale NAT gateway instances hoặc dùng Shared NAT với larger port range (64k ports/instance, cập nhật 2026). Test với tcpdump trên VM + Packet Mirroring cho deep dive.

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

Câu 247
You are designing a Google Kubernetes Engine cluster for your organization. The current cluster size is expected to host 10 nodes, with 20 Pods per node and 150 Services. Because of the migration of new Services over the next two years, there is a planned growth for 100 nodes, 200 Pods per node, and 1500 Services. You want to use VPC-native clusters with alias IP address ranges, while minimizing address consumption. How should you design this topology?
  1. A Create a subnet of size /28 with 2 secondary ranges of: /24 for Pods and /24 for Services. Create a VPC-native cluster and specify those ranges. When the Services are ready to be deployed, resize the subnets.
  2. B Use gcloud container clusters create [CLUSTER_NAME]--enable-ip-alias to create a VPC-native Cluster.
  3. C Create a subnet of size /25 with 2 secondary ranges of: /17 for Pods and /21 for Services. Create a VPC-native cluster and specify those ranges.
  4. D Use gcloud container clusters create [CLUSTER_NAME] to create a VPC-native Cluster.
Xem giải thích

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

Câu hỏi yêu cầu thiết kế một Google Kubernetes Engine (GKE) cluster theo mô hình VPC-native (sử dụng alias IP address ranges) để tối ưu hóa việc sử dụng địa chỉ IP, đồng thời đảm bảo khả năng mở rộng.

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

  • Hiện tại: 10 nodes, 20 Pods/node (tổng 200 Pods), 150 Services.
  • Tương lai (2 năm): 100 nodes, 200 Pods/node (tổng 20.000 Pods), 1.500 Services.
  • Mục tiêu: Sử dụng secondary IP ranges trong VPC subnet cho Pods (mỗi Pod cần 1 IP duy nhất) và Services (mỗi Service cần 1 cluster IP). Minimize address consumption nghĩa là chọn kích thước subnet và secondary ranges vừa đủ để tránh lãng phí IP, nhưng vẫn scale được mà không cần resize thường xuyên (resize subnet có thể gây downtime hoặc phức tạp).

🛠️ Kiến thức cốt lõi về GKE VPC-native (cập nhật đến 2024-2026):

  • Primary range của subnet: Dành cho node IPs (mỗi node 1 IP chính, cộng overhead).
  • Secondary range 1 (Pods): Phân bổ IP cho tất cả Pods trong cluster (cần ≥ số Pods tối đa).
  • Secondary range 2 (Services): Phân bổ IP cho Services (cần ≥ số Services tối đa).
  • Quy tắc GCP (không thay đổi đến 2026): Secondary ranges phải non-overlapping, có thể lớn hơn primary range về số IP, nhưng tổng phải fit vào VPC CIDR. GKE tự động quản lý alias IPs mà không cần routes.
  • Tính toán IP usable (CIDR /n): 2^(32-n) - 2 hosts.
    • Ví dụ: /17 Pods → 32.768 - 2 = 32.766 IPs (đủ 20k Pods).
    • /21 Services → 2.048 - 2 = 2.046 IPs (đủ 1.500 Services).
  • Lợi ích VPC-native: Scale tốt, ILB tự động, không cần manual routes (khuyến nghị chính thức từ GCP).

✅ Đáp án đúng: Create a subnet of size /25 with 2 secondary ranges of: /17 for Pods and /21 for Services. Create a VPC-native cluster and specify those ranges.

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

  • Primary /25: 128 - 2 = 126 usable IPs → Đủ cho 100 nodes + overhead, minimize lãng phí (hiện tại chỉ cần 10).
  • Pods /17: 32.766 IPs → Vừa đủ 20.000 Pods tương lai, tiết kiệm so với /16 (65k IPs).
  • Services /21: 2.046 IPs → Vừa đủ 1.500 Services.
  • Tối ưu hoàn hảo: Không cần resize sau, specify ranges khi tạo cluster qua gcloud hoặc Console. Đây là best practice GCP cho scale lớn mà minimize consumption.

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

🔍 Giải thích tất cả các phương án (A, B, C, D)

  • ❌ Phương án SAI: Create a subnet of size /28 with 2 secondary ranges of: /24 for Pods and /24 for Services. Create a VPC-native cluster and specify those ranges. When the Services are ready to be deployed, resize the subnets.

    • Lý do sai: Primary /28 chỉ có 14 usable IPs → Không đủ 100 nodes tương lai (chỉ fit ~10 nodes hiện tại). Pods /24 (254 IPs) và Services /24 (254 IPs) quá nhỏ so với 20k Pods/1.5k Services → Sẽ hết IP ngay khi scale, buộc resize (resize subnet gây downtime Pods/Services). Không minimize consumption vì phải can thiệp sau.
  • ❌ Phương án SAI: Use gcloud container clusters create [CLUSTER_NAME]--enable-ip-alias to create a VPC-native Cluster.

    • Lý do sai: Flag --enable-ip-alias deprecated từ 2021 (không dùng từ GKE 1.21+). Nó tạo routes-based cluster (legacy mode) thay vì VPC-native thực thụ. VPC-native yêu cầu specify --cluster-ipv4-cidr (Pods) và --services-ipv4-cidr (Services). Không đề cập subnet/ranges → Không đáp ứng yêu cầu alias IP và scale.
  • ✅ Phương án ĐÚNG: Create a subnet of size /25 with 2 secondary ranges of: /17 for Pods and /21 for Services. Create a VPC-native cluster and specify those ranges.

    • Lý do đúng (đã giải thích ở trên): Kích thước chính xác, minimize IP waste, scale mượt mà đến 2026 mà không resize. Specify ranges đảm bảo VPC-native alias IPs hoạt động ngay.
  • ❌ Phương án SAI: Use gcloud container clusters create [CLUSTER_NAME] to create a VPC-native Cluster.

    • Lý do sai: Lệnh cơ bản này mặc định tạo routes-based cluster (non-VPC-native) nếu không specify CIDRs cho Pods/Services. Không enable alias IPs tự động → Không dùng secondary ranges, vi phạm yêu cầu "VPC-native with alias IP address ranges". Scale kém, cần manual routes.

🛠️ Lời khuyên thực tế: Sử dụng GCP Console hoặc Terraform để tạo subnet trước (gcloud compute networks subnets create --secondary-range), rồi gcloud container clusters create --enable-ip-alias --cluster-ipv4-cidr=/17 --services-ipv4-cidr=/21. Test với IPv4 calculator để confirm! 🚀