What Is Virtual Network Peering? Private Paths Between Two Networks and Their Limits
Virtual network peering creates a private IP path between two otherwise separate cloud networks, so workloads can communicate without using the public internet. Creating the peering alone does not allow all traffic: the address ranges must be compatible, the connection must be accepted and active, and routes and firewall rules on both sides must permit the flow. Most basic peering is also non-transitive, so it cannot act as a router from one peer through a third network to another.
Virtual network peering creates a private IP path between two otherwise separate cloud networks, so workloads can communicate without using the public internet. Creating the peering alone does not allow all traffic: the address ranges must be compatible, the connection must be accepted and active, and routes and firewall rules on both sides must permit the flow. Most basic peering is also non-transitive, so it cannot act as a router from one peer through a third network to another.
What does peering connect?
Each virtual network has its own address space, routes, and security boundary. Peering is a logical connection that lets the two networks exchange or use private routes. For example, a request from an application VPC using 10.20.0.0/16 to a data VPC using 10.30.0.0/16 can traverse the cloud provider’s private network when both sides route the destination through the peering connection.
Peering does not erase the network boundaries. Administrative ownership, firewall rules, and resource permissions remain separate. A route between networks does not automatically open a virtual machine firewall or grant database or application credentials. A private path, a network rule that permits traffic, and service-level authorization are different requirements.
Why check address ranges and owner approval first?
Each network’s CIDR describes the IP range it can advertise or use. If the peer ranges overlap, a destination IP can be ambiguous: the router cannot tell which network’s resource is intended. AWS VPC Peering rejects overlapping CIDR blocks, and Google Cloud checks for overlapping subnet routes. Planning non-overlapping address space early preserves future connectivity options.
When accounts or projects differ, the other network owner commonly has to accept the request. In AWS, the requester and accepter establish the peering, and both owners add routes to the peer CIDR even after the connection becomes Active. Google Cloud route exchange depends on peering settings; Azure requires peering links on both virtual networks. Check the provider’s current connection state and both sides’ configuration because exact labels and behavior vary.
Is creating a peering connection enough?
No. At least three layers must work together:
**Peering state:** required requests and approvals are complete.
**Routes in both directions:** the sender has a route for the peer’s CIDR, and the other network has a return route. Managed peering may exchange some subnet routes automatically, depending on configuration.
**Security and service permissions:** firewalls, security groups, or network ACLs permit the actual source, destination, protocol, and port; service authentication and authorization also succeed.
Hypothetical example: a VM in an application VPC connects to a database in a data VPC on TCP port 5432. Even with non-overlapping ranges and approved peering, the connection fails if the application subnet lacks a route to the data CIDR or the database side blocks TCP 5432 from the application CIDR. Inspect routes and security rules separately, then test with a database client. An Active peering status alone does not prove that packets can flow.
The common trap: peering is not transitive
Basic peering is generally a one-to-one connection and does not transitively forward routes. If network A peers with B and also with C, B cannot automatically send traffic through A to C. You can create a direct B-to-C peering when that is appropriate, but the number of links and route sets grows as the network count rises.
If several application networks need access only to a shared data network and do not need to talk to each other, separate peer links can form a simple hub-like layout. If every spoke must communicate with the others, compare a managed hub or transit gateway that supports transit routing. A peer also cannot automatically use another VPC’s internet gateway, NAT, VPN, or dedicated connection; gateway transit is available only where the provider explicitly supports and configures it.
When should you choose peering or another option?
Peering fits a small number of networks when a direct private path is simple and the reachable address ranges and traffic can be controlled clearly. It can be useful when direct connectivity meets latency or throughput needs. If consumers should reach only one managed service, a service endpoint such as PrivateLink, Private Service Connect, or Private Endpoint may provide a narrower boundary than connecting whole address spaces.
For many VPCs, centralized routing, transit between spokes, central inspection, or hybrid connectivity, compare a transit gateway, network hub, VPN, or dedicated circuit. Consider not only network count but also overlapping IP ranges, transitivity, control over route exchange, where traffic is inspected, operational ownership, regional support, and cost model. Pricing and quotas change by provider, region, and time; verify official documentation before deployment.
| Requirement | First option to consider | Why and what to watch |
|---|---|---|
| Private paths between resources in two networks | Peering | Simple point-to-point connection; requires non-overlapping CIDRs and has no transit by default |
| Expose one managed service | Service endpoint | Targets a specific service instead of an entire network |
| Connect many networks with transit routing | Transit hub or gateway | Can centralize policy and scale, but needs additional design and cost review |
| Encrypted or policy-controlled connection to on-premises | VPN or dedicated connectivity | Uses a different boundary and operating model |
How should you troubleshoot a failed connection?
First confirm the connection is active on both sides and is not awaiting acceptance. Check that peer CIDRs do not overlap and that routes exist in both directions. Then verify that security groups, network firewalls, and ACLs allow the actual source, destination, protocol, and port. If clients use DNS names, confirm those names resolve correctly across the peer. AWS and Google Cloud document separate limitations and configuration for DNS visibility, so do not assume peering automatically shares name resolution.
Finally, check application authentication, database permissions, and TLS settings. If peering is active but traffic still fails, use flow logs or network observability to identify where packets stop. Review one route or rule at a time. Avoid temporarily allowing every address and port; test only the required source, destination, and port, then restore the intended narrow rule.
References
[How AWS VPC peering connections work and their limitations](https://docs.aws.amazon.com/vpc/latest/peering/vpc-peering-basics.html)
[Google Cloud VPC Network Peering](https://docs.cloud.google.com/vpc/docs/vpc-peering)
[Azure virtual network peering and spoke connectivity](https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/hybrid-networking/virtual-network-peering)
[AWS VPC connectivity options](https://docs.aws.amazon.com/whitepapers/latest/aws-vpc-connectivity-options/vpc-peering.html)