Use this when traffic leaves via the wrong gateway or not at all.
Default Gateway · IP Configuration
The default gateway is the router Windows sends traffic to when no more specific route exists, shown as the 0.0.0.0/0 route. Normally configure only one gateway per machine, on one interface.
1. Get-NetRoute -DestinationPrefix 0.0.0.0/0.
2. One default gateway per family unless metrics are intended.
3. Gateway reachable.
4. Static vs DHCP-provided.
5. Fix and test.
default gateway → default route → off-link traffic
Context & applicabilityCommon mistakes · platform/version boundaries
- Gateway set on several NICs, causing unpredictable routing.
- Gateway in another subnet (Windows accepts it but traffic fails).
- Gateway IP that is a router's secondary address not answering ARP.
Operational reference
Fast context before you go deeper.
Get-NetRoute -DestinationPrefix 0.0.0.0/0Verification & 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 Checks Verify boundary
route print -4 0.0.0.0
Get-NetRoute -DestinationPrefix 0.0.0.0/0
Test-NetConnection 10.10.20.1
Only one default gateway per host is normally correct. Two gateways on different NICs cause traffic to leave through the lowest-metric one, which breaks return traffic through firewalls.
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.
- Configure one default gateway per machine in most cases.
- The gateway appears as the 0.0.0.0/0 route.
- With several defaults, metrics decide.
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
Default gateway issues on multi-homed Windows servers: two gateways cause asymmetric routing (requests in on one NIC, replies out of the other), which stateful firewalls drop.
Rule: one default gateway per host; add persistent specific routes for networks reachable via other NICs.
route -p add 10.50.0.0 mask 255.255.0.0 10.20.0.1 if 15
New-NetRoute -DestinationPrefix 10.50.0.0/16 -InterfaceIndex 15 -NextHop 10.20.0.1 -PolicyStore PersistentStore
ReferenceConfiguration & state1 section · depth on demand
Commands
Get-NetRoute -DestinationPrefix 0.0.0.0/0
New-NetRoute -InterfaceAlias Ethernet -DestinationPrefix 0.0.0.0/0 -NextHop 10.0.0.1
Remove-NetRoute -DestinationPrefix 0.0.0.0/0 -NextHop 10.0.0.254 -Confirm:$false
route print -4
Documented example, not captured output. Only one interface should normally have a default gateway.
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 → Default Gateway. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/windows-server/networking/ · confidence 94%