diff --git a/core/api/src/main/java/org/onosproject/net/flow/instructions/ExtensionTreatmentType.java b/core/api/src/main/java/org/onosproject/net/flow/instructions/ExtensionTreatmentType.java
index 38fbc27..f3690da 100644
--- a/core/api/src/main/java/org/onosproject/net/flow/instructions/ExtensionTreatmentType.java
+++ b/core/api/src/main/java/org/onosproject/net/flow/instructions/ExtensionTreatmentType.java
@@ -35,7 +35,8 @@
         // TODO fix type numbers to include experimenter id
         NICIRA_SET_TUNNEL_DST(0),
         NICIRA_RESUBMIT(1),
-        NICIRA_SET_NSH_SPI(32);
+        NICIRA_SET_NSH_SPI(32),
+        NICIRA_RESUBMIT_TABLE(14);
 
         private ExtensionTreatmentType type;
 
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraExtensionTreatmentInterpreter.java b/drivers/src/main/java/org/onosproject/driver/extensions/NiciraExtensionTreatmentInterpreter.java
index a7f70f9..b6c786c 100644
--- a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraExtensionTreatmentInterpreter.java
+++ b/drivers/src/main/java/org/onosproject/driver/extensions/NiciraExtensionTreatmentInterpreter.java
@@ -50,6 +50,10 @@
                 ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SPI.type())) {
             return true;
         }
+        if (extensionTreatmentType.equals(
+                ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT_TABLE.type())) {
+            return true;
+        }
         return false;
     }
 
@@ -67,6 +71,9 @@
         if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SPI.type())) {
             // TODO this will be implemented later
         }
+        if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT_TABLE.type())) {
+            // TODO this will be implemented later
+          }
         return null;
     }
 
@@ -98,6 +105,9 @@
         if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_SET_NSH_SPI.type())) {
             return new NiciraSetNshSpi();
         }
+        if (type.equals(ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT_TABLE.type())) {
+            return new NiciraResubmitTable();
+        }
         throw new UnsupportedOperationException(
                 "Driver does not support extension type " + type.toString());
     }
diff --git a/drivers/src/main/java/org/onosproject/driver/extensions/NiciraResubmitTable.java b/drivers/src/main/java/org/onosproject/driver/extensions/NiciraResubmitTable.java
new file mode 100644
index 0000000..3c8dd0c
--- /dev/null
+++ b/drivers/src/main/java/org/onosproject/driver/extensions/NiciraResubmitTable.java
@@ -0,0 +1,112 @@
+/*
+ * 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.driver.extensions;
+
+import com.google.common.base.MoreObjects;
+
+import org.onlab.util.KryoNamespace;
+import org.onosproject.net.PortNumber;
+import org.onosproject.net.flow.instructions.AbstractExtensionTreatment;
+import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
+import org.onosproject.store.serializers.PortNumberSerializer;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+/**
+ * Nicira resubmit-table extension instruction.
+ */
+public class NiciraResubmitTable extends AbstractExtensionTreatment {
+
+    //the list of the in port number(PortNumber) and the table(short)
+    private List<Object> inPortAndTable = new ArrayList<Object>();
+
+    private final KryoNamespace appKryo = new KryoNamespace.Builder()
+            .register(ArrayList.class)
+            .register(new PortNumberSerializer(), PortNumber.class)
+            .register(short.class)
+            .register(byte[].class)
+            .build();
+
+    /**
+     * Creates a new resubmit-table instruction.
+     */
+    NiciraResubmitTable() {
+        inPortAndTable = null;
+    }
+
+    /**
+     * Creates a new resubmit-table instruction with a particular inPort and table.
+     *
+     * @param inPortAndTable the list of in port number and table
+     */
+    public NiciraResubmitTable(List<Object> inPortAndTable) {
+        checkNotNull(inPortAndTable);
+        this.inPortAndTable = inPortAndTable;
+    }
+
+    /**
+     * Gets the inPortAndTable.
+     *
+     * @return inPortAndTable
+     */
+    public List<Object> inPortAndTable() {
+        return inPortAndTable;
+    }
+
+    @Override
+    public ExtensionTreatmentType type() {
+        return ExtensionTreatmentType.ExtensionTreatmentTypes.NICIRA_RESUBMIT_TABLE.type();
+    }
+
+    @Override
+    public void deserialize(byte[] data) {
+        inPortAndTable = appKryo.deserialize(data);
+    }
+
+    @Override
+    public byte[] serialize() {
+        return appKryo.serialize(inPortAndTable);
+    }
+
+    @Override
+    public int hashCode() {
+        return Objects.hash(inPortAndTable);
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj instanceof NiciraResubmitTable) {
+            NiciraResubmitTable that = (NiciraResubmitTable) obj;
+            return Objects.equals(inPortAndTable, that.inPortAndTable);
+
+        }
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return MoreObjects.toStringHelper(getClass())
+                .add("inPortAndTable", inPortAndTable).toString();
+    }
+}
\ No newline at end of file
