Istruzioni e requisiti di configurazione del lab
Proteggi il tuo account e i tuoi progressi. Per eseguire questo lab, utilizza sempre una finestra del browser privata e le credenziali del lab.

Implement a Hub-and-Spoke Network Using Network Connectivity Center

Lab 45 minuti universal_currency_alt 5 crediti show_chart Introduttivi
info Questo lab potrebbe incorporare strumenti di AI a supporto del tuo apprendimento.
Questi contenuti non sono ancora ottimizzati per i dispositivi mobili.
Per un'esperienza ottimale, visualizza il sito su un computer utilizzando un link inviato via email.

Overview

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).

Objectives

In this lab, you learn how to perform the following tasks:

  • Configure VMs in different VPCs.
  • Test connectivity between networks before implementing a hub and spoke.
  • Use Network Connectivity Center to create a hub and spoke.
  • Test connectivity after implementing a hub and spoke.
  • Use Network Topology to view metrics for traffic between entities.

Setup and requirements

For each lab, you get a new Google Cloud project and set of resources for a fixed time at no cost.

  1. 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:

    • The Open Google Cloud console button
    • Time remaining
    • The temporary credentials that you must use for this lab
    • Other information, if needed, to step through this lab
  2. 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.

    Note: If you see the Choose an account dialog, click Use Another Account.
  3. If necessary, copy the Username below and paste it into the Sign in dialog.

    {{{user_0.username | "Username"}}}

    You can also find the Username in the Lab Details panel.

  4. Click Next.

  5. Copy the Password below and paste it into the Welcome dialog.

    {{{user_0.password | "Password"}}}

    You can also find the Password in the Lab Details panel.

  6. Click Next.

    Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials. Note: Using your own Google Cloud account for this lab may incur extra charges.
  7. Click through the subsequent pages:

    • Accept the terms and conditions.
    • Do not add recovery options or two-factor authentication (because this is a temporary account).
    • Do not sign up for free trials.

After a few moments, the Google Cloud console opens in this tab.

Note: To view a menu with a list of Google Cloud products and services, click the Navigation menu at the top-left, or type the service or product name in the Search field. Navigation menu icon

Task 1. Explore the pre-configured network

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 (Navigation menu icon), 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.

Explore the firewall rules

  • On the Navigation menu (Navigation menu icon), click VPC network > Firewall.
    Notice the app-allow-icmp and app-allow-ssh-rdp firewall rules.

    These firewall rules have been created for you.

Task 2. Create a VM in each VPC

  1. In the Google Cloud console, on the Navigation menu (Navigation menu icon), click Compute Engine > VM instances.

  2. Click Create instance.

  3. Specify Name as spoke1-vm.

  4. In the left frame, click Networking.

  5. Under Network interfaces , click default. From the Network dropdown select spoke1-vpc.

  6. Click Create.

Repeat the process to create a spoke2-vm VM in spoke2-vpc.

Click Check my progress to verify the objective. Create a VM in each VPC

Task 3: Test connectivity

spoke1-vm and spoke2-vm are in two different VPCs. Let us test the connectivity between the two.

  1. On the VM instances page, for spoke1-vm, copy the internal IP address.

  2. On the VM instances page, for spoke2-vm, click SSH. If prompted, click Authorize.

  3. Run the following command:

ping <internal IP address of spoke1-vm>

Notice how the ping fails. This should execute and display 100% packet loss. Press Ctrl+C to stop the command.

  1. Now, SSH into spoke1-vm to test the connectivity from spoke1-vm to spoke2-vm:
ping <internal IP address of spoke2-vm>

Notice how the ping fails. This should execute and display 100% packet loss. Press Ctrl+C to stop the command.

Task 4: Create a hub and spoke using Network Connectivity Center

Network Connectivity Center lets you create VPC spokes to connect VPC networks together for full mesh connectivity.

  1. In the Google Cloud console, on the Navigation menu (Navigation menu icon), click View all products > Networking > Network Connectivity.

  2. Click Create hub.

  3. For Hub policy mode, select Mesh topology, if not already selected.

  4. Click Next step.

  5. For Hub Name, type my-hub.

  6. Click Next step.

  7. Click Add a spoke.

  8. Select VPC network as the Spoke type.

  9. For Spoke name, type spoke1.

  10. In Associated VPC network, click VPC network*, and then select spoke1-vpc.

  11. Click Done.

  12. To add a second spoke, click Add a spoke.

  13. Select VPC network as the Spoke type.

  14. For Spoke name, type spoke2.

  15. In Associated VPC network, click VPC network*, and then select spoke2-vpc.

  16. Click Done.

  17. When you have finished adding spokes, click Create.

Click Check my progress to verify the objective. Create a hub and spoke using Network Connectivity Center

Task 5. Retest connectivity

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.

  1. In the Google Cloud console, on the Navigation menu (Navigation menu icon), click Compute Engine > VM instances.

  2. Select the SSH button next to spoke1-vm to SSH into the VM. If prompted, click Authorize.

  3. Run the following command:

ping -c 3 <internal IP address of spoke2-vm>
  1. Repeat the previous steps for spoke2-vm.

Task 6. Explore the Network Topology Tool

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.

  1. In the Google Cloud console, on the Navigation menu (Navigation menu icon), click View all products > Networking > Network Intelligence > Network Topology.

  2. Toggle the View options panel to close it.

  3. In the Infrastructure pane, scroll down to the bottom of the screen.

  4. 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.

  5. Click Zoom out to view your infrastructure topology.

  6. Click Expand next to the region to see more information.

Congratulations!

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.

End your lab

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:

  • 1 star = Very dissatisfied
  • 2 stars = Dissatisfied
  • 3 stars = Neutral
  • 4 stars = Satisfied
  • 5 stars = Very satisfied

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.

Prima di iniziare

  1. I lab creano un progetto e risorse Google Cloud per un periodo di tempo prestabilito
  2. I lab hanno un limite di tempo e non possono essere messi in pausa. Se termini il lab, dovrai ricominciare dall'inizio.
  3. In alto a sinistra dello schermo, fai clic su Inizia il lab per iniziare

Utilizza la navigazione privata

  1. Copia il nome utente e la password forniti per il lab
  2. Fai clic su Apri console in modalità privata

Accedi alla console

  1. Accedi utilizzando le tue credenziali del lab. L'utilizzo di altre credenziali potrebbe causare errori oppure l'addebito di costi.
  2. Accetta i termini e salta la pagina di ripristino delle risorse
  3. Non fare clic su Termina lab a meno che tu non abbia terminato il lab o non voglia riavviarlo, perché il tuo lavoro verrà eliminato e il progetto verrà rimosso

Questi contenuti non sono al momento disponibili

Ti invieremo una notifica via email quando sarà disponibile

Bene.

Ti contatteremo via email non appena sarà disponibile

Un lab alla volta

Conferma per terminare tutti i lab esistenti e iniziare questo

Utilizza la navigazione privata per eseguire il lab

Il modo migliore per eseguire questo lab è utilizzare una finestra del browser in incognito o privata. Ciò evita eventuali conflitti tra il tuo account personale e l'account studente, che potrebbero causare addebiti aggiuntivi sul tuo account personale.