ENETDOWN
Linux / POSIXERRORNotableNetworkHIGH confidence

Network Is Down

Production Risk

Indicates infrastructure failure; check interface state and physical connectivity.

What this means

ENETDOWN (errno 100) is returned when a network operation fails because the network interface or the local network is down.

Why it happens
  1. 1All network interfaces are down
  2. 2The interface the socket is bound to was brought down
  3. 3Network subsystem failure
How to reproduce

Network operation when the bound interface is down.

trigger — this will error
trigger — this will error
// Interface goes down while sending
send(sockfd, buf, len, 0);
// Returns -1, errno = ENETDOWN

expected output

send: Network is down (ENETDOWN)

Fix

Bring the network interface back up

WHEN When ENETDOWN is returned

Bring the network interface back up
# Check interface state
ip link show
# Bring up the interface
ip link set eth0 up

Why this works

ENETDOWN means the physical or logical network link is down; fix at the OS level.

Sources
Official documentation ↗

Linux Programmer Manual netdevice(7)

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All Linux / POSIX errors