[ovs-dev] RSPAN port mirroring with vxlan

Ben Pfaff blp at nicira.com
Tue Mar 12 18:02:45 UTC 2013


On Tue, Mar 12, 2013 at 10:29:59PM +0530, Jagadish Nadimpalli wrote:
> Using openvswitch, there is a way to create RSPAN port by mirroring all the
> traffic coming on to a VLAN towards another port. As per my understanding,
> this can be done as follows for a VLAN 10's traffic to be mirrored on tap0.
> 
> *ovs-vsctl add-br br0*
> *       ovs-vsctl add-port br0 eth0*
> *       ovs-vsctl add-port br0 tap0 *
> *       ovs-vsctl add-port br0 tap1 tag=10*
> *       -- --id=@p get port tap0 \*
> *       ovs-vsctl \*
> *       -- --id=@m create mirror name=m0 select-all=true select-vlan=10 \*
> *                                    output-port=@p \*
> *   -- set bridge br0 mirrors=@m*
> 
> Is it possible to do the same for vxlan traffic? Not sure if the selection
> of vxlan from the ovs-vsctl command is provided.

The FAQ has a GRE example:

Q: How do I configure mirroring of all traffic to a GRE tunnel?

A: The following commands configure br0 with eth0 and tap0 as trunk
   ports.  All traffic coming in or going out on eth0 or tap0 is also
   mirrored to gre0, a GRE tunnel to the remote host 192.168.1.10; any
   traffic arriving on gre0 is dropped:

       ovs-vsctl add-br br0
       ovs-vsctl add-port br0 eth0
       ovs-vsctl add-port br0 tap0
       ovs-vsctl add-port br0 gre0 \
           -- set interface gre0 type=gre options:remote_ip=192.168.1.10 \
           -- --id=@p get port gre0 \
	   -- --id=@m create mirror name=m0 select-all=true output-port=@p \
	   -- set bridge br0 mirrors=@m

   To later disable mirroring and destroy the GRE tunnel:

       ovs-vsctl clear bridge br0 mirrors
       ovs-vcstl del-port br0 gre0



More information about the dev mailing list