Google Cloud VPC – Important Compatibility Features

 Google Cloud VPC – Important Compatibility Features


1. Routing Tables

  • VPCs have built-in routing tables, similar to physical networks.
  • You don't need to create or manage a router.
  • Routes can forward traffic:
    • Between VM instances in the same network
    • Between different subnetworks
    • Between different Google Cloud zones
  • This communication can happen without external IP addresses.

👉 Key idea: VPC routing is managed by Google Cloud automatically.


2. VPC Firewall

  • Google Cloud VPC provides a global, distributed firewall.
  • It controls both:
    • Ingress → incoming traffic
    • Egress → outgoing traffic
  • You don't need to provision a separate physical firewall.

Network Tags

Firewall rules can target Compute Engine VMs using network tags.

Example:

Suppose you have several web servers:

VM1 → WEB
VM2 → WEB
VM3 → WEB

You can create a firewall rule:

Source → Allowed
Port   → 80, 443
Target → WEB tag

This means all VMs tagged WEB can receive HTTP/HTTPS traffic, regardless of their individual IP addresses.

👉 Key idea: Network tags make it easy to apply firewall rules to groups of VMs.


3. VPC Peering

Normally, VPCs belonging to different projects are separate.

If two VPCs need to communicate, you can use VPC Network Peering.

Project A                    Project B
┌─────────────┐              ┌─────────────┐
│   VPC A     │ ←──Peering──→│    VPC B    │
└─────────────┘              └─────────────┘

VPC Peering allows the two VPC networks to exchange traffic using private IP addresses.


4. IAM-Based Cross-Project Access

Another option is to use IAM when you need more centralized control over who can use or manage resources across projects.

The important distinction is:

FeatureMain purpose
RoutingDecides where network traffic goes
FirewallControls which traffic is allowed/blocked
Network TagsApply firewall rules to specific VMs
VPC PeeringConnect two VPC networks
IAMControls identities, permissions, and resource access

🧠 Easy way to remember

VPC = Network + Routing + Firewall

VPC
 ├── Routing → Where should traffic go?
 ├── Firewall → Is traffic allowed?
 ├── Tags → Which VMs does the rule apply to?
 ├── Peering → How can VPCs communicate?
 └── IAM → Who is allowed to manage/access resources?

Comments

Popular posts from this blog

Async/await

First negative in every window of size k

Next Smaller Element