Lesson 5 of 5 Azure Virtual Networks and Routing

Troubleshooting Network Connectivity in Azure

This lesson explains a layered method for finding connectivity faults and the most common causes.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe a layered troubleshooting method from DNS to the destination service.
  • Match connectivity questions to the tools that answer them.
  • Identify common causes of connectivity failures.

A layered method

Work through the path from source to destination, checking each layer in turn. The table below maps each question to the tool that answers it; most tools are part of Azure Network Watcher, covered in depth in the Azure Network Watcher module.

QuestionTool
Does the name resolve to the expected IP?nslookup or Resolve-DnsName on the VM; private DNS zone records and VNet links
Where does traffic to this IP go?Effective routes on the NIC; Network Watcher next hop
Is the packet allowed by NSGs?Effective security rules; IP flow verify; NSG diagnostics
Does an end-to-end connection succeed, and where does it fail?Connection troubleshoot
Are the VNets connected?Peering status (Connected), gateway connection status
Is the destination listening?Service status, guest OS firewall, boot diagnostics, Run command
Match the pairs

Which tool answers it?

Exam skills 4.1.5

Match each troubleshooting question with the tool that answers it.

Log in to try this activity Interactive activities are free with an account.

Common causes

Typical findings include: a UDR sending traffic to an NVA that is down or not forwarding (next hop shows Virtual appliance), or to None; an NSG on the NIC that denies what the subnet NSG allows; a peering whose status is Initiated or Disconnected; overlapping address spaces; missing gateway transit settings; a VM in a private subnet without an outbound method trying to reach the internet; and DNS that resolves a PaaS name to its public IP instead of its private endpoint because the privatelink zone is not linked to the VNet.

Inside the VM, check the guest firewall and that the application is listening on the expected port. Boot diagnostics and the serial console help when a VM is not reachable at all, and Reset network interface or Redeploy fix some guest network misconfigurations.

The following diagram compares name resolution for a storage account with a private endpoint, without and with the private DNS zone.

Why a VM resolves the public address of a storage account that has a private endpoint and public access disabled. The privatelink.blob.core.windows.net private DNS zone is missing, lacks the A record or is not linked to the VNet, or a custom DNS server does not forward to Azure DNS. With the zone in place, the name resolves to the private endpoint.
The scenario is illustrative.
Troubleshooting

Finding the broken layer

Exam skills 4.1.5

Find the cause of each connectivity problem.

Log in to try this activity Interactive activities are free with an account.
Worked example

A VM that cannot reach a storage account

A VM in subnet Apps cannot reach stcontoso.blob.core.windows.net, which has a private endpoint in subnet Data of the same VNet and public network access disabled. nslookup on the VM returns a public IP address for the name. What is the cause and the fix?

Name resolution is wrong: the VM resolves the public address, which is blocked because public access is disabled. The privatelink.blob.core.windows.net private DNS zone is missing, lacks the A record, or is not linked to the VNet (or the VNet uses a custom DNS server that does not forward to Azure DNS). Create or link the zone so that the name resolves to the private endpoint's IP. NSG or route changes would not help while DNS returns the wrong address.

Check yourself

Which Network Watcher tool shows which NSG rule blocks a specific packet?

Show answer

IP flow verify.

Exam Tips

Remember for the exam

  • Check DNS, then routes, then NSGs, then the destination service.
  • Next hop and effective routes reveal UDRs; IP flow verify names the blocking rule.
  • Private endpoint problems are usually DNS problems.
  • Peering must show Connected on both sides.