Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

I have a box with Linux Ubuntu 8.04 and 4 Ethernet ports. I enabled 2 ports, eth0 and eth1, and am trying to configure them with static IPs (eth0 = and eth1 =

If I plug 2 cables, one for each, I can to ping my equipment by each IP as expected. But, if I remove the cable from eth1, I still can ping both IPs still. After this I can disable eth1 and the 2 IPs still will be available for me on eth0.

If I to plug the cable in eth1 there is no difference, just eth0 port workings.

I did a test, and if I configure the 2 IPs in distinct subnets this problem doesn't occur.

share|improve this question
I don't understand what the problem is. What do you want to achieve? – Kvisle Oct 20 '11 at 17:13
How did you configure the ports? Command line program or some sort of configuration utility? – Chris S Oct 20 '11 at 17:19
I would like than eth0 had ip and eth1, but both are controlled just by eth0. – Adriano Leal Oct 20 '11 at 17:24
I configured the ports by /etc/network/interfaces file and after i restarted the networking process with '/etc/init.d/networking restart' command. – Adriano Leal Oct 20 '11 at 17:26
To have multiple ip-addresses on one interface, add the 2nd address with ifconfig eth0:0 up. Next address goes with eth0:1 up to eth0:255. You can use the 2nd adapter to connect to a physical different LAN. – ott-- Oct 20 '11 at 18:01

This happens because by default Linux consider an IP address as a property of the whole host, not just a particular interface; therefore an ARP request from outside (which will be received by both interfaces) will cause a reply from all interfaces, not just the one with the requested IP.

Look at this answer to a question similar to yours (there is also another way involving arptables described there).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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