[ovs-discuss] remap double-tagged frame

Eric Garver e at erig.me
Wed Jul 12 21:35:30 UTC 2017


On Wed, Jul 12, 2017 at 01:20:32PM +0300, Aleksey Khalikov wrote:
> Hi guys,
> 
> My scenario is as follows:
> 
> OVS 2.7.90 with two dpdk ports connected to IXIA two dedicated ports.
> 
> From IXIA port1 I send double-tagged traffic to port2. I am trying to remap
> inner and outer tags of the frames with group chaining and at last send it
> out to port 2 of the OVS.
> 
> I issue these commands on the OVS:
> 
> ovs-ofctl -O OpenFlow13 add-group br0
> group_id=1,type=indirect,bucket=actions=pop_vlan,group:2
> ovs-ofctl -O OpenFlow13 add-group br0
> group_id=2,type=indirect,bucket=actions=pop_vlan,group:3
> ovs-ofctl -O OpenFlow13 add-group br0 group_id=3,type=indirect,bucket=actions=push_vlan:0x8100,set_field:4607-\>vlan_vid,group:4
> ovs-ofctl -O OpenFlow13 add-group br0 group_id=4,type=indirect,bucket=actions=push_vlan:0x8100,set_field:4107-\>vlan_vid,output:2
> 
> ovs-ofctl -O Openflow13 add-flow br0
> in_port=1,idle_timeout=0,actions=group:1
> 
> 
> As a result the flow added to direct traffic from port 1 to group1 and pop
> the first tag then to group 2 to pop second tag other groups just push new
> vlan tags to the frame and send it out to port 2. Group chaining works as
> expected btw.
> 
> After all the groups bucket actions I can examine 3 vlans (I use Wireshark)
> on second interface, inside the frame, two of them are new one and the one
> old inner tag.
> 
> Can you help me to get ovs work as expected pop two vlan tags at first and
> then push new ones?

You need to increase the vlan-limit to be able to match or pop multiple
VLAN tags. Otherwise the second tag is parsed as the Ethertype.
e.g.

    # ovs-vsctl set Open_vSwitch . other_config:vlan-limit=2

https://github.com/openvswitch/ovs/blob/ef241d1e8675660b698839e624695da4ccf25e1b/vswitchd/vswitch.xml#L400


More information about the discuss mailing list