GCP Associate Cloud Engineer Practice Question 65: Non Transitive VPC Peering
Google Cloud Associate Cloud Engineer · Test 7 · question 5 of 10
A company has three VPC networks in the same organization: network A, network B, and network C. Network A has a VPC Network Peering connection to network B, and network B has a separate VPC Network Peering connection to network C. A VM in network A can reach VMs in network B, and a VM in network B can reach VMs in network C, but a VM in network A cannot reach any VM in network C. All firewall rules already allow the required traffic, and the subnet IP ranges do not overlap. You need connectivity from network A to network C with the lowest latency and without deploying any additional network appliances.
What should you do?
Show answer and explanation
Answer:
VPC Network Peering is non-transitive: if network A is peered with network B, and network B is peered with network C, resources in network A still cannot reach resources in network C through network B. The only way to get direct connectivity between A and C is to create a separate, direct peering connection between those two networks.
Option A is wrong because exporting custom routes only controls whether routes learned from other peering or hybrid connections on network B are shared over that one peering connection; it does not make the peering transitive, and Google Cloud does not support transitive peering at all. Option B is wrong because you cannot add a route in network A that forwards traffic through a peering connection with network B toward a third network; peering connections carry routes between only the two directly peered networks. Option C is wrong because routing traffic through a VPN gateway in network B, acting as a relay, adds unnecessary infrastructure, cost, and latency when a direct peering connection solves the problem more simply.
Reference: VPC Network Peering overview