Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Select, configure, and scale Azure compute resources—VMs, App Service, AKS, and Container Apps
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
workflows/vm-troubleshooter/references/network-connectivity.md
1# Network Connectivity Problems23User's VM is running but unreachable due to network-level issues (NSG, routing, NIC, DNS).45> ⚠️ **OS Note:** NSG, routing, and public IP issues are OS-agnostic (Azure platform layer). NIC and DNS issues have OS-specific remediation — see the OS column below.67## Symptoms → Solutions89| Symptom | OS | Solution | Documentation |10| ------------------------------------------ | ------- | ------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |11| NSG has no allow rule for RDP/SSH port | Any | Add inbound allow rule for TCP 3389 or 22 | [NSG blocking RDP](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-rdp-nsg-problem) |12| NSG at both NIC and subnet level blocking | Any | Traffic must pass both NSGs — check effective rules | [Diagnose VM traffic filtering](https://learn.microsoft.com/en-us/azure/network-watcher/diagnose-vm-network-traffic-filtering-problem) |13| Custom route (UDR) sending traffic to NVA | Any | Check effective routes, verify NVA is forwarding | [Diagnose VM routing](https://learn.microsoft.com/en-us/azure/network-watcher/diagnose-vm-network-routing-problem) |14| VM has no public IP | Any | Add a public IP or connect via Azure Bastion | [Public IP addresses](https://learn.microsoft.com/en-us/azure/virtual-network/ip-services/public-ip-addresses) |15| NIC is disabled inside guest OS | Windows | Enable NIC via Run Command or Serial Console | [Troubleshoot RDP — NIC disabled](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-rdp-nic-disabled) |16| NIC is down inside guest OS | Linux | Bring interface up via Run Command or Serial Console | [Troubleshoot SSH connection](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/troubleshoot-ssh-connection) |17| Static IP misconfiguration inside guest | Windows | Azure VMs should use DHCP; reset NIC to restore | [Reset network interface](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/reset-network-interface) |18| Static IP misconfiguration inside guest | Linux | Restore DHCP config in `/etc/netplan/` or `/etc/sysconfig/network-scripts/` | [Troubleshoot SSH connection](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/linux/troubleshoot-ssh-connection) |19| Ghost NIC after disk swap or resize | Windows | Old NIC holds IP config, new NIC can't get IP | [Reset network interface](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/reset-network-interface) |20| DNS resolution failure | Any | Check DNS server config; Azure default is 168.63.129.16 | [DHCP troubleshooting](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-rdp-dhcp-disabled) |2122## Quick Commands — Platform (Any OS)2324```bash25# Check effective NSG rules on a NIC26az network nic list-effective-nsg --name <nic-name> -g <resource-group>2728# Check effective routes29az network nic show-effective-route-table --name <nic-name> -g <resource-group> -o table3031# Check if VM has a public IP32az vm list-ip-addresses --name <vm-name> -g <resource-group> -o table3334# Test connectivity from VM to a destination35az network watcher test-connectivity --source-resource <vm-resource-id> \36--dest-address <destination-ip> --dest-port <port> -g <resource-group>37```3839## Quick Commands — Windows4041```bash42# Reset NIC (restores DHCP, removes stale config — Windows only)43az vm repair reset-nic --name <vm-name> -g <resource-group> --yes44```4546## Quick Commands — Linux4748> ⚠️ **Warning:** Commands below use the VM agent/extensions. Run [Pre-Flight Safety Checks](cannot-connect-to-vm.md#pre-flight-safety-checks) before using them.4950```bash51# ⚡ Check network interface status via Run Command52az vm run-command invoke --name <vm-name> -g <resource-group> \53--command-id RunShellScript --scripts "ip link show; ip addr show"5455# ⚡ Bring interface up via Run Command56az vm run-command invoke --name <vm-name> -g <resource-group> \57--command-id RunShellScript --scripts "ip link set eth0 up && dhclient eth0"58```59