You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Connecting your on-premises network to GCP is a fundamental requirement for hybrid cloud architectures. GCP offers several connectivity options: Cloud VPN for encrypted tunnels over the internet, Dedicated Interconnect for private, high-bandwidth connections, and Partner Interconnect for private connections through a service provider. Choosing the right option depends on bandwidth needs, latency requirements, cost, and how quickly you need the connection.
Cloud VPN provides encrypted IPsec tunnels between your on-premises network and your GCP VPC over the public internet. It is the quickest and most cost-effective way to establish hybrid connectivity.
HA VPN provides a 99.99% SLA with two interfaces and automatic failover:
# Create an HA VPN gateway
gcloud compute vpn-gateways create my-ha-vpn \
--network=my-vpc \
--region=europe-west2
# Create a Cloud Router for BGP
gcloud compute routers create my-router \
--network=my-vpc \
--region=europe-west2 \
--asn=65001
# Create VPN tunnels (one per interface)
gcloud compute vpn-tunnels create tunnel-0 \
--vpn-gateway=my-ha-vpn \
--interface=0 \
--peer-gcp-gateway=peer-vpn \
--region=europe-west2 \
--ike-version=2 \
--shared-secret=my-secret \
--router=my-router
Classic VPN provides a single interface with a 99.9% SLA. It supports both static and dynamic (BGP) routing. Google recommends migrating to HA VPN for new deployments.
| Feature | HA VPN | Classic VPN |
|---|---|---|
| SLA | 99.99% | 99.9% |
| Interfaces | 2 | 1 |
| Routing | BGP (dynamic) required | Static or BGP |
| Bandwidth | Up to 3 Gbps per tunnel (with multiple tunnels for aggregation) | Up to 3 Gbps per tunnel |
| Encryption | IPsec with IKEv2 | IPsec with IKEv1 or IKEv2 |
Dedicated Interconnect provides a private, physical connection between your on-premises network and Google's network at a colocation facility (an Interconnect location). Traffic does not traverse the public internet.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.