[ovs-discuss] Turn bridge into a HUB

Ben Pfaff blp at ovn.org
Tue Mar 20 20:14:52 UTC 2018


By default, VLAN tags will be preserved.

If you don't need any MAC learning, then you could omit the
priority=50000 flow I listed, if you go that route.

On Tue, Mar 20, 2018 at 04:30:38PM +0000, Luiz Angelo Daros de Luca wrote:
> Thanks Ben,
> 
> And how about vlan tags? Will it preserve them? Or should I set a "native
> vlan" for both in and out ports?
> 
> There is no "regular vlan" on this bridge. It is for flooding only.
> 
> Em seg, 19 de mar de 2018 às 17:31, Ben Pfaff <blp at ovn.org> escreveu:
> 
> > On Mon, Mar 19, 2018 at 07:58:40PM +0000, Luiz Angelo Daros de Luca wrote:
> > > Hello,
> > >
> > > I have a physical port receives traffic from mirrored ports in a physical
> > > (core) switch. I would like to pass these packets to multiple VMs (xen),
> > > replicating vlan tags when existing.
> > >
> > > With linux bridges, I set aging to 0 and, as it does not understand vlan
> > > tags, everything works. Now I want to setup the same situation with ovs.
> > > I'm still a newbie with ovs.
> > >
> > > Xen uses the /etc/xen/scripts/vif-openvswitch that allows me to specify
> > tag
> > > and trunk argument when a vm port is added (not much besides that). As I
> > > might receive multiple vlans, I would like to not list all of them.
> > >
> > > I saw that flood_vlans might be useful. I simply need to flood all
> > traffic
> > > from the physical port on every other port but the physical one,
> > > replicating vlan tags.
> >
> > You could set this up with flood_vlans, but you would have to list the
> > vlans.  ovs-vsctl supports ranges, so you could probably do this easily,
> > e.g.:
> >         ovs-vsctl set bridge br0 flood_vlans=1-4095
> >
> > Another way to do this would be to add flows or to use a controller to
> > add flows.  All you really need is a high-priority flow that does normal
> > processing for your "regular vlan" and another one that falls back to
> > flooding, e.g.:
> >
> > priority=50000, vlan_vid=1234, actions=normal
> > priority=40000, actions=flood
> >
> -- 
> 
> Luiz Angelo Daros de Luca
> luizluca at gmail.com


More information about the discuss mailing list