Skip to content

6️⃣ Networking

Complete guide to Google Cloud Platform networking - one of the most critical skills for cloud architects.


πŸ“š What You'll Learn

Master GCP networking to build secure, scalable, and high-performance cloud architectures:

  • VPC Fundamentals: Virtual Private Cloud design and implementation
  • Network Connectivity: Connect resources securely
  • Traffic Management: Load balancing and routing
  • Security: Firewall rules and network isolation
  • Hybrid Cloud: Connect on-premises to GCP
  • Performance: CDN, DNS, and optimization

πŸ“– Table of Contents

1. VPC (Virtual Private Cloud)

Foundation of GCP Networking

Topics Covered:
  β€’ VPC architecture and concepts
  β€’ Auto mode vs Custom mode VPCs
  β€’ VPC network characteristics
  β€’ Shared VPC
  β€’ VPC peering
  β€’ VPC network design patterns
  β€’ Best practices

Key Concepts: - Global VPC networks - Regional subnets - Software-defined networking - Network isolation


2. Subnets

IP Address Management

Topics Covered:
  β€’ Subnet creation and management
  β€’ Primary and secondary IP ranges
  β€’ Subnet expansion
  β€’ Regional subnets
  β€’ Private Google Access
  β€’ Subnet design patterns
  β€’ CIDR planning

Key Concepts: - Regional scope - IP address allocation - Subnet sizing - Secondary ranges for GKE


3. Firewall Rules

Network Security

Topics Covered:
  β€’ Firewall rule structure
  β€’ Ingress and egress rules
  β€’ Priority and evaluation
  β€’ Target tags and service accounts
  β€’ Firewall logs
  β€’ Common firewall patterns
  β€’ Security best practices

Key Concepts: - Stateful firewall - Implicit deny - Rule priority - Network tags


4. IP Addressing

Public and Private IPs

Topics Covered:
  β€’ Internal (private) IP addresses
  β€’ External (public) IP addresses
  β€’ Ephemeral vs static IPs
  β€’ IP address reservation
  β€’ Alias IP ranges
  β€’ IPv6 support
  β€’ IP address planning

Key Concepts: - RFC 1918 private ranges - External IP costs - Static IP reservation - Bring Your Own IP (BYOIP)


5. Routing

Traffic Direction

Topics Covered:
  β€’ Route types (system, custom, peering)
  β€’ Route priority
  β€’ Next hop types
  β€’ Policy-based routing
  β€’ Route advertisements
  β€’ Multi-NIC routing
  β€’ Troubleshooting routes

Key Concepts: - Default internet gateway - Route tables - Next hop selection - Route propagation


6. Cloud NAT

Outbound Internet Access

Topics Covered:
  β€’ Cloud NAT architecture
  β€’ NAT gateway configuration
  β€’ IP address allocation
  β€’ Port allocation
  β€’ Logging and monitoring
  β€’ High availability
  β€’ Cost optimization

Key Concepts: - Managed NAT service - No external IPs needed - Regional service - Automatic scaling


7. Load Balancing

Traffic Distribution

Topics Covered:
  β€’ Load balancer types
  β€’ Global vs Regional LBs
  β€’ HTTP(S) Load Balancing
  β€’ TCP/UDP Load Balancing
  β€’ Internal Load Balancing
  β€’ Backend services
  β€’ Health checks

Key Concepts: - Anycast IP - Cross-region load balancing - SSL termination - Session affinity


8. Cloud DNS

Domain Name System

Topics Covered:
  β€’ Public DNS zones
  β€’ Private DNS zones
  β€’ DNS records management
  β€’ DNSSEC
  β€’ DNS policies
  β€’ Split-horizon DNS
  β€’ Performance optimization

Key Concepts: - Managed DNS service - 100% SLA - Global anycast network - Low latency


9. Cloud CDN

Content Delivery Network

Topics Covered:
  β€’ CDN architecture
  β€’ Cache configuration
  β€’ Cache invalidation
  β€’ Signed URLs and cookies
  β€’ Custom origins
  β€’ Performance optimization
  β€’ Cost management

Key Concepts: - Edge caching - Global distribution - Cache hit ratio - Origin shielding


10. Cloud VPN

Hybrid Connectivity

Topics Covered:
  β€’ Classic VPN
  β€’ HA VPN (recommended)
  β€’ VPN tunnels
  β€’ BGP routing
  β€’ IPsec configuration
  β€’ Redundancy and HA
  β€’ Troubleshooting

