How do you see the routes a VM actually uses?
BeginnerConceptNetworking
Answer
az network nic show-effective-route-table -g rg -n vm-app-nic -o table
az network watcher show-next-hop -g rg --vm vm-app \
--source-ip 10.20.1.4 --dest-ip 8.8.8.8
Effective routes combine system routes, UDRs and BGP routes. show-next-hop tells you which next hop type (Internet, VirtualAppliance, VnetLocal, None) and which route table won.
More on Networking
What is a VNet and how does it compare to an AWS VPC?BeginnerHow many IP addresses does Azure reserve in each subnet?BeginnerWhat is a Network Security Group and how are its rules evaluated?BeginnerIf an NSG is on both the subnet and the NIC, how is traffic evaluated?AdvancedWhat are service tags and why use them in NSG rules?BeginnerWhat is an Application Security Group (ASG)?Intermediate