Configuring virtual network interfaces in Linux -


Did you know that you can assign more that one IP address to a single physical network interface? This technique is quite useful, for example when working with Apache and virtual hosts, as it allows you to access same Apache server by using two different IP addresses.

This is a companion discussion topic for the original entry at


Pablo Olivare

Hi, than for the article.
I have a question. I have two pc into de same lan. and, the ping work fine togethers.
The I create a virtual eth0:0 and
From PC One the ping to work fine, this confirm success create the virtual interface.
But the ping from PC one to Two ( doesnt work.
I loss some command? Thank you!!


koxmoz kox -> Pablo Olivare

Hi, the problem is that you cant have multiple host with the same ip,
real host1:
real host2:
virtual host1:
virtual host1:

I hope this can help you!


Side note:
Even if I write the new virtual interface at /etc/network/interface , the new interface does not persist after reboot. One way that worked for me was to uninstall network-manager.

sudo apt-get remove network-manager