Prepare and test your skills

Prepare and test your skills

VPC Network Peering (opens in a new tab) is a method for connecting two separate Virtual Private Cloud (VPC) networks so resources communicate using private, internal IP addresses. Traffic between peered networks stays internal and does not travel over the public internet, which keeps communication private. Peering is configured between two VPC networks, and each network continues to manage its own subnets, firewall rules, and routes.
Private internal communication between VPC networks means a virtual machine (VM) in one VPC network reaches a VM in a peered VPC network by its internal IP address. Each VM network interface has a primary internal IP address from the primary CIDR range of its subnet, and it can also have optional alias IP ranges for extra addresses on the same interface. All alias IP addresses on an interface share the same default gateway as the primary IP address, because all subnets in a VPC network share a single default gateway. Google Cloud automatically configures internal DNS only for the primary IP of the primary interface of every VM, and that lookup works only in the network that contains the primary interface. Google Cloud does not automatically map alias IP addresses or secondary interface addresses to the host name, so extra DNS must be configured manually when those addresses need names across peered networks. All ingress and egress traffic, including traffic to alias IP ranges, is still checked by VPC firewall rules for a matching target tag or target service account.
Managing non-overlapping IP address ranges means ensuring no subnet range in one peered VPC network overlaps a range in the other, so each internal address routes to only one destination. In custom-mode networks, all subnets are created manually, one primary CIDR range is required for each subnet, and secondary CIDR ranges are optional. In auto mode networks, a new subnet with secondary ranges can be added as long as none of its ranges overlap with 10.128.0.0/9. The primary IP and any alias IP range on the same interface must come from CIDR ranges that belong to the same subnet resource:
10.128.1.0/24, a single address using /32 such as 10.128.7.29/32, or an auto-allocated range specified by netmask such as /24./32 alias IP range.Non-transitive peering relationships mean connectivity does not automatically pass through an intermediate VPC network to a third network. If VPC network A is peered with VPC network B, and VPC network B is peered with VPC network C, VPC network A does not automatically gain connectivity to VPC network C. Each pair of VPC networks that needs direct internal communication requires its own peering relationship. Routing has a related boundary for instance next hops. When a static route uses a next hop instance specified by an internal IPv4 address, Google Cloud checks that the address fits within a subnet range in the route's VPC network. Google Cloud programs the route only if the next hop is a primary internal IPv4 address on a VM interface in that same VPC network, not a VM in a peered VPC network.
Exam tip: A static route next hop must be a primary internal IP in the route's own VPC network; an alias IP or an address in a peered VPC network cannot be used as the next hop.
Cloud VPN (opens in a new tab) is a Google Cloud networking service that connects a VPC network to an external environment over the public internet using secure, encrypted tunnels. Traffic flows from the on-premises network to the VPC network through an IPsec tunnel, and return traffic flows back through the same encrypted path. Border Gateway Protocol (BGP) (opens in a new tab) provides dynamic routing for the connection by automatically exchanging routing and reachability information between the two sides.
High Availability (HA) VPN tunnels are the Cloud VPN deployment that provides secure, encrypted connectivity over the public internet with high reliability. An HA VPN configuration creates encrypted tunnels between the Google Cloud VPC and the on-premises gateway, so private workload traffic can cross the internet without giving the workloads public IP addresses. The service scales through Equal-Cost Multi-Path (ECMP) routing, which spreads traffic across multiple tunnels, and HA VPN carries a 99.99% service availability SLA. Packet size is described by two related limits. Cloud VPN gateway MTU is the largest IP packet, including headers, data, and IPsec overhead, supported by a tunnel. Cloud VPN payload MTU is the largest original IP packet, including headers and data but not IPsec overhead, that can be encrypted and sent without fragmentation. Because encapsulation adds overhead, the payload MTU is lower than the gateway MTU.
Dynamic routing with Border Gateway Protocol means route changes on either side are learned automatically instead of being configured as static routes. Border Gateway Protocol (BGP) is an exterior gateway routing protocol that exchanges routing and reachability information among autonomous systems on the internet. An autonomous system (AS) is a collection of connected IP routing prefixes under control of one administrative domain, such as an enterprise or internet service provider, that presents a common routing policy. Each autonomous system that uses BGP is identified by a unique autonomous system number (ASN). A device is BGP-capable when BGP can be enabled on it and it can be assigned a BGP IP address and an ASN, which allows it to peer with the Google Cloud side. BGP peers can use MD5 authentication, in which both peers must be configured with the same authentication key before a connection can be established and every routed segment between them is then verified.
Benefits and limitations of Cloud VPN describe when internet-based encrypted connectivity fits and what tradeoffs it carries. Cloud VPN fits when private networks must be joined over the internet with encryption and dynamic routing. Its strengths center on flexible topologies and availability:
Its limitations center on management, cost, and throughput:
Exam tip: Choose HA VPN when you need the 99.99% availability SLA, and remember that throughput per tunnel is still limited and traffic is billed at internet egress rates.
Cloud Interconnect (opens in a new tab) is a service that creates a direct physical connection between an on-premises network and a Google Cloud VPC network. Traffic flows from the on-premises router across a private circuit to the Google network edge and then into the VPC, without traveling over the public internet. This private path provides lower latency, higher bandwidth, and more consistent performance than an internet-based VPN, which makes Cloud Interconnect the choice for high-volume and reliability-sensitive hybrid workloads.
Dedicated Interconnect is a direct physical connection between an organization's own routers and Google's network in a colocation facility. The organization provisions one or more dedicated circuits, then traffic flows from the on-premises network over those circuits to VLAN attachments in the VPC. Because the organization controls the full circuit, Dedicated Interconnect supports very high data volume and predictable performance for large migrations, continuous replication, and steady hybrid traffic.
Partner Interconnect is a connection to Google Cloud through a supported service provider partner rather than a direct circuit to Google. Traffic flows from the on-premises network to the partner's network, then from the partner to VLAN attachments in the VPC. The partner manages the physical link to Google, so the organization does not need equipment in a Google colocation facility. Choose Partner Interconnect when direct facility presence is not practical or when bandwidth needs are moderate and flexibility matters more than maximum capacity.
Choosing between Dedicated and Partner Interconnect depends on ownership, capacity, and deployment effort, while both options keep hybrid traffic off the public internet:
| Option | How it connects | Choose when |
|---|---|---|
| Dedicated Interconnect | Direct physical circuit from customer routers to Google | Data volume is very high, reliability needs are strict, and the team can deploy in a colocation facility |
| Partner Interconnect | Circuit through a partner provider to Google | Direct facility access is not available, startup must be faster, or bandwidth needs are lower and variable |
Both options depend on Cloud Router to exchange routes with the on-premises network using Border Gateway Protocol (BGP). First the VLAN attachment connects the circuit to the VPC, then Cloud Router learns on-premises routes and advertises VPC routes back. This order matters because traffic can only flow in both directions after the attachment exists and BGP sessions are established.
Exam tip: Choose Dedicated Interconnect for maximum bandwidth and direct control, and choose Partner Interconnect when you need private connectivity without placing equipment in a Google facility.
Virtual Private Cloud (VPC) Network Peering is non-transitive, so if network A is peered with network B and network B is peered with network C, network A does not automatically gain connectivity to network C. Each pair of networks that needs direct internal communication requires its own peering relationship, and traffic between peered networks stays internal using private internal IP addresses without traveling over the public internet.
Use Cloud VPN when private networks must be joined over the public internet with encryption and dynamic routing, while Cloud Interconnect is for high-volume and reliability-sensitive workloads that need a private physical circuit off the public internet. Cloud VPN uses secure encrypted IPsec tunnels with Border Gateway Protocol (BGP) for dynamic routing, while Cloud Interconnect provides lower latency, higher bandwidth and more consistent performance than an internet-based VPN.
Dedicated Interconnect is a direct physical connection between an organization's own routers and Google's network in a colocation facility, while Partner Interconnect connects through a supported service provider partner that manages the physical link to Google. Choose Dedicated Interconnect when data volume is very high and the team can deploy in a colocation facility, and choose Partner Interconnect when direct facility access is not available or bandwidth needs are lower and variable.
An enterprise organization operates two separate VPC networks named vpc-app (using subnet 10.10.0.0/16) and vpc-data (using subnet 10.20.0.0/16) across two different Google Cloud projects.
Workloads in vpc-app need to communicate directly with database VMs in vpc-data using private internal IP addresses without traffic traversing the public internet or incurring the latency and maintenance of virtual routing appliances.
Which solution should you implement to establish this private internal communication?
Last updated