Sharon demonstrates how to enable a gateway subnet, configured the VPN gateway and connect two Azure virtual networks across two different Azure regions.
- [Instructor] Now that we've talked about gateways and validated VPN devices, let's actually start configuring some of our connectivity options. In our first demonstration, we're going to go ahead and configure virtual networks. We're actually going to configure a virtual network to a virtual network. One thing to keep in mind here, these virtual networks have to be in the same subscription. And with that, let's take a look at what I've already pre-configured for us. In in Azure and I'm in the East US Resource Group as we can see here. And within here, I've already created a virtual network, a public IP address and a virtual gateway.
I'd like to connect this to our West US virtual network. You may sometimes hear this called regional networking because you can span a region. In our West US network, all I've done is configured the virtual network. I want to show you how we add in the rest of those bits and pieces. The first thing we need to do is create a gateway subnet. To do so, let's take a look at Subnets and you'll notice I have already created two subnets for us. A front end and a back end. But now I need a gateway subnet. This subnet should only be used for your gateway resources.
You'll notice that the name cannot be changed. I'm going to go ahead and use the address range that is provided for me. I may not need 256 addresses but I'm going to leave it as is. And I'm not worried about a writing table here, so I'm going to go ahead and click OK. And it's very quick to create the gateway subnet. It's just a subnet. What does take time is our next bit, which is actually creating the virtual network gateway. And to do that, I'm actually going to search for it in the Marketplace. So I need to go back go my Resource Group. I'm going to click Add because I need to add this virtual network gateway into this Resource Group.
And I could either search it or it's already presented to me. I'm going to go ahead and click the Virtual network gateway. And then go ahead and click Create. Next, provide a name. I'm choosing WestVNETG for gateway and we'll be using the Route-based VPN. Our SKU, I'm going to go ahead and choose a standard. In the testing environment, you can use a basic. Otherwise, you're looking at a standard or high performance depending on your needs. Next, we're going to go ahead and choose our virtual network. You will notice that we actually don't see our virtual network here.
And you may be wondering why not? Well, it's simple. If you scroll down here, you'll notice that the location is in East US 2. I'm currently working in the West US 2. Now that I've changed that, my network is available to me. It's one of those things that you may not notice because it's below. You may be backtracking ... What happened to it, where did it all go? That's why. Select your network. We do need a public IP address for these virtual networks to communicate with each other. I'm going to go ahead and select Create new.
I'm going to leave it as the same name, that way I know which one is which. Click OK. This is in my page you go subscription and we can see our location is in the West US 2. And go ahead and click Create. Before you do though, please note at the bottom, it says Provisioning for a virtual network gateway, may take up to 45 minutes. And I like to air a little bit on the side of caution here. My general rule of thumb is I will start creating this and then go for lunch. Go ahead, click Create. After an hour, our gateway was created. And you can see now that within our West US Resource Group, we have a virtual network, we have a public IP address and we have a virtual network gateway.
If we look at the East US Resource Group, we're going to see a very similar layout. Now it's time to actually connect these two networks together. To do so, we're going to go ahead and click on one of the virtual network gateways. I'm going to use the one in the East US. And then I'm going to go ahead and click Connections. We are now going to add the connection to connect to the other virtual network. Click Add, provide a name. Click the connection type. In our case, this is VNet to VNet.
Our EastUSVNG, our virtual network gateway is already selected for us because we're configuring it within that Resource Group. Now we have to select the network that it's going to connect to. We're going to go ahead and take our network that is sitting in the West US Resource Group. You will notice that there is another option here available to us. I do have another gateway set up but we do not want to use this one. Next, we're going to go ahead and add our Shared key. We'll use a highly secretive password of password123.
And from here, we can go ahead and click OK. This will take a few moments. Now we have to repeat the same procedure on our West US gateway. I'm going to select our West US Gateway Resource Group. And I'm going to run through the exact same process. I'm selecting Connections from Settings from within the virtual network gateway. I'm going to go ahead and click Add. We're going to go ahead and pick the East US network gateway. And our shared key, please don't ever use this password. And then click OK.
We can see that our first connection is succeeded and our second one is updating. Okay after a few moments, you'll see succeeded. We can actually see the details of that connection itself. We can see it's connected. We can see the two networks that are now joined. And we see the IP address of each one. And that's it. That's all you need to do to connect two virtual networks within Azure. And again, these can go across regions but they do need to be in the same subscription.
- Creating an Azure virtual network
- Creating a virtual network using PowerShell
- Deploying a VM into a virtual network
- Modifying IP addresses
- Working with Azure DNS
- Configuring NSGs
- Setting up load balancers
- Configuring Azure load balancers
- Creating an application gateway
- Setting up on-premises connectivity
- Adding gateway VPNs
- Validating VPN devices
- Configuring VNet
- Creating site connections