Connecting VPCs with HA VPN and Dynamic Routing

PCNE By islever Editorial Last updated

Configuring a site-to-site IPSec VPN. Configuring VPC routing. Designing VPC networks.

Short answer

D In each VPC deploy an HA VPN gateway and a Cloud Router. Create two VPN tunnels on each gateway, and configure BGP sessions for dynamic routing.

Question

Your organization has two applications running in separate Google Cloud VPC networks (vpc-a and vpc-b) in different projects. You need to establish a secure, private, and encrypted connection between these two VPCs to allow for inter-VPC communication. You must ensure the solution provides high availability and uses dynamic routing. What should you do?
  1. Configure VPC Network Peering between the two networks, and adjust firewall rules on both sides to allow the required traffic flow between specific subnets.
  2. In vpc-a, deploy an internal Application Load Balancer for your application. Use Private Service Connect to publish this service in vpc-a and create a PSC consumer endpoint in vpc-b.
  3. In each VPdeploy a Classic VPN gateway and use a pre-shared key for authentication. Configure static routes to direct traffic to the other VPC.
  4. In each VPC. deploy an HA VPN gateway and a Cloud Router. Create two VPN tunnels on each gateway, and configure BGP sessions for dynamic routing. Correct Answer

Key Takeaways

The key trap is choosing VPC Peering (A); while private, it lacks native dynamic routing (BGP), whereas HA VPN (D) provides encryption, high availability, and BGP support.

Learn how to securely connect two separate Google Cloud VPCs using HA VPN gateways, Cloud Routers, and BGP for dynamic routing and high availability.

Common mistake: Many candidates choose VPC Peering (A) because it is the simplest way to connect VPCs privately. However, it fails the 'dynamic routing' constraint as it only supports static routes, and may not satisfy strict 'encrypted connection' interpretations compared to explicit IPsec tunnels.

Expert Analysis

The correct answer is D. The question specifies the need for a 'secure, private, and encrypted connection' that provides 'high availability' and uses 'dynamic routing'. While VPC peering (Option A) is a common choice for connecting VPCs, it does not inherently provide encryption in transit between Google's network edges unless you configure specific security measures, and more importantly, it relies on static routes. It does not support dynamic routing protocols like BGP out of the box.

Option D, deploying HA VPN gateways with Cloud Routers and configuring BGP sessions, directly addresses all constraints. HA VPN provides high availability by creating multiple tunnels across different physical paths. It encrypts traffic over the public internet (or dedicated interconnect if used, but standard HA VPN implies IPsec). Crucially, it supports Border Gateway Protocol (BGP) for dynamic route exchange, which allows the networks to automatically adapt to topology changes. This matches the 'dynamic routing' requirement perfectly.

The suggested answer A is incorrect because while VPC peering is secure and private within Google's backbone, it lacks built-in dynamic routing capabilities and may not meet strict 'encrypted connection' requirements depending on the security posture definition (though intra-GCP traffic is encrypted, external-facing or hybrid scenarios often require explicit encryption like VPN). Furthermore, the prompt explicitly asks for dynamic routing, which peering does not offer natively without additional complex configurations or third-party tools. Option C suggests Classic VPN with static routes, failing the 'dynamic routing' requirement. Option B involves Private Service Connect, which is for service consumption, not general inter-VPC communication.

Exam Strategy

When a question mentions 'dynamic routing' in the context of network connectivity, immediately rule out solutions that rely solely on static routes or default behavior. Look for keywords like 'BGP', 'Cloud Router', or 'Dynamic Route Exchange'. For multi-select or scenario-based questions, verify every constraint: 'High Availability' often implies redundancy (multiple tunnels/gateways), and 'Encrypted' might point to VPN or SSL/TLS rather than just private backbone access.

Frequently Asked Questions

Does VPC Peering encrypt traffic?

Traffic between peered VPCs travels over Google's private backbone and is integrity-protected. However, it does not use IPsec encryption like VPNs. For strict encryption requirements, HA VPN is preferred.

Can VPC Peering use dynamic routing?

No, VPC Peering only supports static routes. To achieve dynamic routing between VPCs, you must use HA VPN with BGP or Cloud Interconnect with Cloud Router.

What is HA VPN?

HA VPN is a fully managed, highly available VPN solution based on IPsec. It provides automatic failover and supports dynamic routing via BGP when paired with Cloud Router.

More PCNE FAQ →

Community Votes

A
100%

100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 1 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 1

  1. Martrin 👍 1 Answered A
    The correct answer is A. According to google documentation, traffic in VPC peering is encrypted, no need for a VPN: https://docs.cloud.google.com/docs/security/encryption-in-transit#gcp-virtual "" VM-to-VM connections within VPC networks and peered VPC networks inside of Google's production network are integrity-protected and encrypted ""

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All PCNE Questions

Access 80 questions with complete answers and detailed explanations.

View Full PCNE Practice Test →

← Back to PCNE Study Guide