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.

Creating the resource groups for this tutorial.

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.

Verifying that the virtual networks were successfully created.

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.

Demonstrating that the peering connection was successfully created.

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.

Verifying firewall settings.

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.

Sending ICMP pings from the first VM to the 2nd.

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.

Sending ICMP pings from the second VM to the 1st.

With PowerShell, this task is made easy and can be quickly incorporated into deployment scripts.

Get started with Azure Virtual Networks today!