Key Concepts: - Site-to-site VPN - 99.99% SLA (HA VPN) - Encrypted tunnels - Hybrid cloud


11. Cloud Interconnect

Dedicated Connectivity

Topics Covered:
  β€’ Dedicated Interconnect
  β€’ Partner Interconnect
  β€’ VLAN attachments
  β€’ Bandwidth options
  β€’ Redundancy design
  β€’ Cost comparison
  β€’ Use cases

Key Concepts: - Private connectivity - Higher bandwidth - Lower latency - Predictable performance


12. Network Security

Advanced Security

Topics Covered:
  β€’ Cloud Armor (DDoS protection)
  β€’ VPC Service Controls
  β€’ Private Service Connect
  β€’ SSL policies
  β€’ Network security best practices
  β€’ Zero-trust networking
  β€’ Compliance

Key Concepts: - Defense in depth - Security perimeters - Private connectivity - DDoS mitigation


🌐 GCP Network Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    GCP Global Network                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  Internet        β”‚
                    β”‚  Users           β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  Cloud CDN       β”‚  ← Edge caching
                    β”‚  (Global)        β”‚     200+ PoPs
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚  Global Load     β”‚  ← Anycast IP
                    β”‚  Balancer        β”‚     SSL termination
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚              β”‚              β”‚
        β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”
        β”‚ Region 1  β”‚  β”‚Region 2 β”‚  β”‚ Region 3  β”‚
        β”‚ us-cent1  β”‚  β”‚eu-west1 β”‚  β”‚asia-se1   β”‚
        β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
              β”‚             β”‚              β”‚
        β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”
        β”‚    VPC    β”‚  β”‚  VPC   β”‚   β”‚   VPC    β”‚
        β”‚  Network  β”‚  β”‚ Networkβ”‚   β”‚  Network β”‚
        β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
              β”‚            β”‚              β”‚
        β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”  β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
        β”‚  Subnets  β”‚  β”‚Subnets β”‚   β”‚ Subnets  β”‚
        β”‚  10.0.x.x β”‚  β”‚10.1.x.xβ”‚   β”‚10.2.x.x  β”‚
        β””β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
              β”‚            β”‚              β”‚
        β”Œβ”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”  β”Œβ”€β”€β–Όβ”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
        β”‚    VMs    β”‚  β”‚  VMs   β”‚   β”‚   VMs    β”‚
        β”‚  GKE      β”‚  β”‚  GKE   β”‚   β”‚   GKE    β”‚
        β”‚  Services β”‚  β”‚Servicesβ”‚   β”‚ Services β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Key Features:
  β€’ Global VPC (spans all regions)
  β€’ Regional subnets
  β€’ Private Google network
  β€’ No inter-region bandwidth charges
  β€’ Software-defined networking

πŸ’‘ Key Networking Concepts

1. VPC Network Scope

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  VPC Network Characteristics                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                         β”‚
β”‚  Global Scope:                                         β”‚
β”‚  β€’ VPC spans all GCP regions                           β”‚
β”‚  β€’ Single VPC across multiple regions                  β”‚
β”‚  β€’ No region boundaries                                β”‚
β”‚                                                         β”‚
β”‚  Regional Subnets:                                     β”‚
β”‚  β€’ Subnets are regional resources                      β”‚
β”‚  β€’ Each subnet in one region                           β”‚
β”‚  β€’ Multiple subnets per region                         β”‚
β”‚                                                         β”‚
β”‚  Benefits:                                             β”‚
β”‚  β€’ Simplified network architecture                     β”‚
β”‚  β€’ Easy multi-region deployment                        β”‚
β”‚  β€’ No VPN between regions                              β”‚
β”‚  β€’ Consistent security policies                        β”‚
β”‚                                                         β”‚
β”‚  Example:                                              β”‚
β”‚  VPC: prod-vpc (global)                                β”‚
β”‚  β”œβ”€ Subnet: us-central1 (10.0.1.0/24)                 β”‚
β”‚  β”œβ”€ Subnet: europe-west1 (10.0.2.0/24)                β”‚
β”‚  └─ Subnet: asia-southeast1 (10.0.3.0/24)             β”‚
β”‚                                                         β”‚
β”‚  VMs in different regions can communicate directly     β”‚
β”‚  using internal IPs without VPN or peering             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2. Network Tiers

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Premium Tier vs Standard Tier                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Premium Tier (Default):
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  User β†’ Edge PoP β†’ Google Network β†’ Destination    β”‚
β”‚         (Enters Google network immediately)         β”‚
β”‚                                                     β”‚
β”‚  Benefits:                                          β”‚
β”‚  β€’ Lowest latency                                   β”‚
β”‚  β€’ Highest reliability                              β”‚
β”‚  β€’ Global load balancing                            β”‚
β”‚  β€’ Better performance                               β”‚
β”‚  β€’ SLA guarantees                                   β”‚
β”‚                                                     β”‚
β”‚  Cost: Higher                                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Standard Tier:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  User β†’ ISP β†’ Internet β†’ Region β†’ Destination      β”‚
β”‚         (Uses public internet)                      β”‚
β”‚                                                     β”‚
β”‚  Trade-offs:                                        β”‚
β”‚  β€’ Lower cost (50% cheaper)                         β”‚
β”‚  β€’ Higher latency                                   β”‚
β”‚  β€’ Less reliable                                    β”‚
β”‚  β€’ Regional load balancing only                     β”‚
β”‚  β€’ No global LB                                     β”‚
β”‚                                                     β”‚
β”‚  Cost: Lower                                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Use Cases:
  Premium: Production apps, global users, low latency
  Standard: Cost-sensitive, regional apps, batch jobs

