Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Create a custom network in project A
/ 20
Create a custom network in project B
/ 20
Peer network-a with network-b
/ 30
Peer network-b with network-a
/ 30
Create a custom network in project A
/ 20
Create a custom network in project B
/ 20
Peer network-a with network-b
/ 30
Peer network-b with network-a
/ 30
Google Cloud Virtual Private Cloud (VPC) Network Peering allows private connectivity across two VPC networks regardless of whether they belong to the same project or the same organization.
VPC Network Peering allows you to build SaaS (Software-as-a-Service) ecosystems in Google Cloud, making services available privately across different VPC networks within and across organizations, allowing workloads to communicate in private space.
VPC Network Peering is useful for:
If you have multiple network administrative domains within your organization, VPC Network Peering allows you to make services available across VPC networks in private space. If you offer services to other organizations, VPC Network Peering allows you to make those services available in private space to those organizations.
The ability to offer services across organizations is useful if you want to offer services to other enterprises, and it is useful within your own enterprise if you have several distinct organization nodes due to your own structure or as a result of mergers or acquisitions.
VPC Network Peering gives you several advantages over using external IP addresses or VPNs to connect networks, including:
In this lab, you learn how to perform the following tasks:
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the right is the Lab setup and access panel with the following:
Note that the lab timer is located near the top of the page, showing the remaining time.
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab setup and access panel.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab setup and access panel.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.
Click Activate Cloud Shell at the top of the Google Cloud console.
Click through the following windows:
When you are connected, you are already authenticated, and the project is set to your Project_ID,
gcloud is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.
Output:
Output:
gcloud, in Google Cloud, refer to the gcloud CLI overview guide.
Within the same organization node, a network can host services that need to be accessible from other VPC networks in the same or different projects.
Alternatively, one organization might want to access services that a third party offers.
Project names are unique across all of Google Cloud, so you do not need to specify the organization when setting up peering. Google Cloud knows the organization based on the project name.
In this lab, you use two provisioned projects: the first project is project-A, and the second project is project-B.
To open a second Cloud Shell tab, in the Cloud Shell toolbar, click Open a new tab (+).
In the first Cloud Shell tab (for project-A), run the following command to set the project ID for project-A:
icmp firewall rules, because you need a secure shell to communicate with VMs during connectivity testing:Next, you set up project-B in the same way.
Click Check my progress to verify the objective.
icmp firewall rules, because you need a secure shell to communicate with VMs during connectivity testing:Click Check my progress to verify the objective.
Consider an organization that needs to establish VPC Network Peering between network-a in project-A and network-b in project-B. To establish VPC Network Peering successfully, administrators of network-a and network-b must separately configure the peering association.
In the Google Cloud console, click the project selector menu in the top bar.
In the Select a project dialog, click the All tab, and then select
On the Navigation menu (), click VPC network > VPC network peering.
Click Create connection.
Click Continue.
For Name, type peer-ab
For Your VPC network, select network-a.
For Peered VPC network, select In another project.
For Project ID, paste the project ID of the second project (project-B):
For VPC network name, type network-b
Click Create.
At this point, the peering state remains INACTIVE because there is no matching configuration in network-b in project-B. The Status column displays the message Waiting for the connection to be created by network-b.
Click Check my progress to verify the objective.
In the Google Cloud console, click the project selector menu in the top bar, click the All tab, and then select
On the Navigation menu (), click VPC network > VPC network peering.
Click Create connection.
Click Continue.
For Name, type peer-ba
For Your VPC network, select network-b.
For Peered VPC network, select In another project (unless you want to peer within the same project).
For Project ID, paste the project ID of the first project (project-A):
For VPC network name, type network-a
Click Create.
On the VPC network peering page, peer-ba now appears in the peering connection list.
VPC Network Peering becomes ACTIVE, and the networks exchange routes. When the peering moves to an ACTIVE state, Google Cloud sets up traffic flows:
The routes to peered network CIDR prefixes are now visible across the VPC network peers. Google Cloud generates these implicit routes for active peerings, and they don't have corresponding route resources.
Example output:
Click Check my progress to verify the objective.
In this task, you perform a connectivity test between vm-b and vm-a.
In the Google Cloud console, switch to project-A (
On the Navigation menu (), click Compute Engine > VM instances.
Copy the Internal IP address for vm-a.
In the Google Cloud console, switch to project-B (
On the Navigation menu (), click Compute Engine > VM instances.
For vm-b, click SSH to launch a terminal and connect.
In the SSH terminal of vm-b, run the following command, replacing <INTERNAL_IP_OF_VM_A> with the internal IP address of vm-a:
Example output:
You learned how to set up VPC Network Peering across projects in Google Cloud.
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated on November 11, 2026
Lab Last Tested November 7, 2026
Copyright 2026 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We can notify you via email when it becomes available
Great!
We can contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one