# Create a VPC Network

In 
GCP
Published 2022-12-03

This tutorial explains what is and how we can create a VPC network.

Good to know about a Virtual Private Cloud network (or a "network") :

  • Is a virtual version of the traditional physical network.
  • Provides connectivity for your Compute Engine instances, Container Engine containers and App Engine Flex services created in different regions (VPC network has a global scope).
  • VPC networks are divided into regional subnetworks, also known as subnetworks, or subnets .
  • GCP projects can contain multiple VPC networks.
  • Networks have no IP address range. Therefore, subnetworks don't need to fit into an address hierarchy.
  • Subnetworks can cross zones in the same region.
  • A single firewall rule can apply to all the VMs connected to a subnet even though they are in different zones.

For creating a VPC network, we need to open the GCP Console, and go to "Networking" -> "VPC network".

And you will see the following screen:

Click on "CREATE VPC NETWORK"

Choose a name for the network, enable or disable the IPv6, choose custom or automatic subnet creation mode.

Set the Dynamic routing mode and Maximum transmission unit (MTU) and click on "CREATE".

The new network is created:

The same result we have if we run the following gcloud compute networks commands:

gcloud compute networks create dev-network --project=fluted-layout-376110 --description=A\ network\ used\ for\ the\ development\ environment. --subnet-mode=custom --mtu=1460 --bgp-routing-mode=regional 
gcloud compute networks subnets create NAME --project=fluted-layout-376110 --range=IP_RANGE --stack-type=IPV4_ONLY --network=dev-network --region=REGION 
gcloud compute networks subnets create NAME --project=fluted-layout-376110 --range=IP_RANGE --stack-type=IPV4_ONLY --network=dev-network --region=REGION