When setting up a web server with multiple IP-based virtual hosts, I've always used the eth0:x alias notation in /etc/network/interfaces. The wiki on my hosting provider states however that this is deprecated and one should now use the iproute tools.

Is this correct, and what's the difference between using aliases and using iproute?


Yes, device aliases are deprecated, and have been for a long time. My guess is that they'll probably never go away, because far too many people will go to their graves using aliases because that's what they've always done.

There's not a huge amount of difference between the two approaches, in practice; I've switched to using iproute mainly because it saves me having to think about interfaces -- rather than having to go "which alias has the IP address I want to remove?" or "what's the next alias interface name that's available?" I can just say "oh, I'd like another IP address or four on this interface" and "let's just delete that IP address from that interface". It's just plain neater, IMO.

  • 1
    I know there are examples all over the internet but it could be great to have a basic example of the two approaches – Doud Jan 31 '12 at 1:31

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.