3. Private vs Public IP

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  IP Address Types                                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                         β”‚
β”‚  Internal (Private) IP:                                β”‚
β”‚  β€’ RFC 1918 ranges (10.x, 172.16-31.x, 192.168.x)     β”‚
β”‚  β€’ Free (no cost)                                      β”‚
β”‚  β€’ Not routable on internet                            β”‚
β”‚  β€’ Used for internal communication                     β”‚
β”‚  β€’ Assigned to all VMs                                 β”‚
β”‚                                                         β”‚
β”‚  External (Public) IP:                                 β”‚
β”‚  β€’ Routable on internet                                β”‚
β”‚  β€’ Costs money (charged per hour)                      β”‚
β”‚  β€’ Optional (not required)                             β”‚
β”‚  β€’ Ephemeral or static                                 β”‚
β”‚  β€’ Used for internet access                            β”‚
β”‚                                                         β”‚
β”‚  Best Practice:                                        β”‚
β”‚  β€’ Use internal IPs for inter-VM communication         β”‚
β”‚  β€’ Use Cloud NAT for outbound internet                 β”‚
β”‚  β€’ Minimize external IPs (cost + security)             β”‚
β”‚  β€’ Use load balancers for inbound traffic              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ—οΈ Common Network Architectures

1. Single Region Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Single Region Deployment                                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Internet
    β”‚
    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Global Load        β”‚
β”‚  Balancer           β”‚
β”‚  (External IP)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
    β”‚  Region:    β”‚
    β”‚  us-central1β”‚
    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
           β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  VPC: prod-vpc                  β”‚
    β”‚                                 β”‚
    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
    β”‚  β”‚ Subnet: web-tier           β”‚β”‚
    β”‚  β”‚ 10.0.1.0/24                β”‚β”‚
    β”‚  β”‚ β”Œβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”      β”‚β”‚
    β”‚  β”‚ β”‚VM-1β”‚ β”‚VM-2β”‚ β”‚VM-3β”‚      β”‚β”‚
    β”‚  β”‚ β””β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”˜      β”‚β”‚
    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
    β”‚                                 β”‚
    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
    β”‚  β”‚ Subnet: app-tier           β”‚β”‚
    β”‚  β”‚ 10.0.2.0/24                β”‚β”‚
    β”‚  β”‚ β”Œβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”             β”‚β”‚
    β”‚  β”‚ β”‚VM-4β”‚ β”‚VM-5β”‚             β”‚β”‚
    β”‚  β”‚ β””β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”˜             β”‚β”‚
    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
    β”‚                                 β”‚
    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”β”‚
    β”‚  β”‚ Subnet: db-tier            β”‚β”‚
    β”‚  β”‚ 10.0.3.0/24                β”‚β”‚
    β”‚  β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚β”‚
    β”‚  β”‚ β”‚Cloud SQL β”‚               β”‚β”‚
    β”‚  β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚β”‚
    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Firewall Rules:
  β€’ Allow HTTP/HTTPS to web-tier
  β€’ Allow app-tier to web-tier
  β€’ Allow db-tier to app-tier
  β€’ Deny all other traffic

