I've been pounding my head against the wall for a while on this and haven't made any headway.

I have a system with a statically assigned ipv4 and ipv6 address. After boot running systemctl status networking results in this:

● networking.service - Raise network interfaces
   Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
  Drop-In: /run/systemd/generator/networking.service.d
   Active: failed (Result: exit-code) since Sat 2016-08-27 14:48:50 MST; 8min ago
     Docs: man:interfaces(5)
  Process: 3301 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
  Process: 3275 ExecStartPre=/bin/sh -c [ "$CONFIGURE_INTERFACES" != "no" ] && [ -n "$(ifquery --read-environment --list --exclude=lo)" ] && udevadm settle (code=exited, status=0/SUCCESS)
 Main PID: 3301 (code=exited, status=1/FAILURE)

Aug 27 14:48:25 phoenix systemd[1]: Starting Raise network interfaces...
Aug 27 14:48:28 phoenix ifup[3301]: /sbin/ifup: waiting for lock on /run/network/ifstate.ens160
Aug 27 14:48:50 phoenix ifup[3301]: RTNETLINK answers: File exists
Aug 27 14:48:50 phoenix ifup[3301]: Failed to bring up ens160.
Aug 27 14:48:50 phoenix systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Aug 27 14:48:50 phoenix systemd[1]: Failed to start Raise network interfaces.
Aug 27 14:48:50 phoenix systemd[1]: networking.service: Unit entered failed state.
Aug 27 14:48:50 phoenix systemd[1]: networking.service: Failed with result 'exit-code'.

But the interface is actually up and functioning properly.

If I run systemctl restart networking, it fails. Running ifdown ens160 just says the interface is not configured.

If I force the interface down with ifdown --force ens160 it goes down and will come back up with either ifup ens160 or systemctl restart networking.

If I comment out the ipv6 section it's fine after booting.

Here's my interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto ens160
iface ens160 inet static
    address XXX.XXX.XXX.3/24
    gateway XXX.XXX.XXX.1
    dns-search example.org
    dns-nameservers ::1

# This is an IPv6 interface
iface ens160 inet6 static
    address XXXX:XXXX:XXXX:XXXX::3/64
    gateway XXXX:XXXX:XXXX:XXXX::1

This is with a vanilla Ubuntu 16.04.1 server installation on a vmware cluster with only bind9 and ssh server installed. The only configuration changes made are a properly configured bind9 and the static IP changes.

I have more than one installation doing the same thing.

I've done plenty of searching and have come up with nothing matching this situation. My google-fu is usually strong, but it has failed me this time.

Any help I could get would be much appreciated.

  • Do you have something in the /etc/network/interfaces.d directory? Aug 28, 2016 at 5:02
  • Does the interface come up when you comment out the gateway line?
    – maxf
    Aug 28, 2016 at 16:22
  • @MichaelHampton, no there's nothing in the /etc/network/interfaces.d directory.
    – Tetz
    Aug 29, 2016 at 16:05
  • @maxf, now that's interesting. I commented out the IPv6 gateway line and it comes up just fine. My question is, does it automatically use the link local advertised gateway? Thank you for your help.
    – Tetz
    Aug 29, 2016 at 16:07

1 Answer 1


Since it works when you comment out the gateway line, you suffer from an unfortunate race condition: As soon as the link of the interface is up, Linux starts doing Neighbor Discovery and accepting Router Advertisements, which can put IPv6 routes into your routing table although the interface is not fully configured yet. When the script later tries to add the default route you get

RTNETLINK answers: File exists

To work around this, you can

  • either comment out the gateway line (which is the recommended way provided that routes get announced correctly in your network)
  • or disable the acceptance of RAs via
    sysctl -w net.ipv6.conf.device.accept_ra=0
    (device being an actual device, default or all).
  • Thank you for the info. It seems to happen most with the machines running bind. That might be slowing the script down enough to make it happen. Anyway, I'll let the protocol work the gateway out on it's own.
    – Tetz
    Aug 29, 2016 at 16:34
  • For VMs, it can also depend on host utilization during boot - it was quite fun to debug back then...
    – maxf
    Aug 29, 2016 at 16:38
  • I am glad I finally found this post after searching the web for 3 months now. It drove me mad, I couldn't find why the guests had proper internet if I delayed their boot, but not when I had them on autostart (clearly this was the host having max. utilisation on boot).
    – Qlii256
    Nov 19, 2016 at 14:31
  • @maxf I know it's been a while, but could you explain a bit more why this is happening and maybe a fix? When autostarting all of my VM's at the same time at host boot they all fail the networking setup with the same error (RTNETLINK answers: file exists). When I wait for low host utilisation and then boot them manually one at a time it's working without a problem.
    – Qlii256
    Mar 3, 2018 at 10:08
  • One more detail, my guests fail on this line: ifup[815]: run-parts: executing /etc/network/if-pre-up.d/vlan ifup[815]: /bin/ip addr add broadcast relax ifup[815]: RTNETLINK answers: File exists ifup[815]: /bin/run-parts --exit-on-error --verbose /etc/network/if-up.d ifup[815]: Failed to bring up ens3. It's weird because this only happens when booting the guest with high host cpu utilisation. And why is that address already there for some reason?
    – Qlii256
    Mar 3, 2018 at 10:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .