Pcornel
Windows · Windows Networking

Routing Table

Cheat sheet · https://pcornel.dk/topic.php?topic=3066

Back to the Topic

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 interface
  • Get-NetAdapter — adapters, status and link speed
  • Get-NetRoute -AddressFamily IPv4 — routes and metrics
  • Test-NetConnection <host> -Port <p> — ping, route and TCP port test
  • ipconfig /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

BoundaryMeaningEvidence limit
PrefixDestination coveragelongest match wins first
Next hopGateway or on-link markerrequires neighbor/link path
InterfaceEgress associationmust correlate to adapter state
Route metricRoute preference inputcombined/contextual with interface metric
Persistence/sourceHow route arriveddoes 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

Confirmation

Confirm action

Continue?