Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This quickstart shows you how to create an Azure Route Server and configure BGP peering with a network virtual appliance (NVA) using Azure PowerShell. Azure Route Server enables dynamic routing between your virtual network and network virtual appliances, automatically exchanging routes through BGP protocols.
By completing this quickstart, you have a functioning Route Server that can facilitate dynamic route exchange with network virtual appliances in your Azure virtual network.
Important
Route servers created before November 1, 2021, without an associated public IP address, were deployed with the public preview offering. The public preview offering doesn't include General Availability SLA and support. To deploy a route server with the General Availability offering and qualify for the General Availability SLA and support, delete and recreate your route server.
Prerequisites
Before you begin, ensure you have the following requirements:
- An Azure account with an active subscription. Create an account.
- Familiarity with Azure Route Server service limits.
- Azure PowerShell installed locally.
Azure PowerShell setup
You can install Azure PowerShell locally to run the cmdlets. Sign in to Azure using the Connect-AzAccount cmdlet.
Create a Route Server
This section walks you through creating the foundational infrastructure for Azure Route Server, including the resource group, virtual network, and Route Server instance.
Create resource group and virtual network
Route Server requires a dedicated subnet named RouteServerSubnet with a minimum size of /26. First, create the resource group and virtual network infrastructure:
Create a resource group using the New-AzResourceGroup cmdlet:
# Create a resource group New-AzResourceGroup -Name 'myResourceGroup' -Location 'ChinaNorth3'
Create a subnet configuration for RouteServerSubnet using the New-AzVirtualNetworkSubnetConfig cmdlet:
# Create subnet configuration for Route Server $subnet = New-AzVirtualNetworkSubnetConfig -Name 'RouteServerSubnet' -AddressPrefix '10.0.1.0/26'
Create a virtual network using the New-AzVirtualNetwork cmdlet:
# Create a virtual network and store in a variable $vnet = New-AzVirtualNetwork -Name 'myVirtualNetwork' -ResourceGroupName 'myResourceGroup' -Location 'ChinaNorth3' -AddressPrefix '10.0.0.0/16' -Subnet $subnet # Store the subnet ID in a variable for later use $subnetId = (Get-AzVirtualNetworkSubnetConfig -Name 'RouteServerSubnet' -VirtualNetwork $vnet).Id
Create public IP and Route Server
Route Server requires a public IP address to ensure connectivity to the backend management service:
Create a Standard public IP address using the New-AzPublicIpAddress cmdlet:
# Create a Standard public IP for Route Server $publicIp = New-AzPublicIpAddress -ResourceGroupName 'myResourceGroup' -Name 'myRouteServerIP' -Location 'ChinaNorth3' -AllocationMethod 'Static' -Sku 'Standard' -IpAddressVersion 'Ipv4'
Create the Route Server using the New-AzRouteServer cmdlet:
# Create the Route Server New-AzRouteServer -RouteServerName 'myRouteServer' -ResourceGroupName 'myResourceGroup' -Location 'ChinaNorth3' -HostedSubnet $subnetId -PublicIP $publicIp
Note
The deployment of the Route Server can take up to 30 minutes.
Configure BGP peering with network virtual appliance
After creating the Route Server, configure BGP peering with your network virtual appliance to enable dynamic route exchange.
Establish BGP peering
Use the Add-AzRouteServerPeer cmdlet to create a BGP peering session between Route Server and your NVA:
# Create BGP peering with the network virtual appliance
Add-AzRouteServerPeer -ResourceGroupName 'myResourceGroup' -RouteServerName 'myRouteServer' -PeerName 'myNVA' -PeerAsn '65001' -PeerIp '10.0.0.4'
This command creates a peer named myNVA with:
- Peer IP address: 10.0.0.4 (the NVA's IP address)
- Autonomous System Number (ASN): 65001 (see supported ASN values)
Note
The peer name doesn't need to match the actual NVA name; it's just an identifier for the BGP peering session.
Get Route Server BGP information
To complete the BGP peering configuration on your NVA, you need the Route Server's IP addresses and ASN. Use the Get-AzRouteServer cmdlet to retrieve this information:
# Get Route Server details for NVA configuration
Get-AzRouteServer -ResourceGroupName 'myResourceGroup' -RouteServerName 'myRouteServer'
The command returns output similar to the following example. Note the RouteServerAsn and RouteServerIps values needed for your NVA configuration:
ResourceGroupName Name Location RouteServerAsn RouteServerIps ProvisioningState HubRoutingPreference AllowBranchToBranchTraffic
----------------- ---- -------- -------------- -------------- ----------------- -------------------- --------------------------
myResourceGroup myRouteServer chinanorth3 65515 {10.0.1.4, 10.0.1.5} Succeeded ExpressRoute False
Use these values to configure BGP on your NVA:
- ASN: 65515 (RouteServerAsn)
- Peer IP addresses: 10.0.1.4 and 10.0.1.5 (RouteServerIps)
Important
We recommend peering each NVA with both route server instances to ensure that virtual network routes are advertised over the NVA connections and achieve high availability.
Clean up resources
When you no longer need the Route Server and associated resources, delete the resource group using the Remove-AzResourceGroup cmdlet:
# Delete the resource group and all contained resources
Remove-AzResourceGroup -Name 'myResourceGroup' -Force
Next step
Now that you've created a Route Server and established BGP peering, learn more about Route Server capabilities: