Routing Table
Cheat sheet · https://pcornel.dk/topic.php?topic=3066
Answer
The Windows Routing Table is the runtime set of IPv4/IPv6 routes used to choose an egress interface and next hop for each destination, including connected/on-link, default, static and dynamically installed host routes.
Remember
- Longest prefix match is the first major route-selection rule.
- Metrics do not make a less-specific route beat a more-specific route.
- Route metric and interface metric can both influence preference among equivalent candidates.
- A route's presence does not prove its next hop or egress path is usable.
- IPv4 and IPv6 routes are separate and an application may choose either family.
First checks
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 configuration
Commands
ping
Verify in this order
destination → longest prefix → lowest metric (route + interface) → next hop
Where it usually breaks
First mismatch in host/interface identity → local config/routing/name state → Windows service/provider → firewall/security/session → remote service → application-visible exchange; preserve identity/native error/pre-state before mutation.
Windows Networking → Routing Table reference map
| Boundary | Meaning | Evidence limit |
|---|---|---|
| Prefix | Destination coverage | longest match wins first |
| Next hop | Gateway or on-link marker | requires neighbor/link path |
| Interface | Egress association | must correlate to adapter state |
| Route metric | Route preference input | combined/contextual with interface metric |
| Persistence/source | How route arrived | does not alter reachability proof |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3066