Connectivity-wise the two peered networks appear as one.
Peered traffic is routed through Microsoft’s private web link and not over the public internet.
An Azure virtual web link is a software-defined web link with a custom address space and segmented subnets.
There are two types of peering offered by Azure.
Why would we want to use virtual data pipe peering to connect two different virtual networks?
There are a couple of benefits to peered networks.
In this article, we are going to demonstrate creating a peered online grid using Azure Powershell commands.
You will need theAzure PowerShellmodule to perform these commands.
First, we need to import the
module and authenticate to Azure using the
cmdlet.
We can verify that the virtual networks have been created successfully, using theGet-AzVirtualNetworkcmdlet.
To do this, we will create two standard virtual machines each located in different virtual networks.
Finally, we will connect the two virtual networks by usingAdd-AzVirtualNetworkPeering.
After retrieving the virtual web link configurations, we will pass that information to create our peered connection.
You may notice that we need to peer from both directions.
UsingGet-AzVirtualNetworkPeeringwe can see that our peered networks are now available for use.
Otherwise, even with a peered connection, your ping tests will most likely fail.
As you might see below, both sides of the peered virtual connection connection work as expected.
Conclusion
Connecting Azure Virtual Networks through peering enables different resources to easily communicate and share data securely.
With PowerShell, this task is made easy and can be quickly incorporated into deployment scripts.
Get started with Azure Virtual Networks today!