The knowledge base / All cheat sheets
● Always in your toolkitAbout the project ↗

Windows route selection and VPN troubleshooting cheat sheet

Inspect route selection, interface metrics and the source path for a destination on a Windows host.

Windows 10/11 or Windows Server with NetTCPIP PowerShell module.

Updated · Windows · 6 min read

CommandWhat it does
Get-NetIPConfigurationInspect interface configuration
Get-NetRoute -AddressFamily IPv4List IPv4 routes
Get-NetIPInterface -AddressFamily IPv4Inspect IPv4 interface metrics
Find-NetRoute -RemoteIPAddress 192.0.2.25Find the selected local address and route
Test-NetConnection 192.0.2.25 -Port 443 -InformationLevel DetailedTest an approved TCP service

Walkthrough

Run on the affected host and replace 192.0.2.25 with the approved destination. VPN policy, route compartments and other filters can affect the observed path.

Step 1: Inspect interface configuration

Get-NetIPConfiguration

Identify active adapters, their IP addresses and gateways. VPN and physical adapters may both be present; note the interface associated with the affected traffic.

Step 2: List IPv4 routes

Get-NetRoute -AddressFamily IPv4

Compare destination prefixes, next hops, interface indexes and route metrics. The longest matching prefix matters before comparing metrics for otherwise equivalent routes.

Step 3: Inspect IPv4 interface metrics

Get-NetIPInterface -AddressFamily IPv4

Compare the interface metrics and connection states with the affected route. Automatic metrics and changes in VPN state can affect selection; capture output during the incident.

Step 4: Find the selected local address and route

Find-NetRoute -RemoteIPAddress 192.0.2.25

Replace the documentation address with the actual destination. Record the selected source address, route and interface, then check the return path separately.

Step 5: Test an approved TCP service

Test-NetConnection 192.0.2.25 -Port 443 -InformationLevel Detailed

Run from the affected host and inspect the selected source interface and TcpTestSucceeded. A TCP connection alone does not prove that TLS or the application works.

WORKED INCIDENT

Practical case: VPN users reach the wrong path

Fictional teaching scenario; observations are examples, not captured production output.

Situation

A user cannot connect to an internal service after enabling a VPN.

Investigation sequence

1. Inspect interface configuration

Get-NetIPConfiguration

Record active addresses and gateways with the VPN connected.

2. List IPv4 routes

Get-NetRoute -AddressFamily IPv4

Compare specific destination prefixes and next hops in the IPv4 route table.

3. Find the selected local address and route

Find-NetRoute -RemoteIPAddress 192.0.2.25

Find the route and source address selected for the actual service address.

4. Test an approved TCP service

Test-NetConnection 192.0.2.25 -Port 443 -InformationLevel Detailed

Test the approved service port and record the client source interface.

Example findings

Illustrative findings: a more-specific route points to the physical adapter rather than the expected VPN interface.

Interpret the findings

The selected route explains the observed forward-path mismatch in this example. Verify the intended VPN configuration and return route before proposing a change.

Verify the outcome

After the VPN owner applies an approved correction, repeat the route lookup and application test from the affected host.

Escalation handoff

Provide the destination, route prefixes, interface indexes and incident time to the network team.

Primary references

Documented reference; examples above are teaching scenarios. Confirm behavior against your deployed version.