I have a problem very similar to getting error "SIOCADDRT: File exists" when trying to restart network on ubuntu, but it is not a duplicate for reasons explained below. My /etc/network/interfaces looks like this (specific details obfuscated):
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address x.y.z.81 netmask 255.255.255.0 network x.y.z.60 broadcast x.y.z.91 gateway x.y.z.61 dns-nameservers 188.8.131.52 184.108.40.206 up ip addr add x.y.z.82 dev eth0 label eth0:0 down ip addr del x.y.z.82/32 dev eth0
But when I run
/etc/init.d/networking restart I get this output:
* Reconfiguring network interfaces... SIOCADDRT: File exists Failed to bring up eth0.
Unlike with the question I linked above, this happens every single time I try, whether I've made changes or not (the answer I linked said, "If you are changing the network configuration, it is normal to get such type of errors when restarting the network" -- but I'm not changing network configuration here).
When the network originally started it worked. Here's the output of
eth0 Link encap:Ethernet HWaddr aa:bb:cc:dd:ee:ff inet addr:x.y.z.81 Bcast:x.y.z.91 Mask:255.255.255.0 ... eth0:0 Link encap:Ethernet HWaddr aa:bb:cc:dd:ee:ff inet addr:x.y.z.82 Bcast:0.0.0.0 Mask:255.255.255.255 .... lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 ...
It seems to be the "ifup" part of the restart that is emitting this error. If I manually run
echo ifdown; sudo ifdown -a --exclude=lo; echo ifup; sudo ifup -a --exclude=lo I get this output:
ifdown ifup SIOCADDRT: File exists Failed to bring up eth0.
It almost seems like the
ifdown command is having no effect.
In addition, it doesn't seem to be just a warning that lets it work in the background. If I add these directives to the interfaces file:
up ip addr add x.y.z.83 dev eth0 label eth0:1 down ip addr del x.y.z.83/32 dev eth0
And then try restarting, it spits out that error (again, every time, not just after I make the change) and also doesn't add eth0:1 (
ifconfig output doesn't change). But if I manually run the
ip addr add command above, it works fine, adding the ip with label eth0:1.
If it matters, I'm running Ubuntu 10.10.
Let me know if there's any more use information I can provide.