Information Gathering

Like the beginning of every great investigation into the unknown, there is some information you will need to gather ahead of time for implementing this. Go ahead and get a text editor open to jot down some values needed for later steps.

The first piece of information is very easy: your static IP address.

The easiest method is to Google “my IP” and it will appear right at the top of the search results from a machine on the same network. If you are not on the same network consult your administrator or ISP to acquire this IP address. Put this into your text editor and label it Static IP Address for later.

The second piece of information you will need is the subnet IP address range for your on-premise network(s) that you plan to connect to GCP.

To do this you will need to login to your UniFi controller with an admin account. From there go to the Settings menu (sprocket on the lower-left corner) and into the Networks page. Find the networks you will be connecting to and take note of the information in the subnet column.

Note that you can have more than 1 network chosen here. Put this into your text editor and label it On-Prem Subnet for later.

Here is an example in this screenshot. In the following screenshot I want to connect the Gaming and Home Devices networks to GCP, so I will save aside the following IP ranges in CIDR notation for later: 10.4.4.0/24 and 10.2.2.0/24.

Screenshot of Networks settings inside of UniFi controller

Leave this page open in a tab for later as well because we will return to it.

The last piece of information you will need is the subnet IP address range for the region you will be connecting to in GCP. You will need to have a little knowledge of what’s in your project and what region it runs in for this.

To acquire this you will need to login to the GCP console:

Click the main navigation menu in the upper left corner (3 bars icon) and go to VPC network -> VPC networks. On the screen that pops up will be one or more networks with a table of subnets in different regions. This can look different for every project depending upon the network design, so I will assume you are using the default network design that GCP provides. What you are looking for is the region where your resources live, most of the time this is us-central1 but can vary depending upon the network and infrastructure design. Once the correct region is determined take note of the value in the IP address ranges column. Put this in your text editor and label it GCP Network Range.

Leave your GCP Console open in a tab as you will be using it for the next set of steps in this process.

That’s all you need for getting this setup, it’s now time to dive in and implement this.