Demonstration of configuring peering between two VNets in Azure
An Azure RM template is included in infrastructure/
to create the environment:
Using Azure PowerShell, do the following to provision the resources:
.\startup.ps1
Alternatively, you can perform a one-click deploy with the following button:
-
Create a Linux VM with password authentication in a new VNet called dev. The VNet can be in a different region although peering data transfer costs are higher than if VNets are in the same region.
-
Initiate a peering connection from the shared-vnet VNet with the dev VNet. Observe the status of the peering is Initiated. The peering connection cannot be used until the status is Connected.
-
Initiate a peering connection from the dev_ VNet with the shared-vnet VNet. Observe the status of the peering is Connected. The peering connection cannot be used until the status is Connected.
-
Use the serial console of the VM in the dev VNet to connect the the VM in the shared VNet using a private IP address:
ssh 10.0.0.100
This confirms the peering connection allows traffic between VNets using Azure's private backbone network (not the public internet).
When finished, remove the Azure resources with:
.\teardown.ps1