Custom mode VPC (Virtual Private Cloud) in Google Cloud Platform provides you with complete control over your network topology, including IP address ranges and subnet configurations. Unlike auto mode VPC, which automatically creates subnets in each region with predetermined IP ranges, custom mode V…Custom mode VPC (Virtual Private Cloud) in Google Cloud Platform provides you with complete control over your network topology, including IP address ranges and subnet configurations. Unlike auto mode VPC, which automatically creates subnets in each region with predetermined IP ranges, custom mode VPC requires you to manually define and create subnets based on your specific requirements.
When you create a custom mode VPC, it starts as an empty network with no subnets. You must explicitly create subnets in the regions where you need them, specifying the IP address ranges that fit your organization's addressing scheme. This approach offers several advantages for enterprise deployments and complex networking scenarios.
Key benefits of custom mode VPC include:
1. **IP Address Planning**: You have full control over CIDR ranges, allowing you to avoid IP conflicts with on-premises networks or other cloud environments when setting up hybrid connectivity.
2. **Resource Optimization**: Create subnets only in regions where your workloads exist, avoiding unused network resources.
3. **Security and Segmentation**: Design network segments that align with your security policies, separating production, development, and testing environments effectively.
4. **Scalability**: Plan for future growth by reserving IP ranges and expanding subnets as needed.
To create a custom mode VPC, use the Cloud Console, gcloud CLI, or Terraform. The command structure involves creating the VPC first, then adding subnets individually. Each subnet requires a name, region, and primary IP range specification.
Google recommends custom mode VPCs for production environments because they prevent unexpected IP range overlaps and provide better integration capabilities with existing infrastructure. When migrating from auto mode to custom mode, the conversion is one-way and cannot be reversed, so careful planning is essential before making this change. Custom mode VPCs support all advanced networking features including Private Google Access, VPC peering, and Cloud VPN connections.
Custom mode VPC is a fundamental networking concept in Google Cloud Platform that gives you complete control over your network topology. Understanding this concept is crucial because:
• It allows precise control over IP address ranges and subnet placement • It's the recommended approach for production environments • It enables multi-region deployments with specific network requirements • Questions about VPC configuration appear frequently on the exam
What is Custom Mode VPC?
A Custom mode VPC is a Virtual Private Cloud network where you manually create subnets. Unlike auto mode VPCs, no subnets are created automatically when you create the network. You have full control over:
• Which regions contain subnets • The IP address ranges (CIDR blocks) for each subnet • The naming conventions for your subnets
Key Characteristics: • No automatic subnet creation • You define IP ranges that don't overlap • Subnets can be added, modified, or deleted as needed • Better suited for complex networking requirements
How Custom Mode VPC Works
Step 1: Create the VPC Network When you create a custom mode VPC, you start with an empty network container. No subnets exist until you create them.
Step 2: Define Subnets You manually create subnets by specifying: • Subnet name • Region (subnets are regional resources) • Primary IP range (e.g., 10.0.0.0/24) • Optional secondary IP ranges for alias IPs
Step 3: Configure Firewall Rules Custom mode VPCs start with default firewall rules that deny all ingress traffic and allow all egress traffic. You must create firewall rules to allow desired traffic.
Custom Mode vs Auto Mode VPC
Auto Mode VPC: • Creates one subnet per region automatically • Uses predefined IP ranges (10.128.0.0/9) • Good for quick prototyping • Can be converted to custom mode
Custom Mode VPC: • No automatic subnet creation • You choose all IP ranges • Recommended for production • Cannot be converted back to auto mode
Common Use Cases
• Organizations with existing IP addressing schemes • Hybrid cloud deployments requiring specific IP ranges • Multi-project environments needing Shared VPC • Environments requiring non-overlapping IP ranges for VPC peering
Exam Tips: Answering Questions on Custom Mode VPC
Tip 1: Know When to Choose Custom Mode Select custom mode when the scenario mentions: • Production environments • Specific IP range requirements • VPC peering or hybrid connectivity • Avoiding IP conflicts with on-premises networks
Tip 2: Remember Key Differences • Auto mode can convert to custom mode, but NOT the reverse • Custom mode starts with zero subnets • Subnets are regional, not zonal
Tip 3: Understand IP Range Planning • Each subnet requires a unique, non-overlapping CIDR range • Secondary ranges are used for alias IPs and GKE pods • You cannot change the primary IP range after creation (but can expand it)
Tip 4: Watch for Keywords Look for phrases like: • 'Full control over network design' - points to custom mode • 'Specific IP addressing requirements' - points to custom mode • 'Quick setup for testing' - may point to auto mode
Tip 5: Remember Default Behaviors • New custom VPCs have implied firewall rules • Egress is allowed by default • Ingress is denied by default • You must create allow rules for incoming traffic
Tip 6: Shared VPC Considerations Custom mode VPCs are typically used with Shared VPC configurations. If a question involves cross-project networking, custom mode is usually the answer.
Practice Question Approach
When you see a VPC-related question: 1. Identify if the scenario requires specific IP control 2. Check if there are existing network constraints mentioned 3. Consider if this is a production or testing scenario 4. Look for mentions of VPC peering or hybrid connectivity 5. Choose custom mode for enterprise and production scenarios