Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My server is dedicated (non-virtual). I want to have 3+1 static IPs. I used aliases (eth0:0, eth0:1) previously, but read that this method is deprecated. So I added another IP and reconfigured my interface with ifup/ifdown while I'm at i;, but ifdown tells me that the interface is not configured.

/etc/network/interfaces looks like this:

auto lo eth0
iface lo inet loopback

# Main IPs (IPv4 + IPv6)
allow-hotplug eth0
iface eth0 inet static
        address 81.x.x.x
        broadcast 81.x.x.255
        gateway 81.x.x.1

iface eth0 inet6 static
        address 2a02:x:x:x::x:x
        netmask 64
        gateway 2a02:x:x:x::1

# 2nd IP
up ip addr add 81.x.x.x/32 dev eth0

# 3rd IP
up ip addr add 81.x.x.x/32 dev eth0

Note that the 2nd and 3rd IP adresses are from different net ranges (don't know if it matters)

I reload the network configuration with

nohup sh -c "ifdown eth0 && ifup eth0"

The exact output (nohup) is

ifdown: interface eth0 not configured
SIOCADDRT: File exists
Failed to bring up eth0.

What am I doing wrong?

Edit: This questuion has been asked before. But the old question uses deprecated methods. Also the solution does not work for me. Since people here at serverfault seem not to be able to help me but rather just close this as duplicate (I doubt you have actually read what I wrote...) I have asked people at official forums. They are stuck with this problem and cannot find a solution at all - but at least try.
I am getting more and more problems, so I will reinstall the server. You can leave this question closed and unanswered.

share|improve this question

marked as duplicate by Jenny D, mdpc, kce, Stephane, MadHatter Oct 31 '13 at 15:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

nope, that did not solve my problem. networking restart works incorrectly without giving an error an is also DEPRECATED. – Marco Alka Oct 30 '13 at 9:42
If you simply added the part of your edit about deprecated methods and that even that method did not work may have made this a candidate for a re-open. It also can take more than a few days to get an answer. – Dave M Nov 1 '13 at 20:35
I agree with @MarcoAlka, the problem is not solved and I also can't find a solution for this problem. I have a feeling that ifup, ifdown and /etc/init.d/networking restart are all deprecated but no one wants to tell us the new way. – Ethan Leroy Mar 28 '14 at 16:34
@EthanLeroy: unfortunately, I cannot test a solution any more. I switched over to FreeBSD as this question took too long and no one was able to find a solution. Imho, FreeBSD is a lot easier to configure. Took me way to long to find this out, though. – Marco Alka Apr 1 '14 at 15:03
You can try sudo ip link set eth0 down and sudo ip link set eth0 up. – appas May 13 '15 at 18:24

ifdown thinks the interface is already down. If that's not true, because it was brought up using some command other than ifup (ifconfig for example) then you need to shut it down the same way (ifconfig eth0 down).

If the ip addr add commands have also been done manually, you may have to undo them with ip addr del.

ifup and ifdown are fragile. They don't operate smoothly if they aren't the only configuration tools being used. They could get current interface status from the kernel instead of remembering what they last changed it to, but they don't.

Once you've made the current state of the interface match what ifupdown thinks it is, they will start behaving better.

share|improve this answer
nohup contains SIOCSIFADDR: Permission denied Failed to bring up eth0 after I tried ifconfig eth0 down instead of ifdown – Marco Alka Oct 28 '13 at 14:23
why is nohup involved in this anyway? – Wumpus Q. Wumbley Oct 28 '13 at 14:25
because I want to have the output in a text file since I am connected via SSH. – Marco Alka Oct 28 '13 at 14:26

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