Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have found several guides to bridging a single interface (eg br0) onto eth0 but none for multiple interfaces (eg br0, br1 etc).

Is this possible?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Maybe you have it backwards. You don't bridge br0 onto eth0, but eth0 onto br0. And yes, you can put any number of devices on a bridge, so you can also put eth1 and eth2 onto br0, using the brctl addif br0 eth1 command. Does that answer your question?

share|improve this answer
    
It is helpful for clarification (+1) but isn't what I'm after: I think I have the answer I'm looking for though, I need aliases for eth0 (eg eth0:0, eth0:1 etc) bridged onto br0, br1 etc. –  Jack Douglas Feb 4 '13 at 17:55
    
eth0:0 is IP aliasing, but it's not needed anymore as you can just ip addr add to the main eth0 interface. What problem are you trying to solve? –  frostschutz Feb 4 '13 at 20:21
    
I want to set up private networks manually on my CentOS/KVM host rather than use the NAT/networking component of libvirt. Each brX is a private network that is then bridged to (from?) eth0 the public interface. The inter-network traffic is then controlled by iptables. when you say "you can just ip addr add to the main eth0", afaik I can only specify one BRIDGE line in each /etc/sysconfig/network-scripts/ifcfg-ethX, right? That's why I think I need the aliases defined in this way... –  Jack Douglas Feb 4 '13 at 21:14
    
If you bridge private networks with eth0, they're on eth0 and as such, visible to whatever eth0 is connected to. Datacenters often do not allow bridging like that, they require you to run a routed setup. This should be described in their documentation though. If you really want multiple VMs to share a bridge with eth0, you can put them all on the same bridge device. –  frostschutz Feb 5 '13 at 7:44
    
Yes it is a routed setup, iiuc none of the private traffic is being broadcast on eth0 as the host is the gateway for the VMs and I have NAT set up in iptables to translate the private network addresses. Am I understanding this all wrong, is all the private traffic being broadcast? –  Jack Douglas Feb 5 '13 at 8:47
show 2 more comments

Your Answer

 
discard

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.