
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 vpc-transit network
/ 10
Create remote branch office VPCs namely vpc-a and vpc-b
/ 10
Create Cloud routers and HA VPN gateways
/ 20
Create a pair of VPN tunnels between vpc-transit to vpc-a and vpc-b
/ 20
Create NCC hub resources and attach the HA VPNs as spokes
/ 20
Create VMs in the remote branch office VPCs
/ 20
Network Connectivity Center (NCC) enables connecting different enterprise networks together that are outside of Google Cloud by leveraging Google's network—providing enterprises instant access to planet-scale reach and high reliability. Traffic between non-Google networks is referred to as data transfer traffic, which can occur using existing standard cloud network connectivity resources such as Cloud VPN, Dedicated or Partner Interconnect.
In this lab, you will go through the process of setting up NCC as a transit hub to route traffic between two non-Google networks using Google's backbone network.
NCC consists of hub and spoke resources.
Hub
A hub is a global Google Cloud resource that supports multiple attached spokes. It provides a simple way to connect spokes together to enable data transfer across them. A hub can provide data transfer between different on-premises locations and a Virtual Private Cloud (VPC) network through its attached spokes.
Spoke
A spoke is a Google Cloud network resource connected to a hub. It is part of the hub, and can't be created without creating the hub first. A spoke routes traffic to remote network address blocks and enables the connection of multiple remote networks.
Spokes can be of one of the following types:
The following network topology is similar to a typical customer deployment having branch offices located in two geographically separate locations. For this lab, you are simulating two VPCs vpc-a, and vpc-b in
The branch offices are connected to a VPC, vpc-transit, which is a central hub terminating a pair of HA VPNs. These VPNs are configured in a region closest to the branch offices. In the real world, these VPNs could be replaced using Interconnects.
You will configure the NCC hub in the vpc-transit network, and the two remote branch offices will be connected using the HA VPN tunnels as spokes.
In this lab, you will achieve the following objectives:
Click Check my progress to verify the objective.
In the Google Cloud console, from the Navigation menu, go to the VPC network.
Click CREATE VPC NETWORK.
Enter a Name for the network as vpc-a.
Choose Custom for the Subnet creation mode.
In the New subnet section, specify the following configuration parameters for a subnet:
Click Done.
Choose the Dynamic routing mode for the VPC network as Regional.
Click Create.
To add the second remote branch office VPC, click CREATE VPC NETWORK.
Enter a Name for the network as vpc-b.
Choose Custom for the Subnet creation mode.
In the New subnet section, specify the following configuration parameters for a subnet:
Provide a Name for the subnet as vpc-b-sub1-usw2.
Select Region as
Enter an IP address range 10.20.20.0/24.
Click Done.
Choose the Dynamic routing mode for the VPC network as Regional.
Click Create.
Now you should be able to view all 3 VPCs in the VPC networks console like this:
Click Check my progress to verify the objective.
In this section you will configure an HA VPN between the remote branch office VPCs (vpc-a and vpc-b) and the transit hub VPC (vpc-transit). HA VPN uses BGP for dynamically exchanging routes between Google Cloud and the peer network. Before configuring the HA VPNs, you need to create Cloud Routers associated with each VPC network.
To create a new Cloud Router for each VPC, specify the following:
Name |
Network |
Region |
Cloud Router ASN |
cr-vpc-transit-usw2-1 |
vpc-transit |
|
65000 |
cr-vpc-a-use4-1 |
vpc-a |
|
65001 |
cr-vpc-b-usw2-1 |
vpc-b |
|
65002 |
Create an HA VPN gateway in the vpc-transit network for
VPN gateway name |
VPC Network |
Region |
vpc-transit-gw1-usw2 |
vpc-transit |
|
vpc-a-gw1-use4 |
vpc-a |
|
vpc-b-gw1-usw2 |
vpc-b |
|
Click Check my progress to verify the objective.
Create a pair of VPN tunnels using the following steps:
From the VPN page, click on Cloud VPN Gateways and select vpc-transit-gw1-use4.
Click to Add VPN tunnel.
For the Peer VPN Gateway, select Google Cloud VPN Gateways.
Select the Project Id associated with the lab.
Select the remote VPN gateway, vpc-a-gw1-use4.
For high availability, select Create a pair of VPN tunnels.
Select the Cloud Router cr-vpc-transit-use4-1.
Click on the VPN tunnel to enter the tunnel details:
Click Done.
Repeat steps for the second tunnel:
Click Done.
Click Create & Continue.
The next step is to configure BGP session for the VPN tunnel transit-to-vpc-a-tu1
Now create a pair of VPN tunnels from the vpc-a to vpc-transit to complete the bidirectional tunnel configuration using the following steps:
From the VPN page, select Cloud VPN Gateways vpc-a-gw1-use4:
Click to Add VPN tunnel.
For the Peer VPN Gateway, select Google Cloud VPN Gateways.
Select the Project Id associated with the lab.
Select the remote VPN gateway, vpc-transit-gw1-use4
For high availability, select Create a pair of VPN tunnels.
Select the Cloud Router, cr-vpc-a-use4-1
Click on the VPN tunnel to enter the tunnel details:
Click Done.
Repeat steps for the second tunnel:
Click Done.
Click Create & Continue.
The next step is to configure BGP session for the VPN tunnel: transit-to-vpc-a-tu1
Repeat steps to configure BGP session for the VPN tunnel: transit-to-vpc-a-tu2
Once this step is complete the VPN tunnel status should reflect Established and BGP status should reflect BGP established.
Peer VPN gateway name |
vpc-b-gw1-usw2 |
Cloud Router |
cr-vpc-transit-usw2-1 |
VPN tunnel one |
transit-to-vpc-b-tu1 |
Pre-shared key |
gcprocks |
VPN tunnel two |
transit-to-vpc-b-tu2 |
Pre-shared key |
gcprocks |
BGP session for tunnel transit-to-vpc-b-tu1 :
BGP session |
transit-to-vpc-b-bgp1 |
Peer ASN |
65002 |
Cloud Router BGP IPv4 address |
169.254.1.9 |
BGP peer IPv4 address |
169.254.1.10 |
BGP session for tunnel transit-to-vpc-b-tu2 :
BGP session |
transit-to-vpc-b-bgp2 |
Peer ASN |
65002 |
Cloud Router BGP IPv4 address |
169.254.1.13 |
BGP peer IPv4 address |
169.254.1.14 |
Peer VPN gateway name |
vpc-transit-gw1-usw2 |
Cloud Router |
cr-vpc-b-usw2-1 |
VPN tunnel one |
vpc-b-to-transit-tu1 |
Pre-shared key |
gcprocks |
VPN tunnel second |
vpc-b-to-transit-tu2 |
Pre-shared key |
gcprocks |
BGP session for tunnel vpc-b-to-transit-tu1 :
BGP session |
vpc-b-to-transit-bgp1 |
Peer ASN |
65000 |
Cloud Router BGP IPv4 address |
169.254.1.10 |
BGP peer IPv4 address |
169.254.1.9 |
BGP session for tunnel vpc-b-to-transit-tu2 :
BGP session |
vpc-b-to-transit-bgp2 |
Peer ASN |
65000 |
Cloud Router BGP IPv4 address |
169.254.1.14 |
BGP peer IPv4 address |
169.254.1.13 |
Click Check my progress to verify the objective.
In this section you will create a VPC and create 2 subnets inside that VPC. This will all be done using gcloud CLI commands inside Google Cloud Shell.
Before you can perform any tasks for Network Connectivity Center, you must enable the Network Connectivity API.
Click Enable.
In this lab gcloud
commands are used to configure the Network Connectivity Center. In order to authorize Cloud Shell to run the gcloud commands, open the Google Cloud Shell by clicking Activate Cloud Shell().
Run the following command to list the active account name:
Click Check my progress to verify the objective.
After configuring the hub and its spokes, you should be able to pass traffic from the virtual machine (VM) instance in branch office1 to the VM instance in branch office2. To do this, create a vpc-a-vm-1 in vpc-a and vpc-b-vm-1 in vpc-b respectively.
First, create firewall rules: fw-a for vpc-a-vm-1 in vpc-a-sub1-use4 subnet and fw-b for vpc-b-vm-1 in vpc-b-sub1-usw2 subnet respectively to allow ingress SSH and ICMP traffic.
In the Cloud Platform Console, click Navigation menu () at the top left of the screen.
Then navigate to VPC network > Firewall.
Click on CREATE FIREWALL RULE and specify the details as shown.
There are many parameters you can configure when creating a new instance. Use the following for this lab:
In the Machine configuration
Enter the values for the following fields:
Field | Value |
---|---|
Name | vpc-a-vm-1 |
Region | |
Zone | |
Series | E2 |
Machine | e2-medium |
Click OS and storage
Click Change to begin configuring your boot disk and select the values for:
Field | Value |
---|---|
Operating system | Debian |
Version | Debian GNU/Linux 11 (bullseye) x86/64 |
Boot disk type | balanced persistent disk |
Size (GB) | 10 GB |
Click Networking
default
to edit.
vpc-a
vpc-a-sub1-use4
Once all sections are configured, scroll down and click Create to launch your virtual machine instance.
Once finished, you should see the new virtual machine in the VM Instances page.
Similarly, create another VM in vpc-b using the following parameters:
In the Machine configuration
Enter the values for the following fields:
Field | Value |
---|---|
Name | vpc-b-vm-1 |
Region | |
Zone | |
Series | E2 |
Machine | e2-medium |
Click OS and storage
Click Change to begin configuring your boot disk and select the values for:
Field | Value |
---|---|
Operating system | Debian |
Version | Debian GNU/Linux 11 (bullseye) x86/64 |
Boot disk type | balanced persistent disk |
Size (GB) | 10 GB |
Click Networking
default
to edit.
vpc-b
vpc-b-sub1-usw2
Once all sections are configured, scroll down and click Create to launch your virtual machine instance.
Once finished, you should see the two virtual machines in the VM Instances page.
Click Check my progress to verify the objective.
To verify the end to end connectivity, run a ping test between vpc-a-vm-1 and vpc-b-vm-1 using the following steps:
Run a ping test from vpc-a-vm-1 to the internal IP of vpc-b-vm-1.
You can click on the "clipboard" icon in the upper right corner of the text box to copy the contents.
This completes our lab for the Network Connectivity Center as a Transit hub with HA VPNs as spokes.
Manual Last Updated December 11, 2024
Lab Last Tested october 3, 2024
Copyright 2025 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 will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one