[ovs-discuss] Adding VLAN tag in flow

Benoît benoitne at gmail.com
Mon Dec 21 08:38:36 UTC 2015


Hi,

I am trying to add VLAN tag on flow (the original packets don't have 
VLAN) but I am not sure of the command...
I have found this in the documentation

               mod_vlan_pcp:vlan_pcp
                      Modifies  the VLAN priority on a packet.  The VLAN tag is
                      added or modified as necessary to match the value  speci‐
                      fied.   Valid  values are between 0 (lowest) and 7 (high‐
                      est).  If the VLAN tag is added, a vid of  zero  is  used
                      (see the mod_vlan_vid action to set this).


I have tried :
ovs-ofctl add-flow vswitch_rspan 
priority=500,in_port=8,actions=mod_vlan_vid:888,output:7

but I am not seeing the VLAN id.

I found another command type but I got an error.
ovs-ofctl add-flow vswitch_rspan 
priority=500,in_port=8,actions=push_vlan:0x8100,set_field:0-\>vlan_vid,output:7 

ovs-ofctl: none of the usable flow formats (OXM,OpenFlow11) is among the 
allowed flow formats (OpenFlow10,NXM)

Is there another way to add vlan, or do I make mistake doing like this?

Normally I am able to read and see vlan when I do port mirroring on 
openvswitch, here I need to add the vlan on a flow.
Is there a difference when using port mirroring where the destination 
port accept the vlan by default?
I tried to change my output port (on the flow) on trunk and 
native-untagged but same result..

Many thanks,

belette
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20151221/b20b5043/attachment-0002.html>


More information about the discuss mailing list