[ovs-discuss] match ethertype when packet with multiple vlan tags

Eric Garver e at erig.me
Tue Apr 18 14:29:50 UTC 2017


On Tue, Apr 18, 2017 at 12:17:17PM +0800, Dickens Yeh wrote:
> Thanks for your response.
> I know that if I have to match multiple vlan tags, it have to pop the outer
> vlan.
> But I think my question are not the matching vlan tags in multiple vlan, my
> question is matching the first vlan tag and the correct ethertype that
> OpenFlow Spec defined ( the ethertype after all vlan tags ), not the case
> that match multiple vlan tags in a single flow entry.
> 
> For example, that packet header like
> ffffffffffff000000000012 8100 00d0 8060 001080006040001000000000012c0a
> 80202000000000000c0a80302
> In the view of ethernet, the ethertype should be 8100, that's not a problem.
> In the view of openflow spec match, the ethertype should be 0806 ( ARP ),
> the ethertype match after vlan tags
> In the view of OVS match, the etherype is 0806, the result is matching with
> spec.
> 
> Then, if the packet header like
> ffffffffffff000000000012 88a8 00c0 8100 00d0 8060
> 001080006040001000000000012c0a80202000000000000c0a80302
> In the view of ethernet, the ethertype should be 88a8, the same result with
> one vlan tag.
> In the view of openflow spec match, the ethertype should be 0806 ( ARP )
> In the view of OVS match, the ethertype is 8100, not 0806.

This is true if vlan-limit == 1, which is the default.
If vlan-limit > 1, then dl_type would be 0x0806. As I indicated earlier,
vlan-limit is new with 802.1ad support.

> I think the result is strange, but I don't know that it's an issue or
> something else.

Strange or not, it's this way because OVS used to only support a single
VLAN tag. It didn't know how to keep looking for the "true" Ethertype.

> Is there any ideas? or I misunderstand something.

I think you understand it correctly.

> 
> best wishes,
> Dickens Yeh
> 
> 2017-04-18 0:35 GMT+08:00 Ben Pfaff <blp at ovn.org>:
> 
> > On Mon, Apr 17, 2017 at 10:51:08AM -0400, Eric Garver wrote:
> > > On Mon, Apr 17, 2017 at 01:26:37PM +0800, Dickens Yeh wrote:
> > > > Hello,
> > > > I have a problem with matching ethertype when the packet with vlan
> > tags.
> > > > My testing environment is Ubuntu 16 in vmware fusion, mininet 2.2.2rc1,
> > > > openvswitch 2.7.90
> > > >
> > > > With these cases:
> > > > case 1: packet with vlan=100,ethertype=arp
> > > > case 2: packet with vlan=2000,vlan=100,ethertype=arp
> > > >
> > > > The result of cases:
> > > > case 1 can be matched by vlan=100 and ethertype=arp fields in a flow
> > entry
> > > > case 2 can be matched only by vlan=2000 and ethertype=0x8100 fields in
> > a
> > > > flow entry
> > > >
> > > > But I read some informations from OpenFlow Spec 1.1, that says about
> > "match
> > > > ethertype after all vlan tags".
> > > > Is the resulf of case 2 should be matched vlan=2000 and ethertype=arp?
> > >
> > > Until very recently openvswitch only supported a single VLAN tag.
> > > Current master branch has support for 802.1ad/QinQ and can match the ARP
> > > EtherType as you wish in case 2 above.
> >
> > I think that OVS still doesn't have the ability to match multiple VLAN
> > tags in a single flow entry.  I think that you have to match one, then
> > pop it and match the second one in another flow lookup.
> >

> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss



More information about the discuss mailing list