Himanshu
Himanshu

Reputation: 363

What is the cidr range for GCP VPC

What is the maximum and minimum CIDR block size allowed while creating a VPC and its subnets in Google Cloud Platform?

Upvotes: 5

Views: 17483

Answers (3)

frog32
frog32

Reputation: 976

You can create a VPC network with a subnet that has 10.0.0.0/8 which works just fine. While the smallest possible subnet is a /29

Upvotes: 5

Sunny J
Sunny J

Reputation: 449

By default, VPC networks do not have any IP address ranges associated with them. When you create a subnet, you must define a primary IP address range. You can optionally define one or more secondary ranges:

So, the answer to the question is that CIDR range mask length must not be greater than 29, which means that the minimum allowed is /29, while the maximum is /9.

Example:

Private Address Ranges for class A, B and C networks

Class   Private IP   Address Range    Subnet Mask

A      10.0.0.0      10.255.255.255   255.0.0.0    | 24-bit block
B      172.16.0.0    172.31.255.255   255.240.0.0  | 20-bit block
C      192.168.0.0   192.168.255.255  255.255.0.0  | 16-bit block

Upvotes: 2

night-gold
night-gold

Reputation: 2421

each vpc is a closed environment, so you can define a valid IPv4 range, I never had to define a network bigger than a /8, but I don't see why .

For the subnets I suggest a quick look at this part of the documentation: https://cloud.google.com/vpc/docs/vpc#manually_created_subnet_ip_ranges

Upvotes: 0

Related Questions