Hi Barany Mok,
Thanks for your question on the Microsoft Q&A portal !.
It sounds like you're working with a virtual WAN setup and you're looking to link a virtual hub to one of the user-defined routing (UDR) tables in your vNET_A. Here's how you can approach this.
In a Virtual WAN (vWAN) architecture, when a virtual network connection is established between a vHub and a vNET (e.g., vNET_A), the routing behavior is managed centrally by the vHub router. However, User-Defined Routes (UDRs) within vNET_A are applied at the subnet level, not directly to the peering itself.
Why the UDR Link Seems Unclear
- The effective route in the vHub shows the next hop as the virtual connection to vNET_A, but it doesn’t reflect which subnet or UDR table is being used.
- That’s because UDRs are enforced within the vNET, not in the vHub. The vHub simply forwards traffic to the vNET, and the subnet’s UDR table takes over from there.
How to Link Peering to a Specific UDR
To ensure traffic from the vHub follows a specific UDR in vNET_A:
- Assign the desired UDR table to the target subnet in vNET_A.
- Ensure that the VM or resource in that subnet is the intended recipient of traffic.
- The vHub will route traffic to vNET_A, and the subnet’s UDR will determine the next hop (e.g., a virtual router VM).
BGP Peering Between vHub and VM (Virtual Router)
To establish BGP peering between the vHub and a VM (acting as a virtual router) in vNET_A:
Requirements you need to have.
- The VM must support BGP and be configured with a different ASN than the vHub.
- The virtual network connection to vNET_A must be:
- Associated with the default route table
- Propagating to the default route table (custom route tables are not supported for BGP peering at this time)
- Associated with the default route table
Please find the below Steps:
- Deploy the VM (NVA or router) in the subnet with the correct UDR.
- Configure BGP on the VM with a unique ASN.
- Ensure the VM’s IP is reachable from the vHub.
- Set up BGP peering in the vHub configuration, pointing to the VM’s IP.
Note: BGP peering is only supported with IPs assigned to VM interfaces—not loopbacks.
If you need more information about BGP Peering please go through with this link - About BGP peering with a virtual hub - Azure Virtual WAN | Microsoft Learn
Thanks,
Pranitha