5_Peering Hub and Spoke VNets - Nirvan-Pandey/Azure_DOC GitHub Wiki

5_1: Introduction

Peering Hub and Spoke Virtual Networks (VNets) in Azure allows seamless communication between the Hub VNet and Spoke VNets. This is commonly used in a Hub-

and-Spoke network topology, where the Hub VNet acts as a central point for shared services (e.g., VPN, firewall, etc.), and Spoke VNets host workloads or

applications.

5_2: Peer the Hub VNet with a Spoke VNet

Step 1: Navigate to the Hub VNet

In the Azure portal, go to Virtual networks.

image

image

Select the Hub VNet.

image

Step 2: Create a Peering from Hub to Spoke

In the Hub VNet, go to Settings > Peerings.

Click + Add to create a new peering.

image

Fill in the details:

Peering link name: Enter a name for the peering (e.g., Hub_VNet_to_Spoke_VNet_Peering).

Virtual network deployment model: Select Resource Manager.

Virtual network: Select the Spoke VNet (e.g., SpokeVNet).

Traffic to remote virtual network: Select Allow (default).

Traffic forwarded from remote virtual network: Select Allow if you want the Spoke VNet to forward traffic to other VNets via the Hub.

Gateway transit: Enable this if the Hub VNet has a gateway and you want the Spoke VNet to use it.

Click Add.

image

image

5_3: Verify the Peering

Step 1: Check Peering Status

Go to Settings > Peerings in both the Hub and Spoke VNets.

Ensure the peering status is Connected for both directions.

image

image

Step 2: Test Connectivity

Deploy a virtual machine (VM) in the Hub VNet and another in the Spoke VNet.

Use tools like ping or tracert to test connectivity between the VMs.

This document provides a structured approach to setting up Hub-and-Spoke VNet Peering in Azure.