In Microsoft Azure Virtual Networks, Peering connects multiple virtual networks. It simplifies the connectivity and configuration between virtual networks. Once connectivity established through peering, traffic flows seamlessly between two virtual networks. Traffic between peered virtual network leverages Microsoft infrastructure backbone, much likely traffic is flowing within the same virtual network. However, it doesn’t cover all the scenarios and it is the option available only for virtual networks available in same region. Apart from this major constraint, there are many other restrictions applies to it such as address ranges can’t be added or deleted from the address space of a virtual network once peered with another virtual network. However, peering virtual networks between region is currently in preview for few regions and it may be generally available soon.
Address spaces within same virtual network doesn’t require peering. For example, if I have two address spaces one for corporate network and another for perimeter network, and both are part of the same virtual network then there is no need to establish any kind of connectivity because both networks can talk to each other by default.
Now, let me show you how to setup peering between virtual network.
Login to the Azure Portal and first go to your virtual network and then go to the “Peering” under settings. Select “+ Add” to establish a peering between virtual networks.
In Add peering panel, fill the required details.
Name: Enter a common name for the peering that you can recognized.
Peer details: Select virtual network deployment model.
Subscription: Select the subscription.
Virtual network: Select the destination virtual network.
Configuration: By default, “Allow virtual network access” enabled. If you don’t have specific configuration, go with default configuration.
Once entered all the necessary details then click “OK” to setup a peering.
Once created successfully, you will be able to see it in peering panel.
Follow the same steps in another virtual network as well. Once completed from both the side, you will be able to flow data between peered networks.