2. Multi-Region Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Multi-Region Global Deployment                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

                    Internet
                       β”‚
                       β–Ό
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚  Global Load     β”‚  ← Anycast IP
            β”‚  Balancer        β”‚     (1.2.3.4)
            β”‚  + Cloud CDN     β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚            β”‚            β”‚
   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”  β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”  β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”
   β”‚us-cent1 β”‚  β”‚eu-west1β”‚  β”‚asia-se1β”‚
   β”‚         β”‚  β”‚        β”‚  β”‚        β”‚
   β”‚Subnet:  β”‚  β”‚Subnet: β”‚  β”‚Subnet: β”‚
   β”‚10.0.1.x β”‚  β”‚10.0.2.xβ”‚  β”‚10.0.3.xβ”‚
   β”‚         β”‚  β”‚        β”‚  β”‚        β”‚
   β”‚β”Œβ”€β”€β”€β”€β”€β”€β” β”‚  β”‚β”Œβ”€β”€β”€β”€β”€β”€β”β”‚  β”‚β”Œβ”€β”€β”€β”€β”€β”€β”β”‚
   β”‚β”‚ VMs  β”‚ β”‚  β”‚β”‚ VMs  β”‚β”‚  β”‚β”‚ VMs  β”‚β”‚
   β”‚β”‚ GKE  β”‚ β”‚  β”‚β”‚ GKE  β”‚β”‚  β”‚β”‚ GKE  β”‚β”‚
   β”‚β””β”€β”€β”€β”€β”€β”€β”˜ β”‚  β”‚β””β”€β”€β”€β”€β”€β”€β”˜β”‚  β”‚β””β”€β”€β”€β”€β”€β”€β”˜β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚            β”‚            β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              Cloud Spanner
           (Global Database)

Benefits:
  β€’ Low latency worldwide
  β€’ High availability
  β€’ Disaster recovery
  β€’ Automatic failover

3. Hybrid Cloud Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Hybrid Cloud with VPN                                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

On-Premises Data Center          Google Cloud Platform
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     β”‚          β”‚                     β”‚
β”‚  Network:           β”‚          β”‚  VPC: prod-vpc      β”‚
β”‚  192.168.0.0/16     β”‚          β”‚                     β”‚
β”‚                     β”‚          β”‚  Subnet:            β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚          β”‚  10.0.1.0/24        β”‚
β”‚  β”‚ Servers       β”‚ β”‚          β”‚                     β”‚
β”‚  β”‚ Databases     β”‚ β”‚          β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Applications  β”‚ β”‚          β”‚  β”‚ VMs           β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚          β”‚  β”‚ GKE           β”‚ β”‚
β”‚         β”‚           β”‚          β”‚  β”‚ Cloud SQL     β”‚ β”‚
β”‚         β”‚           β”‚          β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚          β”‚         β”‚           β”‚
β”‚  β”‚ VPN Gateway   │◄┼──────────┼────────►│           β”‚
β”‚  β”‚ (On-prem)     β”‚ β”‚  IPsec   β”‚  Cloud VPN Gateway β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚  Tunnel  β”‚  (HA VPN)          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Features:
  β€’ Secure encrypted tunnel
  β€’ Private IP connectivity
  β€’ BGP routing
  β€’ 99.99% SLA (HA VPN)
  β€’ Hybrid workloads

πŸš€ Quick Start Guide

Step 1: Create VPC Network

# Create custom VPC
gcloud compute networks create prod-vpc \
  --subnet-mode=custom \
  --bgp-routing-mode=regional

# Create subnet
gcloud compute networks subnets create web-subnet \
  --network=prod-vpc \
  --region=us-central1 \
  --range=10.0.1.0/24

Step 2: Create Firewall Rules

# Allow SSH from specific IP
gcloud compute firewall-rules create allow-ssh \
  --network=prod-vpc \
  --allow=tcp:22 \
  --source-ranges=203.0.113.0/24

# Allow HTTP/HTTPS
gcloud compute firewall-rules create allow-web \
  --network=prod-vpc \
  --allow=tcp:80,tcp:443 \
  --source-ranges=0.0.0.0/0 \
  --target-tags=web-server

Step 3: Create VM with Network

# Create VM in custom network
gcloud compute instances create web-vm \
  --zone=us-central1-a \
  --machine-type=e2-medium \
  --network=prod-vpc \
  --subnet=web-subnet \
  --tags=web-server \
  --no-address  # No external IP (use Cloud NAT)

Step 4: Set Up Cloud NAT

# Create Cloud Router
gcloud compute routers create nat-router \
  --network=prod-vpc \
  --region=us-central1

