ifup: "RTNETLINK answers: File exists"

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

ifup: "RTNETLINK answers: File exists"

Post 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! :)
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1481
Joined: Fri Aug 29, 2003 8:39 pm

Remove duplicate default gateways

Post 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)
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply