[ovs-discuss] Stripping VLAN tags in Openflow 1.1+

Ben Warren ben at skyportsystems.com
Fri Mar 11 01:48:56 UTC 2016


On Mar 10, 2016, at 5:47 PM, Ben Pfaff <blp at ovn.org> wrote:
> 
> On Thu, Mar 10, 2016 at 05:24:43PM -0800, Ben Warren wrote:
>> Thanks Ben
>>> On Mar 10, 2016, at 11:05 AM, Ben Pfaff <blp at ovn.org> wrote:
>>> 
>>> On Thu, Mar 10, 2016 at 10:51:35AM -0800, Ben Warren wrote:
>>>> Hi,
>>>> 
>>>> I’m wondering how to strip VLAN tags when using OpenFlow version 1.1 or greater messaging.  The “strip_vlan” action in “ovs-ofctl” seems to be version 1.0-only.  The “parse_op_flow_mod_str()” function returns 0xa, which = (OFPUTIL_P_OF10_STD_TID | OFPUTIL_P_OF10_NXM_TID).  I’ve tried the following:
>>>> 
>>>> 	• Use “pop_vlan” instead of “strip_vlan”, but they seem to be aliased
>>>> 	• Use “mod_vlan_vid=0”, but that still sends 802.1Q frames
>>>> 	• Use “mod_vlan_vid=-1” and “mod_vlan_vid=0xffff”, but get syntax errors 
>>> 
>>> Make sure you match on the presence of a VLAN tag; OF1.1+ requires this.
>> 
>> The “ovs-ofctl” man page says to set “dl_vlan=0xffff” to match untagged frames, but there’s no mention of a wildcard for “all tagged frames”.  Am I reading this right?  I’d like to unconditionally strip off all tags if possible.
> 
> You can use "vlan_tci=0x1000/0x1000" to match any packet with an 802.1Q
> header.

Thanks!  I’ll try it.

—Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160310/b0fbd963/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3583 bytes
Desc: not available
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160310/b0fbd963/attachment.p7s>


More information about the discuss mailing list