[ovs-discuss] MPLS label + VLAN tag

Nataliia Trifonova trifonova.natalia at gmail.com
Fri Dec 6 15:39:32 UTC 2013


Thank you very much, Joe!

The way I am sending actions from Ryu:

actions.append(ofp_parser.OFPActionPushVlan(ether.ETH_TYPE_8021Q))
actions.append(ofp_parser.OFPActionSetField(vlan_vid=4))
actions.append(ofp_parser.OFPActionPushMpls(0x8847))
actions.append(ofp_parser.OFPActionSetField(mpls_label=102))

I tried this order with OF1.2 and I got MPLS and VLAN there in the packet.

As for OF1.3:
According to the OF1.3 spec each tag is added as outermost tag, so first I should push MPLS label and then VLAN tag. Results are: when I just PushMpls, SetField(mpls_label) and PushVlan, then VLAN tag 0 is added, but when I want to add SetField(vlan_vid), VLAN tag is not added at all. But the rule looks like this:

NXST_FLOW reply (xid=0x4):
 cookie=0x0, duration=8.339s, table=0, n_packets=7, n_bytes=686, hard_timeout=100, idle_age=2, priority=1,icmp,nw_src=10.0.0.1,nw_dst=10.10.10.1 actions=load:0x8002709001b->NXM_OF_ETH_SRC[],load:0x80027b50738->NXM_OF_ETH_DST[],push_mpls:0x8847,load:0x66->OXM_OF_MPLS_LABEL[],load:0x4->OXM_OF_VLAN_VID[],output:2

Regarding ovs-ofctl:
With ovs-ofctl I used "mod_vlan_vid" action. When I tried to install the flow using  push_vlan and set_field actions, I got the following:

# ovs-ofctl add-flow ovsbr0 dl_type=0x800,priority=1,nw_src=10.0.0.1,nw_dst=10.10.10.1,nw_proto=1,actions=push_vlan:0x8100,set_field:2-\>vlan_vid,push_mpls:0x8847,set_field:10-\>mpls_label,output:2 
ovs-ofctl: none of the usable flow formats (OXM,OpenFlow11) is among the allowed flow formats (OpenFlow10,NXM)
  
Nataliia

On Dec 3, 2013, at 9:49 PM, Joe Stringer wrote:

> On 3 December 2013 10:16, Nataliia Trifonova
> <trifonova.natalia at gmail.com> wrote:
>> When I push first VLAN tag and then MPLS label, tcpdump shows corrupted packets sent out from the interface.
> 
> Section B.11.9 (below) of the OF1.3.3 spec allows pushing MPLS shims
> in the middle of VLAN tags, which would cause tcpdump to report a
> corrupt packet. The equivalent message in OF1.2 would result in a
> different ordering of tags.
> 
> "In previous version of the specification, the final order of tags in
> a packet was statically specified. For
> example, a MPLS shim header was always inserted after all VLAN tags in
> the packet. OpenFlow
> 1.3 removes this restriction, the final order of tags in a packet is
> dictated by the order of the tagging
> operations, each tagging operation adds its tag in the outermost
> position (EXT-121)."
> 
>> When I push first MPLS label and then VLAN tag, only MPLS tag is added, VLAN is ignored, even though the rules does instruct pushing both.
>> 
>> Moreover, when I add the flow using ovs-ofctl, like this:
>> 
>> ovs-ofctl add-flow ovsbr0 dl_type=0x800,priority=1,nw_src=10.0.0.1,nw_dst=10.10.10.1,actions=push_mpls:0x8847,set_field:10-\>mpls_label,mod_vlan_vid:3,output:2
>> 
>> everything is fine, I have VLAN and MPLS sitting there. What am I doing wrong?
> 
> It sounds like the Flow Mod message sent by ovs-ofctl differs from the
> one you are sending from Ryu. You could compare these to find out why.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20131206/bef12bca/attachment.html>


More information about the discuss mailing list