What does errno 118 (ENETUNREACH) mean?

 
Could be also:
ConstantTypeOS
ERROR_INVALID_VERIFY_SWITCHWin32 errorWindows
ENOTNAMerrnoLinux
PROCESS_HAS_LOCKED_PAGESBugCheck CodeWindows
Previous Next
ENETRESET ENOBUFS

ENETUNREACH

ENETUNREACH means the selected destination cannot be reached through a usable network path. It is primarily a routing or network-availability observation, whereas EHOSTUNREACH is more specific to the target host after a network path has been considered.

For Winsock, capture WSAENETUNREACH immediately with WSAGetLastError(). A high-level errno mapping alone loses whether the failing call was a route-sensitive connection attempt, a send, or a helper that selected a destination from multiple DNS answers.

Route-selection evidence

  • Log all candidate addresses, the one selected, address family, source interface, default route, and proxy or tunnel configuration.
  • Check whether IPv6 was selected while the active route exists only for IPv4, or vice versa.
  • Inspect VPN split routes and policy routing; a destination can be reachable on one adapter but forbidden on another.
  • Use address fallback only when the resolver or protocol policy permits it, and retain per-address failures rather than collapsing them into one timeout.

References


Looking for a different code? Search another status or error code.