You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Learn how to configure routing preference (preview) in Azure Route Server using Azure PowerShell to influence its route selection.
5
5
author: halkazwini
6
6
ms.author: halkazwini
7
7
ms.service: route-server
8
-
ms.custom: devx-track-azurepowershell
9
8
ms.topic: how-to
10
-
ms.date: 07/31/2023
9
+
ms.date: 10/12/2023
10
+
ms.custom: devx-track-azurepowershell
11
+
12
+
#CustomerIntent: As an Azure administrator, I want learn how to use routing preference setting so that I can influence route selection in Azure Route Server by using Azure PowerShell.
11
13
---
12
14
13
15
# Configure routing preference to influence route selection using PowerShell
14
16
15
-
Learn how to use [routing preference (preview)](hub-routing-preference.md)setting in Azure Route Server to influence its route selection.
17
+
Learn how to use routing preference setting in Azure Route Server to influence its route learning and selection. For more information, see [Routing preference (preview)](hub-routing-preference.md).
16
18
17
19
> [!IMPORTANT]
18
20
> Routing preference is currently in PREVIEW.
@@ -21,62 +23,52 @@ Learn how to use [routing preference (preview)](hub-routing-preference.md) setti
21
23
## Prerequisites
22
24
23
25
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
26
+
- An Azure route server. If you need to create a Route Server, see [Create and configure Azure Route Server](quickstart-configure-route-server-powershell.md).
24
27
- Azure Cloud Shell or Azure PowerShell installed locally.
25
28
26
-
## Create a virtual network
29
+
## View routing preference configuration
27
30
28
-
Before you can create a virtual network, you have to create a resource group. Use [New-AzResourceGroup](/powershell/module/az.Resources/New-azResourceGroup) to create the resource group. This example creates a resource group named **myResourceGroup** in the **EastUS** region.
29
-
30
-
Use [New-AzVirtualNetwork](/powershell/module/az.network/new-azvirtualnetwork) to create the virtual network. This example creates a virtual network named **myVirtualNetwork** in the **EastUS** region. You need a dedicated subnet called **RouteServerSubnet** for the Route Server. Use [New-AzVirtualNetworkSubnetConfig](/powershell/module/az.network/new-azvirtualnetworksubnetconfig) to create the subnet configuration of RouteServerSubnet.
31
+
Use [Get-AzRouteServer](/powershell/module/az.network/get-azrouteserver) to view the current routing preference configuration.
In the output, you can see the current routing preference setting under **HubRoutingPreference**:
47
39
48
-
Before you create the Route Server, create a standard public IP using [New-AzPublicIpAddress](/powershell/module/az.network/new-azpublicipaddress). Then use [New-AzRouteServer](/powershell/module/az.network/new-azrouteserver) to create the route server with a routing preference set to **VpnGateway**. When you choose VpnGateway as a routing preference, Route Server prefers routes learned through VPN/SD-WAN connections over routes learned through ExpressRoute.
40
+
```output
41
+
ResourceGroupName Name Location RouteServerAsn RouteServerIps ProvisioningState HubRoutingPreference
To update the routing preference of an existing Route Server, use [Update-AzRouteServer](/powershell/module/az.network/update-azrouteserver). This example updates the routing preference to AS Path.
> If you don't include ***-AllowBranchToBranchTraffic*** parameter, **route exchange (branch-to-branch)** will be disabled even if it was enabled before running the **Update-AzRouteServer** cmdlet.
69
+
70
+
## Related content
80
71
81
-
- To learn more about configuring Azure Route Servers, see [Create and configure Route Server using Azure PowerShell](quickstart-configure-route-server-powershell.md).
82
-
- To learn more about Azure Route Server, see [Azure Route Server FAQ](route-server-faq.md).
72
+
-[Create and configure Route Server](quickstart-configure-route-server-powershell.md)
0 commit comments