Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 four IP addresses on my Debian machine: 1 main (eth0) + 3 extra (eth0:0, eth0:1, eth0:2).

I want to assign the eth0:1 as bridged network to my VM. Who do I need to add in the /etc/network/interfaces?

share|improve this question
up vote 5 down vote accepted

Virtual interfaces are not real, and don't behave like real interfaces. (They're actually not recommended at all, and can be replaced with multiple addresses attached to a single interface.) They can't be used by iptables, and they can't be used in bridges[0].

If you want to bridge the VM onto the real network then just put eth0 into the bridge. The bridge doesn't need an IP because it's just doing layer 2 forwarding. If you want the VM to use one of the external IPs then put eth0 and the VM in the bridge, and attach the IP inside the actual VM and not on the host at all.

If you really want to use an external IP on the bridge (without putting eth0 in the bridge) you can attach it to the bridge instead of to a virtual interface and use Proxy ARP to announce it on the real network.

[0] Well, technically they can, but the real interface gets added.

share|improve this answer
Thanks für you answer. I just want to use one of the additional IPs to access my VM. I thought i need to bridge the virtual interface not the main eth0. I'm new in this stuff and i just have a simple HowTo for install VirtualBox, install OS in there, etc... From your answer i think i just need to bridge eth:0 (br) and set bridge_ports eth0:1 – Chris Apr 28 '12 at 5:33
Added that to the answer. You want to put eth0 into the bridge, and configure the IP inside the VM, not on the host at all. – mgorven Apr 28 '12 at 5:52

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.