Peering networks...

Dragan Stojkoski 66 Reputation points
2023-01-04T09:42:49.037+00:00

How to peer 2 vnets in Azure ? Can you provide me some guidance ...

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,762 questions
0 comments No comments
{count} votes

Accepted answer
  1. Martin Dimovski 1,636 Reputation points MVP
    2023-01-04T10:07:56.937+00:00

    Hi,

    Thank you for posting the question to the Q&A forum.

    Virtual network peering enables you to seamlessly connect two or more Virtual Networks in Azure. The virtual networks appear as one for connectivity purposes. The traffic between virtual machines in peered virtual networks uses the Microsoft backbone infrastructure. Like traffic between virtual machines in the same network, traffic is routed through Microsoft's private network only.

    You can find how to peer the 2 virtual networks on this link below: https://learn.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal

    I hope the above information can help you.

    If the ANSWER is helpful, please click "Accept Answer" and upvote it. Thanks

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Andrei Barbu 2,596 Reputation points Microsoft Employee
    2023-01-04T09:49:15.687+00:00

    Hello @Dragan Stojkoski !

    There are multiple ways to peer two VNETs in Azure. Most intuitive are using Azure Portal or Azure CLI.

    For Azure Portal, you can refer to:
    https://learn.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal
    https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-peering?tabs=peering-portal#create-a-peering

    Basically you just need to go to the VNET in Azure Portal -> Peerings -> Add -> fill the details

    For Azure CLI, you can use:
    az network vnet peering create -g MyResourceGroup -n MyVnet1ToMyVnet2 --vnet-name MyVnet1 \
    --remote-vnet MyVnet2Id --allow-vnet-access

    Reference: https://learn.microsoft.com/en-us/cli/azure/network/vnet/peering?view=azure-cli-latest#az-network-vnet-peering-create

    Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.

    Thank you and happy new year!

    0 comments No comments

  2. GitaraniSharma-MSFT 50,021 Reputation points Microsoft Employee Moderator
    2023-01-04T09:51:20.363+00:00

    Hello @Dragan Stojkoski ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you would like to know how to peer 2 Vnets in Azure.

    Azure supports the following types of peering:

    • Virtual network peering: Connecting virtual networks within the same Azure region.
    • Global virtual network peering: Connecting virtual networks across Azure regions.

    Limitations & constraints of Vnet peering:
    You cannot peer two VNets with matching or overlapping address ranges.
    https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-faq#can-i-peer-two-vnets-with-matching-or-overlapping-address-ranges
    Resources in one virtual network can't communicate with the front-end IP address of a Basic Internal Load Balancer (ILB) in a globally peered virtual network.
    Some services that use a Basic load balancer don't work over global virtual network peering.
    Refer: https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-peering-overview#constraints-for-peered-virtual-networks

    You can peer 2 Vnets from the same subscription or belonging to different subscriptions.
    Refer: https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-peering-overview#next-steps

    To create Vnet peering between 2 Vnets in same subscription, please refer the below step by step tutorial:
    https://learn.microsoft.com/en-us/azure/virtual-network/tutorial-connect-virtual-networks-portal

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.