Trace the effective network route
Follow a destination through subnet addressing, peering and next-hop selection.
Trace the effective network route
Reserve non-overlapping address spaces for networks that must peer. A subnet belongs to one VNet. Check its address range, association to a route table and any required gateway or appliance. VNet peering gives private connectivity between the paired networks. A chain of peerings does not automatically make one spoke a transit network for another.
First determine the actual destination IP. Inspect the NIC’s effective routes and use the longest matching prefix. For equal prefixes, route source and specific Azure routing rules matter. A user-defined route can send traffic to a virtual appliance. Verify forwarding, appliance behavior and a return path before attributing a problem to an application. A public IP provides addressability subject to other access controls.
Worked case
A spoke sends traffic for a partner subnet to a firewall, while traffic to other subnets still uses peering. Why can both paths be correct?
Check your reasoning
A more specific matching route for the partner subnet can select the appliance. Determine the actual destination and effective routes. Inspect the return path as well.
Second worked case
Spoke A peers with the hub and the hub peers with spoke B. Why might A still be unable to reach B?
Check your reasoning
Peering is nontransitive. Design an explicit supported transit path or direct peering, then check effective routes and security rules at both ends.
Select the effective route
Run the Python 3 exercise for two destination IPs. The table contains matching routes of different lengths. Predict which traffic goes to the virtual appliance.
from ipaddress import ip_address, ip_network
routes = [("0.0.0.0/0", "appliance"), ("10.30.0.0/16", "peering"),
("10.30.4.0/24", "inspection")]
for destination in ["10.30.4.8", "10.30.9.8"]:
matches = [(ip_network(prefix).prefixlen, hop)
for prefix, hop in routes if ip_address(destination) in ip_network(prefix)]
print(destination, max(matches)[1])
Check your output
10.30.4.8 inspection 10.30.9.8 peering
The /24 wins for the first destination and the /16 for the second. Remove the /24 to see both use peering. This fixture uses distinct prefix lengths. Azure route-source precedence also matters for ties.
Azure virtual network routing · Official AZ-104 objectives for this domain
Microsoft Exam Readiness Zone on implement and manage virtual networking
Related lesson in Microsoft Certified: Azure Fundamentals. Connect a workload to the right hosting platform.
Practice with the recording
Networks A and B are peered, as are B and C. Why does a VM in A still have no route to C?
Check your reasoning
Peering connects the paired networks directly. Inspect A’s effective routes to the C prefix and choose a direct peering or an explicitly configured routed hub. Verify the return route as well.
Current AZ-104 course · 1:31:55 · John Savill · AZ-104 Study Cram v2 · 1:20:00
Trace the effective network route quiz
Answer 3 questions. Check each answer for an explanation.