Use it when a Windows host with several interfaces, a VPN or a static route sends traffic out of the wrong one.
Route Selection
Windows route selection picks, for a destination, the route with the longest matching prefix and then the lowest total metric (route metric + interface metric). Find-NetRoute shows the result.
1. Find-NetRoute -RemoteIPAddress <dest>.
2. Longest prefix first, then lowest metric sum.
3. VPN routes may override.
4. Adjust metric or prefix.
5. Re-test.
matching routes → longest prefix → lowest metric
Context & applicabilityCommon mistakes · platform/version boundaries
- Assuming the lowest metric wins over a more specific route.
- Forgetting VPN-pushed routes.
- Persistent routes left from old networks.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Finding the chosen route Verify boundary
Find-NetRoute -RemoteIPAddress <ip> shows both the selected source address and the route used. Test-NetConnection <ip> -TraceRoute follows the path. VPN clients often add a more specific route or a lower metric, which explains why traffic suddenly takes the tunnel.
Step 2 Example Narrow the fault
Find-NetRoute -RemoteIPAddress 10.20.30.40 | Select-Object InterfaceAlias,NextHop,RouteMetric,DestinationPrefix
If the result shows the VPN interface but you expected the LAN, a more specific route from the VPN (e.g. 10.0.0.0/8) is winning over the LAN's default route.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Find-NetRoute shows the decision for one destination, including the source address. Total metric = route metric + interface metric; by default the interface metric is set automatically from link speed. Routes added with New-NetRoute are persistent unless created in the ActiveStore.
Get-NetRoute— routing tableFind-NetRoute -RemoteIPAddress <ip>— selected route and sourceroute print— routing table in CMDtracert <dest>— path
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Route selection steps in Windows:
1. Find all routes matching the destination.
2. Choose the longest prefix (most specific).
3. Among equal prefixes, choose the lowest combined metric.
4. Equal-cost routes on different interfaces: Windows uses one (no general ECMP for hosts).
5. Source address selection (RFC 6724 for IPv6) picks the local address.
Find-NetRoute -RemoteIPAddress 8.8.8.8 | Select IPAddress,InterfaceAlias,NextHop,RouteMetric
Test-NetConnection 10.50.1.10 -DiagnoseRouting
Selection order
1. Longest prefix match (most specific route).
2. Lowest total metric (route metric + interface metric).
3. If equal, Windows can use either.
A /32 host route beats a /24, which beats the 0.0.0.0/0 default route, regardless of metric.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Routing → Route Selection. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/networking/ · confidence 94%