Create network in Google Cloud Platform

Create network in Google Cloud Platform

To create network in Google Cloud Platform, step 1 is to Logon to your Google Cloud account.

Move on to the Networking section under the portal. Then click the link “Networks“. It will open up a window for creating the network. Click the “CREATE NETWORK” to start creating your network.

Create network in Google Cloud Platform

Under the “CREATE NETWORK” page, choose a name for your network. Also provide a description which will help you to identify your new network.

Create network in Google Cloud Platform

You can create the subnets under your network from the same page. Provide a “Name” & “Description” for your subnet. Select the “Region” from the drop down menu. Next step is to provide an IP address range for your subnet.  Provide the subnet mask also, when you provide your IP address range. You can create additional subnets by clicking the “+ Add subnetwork“.

Create network in Google Cloud Platform

Gshell Method to create the Network

Open the gshell window. Once it is “connected”, then enter the below code as shown in the picture. Replace the Then press “Enter” to start the code execution.

gcloud compute --project "<project name>" networks create "<network-name>" --description "<Description of your network>" --mode "custom" && gcloud compute --project "<project name>" networks subnets create "<subnet-name>" --network "<network-name>" --region "<Region-Name>" --range "<IP-Address-Range>" 

Sample

gcloud compute --project "composite-drive-123456" networks create "backend-network" --description "Back End Network for Databases" --mode "custom" && gcloud compute --project "composite-drive-123456" networks subnets create "backend-subnet" --network "backend-network" --region "us-central1" --range "10.2.0.0/24" 

Create network in Google Cloud Platform

Once the Network creation is done, it will show an output like the one below.

Create network in Google Cloud Platform

The next step is to create firewall rule. Please refer the below link to create a firewall rule in GCP.

http://admindiary.com/create-firewall-rule-in-google-cloud-platform/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.