diff --git a/apps/bgprouter/src/main/java/org/onosproject/bgprouter/BgpRouter.java b/apps/bgprouter/src/main/java/org/onosproject/bgprouter/BgpRouter.java
index 1035cd6..3266ac1 100644
--- a/apps/bgprouter/src/main/java/org/onosproject/bgprouter/BgpRouter.java
+++ b/apps/bgprouter/src/main/java/org/onosproject/bgprouter/BgpRouter.java
@@ -453,7 +453,7 @@
             FlowRuleOperations.Builder ops = FlowRuleOperations.builder();
             FlowRule rule;
 
-            selector.matchEthType(Ethernet.TYPE_VLAN);
+            selector.matchVlanId(VlanId.ANY);
             treatment.transition(FlowRule.Type.VLAN);
 
             rule = new DefaultFlowRule(deviceId, selector.build(),
diff --git a/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/DriverManager.java b/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/DriverManager.java
index 17f79f3..bfd60d9 100644
--- a/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/DriverManager.java
+++ b/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/DriverManager.java
@@ -60,7 +60,11 @@
         String hw = desc.getHwDesc();
 
         if (dpid.equals(corsaDpid)) {
-            return new OFCorsaSwitchDriver(dpid, desc);
+            if (hw.startsWith("Open vSwitch")) {
+                return new OFOVSSwitchCorsaTTP(dpid, desc);
+            } else {
+                return new OFCorsaSwitchDriver(dpid, desc);
+            }
         }
 
         if (vendor.startsWith("Stanford University, Ericsson Research and CPqD Research")
diff --git a/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/OFCorsaSwitchDriver.java b/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/OFCorsaSwitchDriver.java
index 6b32bcd..5cbdc0f 100644
--- a/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/OFCorsaSwitchDriver.java
+++ b/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/OFCorsaSwitchDriver.java
@@ -16,6 +16,7 @@
 package org.onosproject.openflow.drivers;
 
 import com.google.common.collect.Lists;
+import org.onlab.packet.Ethernet;
 import org.onosproject.openflow.controller.Dpid;
 import org.onosproject.openflow.controller.driver.AbstractOpenFlowSwitch;
 import org.onosproject.openflow.controller.driver.SwitchDriverSubHandshakeAlreadyStarted;
@@ -24,11 +25,17 @@
 import org.projectfloodlight.openflow.protocol.OFBarrierRequest;
 import org.projectfloodlight.openflow.protocol.OFDescStatsReply;
 import org.projectfloodlight.openflow.protocol.OFFlowMod;
+import org.projectfloodlight.openflow.protocol.OFMatchV3;
 import org.projectfloodlight.openflow.protocol.OFMessage;
 import org.projectfloodlight.openflow.protocol.OFType;
 import org.projectfloodlight.openflow.protocol.instruction.OFInstruction;
 import org.projectfloodlight.openflow.protocol.instruction.OFInstructionGotoTable;
+import org.projectfloodlight.openflow.protocol.match.Match;
+import org.projectfloodlight.openflow.protocol.match.MatchField;
+import org.projectfloodlight.openflow.protocol.oxm.OFOxm;
+import org.projectfloodlight.openflow.types.EthType;
 import org.projectfloodlight.openflow.types.OFGroup;
+import org.projectfloodlight.openflow.types.OFVlanVidMatch;
 import org.projectfloodlight.openflow.types.TableId;
 
 import java.util.ArrayList;
@@ -41,14 +48,15 @@
  */
 public class OFCorsaSwitchDriver extends AbstractOpenFlowSwitch {
 
-    private static final int FIRST_TABLE = 0;
-    private static final int VLAN_MPLS_TABLE = 1;
-    private static final int VLAN_TABLE = 2;
-    private static final int MPLS_TABLE = 3;
-    private static final int ETHER_TABLE = 4;
-    private static final int COS_MAP_TABLE = 5;
-    private static final int FIB_TABLE = 6;
-    private static final int LOCAL_TABLE = 9;
+    protected static final int FIRST_TABLE = 0;
+    protected static final int VLAN_MPLS_TABLE = 1;
+    protected static final int VLAN_TABLE = 2;
+    protected static final int MPLS_TABLE = 3;
+    protected static final int ETHER_TABLE = 4;
+    protected static final int COS_MAP_TABLE = 5;
+    protected static final int FIB_TABLE = 6;
+    protected static final int LOCAL_TABLE = 9;
+
 
     private AtomicBoolean handShakeComplete = new AtomicBoolean(false);
 
@@ -192,6 +200,17 @@
                     log.warn("Unknown table type: {}", type);
             }
             builder.setInstructions(newInstructions);
+
+            OFMatchV3 match = (OFMatchV3) flowMod.getMatch();
+            for (OFOxm oxm: match.getOxmList()) {
+                if (oxm.getMatchField() == MatchField.VLAN_VID &&
+                        oxm.getValue().equals(OFVlanVidMatch.PRESENT)) {
+                        Match.Builder mBuilder = factory().buildMatchV3();
+                        mBuilder.setExact(MatchField.ETH_TYPE, EthType.of(Ethernet.TYPE_VLAN));
+                        builder.setMatch(mBuilder.build());
+                }
+            }
+
             OFMessage msgnew = builder.build();
             channel.write(Collections.singletonList(msgnew));
             log.debug("Installed {}", msgnew);
diff --git a/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/OFOVSSwitchCorsaTTP.java b/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/OFOVSSwitchCorsaTTP.java
new file mode 100644
index 0000000..46fb87e
--- /dev/null
+++ b/openflow/drivers/src/main/java/org/onosproject/openflow/drivers/OFOVSSwitchCorsaTTP.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2015 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onosproject.openflow.drivers;
+
+import com.google.common.collect.Lists;
+import org.onosproject.openflow.controller.Dpid;
+import org.projectfloodlight.openflow.protocol.OFDescStatsReply;
+import org.projectfloodlight.openflow.protocol.OFFlowMod;
+import org.projectfloodlight.openflow.protocol.OFMessage;
+import org.projectfloodlight.openflow.protocol.OFType;
+import org.projectfloodlight.openflow.protocol.instruction.OFInstruction;
+import org.projectfloodlight.openflow.protocol.instruction.OFInstructionGotoTable;
+import org.projectfloodlight.openflow.types.TableId;
+
+import java.util.Collections;
+import java.util.List;
+
+public class OFOVSSwitchCorsaTTP extends OFCorsaSwitchDriver {
+
+    OFOVSSwitchCorsaTTP(Dpid dpid, OFDescStatsReply desc) {
+        super(dpid, desc);
+    }
+
+    @Override
+    public void transformAndSendMsg(OFMessage msg, TableType type) {
+        log.trace("Trying to send {} of TableType {}", msg, type);
+        if (msg.getType() == OFType.FLOW_MOD) {
+            OFFlowMod flowMod = (OFFlowMod) msg;
+            OFFlowMod.Builder builder = flowMod.createBuilder();
+            List<OFInstruction> instructions = flowMod.getInstructions();
+            List<OFInstruction> newInstructions = Lists.newArrayList();
+            for (OFInstruction i : instructions) {
+                if (i instanceof OFInstructionGotoTable) {
+                    OFInstructionGotoTable gotoTable = (OFInstructionGotoTable) i;
+                    TableType tid = TableType.values()[gotoTable.getTableId().getValue()];
+                    switch (tid) {
+                        case VLAN_MPLS:
+                            newInstructions.add(
+                                    gotoTable.createBuilder()
+                                            .setTableId(TableId.of(VLAN_MPLS_TABLE)).build());
+                            break;
+                        case VLAN:
+                            newInstructions.add(
+                                    gotoTable.createBuilder()
+                                            .setTableId(TableId.of(VLAN_TABLE)).build());
+                            break;
+                        case ETHER:
+                            newInstructions.add(
+                                    gotoTable.createBuilder()
+                                            .setTableId(TableId.of(ETHER_TABLE)).build());
+                            break;
+                        case COS:
+                            newInstructions.add(
+                                    gotoTable.createBuilder()
+                                            .setTableId(TableId.of(COS_MAP_TABLE)).build());
+                            break;
+                        case IP:
+                            newInstructions.add(
+                                    gotoTable.createBuilder()
+                                            .setTableId(TableId.of(FIB_TABLE)).build());
+                            break;
+                        case MPLS:
+                            newInstructions.add(
+                                    gotoTable.createBuilder()
+                                            .setTableId(TableId.of(MPLS_TABLE)).build());
+                            break;
+                        case ACL:
+                            newInstructions.add(
+                                    gotoTable.createBuilder()
+                                            .setTableId(TableId.of(LOCAL_TABLE)).build());
+                            break;
+                        case NONE:
+                            log.error("Should never have to go to Table 0");
+                            /*newInstructions.add(
+                                    gotoTable.createBuilder()
+                                            .setTableId(TableId.of(0)).build());
+                            */
+                            break;
+                        default:
+                            log.warn("Unknown table type: {}", tid);
+                    }
+                } else {
+                    newInstructions.add(i);
+                }
+            }
+            switch (type) {
+                case VLAN_MPLS:
+                    builder.setTableId(TableId.of(VLAN_MPLS_TABLE));
+                    break;
+                case VLAN:
+                    builder.setTableId(TableId.of(VLAN_TABLE));
+                    break;
+                case ETHER:
+                    builder.setTableId(TableId.of(ETHER_TABLE));
+                    break;
+                case COS:
+                    builder.setTableId(TableId.of(COS_MAP_TABLE));
+                    break;
+                case IP:
+                    builder.setTableId(TableId.of(FIB_TABLE));
+                    break;
+                case MPLS:
+                    builder.setTableId(TableId.of(MPLS_TABLE));
+                    break;
+                case ACL:
+                    builder.setTableId(TableId.of(LOCAL_TABLE));
+                    break;
+                case FIRST:
+                    builder.setTableId(TableId.of(FIRST_TABLE));
+                    break;
+                case NONE:
+                    builder.setTableId(TableId.of(LOCAL_TABLE));
+                    break;
+                default:
+                    log.warn("Unknown table type: {}", type);
+            }
+            builder.setInstructions(newInstructions);
+            OFMessage msgnew = builder.build();
+            channel.write(Collections.singletonList(msgnew));
+            log.debug("Installed {}", msgnew);
+
+        } else {
+            channel.write(Collections.singletonList(msg));
+        }
+    }
+}
diff --git a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowEntryBuilder.java b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowEntryBuilder.java
index 17bfc11..0e7e31a 100644
--- a/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowEntryBuilder.java
+++ b/providers/openflow/flow/src/main/java/org/onosproject/provider/of/flow/impl/FlowEntryBuilder.java
@@ -61,6 +61,7 @@
 import org.projectfloodlight.openflow.protocol.oxm.OFOxm;
 import org.projectfloodlight.openflow.protocol.oxm.OFOxmOchSigidBasic;
 import org.projectfloodlight.openflow.protocol.ver13.OFFactoryVer13;
+import org.projectfloodlight.openflow.types.EthType;
 import org.projectfloodlight.openflow.types.IPv4Address;
 import org.projectfloodlight.openflow.types.IPv6Address;
 import org.projectfloodlight.openflow.types.Masked;
@@ -466,7 +467,11 @@
                 break;
             case ETH_TYPE:
                 int ethType = match.get(MatchField.ETH_TYPE).getValue();
-                builder.matchEthType((short) ethType);
+                if (ethType == EthType.VLAN_FRAME.getValue()) {
+                    builder.matchVlanId(VlanId.ANY);
+                } else {
+                    builder.matchEthType((short) ethType);
+                }
                 break;
             case VLAN_VID:
                 VlanId vlanId = null;
