Prepare and test your skills
Prepare and test your skills
Design dynamic routing and traffic management is the use of Cloud Router (opens in a new tab) with Border Gateway Protocol (BGP) to exchange routes automatically between Google Cloud and peer networks. Cloud Router advertises Virtual Private Cloud (VPC) subnets to the peer and learns peer routes in return, so traffic can fail over between high-availability tunnels without manual static routes. This design supports multicloud links and Google Cloud-to-Google Cloud communication across regions.
Cloud Router is a regional service that manages BGP sessions for Cloud VPN tunnels and VLAN attachments. Each Cloud Router belongs to one VPC network in one region and uses one Google autonomous system number (ASN) for all of its BGP sessions. The Google ASN must be a private ASN in the range 64512 through 65534 or 4200000000 through 4294967294 that is not already used in the same network, and the ASN cannot be changed after the router is created.
A BGP session runs over each VPN tunnel and depends on a Cloud Router interface that is bound to that tunnel. Traffic flows from the VPC network to the Cloud Router interface, through the VPN tunnel to the peer gateway interface, and then into the peer network. A Cloud Router used for VPN must not already manage a BGP session for a VLAN attachment associated with a Partner Interconnect connection, and it should not be shared with Cloud NAT. The peer gateway must also support BGP, and the VPC network should use global BGP routing mode so learned routes apply across regions.
An HA VPN gateway (opens in a new tab) is a regional high-availability VPN gateway with two interfaces, each with its own automatically assigned external IP address. A Cloud VPN tunnel (opens in a new tab) connects one HA VPN gateway interface to one peer gateway interface, and a BGP session runs on top of each tunnel to exchange routes. To receive a 99.99% availability agreement, tunnels must be configured on both HA VPN gateway interfaces.
Two Google Cloud VPC networks, each with a Cloud Router and an HA VPN gateway with two interfaces, are connected by two IPsec tunnels: tunnel 0 links interface 0 to interface 0 and tunnel 1 links interface 1 to interface 1, each carrying a BGP session over IKEv2 for 99.99% availability.
Building the connection follows an ordered dependency where each step depends on the previous one:
0 to peer interface 0 and a second tunnel from HA VPN interface 1 to peer interface 1, using matching pre-shared keys and IKEv2.For Google Cloud-to-Google Cloud communication, the same pattern is used on both sides with a Cloud Router in each VPC network. Tunnel 0 from the first gateway must connect to interface 0 of the second gateway, and tunnel 1 must connect to interface 1 of the second gateway. If interface addresses are mismatched, the tunnels are not established. IPv6 traffic requires IKEv2 and a dual-stack or IPv6 stack type, and the stack type cannot be changed after the gateway is created.
An external VPN gateway (opens in a new tab) resource represents the peer side of the connection, and its redundancy type is inferred from the number of peer interfaces configured. The interface identification numbers must match the documented values for each redundancy level. The external VPN gateway resource sits outside the Google Cloud trust boundary but is managed inside the Google Cloud project, and the HA VPN gateway depends on this resource to know which peer IP address belongs to each tunnel.
| Peer configuration | Interfaces | Redundancy type |
|---|---|---|
| Single peer gateway with one IP | ID 0 | SINGLE_IP_INTERNALLY_REDUNDANT |
| Peer gateway with two IPs, or two peer gateways with one IP each | IDs 0 and 1 | TWO_IPS_REDUNDANCY |
| Peer gateways with four IPs, such as Amazon Web Services (AWS) | IDs 0, 1, 2, and 3 | FOUR_IPS_REDUNDANCY |
Choosing four interfaces is required when the peer cloud exposes four VPN endpoints, while one or two interfaces fit simpler on-premises or single-device peers.
Advertised route priority controls how Cloud Router steers return traffic across the tunnel pair. By default, both BGP sessions advertise routes with unmodified base priorities, which creates an active-active configuration where both tunnels carry traffic. This default is used when the Google Cloud side and peer side advertise the same priorities to each other.
An active-passive configuration uses unequal base priorities so one tunnel is preferred. For example, BGP session and tunnel 1 advertises priority 10 while session and tunnel 2 advertises priority 20, so traffic flows from the VPC network through tunnel 1 first and only uses tunnel 2 after a failure. Custom route advertisement can further limit which prefixes are advertised by setting advertisement mode to custom and specifying IP ranges. After tunnels and BGP sessions are created, the peer gateway must be configured, firewall rules must allow the traffic, and tunnel status must be checked before production use.
Exam tip: A 99.99% agreement requires VPN tunnels on both HA VPN gateway interfaces; a single tunnel does not qualify even if BGP is configured.
Inter-VPC and cross-organization communication is the set of private networking methods that let separate VPC networks exchange traffic while keeping their isolation boundaries. A Virtual Private Cloud (VPC) (opens in a new tab) network is a completely isolated, private network partition, so workloads in one VPC network cannot communicate with workloads in another VPC network by default. VPC networks in Google Cloud are global, which means subnets in different regions within the same VPC network communicate privately over Google's backbone using local VPC routes.
Enterprises create separate VPC networks for organizationally meaningful isolation:
Because each VPC network has its own private IP address space, the same address can be reused in different VPC networks without conflict as long as those networks are not connected or peered.
VPC Network Peering is a direct peering connection that lets workloads in two different VPC networks communicate internally using internal IP addresses. Traffic from one peered VPC network to the other peered VPC network stays within Google's network and does not traverse the public internet. Peering works whether the two VPC networks are in the same project, in different projects, or in projects in different organization resources.
VPC Network Peering merges the control plane and route propagation between the two peers, so forwarding behaves as if all virtual machines (VMs) were in the same VPC network. Peered networks automatically exchange subnet routes for private ranges, with optional exchange of privately reused public ranges and custom static and dynamic routes. Each peered VPC network maintains its own distributed firewall, and Identity and Access Management (IAM) policies are never exchanged, so administrators of one peered network do not gain roles in the other network. VPC Network Peering requires that the peered networks do not have overlapping IP addresses and is not transitive. In a hub-and-spoke design, each workload spoke VPC network peers with a central routing hub VPC network, but spoke VPC networks cannot reach each other or on-premises through the hub alone. Choose VPC Network Peering when full VM-to-VM reachability is needed at VM bandwidth, or when network virtual appliances (NVAs) must inspect traffic between VPC networks, while respecting limits on VM instances, peering connections, and internal forwarding rules.
Shared VPC is a sharing model that lets one host project share a common VPC network with one or more service projects in the same organization resource. The VPC networks in the host project are called Shared VPC networks, and eligible resources from attached service projects can use subnets in the Shared VPC network. Resources in different service projects then communicate securely using internal IP addresses from the shared network.
Shared VPC separates network administration from workload administration to enforce least privilege. Central network and security administrators control subnets, routes, and firewalls in the host project, while instance administrators in service projects can only create and manage VMs and deploy workloads into designated subnets. Access can be granted to an entire Shared VPC network or to select subnets using specific IAM permissions. Shared VPC supports stronger environment separation by using multiple host projects with multiple service projects. For example, one host project can hold a production Shared VPC network and another host project can hold a testing Shared VPC network, with separate service projects attached to each. Choose Shared VPC when teams need centralized network control with delegated workload deployment inside one organization.
Private Service Connect is a service-level private access model with consumers on one side and producers on the other side. Consumers access a service privately from inside their own VPC network without merging networks, and producers host the service in their own separate VPC network and offer a private connection to those consumers. The connection works within the same organization or across different organizations.
Private Service Connect preserves strict network isolation because only the published service is reachable, not the entire producer VPC network. The consumer VPC network initiates a private connection to the producer attachment, and traffic stays private without requiring external IP addresses or a network-wide peering relationship. Choose Private Service Connect when the goal is to expose a specific service across projects or organizations while keeping each VPC network administratively and topologically separate.
The three private communication methods differ by how much of the network is shared and where they operate. Shared VPC centralizes control inside one organization, VPC Network Peering provides full private reachability between distinct networks, and Private Service Connect exposes only a service without merging networks.
| Method | Connectivity model | Works across organizations | Isolation boundary |
|---|---|---|---|
| VPC Network Peering | Two VPC networks exchange routes and communicate VM-to-VM with internal IPs | Yes, across projects and organizations | Each VPC network keeps its own firewall and IAM; peering is not transitive |
| Shared VPC | Multiple service projects share subnets in one host-project VPC network | No, projects connect to a common VPC network inside one organization resource | Central control of network resources with delegated VM creation in service projects |
| Private Service Connect | Consumer VPC network connects privately to a producer service in a separate VPC network | Yes, within the same organization or across organizations | Only the published service is exposed; VPC networks are not merged |
Use Shared VPC for centralized subnet and firewall management inside one organization, use VPC Network Peering for full private VM reachability between distinct VPC networks, and use Private Service Connect for private service consumption without broad network access.
Exam tip: VPC Network Peering is not transitive and requires non-overlapping IP addresses, so spoke VPC networks peered to the same hub cannot reach each other through the hub alone.
Hybrid and multicloud connectivity refers to the connections that link on-premises networks, Google Cloud, and other cloud environments together. These connections carry all inter-environment traffic, so bandwidth, latency, packet loss, and jitter directly affect application performance. Google Cloud provides Cloud VPN (opens in a new tab) for private secure connectivity over the public internet, Dedicated Interconnect and Partner Interconnect for private connectivity over private transport, and Cross-Cloud Interconnect for direct cloud-to-cloud links. All of these options pair with Cloud Router to exchange routes dynamically with a VPC network.
Cloud VPN is a service that extends a peer network to Google's network through an Internet Protocol Security (IPsec) VPN tunnel. Traffic traveling between the two networks is encrypted by one VPN gateway and decrypted by the other VPN gateway as it traverses the internet. Cloud VPN costs less than Cloud Interconnect but provides lower bandwidth and less deterministic performance. A High Availability (HA) VPN deployment can meet up to 99.99% availability when built with the conforming architecture.
Choose Cloud VPN when needs are modest, costs must stay low, or teams are experimenting with migration to Google Cloud. Cloud VPN is a good fit for non-mission-critical use cases, for extending connectivity to other cloud providers at low bandwidth, and for getting started before upgrading to Interconnect as bandwidth grows. Individual VPN tunnels have bandwidth limits, so deployments must create a sufficient number of tunnels to handle expected traffic.
Dedicated Interconnect is a direct physical connection from customer routers to Google's network that provides enterprise-grade throughput and reliability. Traffic flows directly between the external network and the VPC network and does not traverse the public internet. Setup requires installing and maintaining routing equipment in a colocation facility where Google has a presence that supports the target regions. The customer configures Border Gateway Protocol (BGP) on both on-premises routers and Cloud Routers.
Connection capacity is delivered over one or more 10-Gbps, 100-Gbps, or 400-Gbps Ethernet circuits, with a maximum of 8 circuits per Dedicated Interconnect connection. Flexible Virtual Local Area Network (VLAN) attachment capacities range from 50 Mbps to 50 Gbps, which makes Dedicated Interconnect cost-effective for high bandwidth needs. Google offers an end-to-end service level agreement (SLA) for Google-defined topologies, and encryption is added by deploying HA VPN over Cloud Interconnect.
Partner Interconnect is dedicated connectivity to VPC networks through a supported service provider that connects directly to Google. Traffic flows between networks through the service provider and not through the public internet. Partner Interconnect offers more points of connectivity than Dedicated Interconnect colocation facilities and does not require the customer to install and maintain routing equipment in a colocation facility. Use Partner Interconnect when the team cannot physically meet Google in a colocation facility or needs flexible capacity without managing physical circuits.
Each VLAN attachment provides flexible capacity from 50 Mbps to 50 Gbps, so customers pay only for the capacity they need. Increases in attachment count or capacity depend on the service provider's available capacity. For Layer 2 connections, BGP is configured on both on-premises routers and Cloud Routers, while for Layer 3 connections Cloud Router configuration is fully automated and on-premises configuration depends on the provider. Google provides an SLA for the connection between Google and the service provider, and the provider may provide an end-to-end SLA.
Cross-Cloud Interconnect is a dedicated physical connection that Google provisions between a Google Cloud VPC network and a network hosted by another cloud service provider. To satisfy the Cloud Interconnect SLA, the customer purchases two connections, a primary connection and a redundant connection, for each cloud provider. A different pair of connections is required when connecting to more than one provider. Supported providers include:
Cross-Cloud Interconnect delivers line-rate performance with high-availability options of 99.9% and 99.99%, which helps lower total cost of ownership without managing intermediate networking equipment. Throughput reaches up to 100 Gbps per link, and Media Access Control Security (MACsec) encryption is supported when network-layer encryption in transit is required. Select locations based on proximity to target regions by checking supported Cross-Cloud Interconnect locations and evaluating latency between the point of presence edge and the relevant region in each cloud.
Cloud Router is a distributed and fully managed service that provides BGP speaker and responder functionality for hybrid and multicloud links. Cloud Router works with Cloud Interconnect, Cloud VPN, and router appliances to create dynamic routes in VPC networks based on BGP-received and custom-learned routes. Routes to the external network learned by Cloud Routers are applied as custom dynamic routes in the VPC network. This dynamic exchange allows route changes to propagate automatically instead of requiring manual updates on every network.
The choice between connectivity options depends on bandwidth demand, privacy requirements, ability to reach a colocation facility, cost sensitivity, and whether the far end is on-premises or another cloud. Cloud VPN suits lower-cost and lower-bandwidth starts, Dedicated Interconnect suits demanding enterprise throughput with direct control, Partner Interconnect suits flexible capacity through a provider, and Cross-Cloud Interconnect suits direct multicloud links.
| Option | Network path | Capacity and setup |
|---|---|---|
| Cloud VPN | Private secure path over public internet with IPsec encryption between VPN gateways | Lower bandwidth than Interconnect; choose when cost is constrained or workloads are experimental |
| Dedicated Interconnect | Direct connection to Google with traffic flowing directly between networks | 10-Gbps, 100-Gbps, or 400-Gbps circuits up to 8 per connection with VLAN attachments from 50 Mbps to 50 Gbps; requires equipment in a colocation facility |
| Partner Interconnect | Dedicated path through a supported service provider, not the public internet | VLAN attachments from 50 Mbps to 50 Gbps; uses any supported provider with no colocation equipment to maintain |
| Cross-Cloud Interconnect | Dedicated physical connection provisioned by Google between Google Cloud and another cloud | Up to 100 Gbps per link with paired primary and redundant connections; requires a separate pair per cloud provider |
Cloud Interconnect variants keep traffic off the public internet and provide access to all Google Cloud products and services except Google Workspace, plus access to supported APIs through Private Google Access from on-premises hosts. Add HA VPN over Cloud Interconnect or MACsec when encryption at the connectivity layer is required. For production reliability, use Google-defined 99.99% topologies, which normally connect into two different Google Cloud regions from different metros across distinct zones.
Exam tip: Dedicated Interconnect requires customer routing equipment in a colocation facility, while Partner Interconnect connects through a supported provider with no colocation equipment to maintain.
Virtual Private Cloud (VPC) Network Peering provides full private virtual machine to virtual machine reachability between two distinct VPC networks, Shared VPC lets service projects share subnets in a host-project VPC network inside one organization, and Private Service Connect exposes only a specific producer service to consumer VPC networks without merging networks. VPC Network Peering works across projects and organizations but is not transitive and requires non-overlapping IP addresses, Shared VPC works only inside one organization resource with centralized network control, and Private Service Connect works within the same organization or across organizations while keeping each VPC network administratively and topologically separate.
Cloud VPN provides private secure connectivity over the public internet with Internet Protocol Security (IPsec) encryption and costs less but provides lower bandwidth and less deterministic performance, so choose it for modest, low-cost, non-mission-critical or experimental needs and for low-bandwidth links to other clouds before upgrading to Interconnect as bandwidth grows. Choose Dedicated Interconnect for enterprise-grade throughput with direct circuits when you can install routing equipment in a colocation facility, Partner Interconnect for dedicated capacity through a supported provider without colocation equipment, and Cross-Cloud Interconnect for dedicated physical links between a Google Cloud VPC network and another cloud provider with paired primary and redundant connections.
A 99.99% availability agreement requires VPN tunnels configured on both High Availability (HA) VPN gateway interfaces, with a Border Gateway Protocol (BGP) session running over each tunnel through a Cloud Router interface bound to that tunnel. The Cloud Router must be in the same region and Virtual Private Cloud (VPC) network as the gateway and use one private Google autonomous system number, and for Google Cloud to Google Cloud communication tunnel 0 must connect to interface 0 and tunnel 1 must connect to interface 1 or the tunnels are not established.
An enterprise is deploying a multicloud architecture connecting its Google Cloud Virtual Private Cloud (VPC) network directly to workloads hosted in Amazon Web Services (AWS).
The networking team defines the following requirements and constraints:
Which hybrid and multicloud connectivity solution should the enterprise choose?
Last updated