Azure PowerShell Commands for Listing Network Configuration

While working on Azure, PowerShell can be your friend when you need some information quickly, live and that is not visible in Azure Portal. Following are few of the commands that can be helpful for a network administrator working on Azure.


List all virtual network subnets by using PowerShell

Get-AzureRmVirtualNetwork -Name <My-vnet-name> -ResourceGroupName <vnet-resource-group-name> | Get-AzureRmVirtualNetworkSubnetConfig | Format-Table


List detailed route table of an ExpressRoute circuit. This command output will include prefixes learnt/advertised with Next hop, Local Preference, Weight and AS Path list.

Get-AzureRmExpressRouteCircuitRouteTable -ResourceGroupName: <express-route-resource-group-name> -ExpressRouteCircuitName: <express-route-circuit-name> -PeeringType: AzurePrivatePeering -DevicePath: Primary | Format-Table 


List summary of BGP neighbor information for a particular routing context. This information is useful to determine for how long a routing context has been established and the number of route prefixes advertised by the peering router.

Get-AzExpressRouteCircuitRouteTableSummary -ResourceGroupName: <express-route-resource-group-name> -ExpressRouteCircuitName: <express-route-circuit-name> -PeeringType: AzurePrivatePeering -DevicePath: Primary | Format-Table


List traffic statistics for an ExpressRoute circuit. The statistics include the number of bytes sent and received over both the primary and secondary routes.

Get-AzExpressRouteCircuitStat -ResourceGroupName: <express-route-resource-group-name> -ExpressRouteCircuitName: <express-route-circuit-name> -PeeringType: AzurePrivatePeering | Format-Table


Lists an Azure virtual network gateway's BGP peers. Output of the command shows Local Address, Neighbor Address, Remote ASN, State, Connected Duration, Routes Received and message sent or received.

Get-AzVirtualNetworkGatewayBGPPeerStatus -VirtualNetworkGatewayName <virutal-gateway-name> -ResourceGroupName <vng-resource-group-name> | Format-Table


Lists routes being advertised by an Azure virtual network gateway. Output of the command shows Local Address, Advertised prefixes, Next Hop, Origin, ASPath and Weight

Get-AzVirtualNetworkGatewayAdvertisedRoute -VirtualNetworkGatewayName <virutal-gateway-name> -ResourceGroupName <vng-resource-group-name> -Peer <bgp-remote-peer-ip-address> | Format-Table


Lists routes learned by an Azure virtual network gateway. Output of the command shows Local Address, Learnt prefixes, Next hop, Peer from which the prefix is received, Route Origin, ASPath and Weight.

Get-AzVirtualNetworkGatewayLearnedRoute -VirtualNetworkGatewayName <virutal-gateway-name> -ResourceGroupName <vng-resource-group-name> | Sort-Object -Property Network | Format-Table


 

Comments

  1. You have done good work by publishing this article here. I found this article too much informative, and also it is beneficial to enhance our knowledge. Grateful to you for sharing an article like this. software development company in indore

    ReplyDelete

Post a Comment

Popular posts from this blog

Anyconnect SSL-Client VPN with Self-signed Certificate on Cisco ASA

Filtering Routes in BGP using Route-maps and Prefix-list

Open Shortest Path First (OSPF)

IKEv2 IPsec Site-to-Site VPN configuration on Cisco ASA 8.4(x)

IPsec VPN as a Backup for Point-to-Point Link using IP SLA

Border Gateway Protocol (BGP)

Cisco ASA Active/Active Failover Configuration

Bypassing Proxy Server in Google Chrome

Cisco ASA Active/Standby Failover Configuration