# Create Cloud NAT
gcloud compute routers nats create nat-config \
  --router=nat-router \
  --region=us-central1 \
  --auto-allocate-nat-external-ips \
  --nat-all-subnet-ip-ranges

Step 5: Create Load Balancer

# Create instance group
gcloud compute instance-groups managed create web-group \
  --base-instance-name=web \
  --template=web-template \
  --size=3 \
  --zone=us-central1-a

# Create health check
gcloud compute health-checks create http web-health-check \
  --port=80

# Create backend service
gcloud compute backend-services create web-backend \
  --protocol=HTTP \
  --health-checks=web-health-check \
  --global

# Add instance group to backend
gcloud compute backend-services add-backend web-backend \
  --instance-group=web-group \
  --instance-group-zone=us-central1-a \
  --global

πŸ“Š Network Performance

Latency Optimization

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Latency Reduction Strategies                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                         β”‚
β”‚  1. Use Premium Network Tier                           β”‚
β”‚     β€’ Traffic on Google's network                      β”‚
β”‚     β€’ Lower latency                                    β”‚
β”‚                                                         β”‚
β”‚  2. Deploy in Multiple Regions                         β”‚
β”‚     β€’ Closer to users                                  β”‚
β”‚     β€’ Global load balancing                            β”‚
β”‚                                                         β”‚
β”‚  3. Enable Cloud CDN                                   β”‚
β”‚     β€’ Edge caching                                     β”‚
β”‚     β€’ 200+ PoPs worldwide                              β”‚
β”‚                                                         β”‚
β”‚  4. Use Regional Resources                             β”‚
β”‚     β€’ Reduce cross-region traffic                      β”‚
β”‚     β€’ Keep data close to compute                       β”‚
β”‚                                                         β”‚
β”‚  5. Optimize DNS                                       β”‚
β”‚     β€’ Use Cloud DNS                                    β”‚
β”‚     β€’ Low TTL for failover                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ’° Network Costs

Cost Components

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Network Pricing                                       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                         β”‚
β”‚  Free:                                                 β”‚
β”‚  β€’ Ingress (incoming traffic)                          β”‚
β”‚  β€’ Traffic within same zone                            β”‚
β”‚  β€’ Traffic between zones in same region (internal IP)  β”‚
β”‚  β€’ Internal IP communication                           β”‚
β”‚                                                         β”‚
β”‚  Charged:                                              β”‚
β”‚  β€’ Egress to internet ($0.12/GB)                       β”‚
β”‚  β€’ Cross-region traffic ($0.01/GB)                     β”‚
β”‚  β€’ External IP addresses ($0.004/hour)                 β”‚
β”‚  β€’ Load balancer usage                                 β”‚
β”‚  β€’ VPN tunnels ($0.05/hour)                            β”‚
β”‚  β€’ Cloud NAT ($0.045/hour + data)                      β”‚
β”‚                                                         β”‚
β”‚  Cost Optimization:                                    β”‚
β”‚  βœ“ Use internal IPs                                    β”‚
β”‚  βœ“ Minimize external IPs                               β”‚
β”‚  βœ“ Use Cloud CDN for static content                    β”‚
β”‚  βœ“ Keep traffic in same region                         β”‚
β”‚  βœ“ Use Standard tier for non-critical                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

βœ… Networking Checklist

Design Phase

  • [ ] Plan IP address ranges (avoid conflicts)
  • [ ] Design VPC architecture
  • [ ] Plan subnet layout
  • [ ] Document network topology
  • [ ] Plan firewall rules
  • [ ] Design for high availability

Implementation Phase

  • [ ] Create VPC networks
  • [ ] Create subnets
  • [ ] Configure firewall rules
  • [ ] Set up Cloud NAT
  • [ ] Configure load balancers
  • [ ] Set up DNS records

Security Phase

  • [ ] Implement least privilege firewall rules
  • [ ] Enable VPC Flow Logs
  • [ ] Configure Cloud Armor
  • [ ] Set up VPC Service Controls
  • [ ] Enable Private Google Access
  • [ ] Audit network access

Operations Phase

  • [ ] Monitor network performance
  • [ ] Set up alerting
  • [ ] Regular security audits
  • [ ] Document changes
  • [ ] Test disaster recovery
  • [ ] Optimize costs

πŸŽ“ Next Steps

After mastering GCP Networking:

  1. Compute Services - Deploy workloads
  2. Storage & Databases - Data management
  3. Security - Advanced security features
  4. Monitoring - Network observability
  5. Hybrid Cloud - Connect on-premises

Last Updated: March 2026 Version: 2.0