| Previous | Next |
| ERROR_CONNECTION_ACTIVE | ERROR_HOST_UNREACHABLE |
ERROR_NETWORK_UNREACHABLE
The destination network cannot be reached.
ERROR_NETWORK_UNREACHABLE has decimal value 1231 (0x4CF). The networking stack could not find or use a path to the destination network. The condition normally occurs before a remote host or service can accept or reject the connection.
Separate network reachability from name resolution
A hostname can resolve correctly while its address is unreachable, and a literal IP address can fail without DNS being involved. Record the resolved destination addresses and which one the connection attempted. Dual-stack applications should not report a failed IPv6 route as proof that every IPv4 path is also unavailable.
Evidence to gather
- destination address, prefix, port, and address family
- selected source address and interface index
- routing-table result and default gateway at failure time
- interface operational state, VPN profile, and network compartment
- recent DHCP, route, firewall, or adapter changes
- whether another destination on the same prefix is reachable
Diagnostic order
Use IP Helper routing information to determine the selected path, then verify interface and gateway state. Check VPN split-tunnel policy, virtual adapters, metric changes, and missing routes before focusing on the remote server. Packet capture can show whether any neighbor discovery or gateway traffic leaves the host.
Retry behavior
A bounded retry is reasonable during interface startup, VPN connection, DHCP renewal, or route convergence. Use backoff and react to network-change notifications rather than opening connections in a tight loop. For stable routing misconfiguration, retries create noise without changing the result.
Administrator actions
Restore the correct route, interface, gateway, or VPN policy. Confirm that security software has not moved the application into another network compartment. Avoid adding a broad persistent route until the intended source interface and address family are known, because an incorrect route can redirect unrelated traffic.
Difference from nearby codes
ERROR_HOST_UNREACHABLE narrows failure to the destination host. ERROR_PORT_UNREACHABLE indicates that no service is operating at the target endpoint. ERROR_CONNECTION_REFUSED means the remote side was reached and refused the connection. Error 1231 points to the network path itself.
Example
A laptop resolves an internal server to 10.40.8.20 while disconnected from the corporate VPN. The local route table has no path for 10.40.0.0/16, so the client receives 1231. It pauses, prompts for VPN connection, waits for a route-change event, and retries only after the corporate route appears.
References
- Microsoft: System Error Codes (1000–1299)
- Microsoft: GetBestRoute2 function
- Microsoft: IP Helper
- Microsoft: Handling Winsock Errors
Looking for a different code? Search another status or error code.