2015-11-13 16:43 GMT-03:00 Gordon Messmer <gordon.messmer at gmail.com>:> On 11/13/2015 09:15 AM, Sergio Belkin wrote: > >> But.... AFAIK, routers divide broadcast domains, and switches (and >> therefore bridges) divide collision domains. >> > > Oh good, Cisco terminology. :) >Oh yeah,> > I'll be more specific than I was earlier, then. > > It's possible to unify two collision domains into a single broadcast > domain with a router, but it's also possible to use a bridge to link > collision domains to create a larger broadcast domain. Don't get hung up > on that. > > The comparison of a Linux bridge to a switch is apt. You could, > conceptually, connect two PCs to each other using a Linux bridge. You > wouldn't, however, connect two ports on one switch (here, the Linux bridge) > to two ports on another switch. Doing that creates a loop in your network. > > Linux Ethernet bridges have several uses, so it's not clear what you're > really trying to do. That is, you've said that you're trying to create a > virtualized Linux bridge, but a bridge is a tool, not a goal in itself. > What do you expect the bridge to do when you've set it up? > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >I'd want to connect a VM to another VM (or eventually to the host) via the "Linux bridge" so that I can demonstrate that capability in a classroom with only one laptop. -- -- Sergio Belkin LPIC-2 Certified - http://www.lpi.org
On 11/14/2015 09:20 AM, Sergio Belkin wrote:> I'd want to connect a VM to another VM (or eventually to the host) via the > "Linux bridge" so that I can demonstrate that capability in a classroom > with only one laptop.You don't actually need to attach *any* ethernet interfaces to do that. If you create a bridge with no Ethernet slaves, and then create two VMs, those VMs will get virtual network interfaces that will then be slaved to the bridge. So, you'll see the bridge with two network devices as slaves, and those network devices will be attached to the two VMs. If you create a bridge device with one Ethernet interface attached, then you'll end up with a bridge that spans two VMs and the Ethernet interface. That way the VMs will be connected to each other and to the Ethernet network.
----- Original Message ----- | On 11/14/2015 09:20 AM, Sergio Belkin wrote: | > I'd want to connect a VM to another VM (or eventually to the host) via the | > "Linux bridge" so that I can demonstrate that capability in a classroom | > with only one laptop. If the purpose of this is to demonstrate VMs you just want to bridge the physical interface so that the guest can access the network. To do this you only need one physical interface. If you have two interfaces on the same LAN than you want device teaming or LACP. You would create a team or bond interface using the two interfaces and then create a bridge to that team or bond device. -- James A. Peltier IT Services - Research Computing Group Simon Fraser University - Burnaby Campus Phone : 604-365-6432 Fax : 778-782-3045 E-Mail : jpeltier at sfu.ca Website : http://www.sfu.ca/itservices Twitter : @sfu_rcg Powering Engagement Through Technology
2015-11-14 16:43 GMT-03:00 Gordon Messmer <gordon.messmer at gmail.com>:> On 11/14/2015 09:20 AM, Sergio Belkin wrote: > >> I'd want to connect a VM to another VM (or eventually to the host) via the >> "Linux bridge" so that I can demonstrate that capability in a classroom >> with only one laptop. >> > > You don't actually need to attach *any* ethernet interfaces to do that. > If you create a bridge with no Ethernet slaves, and then create two VMs, > those VMs will get virtual network interfaces that will then be slaved to > the bridge. So, you'll see the bridge with two network devices as slaves, > and those network devices will be attached to the two VMs. > > If you create a bridge device with one Ethernet interface attached, then > you'll end up with a bridge that spans two VMs and the Ethernet interface. > That way the VMs will be connected to each other and to the Ethernet > network. > > _______________________________________________ >Are you talking bearing in mind VirtualBox? I've created a bridge on the host machine, and 2 VM's but br0 has no slaves: [sergio at hope share]$ sudo brctl show br0 bridge name bridge id STP enabled interfaces br0 8000.000000000000 no Greets -- -- Sergio Belkin LPIC-2 Certified - http://www.lpi.org