Page 1 of 1

ifup: "RTNETLINK answers: File exists"

Posted: Tue Aug 13, 2013 1:12 am
by ^rooker
[PROBLEM]
For some strange reason, my Debian 7 (wheezy) installation wouldn't let me start the network interfaces using the official scripts.

Running "ifup eth0" simply replied:
RTNETLINK answers: File exists
Manually using "ifconfig eth0 inet <address> up" worked fine.
The IP-address was configured as "inet static" in /etc/network/interfaces.


[SOLUTION]
It seems that some part of the static configuration information got "stuck" somewhere, somehow.
Thanks to a post by user namend "civing" on unix.stackexchange.com, I did the following:

Code: Select all

$ ip addr flush dev ethx
Where "ethx" must be replaced by the actual network interface you're having the problem with (e.g. "eth0").

Problem solved! :)

Remove duplicate default gateways

Posted: Mon Mar 27, 2017 7:18 pm
by ^rooker
If the above command does not solve the issue, try removing duplicate default-gateway entries before running the above "flush" commands.
Thanks to: http://raspberrypi.stackexchange.com/qu ... nning-ifup

Then perform the following steps for *all* affected interfaces.
("ethX" = eth0, eth1, eth2, etc...)

Take all interfaces down:
$ ifconfig ethX down

Flush stuck entries:
$ ip addr flush dev ethX

Bring interfaces back up with "ifup":
$ ifup ethX


Good luck! 8)