Get-​Azure​Rm​Virtual​Network​Gateway​Learned​Route

Lists routes learned by an Azure virtual network gateway

Syntax

Get-AzureRmVirtualNetworkGatewayLearnedRoute
   -ResourceGroupName <String>
   -VirtualNetworkGatewayName <String>
   [<CommonParameters>]

Description

Enumerates routes learned by an Azure virtual network gateway from various sources. This includes routes learned over BGP, as well as static routes.

Examples

Example 1

PS C:\> Get-AzureRmVirtualNetworkGatewayLearnedRoute -ResourceGroupName resourceGroup -VirtualNetworkGatewayname gatewayName

AsPath       :
LocalAddress : 10.1.0.254
Network      : 10.1.0.0/16
NextHop      :
Origin       : Network
SourcePeer   : 10.1.0.254
Weight       : 32768

AsPath       :
LocalAddress : 10.1.0.254
Network      : 10.0.0.254/32
NextHop      :
Origin       : Network
SourcePeer   : 10.1.0.254
Weight       : 32768

AsPath       : 65515
LocalAddress : 10.1.0.254
Network      : 10.0.0.0/16
NextHop      : 10.0.0.254
Origin       : EBgp
SourcePeer   : 10.0.0.254
Weight       : 32768

For the Azure virtual network gateway named gatewayname in resource group resourceGroup, retrieves routes the Azure gateway knows.

The Azure virtual network gateway in this case has two static routes (10.1.0.0/16 and 10.0.0.254/32), as well as one route learned over BGP (10.0.0.0/16).

Required Parameters

-ResourceGroupName

Virtual network gateway resource group's name

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-VirtualNetworkGatewayName

Virtual network gateway name

Type:String
Aliases:ResourceName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

System.String

Outputs

Microsoft.Azure.Commands.Network.Models.PSGatewayRoute[]