What Is Azure VNet Peering?
Azure Virtual Network is used for the Virtual Network Peering empowers users to flawlessly communicate with virtual networks in Azure. VNet Peering in Azure allows the traffic of one virtual network to communicate to another virtual network.
Types Of VNet Peering
1. Default VNet Peering: it empowers the connectivity between various VNets within the same Azure region.
2. Global VNet Peering: it allows Virtual networks to connect across different Azure regions. It provides private peering with low latency and high bandwidth in Azure backbone infrastructure.
Step-by-Step Configuration
1. Log in to the Azure portal at https://portal.azure.com.
2. Create two Virtual networks in the same or Different regions like Vnet1, Vnet2, etc.
Now go to any one of the two Virtual Networks and select Peerings, under Settings, and then select Add.
Note : Open the below image just by clicking if you see it blurred.
4. Configuring the peering for the two virtual
networks and select, Add.
This virtual network: means the
vnet 1
Remote virtual network: means the vnet (here vnet2) which you want to peer the vnet1 with.
Note : Open the below image just by clicking if you see it blurred.
5. The PEERING STATUS is Connected, as shown in the following picture.
Open the below image just by clicking if you see it blurred.
6. If you don’t see the status, refresh your browser.
Note: Configuring peering on anyone VNet will configure the peering automatically on the other VNet as well.
7. Now connect anyone
of your VM and then try to ping the Public IP of the second
Virtual Machine to test the peering.
Note: If you are using a Windows Server VM, the ping will
fail, because ping uses the Internet Control Message Protocol (ICMP). By
default, ICMP isn’t allowed through the Windows firewall.
8. To allow VM1 to ping
VM2 in a later step, enter this command in the VM2 Powershell.
New-NetFirewallRule –DisplayName “Allow
ICMPv4-In” –Protocol ICMPv4
9. NOTE: You have to enter this command on the other VM. (Here VM2).
10. Now, close the
remote desktop connection to VM2 and connect to the VM1, then again ping
the Public IP of the second VM.
Now you will see
that your Virtual Machines is connected as it has 100% packages received on
pinging to VM2.
You have successfully configured and tested the VNet Peering, I hope now you have a better understanding of VNet Peering in Azure. The virtual network establishes the connection with VPN gateways and VNet Peering but it depends on the condition and requirement of the scenario.
0 Comments