Error Codes Wiki

Linux errno 99 EADDRNOTAVAIL — Cannot Assign Requested Address

Errorerrno

About Linux errno 99 EADDRNOTAVAIL

Linux errno 99 (EADDRNOTAVAIL) occurs when a program tries to bind to an IP address not assigned to any local network interface. This guide covers everything you need to know about this topic, including common causes, step-by-step solutions, and answers to frequently asked questions.

Here are the key things to understand: EADDRNOTAVAIL is errno 99 on Linux. Most common when binding a socket to a specific IP address. The IP address is not configured on any network interface. Can occur when connecting and the system runs out of ephemeral ports. IPv6 addresses not yet configured trigger this during DAD (Duplicate Address Detection). Understanding these fundamentals will help you diagnose and resolve this issue more effectively.

The most common reasons this occurs include: Application configured with an IP address not assigned to the machine. Network interface lost its IP (DHCP lease expired). All ephemeral ports exhausted (over 28,000 connections). IPv6 address in tentative state during DAD. VPN or network configuration change removing the bound IP. Identifying the root cause is the first step toward finding the right solution.

To resolve this, follow these recommended steps: Check assigned IPs: ip addr show. Verify the application config matches an actual interface IP or use 0.0.0.0 to bind to all. Check ephemeral port range: cat /proc/sys/net/ipv4/ip_local_port_range. Increase ephemeral port range: echo '1024 65535' > /proc/sys/net/ipv4/ip_local_port_range. Enable port reuse: set SO_REUSEADDR socket option in the application. If these steps do not resolve the issue, consider consulting additional resources or a qualified professional.

This article is part of our Linux Error Codes collection on Error Codes Wiki. We provide comprehensive, up-to-date information to help you find solutions quickly.

Quick Answer

What is an ephemeral port?

A temporary port assigned by the OS for outgoing connections. Linux defaults to ports 32768-60999. High connection rates can exhaust them.

Overview

Linux errno 99 (EADDRNOTAVAIL) occurs when a program tries to bind to an IP address not assigned to any local network interface.

Key Details

  • EADDRNOTAVAIL is errno 99 on Linux
  • Most common when binding a socket to a specific IP address
  • The IP address is not configured on any network interface
  • Can occur when connecting and the system runs out of ephemeral ports
  • IPv6 addresses not yet configured trigger this during DAD (Duplicate Address Detection)

Common Causes

  • Application configured with an IP address not assigned to the machine
  • Network interface lost its IP (DHCP lease expired)
  • All ephemeral ports exhausted (over 28,000 connections)
  • IPv6 address in tentative state during DAD
  • VPN or network configuration change removing the bound IP

Steps

  1. 1Check assigned IPs: ip addr show
  2. 2Verify the application config matches an actual interface IP or use 0.0.0.0 to bind to all
  3. 3Check ephemeral port range: cat /proc/sys/net/ipv4/ip_local_port_range
  4. 4Increase ephemeral port range: echo '1024 65535' > /proc/sys/net/ipv4/ip_local_port_range
  5. 5Enable port reuse: set SO_REUSEADDR socket option in the application

Tags

linuxerrnoeaddrnotavailsocketnetworking

More in Errno

Frequently Asked Questions

A temporary port assigned by the OS for outgoing connections. Linux defaults to ports 32768-60999. High connection rates can exhaust them.