DEV Community

Latchu@DevOps
Latchu@DevOps

Posted on

Part-57: Google Cloud Networking – VPC IP Addresses (External & Internal) in GCP Cloud

In Google Cloud, every resource inside a Virtual Private Cloud (VPC) requires an IP address for communication. These IPs can be internal (private) or external (public), and can be either ephemeral or static depending on how they are assigned. Let’s break it down.


🔹 External IP (Public IP)

  • Accessible from the internet.
  • Typically used by VM instances or Load Balancers.
  • Can be Ephemeral (temporary) or Static (reserved).
  • IPv4 can be provided by Google or brought by you (BYOIP).
  • IPv6 is provided only by Google.

📌 Ephemeral External IP

  • Assigned automatically when you create a resource (e.g., VM).
  • Released if you stop or delete the resource.
  • Best for short-lived workloads.

📌 Static External IP

  • Must be explicitly reserved.
  • Persistent until released manually.
  • Commonly used for:
Load balancers
DNS mappings (e.g., pointing stacksimplify.com to a fixed IP)
Enter fullscreen mode Exit fullscreen mode

📌 Regional vs Global External IP

Regional: Used by VMs, passthrough Network Load Balancers, Cloud NAT, and Cloud VPN.

  • Can use premium or standard network tiers.

Global: Used by Global Application Load Balancers and Proxy Load Balancers.

  • Always uses premium network tier (Google’s high-speed backbone).

🔹 Internal IP (Private IP)

  1. Not accessible directly from the internet.
  2. Used for internal communication inside a VPC.
  3. Accessible:
  • Within the same VPC
  • Across VPCs (via VPC Peering)
  • From on-premises networks (via Cloud VPN or Interconnect)

📌 Key Points

  • Always uses premium network tier.
  • Scoped at the regional level.

📌 Static Internal IP

  1. Can be reserved explicitly.
  2. Useful for:
  • Subnets
  • VM interfaces
  • GKE nodes
  • Internal Load Balancers

📌 Global Internal IP

  • Cannot be reserved manually.
  • Mostly used by Private Service Connect endpoints for Google APIs.

✅ Summary

  • External IPs: Allow internet communication. Can be Ephemeral (temporary) or Static (persistent).
  • Internal IPs: Stay inside the VPC (or connected networks). Used for private communication.
  • Ephemeral vs Static: Ephemeral is temporary, Static is reserved and persistent.
  • Regional vs Global: Regional works in one region, Global spans across Google’s backbone network.

By choosing the right type of IP address for your VM, load balancer, or service, you can balance cost, accessibility, and security effectively in Google Cloud. 🚀

Top comments (0)