I've configured a VPN connection and it created foo interface listed with ifconfig. Its IP is assigned via dhclient foo.

From time to time, my connection drops. When I list the available interfaces with ifconfig, there is foo without an IP and foo:avahi with a random IP.

If I request an IP with dhclient foo, an IP (generally same IP) is immediately fetched, my internet connection is fixed and the foo:avahi interface is disappeared.

What is this ...:avahi interface and how can I prevent this connection drops from happening?

  • Is other network configuration software, such as NetworkManager, running on your system? – grawity Feb 24 at 15:20
  • No, NetworkManager is totally uninstalled. I'm using my own network manager. – ceremcem Feb 24 at 15:32

This isn't an interface; this is how old tools, namely ifconfig, show additional IP addresses on the eth0 interface (the kernel emulates an "interface alias" for every extra address).

The address/alias marked with "avahi" is created by avahi-autoipd, which implements RFC 3927 IPv4 link-local address autoconfiguration (also known as zeroconf or APIPA). The IP address isn't random; it's chosen from the reserved link-local prefix

As for why this appears on its own, you'll need to actually check the system logs to find out; autoipd could be both the cause of the problems or it could be just the result of external problems.

  • It could be that some component in your system thinks no connection profile is active yet – because you've configured the IP address externally – so it deliberately switches into a "link-local only" profile and starts avahi-autoipd.

  • It could be that you first lose the connection, the DHCP client loses its address lease and is unable to obtain a new one, and some component on your system switches to "link-local mode" as a last resort only.

  • If the reason was loosing the connection first, then could the "link-local mode" be interpreted as "Currently we have no IP"? If so, is it correct to re-issue dhclient foo to get a new IP or is it only a workaround for a different problem? – ceremcem Feb 24 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.