Virtual Network Peering and VNet-to-VNet VPN gateway connection

 

 

Virtual Network Peering :

Virtual network peering is used to connect two or more Virtual Networks in Azure. Once the Virtual networks are connected using peering  it will appear as one network. The traffic between VM's are routed through Microsoft infrastructure through private IP addresses only.

Types of Virtual network peering:

  • Virtual network peering: Connect virtual networks within the same Azure region.

  • Global virtual network peering: Connecting virtual networks across Azure regions. 

Step by Step procedure to create a Virtual network peering:

Create two Virtual Networks:

Go to Home >Virtual networks>Create>

Fill up the required fields > Review and Create

 

Create two Virtual Machines:

Go to Home >Virtual Machine >Create

Fill up the required fields as mentioned below> Ensure you select the appropriate VNets for VM1 and VM2

>Review and create 

Connect the VM’s using RDP Downloaded File


Create a Peering between Vnet1 and Vnet2:

Go to VNet1 you created >Peering> + Add

Specify the Peering Link Names >Add

Now you successfully created a peering between VNet1 and Vnet2 


Disable Firewall on both VM1 and VM2 (Disabling a firewall permits all data packets to entering and exiting the network unrestricted ) to allow the private ip’s of VM’s

Go to VM> Control Panel>System Security> Windows Firewall>

Turn Off Windows Firewall


To Verify the Peering connection:

Copy the private ip of the VM2 and Ping the IP from the VM1 Machine



You should be able to ping the Private IP of VM2 from VM1 .

Vice versa:


Ping from VM2 machine:

VNet-to-VNet VPN gateway connection:

A VPN gateway is a specific type of virtual network gateway that is used to send encrypted traffic between an Azure virtual network and an on-premises location over the public Internet.
You can also use a VPN gateway to send encrypted traffic between Azure virtual networks over the Microsoft network. A local Gateway (on-prem) reffers to on premises router WITHIN azure. Azure fetches the required information from on prem router and configures a Virtual Device (local Gateway) within Azure.

Create two Virtual Networks for 2 regions:

Go to Home >Virtual networks>Create>

From the Azure portal, Click on Virtual Networks> Add >Provide Ip Address (10.0.0.0/16)> Create
Select Subnet>Gateway subnet>Verify your network requirements and assign the address range to the gateway subnet accordingly. We use the 10.0.1.0/24 address range


Fill up the required fields > Review and Create

 Create two Virtual network gateways:

Go to Home >Virtual Network Gateway> Add button> Fill up the details>Gateway type as VPN >VPN type as Route-based

Create a public IP address or select the existing one>Select the location >create 

  

   Creating connection between two regions:

V-Net1 to V-Net2 
Go to Virtual Network Gateway >Add Connection>

                                         Thank You !!

 Fill up the details> Connection type V-Net-to-V-Net> The Virtual Network gateway field will get filled automatically.
 Select the Second Virtual Gateway>Create Shared key (PSK) secret for both gateway to share >Ok

Create another connection for  V-Net2 to V-Net1.

Once the Connection is established you can see the status of the two virtual network gateway's as connected.Double-click each Connection to view amount of Data transferred between the two virtual networks.

Verify VPN Gateway connection using Azure portal 

                                                  Thank you !!

Comments

Popular posts from this blog

AZCopy : Upload and Download files from or to Azure Storage account using AZcopy

AZURE ADMINISTRATOR ASSOCIATE (AZ-104)