[ovs-discuss] Turn bridge into a HUB

Ben Pfaff blp at ovn.org
Mon Mar 19 20:31:19 UTC 2018


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


More information about the discuss mailing list