This tutorial shows how to perform cross-region failover by connecting VM-Series as a router appliance to a Network Connectivity Center (NCC) hub.
Beyond cross-region failover, using the VM-Series as a router appliance with NCC supports other use cases, including:
- Connecting remote networks to Google Cloud while providing full BGP route exchange.
- Creating a global WAN network secured with VM-Series deployed in Google Cloud.
- Facilitating disaster recovery network operations with regionally distributed VM-Series.
This tutorial is intended for network administrators, solution architects, and security professionals who are familiar with Compute Engine and Virtual Private Cloud (VPC) networking.
Below is a diagram of the tutorial.
- 3 x VPCs are created (
mgmt,untrust, &vpc1), each containing a subnets inus-east1&us-west1. - 1 x VM-Series is created in each region (
us-east1-vmseries&us-west1-vmseries) with a NIC in each VPC. - The firewall's NIC in
vpc1is connected as a router appliance to a NCC hub. - In each region, the firewalls are BGP neighbors with Cloud Routers enabling end-to-end route propagation.
- In the event of a regional failure, egress traffic from the affected region in
vpc1is automatically rerouted to the firewall in the healthy region through dynamic route propagation.
The following is required for this tutorial:
- A Google Cloud project.
- A machine with Terraform version:
" ">= 0.15.3, < 2.0""
Note
This tutorial assumes you are using Google Cloud Shell.
-
Enable the required APIs and clone the repository.
gcloud services enable compute.googleapis.com git clone https://github.com/PaloAltoNetworks/google-cloud-vmseries-ncc-tutorial cd google-cloud-vmseries-ncc-tutorial -
Generate an SSH key.
ssh-keygen -f ~/.ssh/vmseries-tutorial -t rsa -
Create a
terraform.tfvarsfile.cp terraform.tfvars.example terraform.tfvars -
Edit the
terraform.tfvarsfile and set values for the following variables:Key Value project_idThe Project ID within Google Cloud. public_key_pathThe local path of the public key you previously created mgmt_allow_ipsA list of IPv4 addresses which require access to the VM-Series MGT NIC. vmseries_image_nameThe VM-Series image to deploy.
Tip
For vmseries_image_name, a full list of public images can be found using gcloud:
gcloud compute images list --project paloaltonetworksgcp-public --filter='name ~ .*vmseries-flex.*'
Note
If you are using BYOL image (i.e. vmseries-flex-byol-*), the license can be applied during or after deployment. To license during deployment, add your VM-Series Authcodes to bootstrap_files/authcodes.
See VM-Series Bootstrap Methods for more information.
When no further changes are necessary in the configuration, deploy the resources.
-
Initialize and apply the Terraform plan.
terraform init terraform applyEnter
yesto create the resources. -
After all the resources are created, Terraform displays the following message:
Apply complete! Outputs: SSH_VMSERIES_REGION1 = "ssh admin@<EXTERNAL_IP> -i ~/.ssh/vmseries-tutorial" SSH_VMSERIES_REGION2 = "ssh admin@<EXTERNAL_IP> -i ~/.ssh/vmseries-tutorial" SSH_VM_REGION1 = "gcloud compute ssh paloalto@us-central1-vm --zone=us-central1-a" SSH_VM_REGION2 = "gcloud compute ssh paloalto@us-east4-vm --zone=us-east4-a"
Caution
It may take an additional 10 minutes for the firewalls to become fully available.
To access the VM-Series user interface, a password must be set for the admin user on each firewall.
-
Use the
SSH_VMSERIES_REGION1output to SSH to the mgmt NIC onus-east1-vmseries. -
On the VM-Series, set a password for the
adminusername.configure set mgt-config users admin password -
Commit the changes.
commit -
Enter
exittwice to terminate the session. -
Log in to the VM-Series web interface using the username
adminand your password.https://<EXTERNAL_IP> -
Repeat the process for
us-west1-vmseriesby using theSSH_VMSERIES_REGION2output.
Confirm BGP has been established between the VM-Series & Cloud Routers in each region. Then, verify routes are exchanged between the peers.
Note
The Terraform plan creates the Cloud Routers for each region within vpc1. It also bootstraps the VM-Series with a configuration to automatically establish BGP with the cloud routers.
-
On each VM-Series, go to Network → Virtual Routers.
-
Next to
gcp-vr, select More Runtime Stats.
💡 Information
The virtual router contains all of routing configurations on the VM-Series. To view the BGP configuration, opengcp-vrand select the BGP tab.
-
Click BGP → Peer to view the status of the BGP peering sessions with each region's cloud router.
💡 Information
Both connections should be listed asEstablished.
-
Click Local RIB to view the routing information the firewall has learned and selected for use.
💡 Information
Routes with the*flag are preferred routes.
-
Click RIB Out to view the routes exported by the VM-Series to the Cloud Routers.
💡 Information
A default route is exported for each Cloud Router's peering interface.
-
In Google Cloud, go to Network Connectivity → Network Connectivity Center.
-
Click Spokes and select the
vmseries-us-east1-spokerouter appliance.
-
Within each spoke, open
peer0&peer1to view the peering status along with any advertised routes.
💡 Information
The Cloud Router in each region automatically propagates subnet routes to the VM-Series firewalls. -
Repeat the process for the
vmseries-us-west1-spokerouter appliance.
-
In Google Cloud, go to VPC Network → Routes → Effective Routes.
💡 Information
This window shows the effective routes for a given VPC, including the propagated routeds. propagated by the VM-Series and Cloud Routers.
-
Set VPC to
vpc1& Region tous-west1to view the effective routes forus-east1traffic.
💡 Information
The preferred default route (priority0) forus-east1uses theus-east1-vmseriesas the next hop.
-
Set Region to
us-west1to view the effective routes forus-west1traffic.
💡 Information
The preferred default route (priority0) forus-west1uses theus-west1-vmseriesas the next hop.
Access the workload VMs in each region to initiate egress internet traffic. Then, verify traffic sourced from us-east1 travereses the us-east1-vmseries and traffic sourced from us-west1 traverses the us-west1-vmseries.
Note
You can redisplay the Terraform output values at anytime by running terraform output from the google-cloud-vmseries-ncc-tutorial directory.
-
In Cloud Shell, open two additional tabs ➕.
-
In the 1st tab, paste the
SSH_VM_REGION1output to SSH tous-east1-vm(10.1.0.5). -
In the 2nd tab, paste the
SSH_VM_REGION2output to SSH tous-west1-vm(10.1.0.21). -
On each VM, run a continuous ping to an internet address.
ping 4.2.2.2Keep the pings running.
-
On each VM-Series, go to Monitor → Traffic and enter the following traffic filter.
( zone.src eq 'vpc1' ) and ( addr.dst in '4.2.2.2' )💡 Information
You should see traffic fromus-east1-vm(10.1.0.5) uses the preferred route tous-east1-vmseries& traffic fromus-west1-vm(10.1.0.21) uses the preferred route tous-west1-vmseries.
Simulate a regional failure event for us-east1 by terminating the BGP connectivity on the us-east1-vmseries. After failover, the dynamic routes using us-east1-vmseries will coverge to use to us-west1-vmseries.
-
On
us-east1-vmseries, go to Network → Virtual Routers and selectgcp-vr. -
Click BGP → uncheck Enable → click OK.
-
In the top-right corner, click Commit → Commit to apply the changes.
-
Wait for the commit to complete.
-
In Google Cloud, go to VPC Network → Routes → Effective Routes.
-
Set Network to
vpc1and Region tous-east1.
💡 Information
The default route forus-east1traffic should useus-west1-vmseriesas the next hop.
-
On
us-west1-vmseries, go to Monitor → Traffic.
💡 Information
Pings fromus-east1-vm(10.1.0.5) should now appear within theus-west1-vmseriestraffic logs indicating a successful failover.
Important
In production environments, it is recommended to have multiple firewalls deployed across different zones in each region. This approach offers higher redundancy for intra-region failure events.
Delete all the resources when you no longer need them.
-
In Cloud Shell,change directories to the Terraform build.
cd google-cloud-vmseries-ncc-tutorial -
run the following to delete all the created resources.
terraform destroyEnter
yesto delete all resources created by the Terraform plan. -
After all the resources are deleted, Terraform displays the following message:
Destroy complete!
- Learn about the VM-Series on Google Cloud.
- Getting started with Palo Alto Networks PAN-OS.
- Read about securing Google Cloud Networks with the VM-Series.
- Learn about VM-Series licensing on all platforms.
- Use the VM-Series Terraform modules for Google Cloud.










