Hello Apurva Pathak
The official Azure document on diagnosing VM networking issues and obtaining effective routes using Azure CLI and PowerShell provides step-by-step commands and explanations
Diagnose a virtual machine routing problem : https://learn.microsoft.com/en-us/azure/virtual-network/diagnose-network-routing-problem
Create, change, or delete a network interface https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-network-interface?tabs=azure-portal
Also, we recommend to follow the below suggested steps
Try using az network nic show-effective-route-table --name <NICName> --resource-group <ResourceGroup> to view effective routes for a NIC.
In VMSS, the NIC name can be identified by listing NICs in the resource group, as they are named per VMSS instance NICs.
From within the OS of a VMSS instance, you cannot directly list Azure effective routes set at the NIC or subnet level since these routes are managed by Azure fabric and are not pushed into the VM OS routing table. You can only see the standard local OS routing tables which don't reflect Azure user-defined routes or the system routes
For troubleshooting, use Azure portal under Networking for the VM instance, selecting the VMSS instance NIC and viewing "Effective routes" under HelpCreate, change, or delete a route table : https://learn.microsoft.com/en-us/azure/virtual-network/manage-route-table
Diagnose a virtual machine routing problem : https://learn.microsoft.com/en-us/azure/virtual-network/diagnose-network-routing-problem
Diagnose a virtual machine network routing problem using the Azure portal : https://learn.microsoft.com/en-us/azure/network-watcher/diagnose-vm-network-routing-problem.