Professional Cloud Network Engineer
Configuring IKE Security Associations, ciphers, and network firewalls involves setting up the cryptographic parameters and firewall rules that protect site-to-site IPsec VPN connections between Google Cloud and on-premises or other cloud networks. The Internet Key Exchange (IKE) protocol establishes secure communications by negotiating security associations (SAs) between VPN endpoints, while firewall rules must permit the specific protocols and ports that IPsec requires to function.
Google Distributed Cloud (GDC) VPN supports IKEv2 using an IKE pre-shared key (PSK) as the sole authentication method. When creating a VPN tunnel, you specify a pre-shared key, and the peer VPN gateway must be configured with the exact same key to successfully authenticate the connection. This shared secret serves as the basis for establishing trust between the two VPN endpoints before cryptographic parameters are negotiated. In hybrid cloud deployments, such as connecting AWS to Google Cloud, you download the peer configuration to extract this pre-shared key and IKE version for consistent setup on both sides.
GDC VPN only supports site-to-site IPsec VPN connectivity. The peer VPN gateway must have a static external IPv4 address to establish the connection. If the peer gateway is behind a firewall, you must configure rules to pass both the Encapsulating Security Payload (ESP) IPsec protocol and IKE traffic on UDP ports 500 and 4500. UDP port 500 is for initial IKE negotiations, while UDP port 4500 is for NAT-Traversal (NAT-T), which allows the VPN to work through network address translation. On the cloud side, such as AWS, security group inbound rules must allow all protocols and ports from the Cloud VPN IP address range to permit traffic flow through the tunnel.
GDC VPN supports ESP in tunnel mode with authentication. Tunnel mode encapsulates the entire original IP packet within a new IPsec packet, providing complete protection for the traffic. The service does not support Authentication Header (AH) or ESP in transport mode. Each GDC VPN tunnel achieves a throughput of up to 600 Mbps. The VPN supports one-to-one NAT using UDP encapsulation for NAT-T, and the peer gateway must identify itself using its static external IPv4 address, not its internal private IP, for proper NAT-T functionality.
In hybrid cloud deployments, VPC firewall rules must be configured on both sides to permit the IPSec control plane traffic and the routed payload traffic. For Classic VPN configurations using static routing, you add the remote network IP ranges from the peer VPN configuration into the Cloud VPN tunnel settings. The firewall rules on both cloud platforms must align with the CIDR ranges being advertised over the VPN. When using dynamic routing with HA VPN, firewall rules must also match the imported routes from VPC Peering connections, such as allowing traffic on specific ports for database access.
GDC VPN supports dynamic routing through IPv4 BGP sessions for each VPN tunnel, enabling BGP peers to advertise routes to each other automatically. Each BGP session requires IPv4 addresses belonging to the same /30 subnet within the 169.254.0.0/16 range. The BGP keepalive interval is 30 seconds with a hold timer of 90 seconds. MD5 authentication is not supported for BGP sessions. To create a VPN BGP session, you create a VPNBGPPeer object with the remote and local peer specifications, including IP addresses and Autonomous System Numbers (ASNs), enabling dynamic route exchange between networks.
Routing architectures establish how traffic traverses hybrid connections between Google Cloud Virtual Private Cloud (VPC) networks and remote peer environments. When connecting hybrid networks using Classic Cloud VPN, administrators configure tunnels using either static routing or dynamic Border Gateway Protocol (BGP) routing managed by Cloud Router. Selecting the appropriate architecture depends on peer device capabilities, network topology scale, and whether routing decisions are bound to explicit static paths or dynamically exchanged control plane advertisements.
Static routing directs VPC network traffic toward a remote network by defining fixed routes that point to a specific Classic VPN tunnel as the next hop. A static route applies by default to all virtual machines (VMs) across all regions within the VPC network. Administrators can restrict the applicability of a static route to specific workloads by configuring network instance tags during route creation. Choose static route-based architectures when connecting to peer VPN gateways that lack dynamic routing capabilities or when specific VM-level routing isolation is required via instance tags.
Dynamic routing uses Cloud Router as an external BGP (eBGP) speaker to exchange network reachability information automatically between Google Cloud and peer networks. Cloud Router operates strictly within the control plane and programs routes into the Google Cloud software-defined network (SDN). Network administrators can configure Cloud Router in either regional or global routing modes to control subnet advertisement boundaries. In regional mode, Cloud Router advertises only local subnets within its region, whereas global mode advertises all subnets across the VPC network while applying a Multi-Exit Discriminator (MED) metric penalty for cross-region routes.
Architectural selection between static route-based routing and dynamic routing depends on network scalability, routing symmetry requirements, and configuration management overhead. Static routing allows granular VM targeting using instance tags but introduces administrative burden because path changes and route updates must be manually provisioned. Dynamic routing automates path updates and enforces symmetrical regional transit paths by using regional metric penalties, but it does not support tag-based route filtering. For scalable and automated route synchronization, dynamic routing via Cloud Router is the standard best practice across supported hybrid topologies.
To diagnose tunnel connectivity and evaluate redundancy limitations, you must understand how Classic VPN gateways and tunnels operate, how they differ from the modern High-Availability VPN (HA VPN), and the tools available for troubleshooting. This involves analyzing handshake failures, assessing service-level agreement (SLA) constraints, and understanding the operational limits that impact redundancy and availability.
Diagnosing VPN tunnel connectivity begins with investigating the Internet Key Exchange (IKE) handshake failures for Phase 1 (IKE SA establishment) and Phase 2 (IPsec SA establishment). You use Cloud Logging and Cloud Monitoring to inspect logs and metrics for these failures. The logs provide detailed error codes and status messages indicating why the handshake did not complete, such as mismatched pre-shared keys, incompatible encryption algorithms, or unreachable peer IP addresses. Monitoring allows you to track the health and state of VPN tunnels over time, identifying intermittent failures that could affect redundancy.
Classic VPN gateways have inherent redundancy and performance limitations that directly impact their SLA. A single Classic VPN gateway provides only a 99.9% availability SLA, as it relies on a single instance without built-in high availability. Its maximum throughput is capped at 3 Gbps, which can become a bottleneck for data-intensive hybrid connections. In contrast, HA VPN is designed for high availability, offering a 99.99% SLA when configured with two active interfaces and tunnels. Evaluating these constraints is critical when diagnosing why a Classic VPN tunnel might fail to meet performance or uptime requirements.
A key part of diagnosing limitations is evaluating the redundancy architecture. A Classic VPN deployment is a single point of failure; if its sole gateway or tunnel fails, the entire connection is lost. To achieve higher availability, you must migrate to HA VPN. The migration pathway involves creating new HA VPN gateways and tunnels, reconfiguring BGP sessions on a new Cloud Router, and updating on-premises peer gateway configurations. HA VPN over Cloud Interconnect is a supported pattern that combines encryption with private backbone connectivity, further illustrating the architectural shift required for improved redundancy.
Operational constraints for Classic VPN include the inability to use internal IP addresses for gateways and no support for IPv6 traffic. When diagnosing connectivity, you must verify that all cryptographic parameters (IKE version, encryption algorithms, Diffie-Hellman groups) match exactly between the Google Cloud gateway and the on-premises peer device. Cloud Logging provides the specific logs for these negotiations. Understanding that Classic VPN is a legacy service helps explain its limitations compared to the modern HA VPN, guiding your troubleshooting focus and long-term remediation plans.
Static routing uses manually configured, fixed routes that point to a VPN tunnel as the next hop and can be applied to specific VMs using tags. Dynamic routing uses Cloud Router and the BGP protocol to automatically exchange and update route information between Google Cloud and the peer network, enabling more scalable and adaptive connectivity.
You should migrate from Classic VPN to HA VPN when you require higher availability (99.99% SLA vs. 99.9%), need to eliminate a single point of failure, or require throughput beyond 3 Gbps. Migration is also advised for new deployments where high availability is a design requirement.
Troubleshoot a failing VPN tunnel by checking Cloud Logging for IKE Phase 1 and Phase 2 handshake errors. Verify that the pre-shared keys, IKE version, encryption algorithms, and peer IP addresses match exactly on both sides of the connection. Also, ensure firewall rules allow ESP protocol and UDP traffic on ports 500 and 4500 to reach the peer gateway.
The key firewall rules must permit the Encapsulating Security Payload (ESP) IPsec protocol and IKE traffic on UDP port 500 for initial negotiations and UDP port 4500 for NAT-Traversal. These rules must be configured on any firewall between the VPN gateways to allow the control plane and encrypted payload traffic to pass.
Prepare and test your skills
Prepare and test your skills