The VNet to VNet connection type is a way to connect VNets together and is similar to creating a Site-to-Site IPsec connection to an on-premises location in that it uses a VPN gateway to create a secure IPsec tunnel between VNets.
Steps to create a VNet to VNet connection type
- Create a Virtual Network
- Create a gateway subnet
- Create a virtual network gateway
- Create other end’s VNet, subnet and gateway
- Configure the gateway connections
- Verify connections
Create a Virtual Network
Information about creating VNet can be found here
Create a gateway subnet
The gateway subnet contains the IP addresses that are used by the virtual network gateway. If possible, it’s best to create a gateway subnet by using a CIDR block of /28 or /27 to provide enough IP addresses to accommodate future additional configuration requirements.
- On the settings section of the Virtual Network, select subnet
- Click on Gateway subnet
- The name is automatically filled out as GatewaySubnet, adjust the IP address field as needed
Create a Virtual Network Gateway
- Click Create a resource and search for virtual network gateway, and select Virtual network gateway from the list and click Create
- Fill out the required fields, selecting VPN for Gateway type and VPN type as Route-based. Select the Region to be the same as the VNet in as well as giving the Public IP address a name.
- Click on Create. Creation can take about 45 minutes
Create other end resources
Create the other VNet with subnet and Virtual Network Gateway
Configure Gateway connections
- Within the resource group, click on the Virtual network gateway and under settings select Connections. Click on Add and fill out the Add Connection blade selecting the other Gateway under Second virtual network gateway.
- Repeat at on the other Gateway.
Verify the Connections
Once the above configurations have been done the connections can be verified by going to Connection on the Virtual network gateway, they should show as Connected (This may take a few minutes to show)
Clicking on the connection will show the data in / out and as traffic is sent this will increase.