准备工作
- 实验会创建一个 Google Cloud 项目和一些资源,供您使用限定的一段时间
- 实验有时间限制,并且没有暂停功能。如果您中途结束实验,则必须重新开始。
- 在屏幕左上角,点击开始实验即可开始
Create a VM in each VPC
/ 50
Create a hub and spoke using Network Connectivity Center
/ 50
In this lab, you design and implement a classic hub-and-spoke network topology. Your pre-configured environment includes two VPC networks and two branches (spoke1 and spoke2). You will create virtual machines (VMs) on each network to test connectivity.
You begin by verifying connectivity between the VMs within and across VPCs. Then, you use Network Connectivity Center to implement a hub and spoke. You retest connectivity to confirm that your hub-and-spoke architecture is fully functional.
VPC spokes let you connect two or more VPC networks to a hub so that the networks exchange subnet routes. VPC spokes attached to a single hub can reference VPC networks in the same project or a different project (including a project in a different organization).
In this lab, you learn how to perform the following tasks:
For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.
Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is the Lab Details panel with the following:
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 Details panel.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details panel.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
The network spoke1-vpc with spoke1-subnet, and spoke2-vpc with spoke2-subnet along with firewall rules for RDP, SSH, and ICMP traffic have been configured for you.
In the Google Cloud console, in the Navigation menu (), click VPC network > VPC networks.
Notice the spoke1-vpc, and spoke2-vpc network with its subnets: spoke1-subnet, and spoke2-subnet.
Each Google Cloud project starts with the default network. In addition, the spoke1-vpc, and spoke2-vpc network has been created for you as part of your network diagram.
You create a VM in spoke1-subnet, and spoke2-subnet.
On the Navigation menu (), click VPC network > Firewall.
Notice the app-allow-icmp and app-allow-ssh-rdp firewall rules.
These firewall rules have been created for you.
In the Google Cloud console, on the Navigation menu (), click Compute Engine > VM instances.
Click Create instance.
Specify Name as spoke1-vm.
In the left frame, click Networking.
Under Network interfaces , click default. From the Network dropdown select spoke1-vpc.
Click Create.
Repeat the process to create a spoke2-vm VM in spoke2-vpc.
Click Check my progress to verify the objective.
spoke1-vm and spoke2-vm are in two different VPCs. Let us test the connectivity between the two.
On the VM instances page, for spoke1-vm, copy the internal IP address.
On the VM instances page, for spoke2-vm, click SSH. If prompted, click Authorize.
Run the following command:
Notice how the ping fails. This should execute and display 100% packet loss. Press Ctrl+C to stop the command.
Notice how the ping fails. This should execute and display 100% packet loss. Press Ctrl+C to stop the command.
Network Connectivity Center lets you create VPC spokes to connect VPC networks together for full mesh connectivity.
In the Google Cloud console, on the Navigation menu (), click View all products > Networking > Network Connectivity.
Click Create hub.
For Hub policy mode, select Mesh topology, if not already selected.
Click Next step.
For Hub Name, type my-hub.
Click Next step.
Click Add a spoke.
Select VPC network as the Spoke type.
For Spoke name, type spoke1.
In Associated VPC network, click VPC network*, and then select spoke1-vpc.
Click Done.
To add a second spoke, click Add a spoke.
Select VPC network as the Spoke type.
For Spoke name, type spoke2.
In Associated VPC network, click VPC network*, and then select spoke2-vpc.
Click Done.
When you have finished adding spokes, click Create.
Click Check my progress to verify the objective.
VPC spokes reduce the operational complexity of managing the individual pair-wise VPC Network Peering connections through the use of VPC spokes and a centralized connectivity management model. Now you retest the connectivity between the VMs from spokes.
This task has been performed for you at the start of this lab. You will need to SSH into VM and run the following command to setup the environment.
In the Google Cloud console, on the Navigation menu (), click Compute Engine > VM instances.
Select the SSH button next to spoke1-vm to SSH into the VM. If prompted, click Authorize.
Run the following command:
Network Topology is a visualization tool that shows the topology of your network infrastructure. You can also view metrics and details of network traffic to other Shared VPC networks and inter-region traffic.
For each Network Topology hierarchy, the Google Cloud console displays a single metric for Compute Engine virtual machine (VM) instance entities and region entities, as well as for connections.
In the Google Cloud console, on the Navigation menu (), click View all products > Networking > Network Intelligence > Network Topology.
Toggle the View options panel to close it.
In the Infrastructure pane, scroll down to the bottom of the screen.
At the bottom of the Infrastructure pane, click and slide the timeline slider to the current time, which is toward the right of the slider.
Click Zoom out to view your infrastructure topology.
Click Expand next to the region to see more information.
In this lab, you implemented a classic hub-and-spoke network topology. You created virtual machines (VMs) on each network to test connectivity.
You started by verifying connectivity between the VMs within and across VPCs. Then, you used Network Connectivity Center to implement a hub and spoke. You retested connectivity to confirm that the hub-and-spoke architecture was fully functional.
When you have completed your lab, click End Lab. Google Skills removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
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.
此内容目前不可用
一旦可用,我们会通过电子邮件告知您
太好了!
一旦可用,我们会通过电子邮件告知您
一次一个实验
确认结束所有现有实验并开始此实验