I'm trying to set an alias for an interface facing local network, but when i try to bring it up I receive this error:

RTNETLINK answers: File exists
Failed to bring up eth1:0.

Here is my /etc/network/interfaces # Loopback device: auto lo iface lo inet loopback

# device: eth0
auto  eth0
iface eth0 inet static
  address   X.X.X.X
  broadcast X.X.X.X
  gateway   X.X.X.1

# device: eth1
auto  eth1
iface eth1 inet static

# device: eth1:0
auto  eth1:0
iface eth1:0 inet static

# default route to access subnet
up route add -net X.X.X.X netmask gw X.X.X.1 eth0
  • From my reading, it appears this is a problem with having multiple network routes, but I wan't able to get this working either. Best I've been able to manage is to have the vip show up under the physical adapter when running ip addr. The ip does work though. – Dana the Sane Mar 22 '12 at 15:29
  • Please remember to accept/upvote the best answer(s) to your question when possible (tick/check mark on the left). This way, the question is marked as "answered" and future readers can refer to it knowing the solution works. Thank you...:) – ish Aug 24 '12 at 21:44

The "file" that "already exists" is the default route (gateway).

ifup will fail because it will try to add a default route that already exists for the base adapter. As @DanatheSane indicated in the comments, you can ignore this -- the alias works nevertheless.

| improve this answer | |

You should really remove the last line, as tries to do the exact same work as is done in the eth0 section:

  • The gateway setting means you get it as the (default) gateway.
  • The netmask (with address) adds a route for the local network, telling your machine how to send packets that can be reach on the local area network.

In summary: the last line is redundant.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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