Configuring VPC Network Peering
- Get link
- X
- Other Apps
Configuring VPC Network Peering
Configuring VPC Network Peering
VPC Network Peering in Google Cloud allows two VPC networks to communicate privately using internal IP addresses, without sending traffic over the public internet.
Simple example
Suppose you have:
VPC-A VPC-B 10.10.0.0/16 10.20.0.0/16 │ │ VM-A ───── VPC Peering ───── VM-B 10.10.0.5 10.20.0.5
VM-A can communicate with VM-B using:
10.20.0.5
There is no need for an external/public IP for this communication.
How it works
Normally:
VPC-A ❌ VPC-B
They are isolated.
After peering:
VPC-A ←──── private connection ────→ VPC-B
Routes are automatically exchanged between the peered VPC networks.
Important points to remember
| Concept | VPC Peering |
|---|---|
| Communication | Private |
| Uses internal IPs | ✅ |
| Public internet required | ❌ |
| Same organization | Not required |
| Same project | Not required |
| Different projects | ✅ |
| Different organizations | ✅ |
| Automatic route exchange | ✅ |
| Transitive peering | ❌ |
⚠️ Most important: No transitive peering
Suppose:
VPC-A ←→ VPC-B ←→ VPC-C
This does NOT mean:
VPC-A ←→ VPC-C
VPC peering is not transitive.
If A needs to communicate directly with C, you need a direct connectivity design between them.
Real-world example
Imagine:
Company A │ └── VPC: Application │ │ Peering ↓ Company B │ └── VPC: Database
The application servers in Company A can privately access the database in Company B:
Application VM 10.10.1.10 │ │ VPC Peering ↓ Database VM 10.20.1.20
This is useful when two independent VPC environments need private connectivity without exposing services through public IPs.
VPC Peering vs Shared VPC
A simple way to remember:
Shared VPC
"I want multiple projects in the same organization to use a centrally managed VPC."
VPC Peering
"I have separate VPC networks and want them to communicate privately."
And importantly, VPC Peering can connect VPCs across different organizations, whereas Shared VPC is an organization-level architecture.
If you're studying the "Configuring VPC Network Peering" GCP module, the next important part is understanding how to create peering from both sides (Network A → Network B and Network B → Network A) and what happens to the routes.
- Get link
- X
- Other Apps
Comments
Post a Comment