Azure portal
In the Azure portal, you can view the connection status of a Resource Manager VPN Gateway by navigating to the connection. The following steps show one way to navigate to your connection and verify.
-
In the Azure portal, click All resources and navigate to your virtual network gateway.
-
On the blade for your virtual network gateway, click Connections. You can see the status of each connection.
-
Click the name of the connection that you want to verify. In Essentials, you can view more information about your connection. The Status values are 'Succeeded' and 'Connected' when you have made a successful connection.
PowerShell
To verify a VPN gateway connection for the Resource Manager deployment model using PowerShell, install the latest version of the Azure Resource Manager PowerShell cmdlets.
You can verify that your connection succeeded by using the 'Get-AzVirtualNetworkGatewayConnection' cmdlet, with or without '-Debug'.
-
Use the following cmdlet example, configuring the values to match your own. If prompted, select 'A' in order to run 'All'. In the example, '-Name' refers to the name of the connection that you want to test.
Azure PowerShellCopy Try ItGet-AzVirtualNetworkGatewayConnection -Name VNet1toSite1 -ResourceGroupName TestRG1
-
After the cmdlet has finished, view the values. In the example below, the connection status shows as 'Connected' and you can see ingress and egress bytes.
Copy"connectionStatus": "Connected", "ingressBytesTransferred": 33509044, "egressBytesTransferred": 4142431
Azure CLI
To verify a VPN gateway connection for the Resource Manager deployment model using Azure CLI, install the latest version of the CLI commands (2.0 or later).
You can verify that your connection succeeded by using the az network vpn-connection show command. In the example, '--name' refers to the name of the connection that you want to test. When the connection is in the process of being established, its connection status shows 'Connecting'. Once the connection is established, the status changes to 'Connected'.
az network vpn-connection show --name VNet1toSite2 --resource-group TestRG1
Azure portal (classic)
In the Azure portal, you can view the connection status for a classic VNet VPN Gateway by navigating to the connection. The following steps show one way to navigate to your connection and verify.
-
In the Azure portal, click All resources and navigate to your classic virtual network (VNet).
-
On the virtual network page, select the type of connection that you want to see. For example, Site-to-site connections.
-
On the Site-to-site connections page, under Name, select the site connection you want to view.
-
On the Properties page, view the information about the connection.
PowerShell (classic)
To verify your VPN gateway connection for the classic deployment model using PowerShell, install the latest versions of the Azure PowerShell cmdlets. Be sure to download and install the Service Management module. Use 'Add-AzureAccount' to log in to the classic deployment model.
You can verify that your connection succeeded by using the 'Get-AzureVNetConnection' cmdlet.
-
Use the following cmdlet example, configuring the values to match your own. The name of the virtual network must be in quotes if it contains spaces.
Azure PowerShellCopyGet-AzureVNetConnection "Group ClassicRG TestVNet1"
-
After the cmdlet has finished, view the values. In the example below, the Connectivity State shows as 'Connected' and you can see ingress and egress bytes.
OutputCopyConnectivityState : Connected EgressBytesTransferred : 181664 IngressBytesTransferred : 182080 LastConnectionEstablished : 10/19/22020 12:40:54 AM LastEventID : 24401 LastEventMessage : The connectivity state for the local network site 'F7F7BFC7_SiteVNet4' changed from Connecting to Connected. LastEventTimeStamp : 10/19/2020 12:40:54 AM LocalNetworkSiteName : F7F7BFC7_SiteVNet4
Comments
0 comments
Please sign in to leave a comment.