![]() ![]() $networkWatcher = Get-AzNetworkWatcher -Name $networkWatcherName -ResourceGroupName $networkWatcherResourceGroup # Get the properties of the Network Watcher $global:currenttime= Set-PSBreakpoint -Variable currenttime -Mode Read -Action \Get-Network-Level-View-of-a-VNet.ps1 nw-hub-myh-we-01 rg-hub-myh-networking-01 ![]() Set-AzContext -Subscription "" (if not using the default subscription) Next to that if you are using multiple Azure subscriptions, select the proper subscription with the Set-AzContext cmdlet before running the script. Keep in mind that if you are not running the script from Cloud Shell, like when you are using Windows Terminal, you first need to sign in with the Connect-AzAccount cmdlet to connect with an authenticated account. Or you can simply run it from Cloud Shell. Then run the script with Administrator privileges from Windows Terminal, Visual Studio Code, or Windows PowerShell. To use the script copy and save it as Get-Network-Topology-of-a-VNet-in-JSON-format.ps1 or download it from GitHub. Just keep in mind that if resources from multiple regions reside in the resource group, that only the resources in the same region as the Network Watcher will be included in the JSON output. This output will give you a network level view of all networking resources and their relationships from a specific resource group. You can use the below Azure PowerShell script to get the network topology of a VNet in a JSON output. View a network topology in JSON format with Network Watcher using an Azure PowerShell script Afterwards, you can also use this image to add it in any documentation you want, like for example an Azure environment assessment or a Low-Level Design (LLD). svg file with Edge or any other modern web browser). When the topology.svg file is downloaded, just click on it to see the VNEt’s network topology (you can view an. Next to this, if you also want to download the topology in SVG file format, you just need to click on Download topology. You can now use this generated topology to analyze, troubleshoot issues, or even identify misconfigurations in this VNet. ![]() Select a Subscription, the Resource Group of a VNet (all resource groups under the chosen subscription that have a VNet are automatically shown in a drop-down list) you want to view the topology for, and then select the VNet itself. When all are selected the topology of the selected VNet will be shown, like you can also see on the below picture. In the Network Watcher screen (blade), select Topology under the Monitoring section. Logon to the Azure Portal and type in “ network watcher” in the Global search bar. View a network topology with Network Watcher using the Azure Portal A network watcher enabled in the same region as the VNet you want to generate a topology for.An Azure Administrator account with the necessary RBAC roles.* You should also keep in mind that Network Watcher Topology supports a limited set of Azure networking resources, which include all of the following: VNet, Subnet, Network Interface, NSG, Load Balancer, Load Balancer Health probe, Public IP, Virtual Network Peering, Virtual network gateway, VPN Gateway Connection, Virtual Machine, and Virtual Machine Scale Set. If you want to read some more about Azure Network Watcher, you can do so via the following Microsoft Docs link: Azure Network Watcher documentation Or you can use NSG flow logs, which allows you to log information about IP traffic flowing through an Azure network security group (NSG).īut in this Azure tip blog post, I will show you how easy it is to get a view of a VNet’s network topology by using Network Watcher Topology* in the Azure Portal and with the use of an Azure PowerShell script. You can use tools like the Connection troubleshoot, which enables you to for example test a connection between an Azure virtual machine (VM) and another Azure VM. Like some of you will know, Azure Network Watcher provides tools that allow you to monitor, diagnose, view metrics and gain insight in the performance of network resources in a VNet. Luckily, you can use the topology capability of Network Watcher for this. ![]() Most of you will probably at some point require a visual overview of the network topology of one or more virtual networks (VNet)s in your own, your companies or even a customer Azure environment. ![]()
0 Comments
Leave a Reply. |