Use this when Windows prefers the wrong adapter.
Interface Metrics
Interface metrics rank network interfaces so Windows prefers the lowest-cost one, for example wired over Wi-Fi. Automatic metric uses link speed; set a fixed value with Set-NetIPInterface -InterfaceMetric.
1. Get-NetIPInterface | Sort InterfaceMetric.
2. Automatic metric based on speed.
3. Set: Set-NetIPInterface -InterfaceAlias <if> -InterfaceMetric 10.
4. Affects default route choice and DNS server order.
5. Verify with Find-NetRoute.
interface metric + route metric → lowest total wins
Context & applicabilityCommon mistakes · platform/version boundaries
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 Common mistakes Narrow the fault
- Manual metrics breaking VPN or failover routing.
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.
- The interface with the lowest metric is preferred.
- Automatic metric is based on link speed.
- A fixed metric overrides the automatic one.
Get-NetIPConfiguration— addresses, gateway and DNS per interfaceGet-NetAdapter— adapters, status and link speedGet-NetRoute -AddressFamily IPv4— routes and metricsTest-NetConnection <host> -Port <p>— ping, route and TCP port testipconfig /all— full IP configurationGet-NetIPInterface | Select InterfaceAlias,AddressFamily,Dhcp,InterfaceMetric— DHCP state and metric per interface
ReferenceHow it works1 section · depth on demand
In depth
Interface metrics influence which interface Windows prefers when routes are otherwise equal. Automatic metric derives from link speed: faster links get lower metrics, so wired usually beats Wi-Fi.
Get-NetIPInterface -AddressFamily IPv4 | Sort InterfaceMetric | ft InterfaceAlias,InterfaceMetric,AutomaticMetric
Set-NetIPInterface -InterfaceAlias VPN -InterfaceMetric 5
Set-NetIPInterface -InterfaceAlias Ethernet -AutomaticMetric Enabled
Interface metric also affects DNS server preference: Windows queries the DNS servers of the interface with the lowest metric first — a classic VPN split-DNS problem.
ReferenceImportant terms & boundaries1 section · depth on demand
How metrics are chosen
Windows adds the interface metric to the route metric. With automatic metric, faster links get lower values (e.g. ~25 for 1 Gb, lower for 10 Gb). Wired is usually preferred over Wi-Fi this way. VPN clients often set a low metric on their adapter so traffic uses the tunnel. Check the effective result with Find-NetRoute -RemoteIPAddress 8.8.8.8.
ReferenceConfiguration & state1 section · depth on demand
Commands
Get-NetIPInterface | Sort-Object InterfaceMetric | Format-Table ifIndex,InterfaceAlias,AddressFamily,InterfaceMetric,AutomaticMetric
Set-NetIPInterface -InterfaceAlias "Ethernet" -InterfaceMetric 10
Set-NetIPInterface -InterfaceAlias "Ethernet" -AutomaticMetric Enabled
Documented example, not captured output. Automatic metric by speed (examples): ≥ 2 Gb/s → 15, 1 Gb/s → 25, 100 Mb/s → 35. A lower metric wins. VPN adapters often get a low metric, pulling traffic and DNS queries into the tunnel.
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 IP Configuration → Interface Metrics. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/networking/ · confidence 94%