Cloud operationsAWS · Azure · Google Cloud
VPC design: subnets, routes and private access
AWS, Azure and Google Cloud all refuse to peer networks whose address ranges overlap. Plan the ranges first, then add subnets, NAT, private endpoints and flow logs.

Address ranges that never overlap
Give every network a range that overlaps no other. All three clouds enforce this when you peer:
- AWS. You cannot create a VPC peering connection between VPCs that have matching or overlapping CIDR blocks.
- Azure. You cannot enable virtual network peering if the address spaces overlap.
- Google Cloud. Google Cloud checks for overlapping subnet ranges at the time of peering and fails the peering if any exist.
On AWS the allowed VPC block size is between a /16 and a /28 netmask, and AWS recommends the private ranges from RFC 1918. More IPv4 blocks can be associated with a VPC after it is created.
The plan below splits one /16 across three Availability Zones. The ranges are this guide's own choice, checked for overlap with Python's ipaddress module. Pick your own:
VPC 10.20.0.0/16 65,536 addresses
Private a 10.20.0.0/19
Private b 10.20.32.0/19
Private c 10.20.64.0/19
Public a 10.20.96.0/24
Public b 10.20.97.0/24
Public c 10.20.98.0/24
Free 10.20.99.0 to 10.20.255.255AWS and Azure reserve five addresses in every subnet: the first four and the last. Google Cloud uses the first two and the last two addresses of a subnet's primary IPv4 range.
Public and private subnets across zones
AWS defines the subnet type by its routes:
- Public subnet. Has a direct route to an internet gateway.
- Private subnet. Has no direct route to an internet gateway. Its resources require a NAT device to access the public internet.
- Isolated subnet. Has no routes to destinations outside its VPC.
AWS recommends private subnets to protect resources. Each AWS subnet must reside entirely within one Availability Zone. An Azure virtual network is limited to one region and spans its availability zones. A Google Cloud VPC network is global and its subnets are regional.
NAT gateways and private endpoints
- Price. On AWS you are charged for each hour the NAT gateway is available and for each gigabyte of data it processes.
- Failure. Each AWS NAT gateway is created in a specific Availability Zone. If resources in several zones share one gateway and its zone is down, the resources in the other zones lose internet access. AWS advises a NAT gateway in each zone. A regional NAT gateway expands across zones automatically.
Azure NAT Gateway has a zonal Standard SKU and a zone-redundant StandardV2 SKU. As of March 31, 2026, new Azure virtual networks default to private subnets with no default outbound access. On Google Cloud, Cloud NAT lets resources that have no external IPv4 address reach the internet.
AWS advises creating endpoints when most of the traffic through a NAT gateway goes to AWS services. The private options on each cloud:
- AWS. Gateway endpoints connect a VPC to Amazon S3 and DynamoDB with no internet gateway or NAT device, at no additional charge. Interface endpoints use AWS PrivateLink and an endpoint network interface in each subnet you specify.
- Azure. A private endpoint is a network interface with a private IP address from your virtual network. It connects to a service powered by Azure Private Link.
- Google Cloud. Private Service Connect sends traffic to endpoints that forward it to Google APIs and published services. Private Google Access is a subnet setting that lets VMs with only internal addresses reach Google APIs and services.
Hub-and-spoke connections
- AWS. AWS Transit Gateway is a network transit hub that interconnects VPCs and on-premises networks.
- Azure. In the hub-spoke topology, a hub virtual network hosts shared networking services, and spoke virtual networks connect to it through virtual network peering, which is nontransitive. Azure Virtual WAN is the Microsoft-managed hub option.
- Google Cloud. Network Connectivity Center connects VPC networks as spokes of a hub, and the spokes exchange subnet routes.
Flow logs
AWS collects VPC Flow Logs outside the path of network traffic, so they do not affect throughput or latency. This example is from the AWS CLI reference. It captures all traffic for a VPC, delivers it to an S3 bucket and sets a maximum aggregation interval of 60 seconds:
aws ec2 create-flow-logs \
--resource-type VPC \
--resource-ids vpc-00112233344556677 \
--traffic-type ALL \
--log-destination-type s3 \
--log-destination arn:aws:s3:::amzn-s3-demo-bucket/my-custom-flow-logs/ \
--max-aggregation-interval 60On Azure, virtual network flow logs send flow data to Azure Storage. Network security group flow logs retire on September 30, 2027, and new ones can no longer be created. On Google Cloud, VPC Flow Logs samples packets and writes the entries to Cloud Logging.
Pod addresses in Kubernetes
The Amazon VPC CNI assigns a private address from the VPC to each pod. EKS documents that a limited number of IPv4 addresses in a subnet can limit the number of pods you create there, and it gives three remedies:
- Assign IP prefixes to nodes. This increases the number of addresses a node can assign to pods.
- Use custom networking. The plugin then creates the secondary network interfaces in a different subnet, which increases the addresses available for pods.
- Create the cluster with the IPv6 family.
What to check on an existing network
- Compare every address range with the ranges of the networks it will peer with.
- On AWS, confirm that each Availability Zone with resources has its own NAT gateway, or that the VPC uses a regional NAT gateway.
- Create gateway or interface endpoints for the AWS services that receive most of the NAT traffic.
- On EKS, check the free IPv4 addresses in the subnets that hold pods.
Sources
- VPC CIDR blocks - Amazon Virtual Private Cloud
- Subnets for your VPC - Amazon Virtual Private Cloud
- NAT gateway basics - Amazon Virtual Private Cloud
- Gateway endpoints - Amazon Virtual Private Cloud
- What Is Azure NAT Gateway?
- Hub-spoke network topology in Azure - Azure Architecture Center
- Private Service Connect - Google Cloud Virtual Private Cloud
- Assign IPs to Pods with the Amazon VPC CNI - Amazon EKS
Want a second pair of eyes on yours? We do this work for a living.
More guides

Security groups and network ACLs: what each one filters
Security · 4 min read
Stateful or stateless, allow or deny, instance or subnet: how the two VPC filters differ.

Landing zones: accounts, subscriptions and projects in order
Cloud operations · 5 min read
The account hierarchy, identity, network, logging and guardrails in each vendor's landing zone design.

Kubernetes network policies: start with default deny
Security · 4 min read
A default-deny manifest, an allow rule for DNS, and the documented way to test a policy.