[ovs-discuss] FW: Traffic Mirroring using XenServer and OpenVSwitch

David Reade d.reade at Reades.co.uk
Fri Jul 17 15:09:01 UTC 2015


Anyone?

-----Original Message-----
From: David Reade 
Sent: 13 July 2015 09:07
To: 'discuss at openvswitch.org'
Subject: Traffic Mirroring using XenServer and OpenVSwitch

Good morning all!

I am using XenServer 6.5 SP1 with OpenVSwitch 2.1.3 and I need to mirror traffic from the source port (vif2.0) to the destination port (vif13.1). I have enabled promiscuous mode on the PIF and target VIF. Using the following command, I can enable traffic mirroring and see the results instantly:

ovs-vsctl -- set Bridge xenbr1 mirrors=@m \
-- --id=@vif2.0 get Port vif2.0 \
-- --id=@vif13.1 get Port vif13.1 \
-- --id=@m create Mirror name=MyMirror select-all=true output-port=@vif13.1

However the port information changes every time the source/target VM is rebooted. This means I have to keep re-adding the mirror every time I reboot a VM using different VIFs which is not practical.

I have devised a way to get the current VIF ID and send it to OVS using a cron job or shell script. However I would prefer to just run a single command without resorting to cron jobs and shell scripts as they need managing themselves.
 
Is there a way to setup traffic mirroring to run permanently which is unaffected by VM reboots?

Thanks in advance,

David



More information about the discuss mailing list