diff --git a/drivers/default/src/main/java/org/onosproject/driver/pipeline/CiscoN9kPipeliner.java b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CiscoN9kPipeliner.java
new file mode 100644
index 0000000..60f27ca
--- /dev/null
+++ b/drivers/default/src/main/java/org/onosproject/driver/pipeline/CiscoN9kPipeliner.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2018-present Open Networking Foundation
+ *
+ * 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.pipeline;
+
+import org.onlab.osgi.ServiceDirectory;
+import org.onosproject.net.Device;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.behaviour.PipelinerContext;
+import org.onosproject.net.device.DeviceService;
+import org.onosproject.net.flow.DefaultTrafficTreatment;
+import org.onosproject.net.flow.TrafficTreatment;
+import org.onosproject.net.flowobjective.DefaultForwardingObjective;
+import org.onosproject.net.flowobjective.ForwardingObjective;
+import org.slf4j.Logger;
+
+import java.util.Optional;
+
+import static org.slf4j.LoggerFactory.getLogger;
+
+/**
+ * Cisco N9K Switch single table pipeline abstraction.
+ */
+public class CiscoN9kPipeliner extends DefaultSingleTablePipeline {
+
+    private final Logger log = getLogger(getClass());
+    private ServiceDirectory serviceDirectory;
+    private DeviceId deviceId;
+
+    protected DeviceService deviceService;
+    @Override
+    public void init(DeviceId deviceId, PipelinerContext context) {
+        this.deviceId = deviceId;
+        this.serviceDirectory = context.directory();
+        this.deviceService = serviceDirectory.get(DeviceService.class);
+    }
+
+
+    @Override
+    public void forward(ForwardingObjective forwardObjective) {
+        ForwardingObjective newFwd = forwardObjective;
+        Device device = deviceService.getDevice(deviceId);
+
+        if (forwardObjective.treatment() != null && forwardObjective.treatment().clearedDeferred()) {
+            log.warn("Using 'clear actions' instruction which is not supported by {} {} {} Switch"
+                            + " removing the clear deferred from the forwarding objective",
+                    device.id(), device.manufacturer(), device.hwVersion());
+            newFwd = forwardingObjectiveWithoutCleardDef(forwardObjective).orElse(forwardObjective);
+        }
+
+        super.forward(newFwd);
+    }
+
+
+    private Optional<ForwardingObjective> forwardingObjectiveWithoutCleardDef(ForwardingObjective forwardingObjective) {
+        TrafficTreatment treatment = trafficTreatmentWithoutClearedDeffered(forwardingObjective.treatment());
+
+        DefaultForwardingObjective.Builder foBuilder = (DefaultForwardingObjective.Builder) forwardingObjective.copy();
+        foBuilder.withTreatment(treatment);
+
+        switch (forwardingObjective.op()) {
+            case ADD:
+                return Optional.of(foBuilder.add(forwardingObjective.context().orElse(null)));
+            case REMOVE:
+                return Optional.of(foBuilder.remove(forwardingObjective.context().orElse(null)));
+            default:
+                log.warn("Driver does not support other operations for forwarding objective");
+                return Optional.empty();
+        }
+
+    }
+
+
+    private TrafficTreatment trafficTreatmentWithoutClearedDeffered(TrafficTreatment treatment) {
+        return DefaultTrafficTreatment.builder(treatment)
+                .notWipeDeferred()
+                .build();
+    }
+
+}
diff --git a/drivers/default/src/main/resources/onos-drivers.xml b/drivers/default/src/main/resources/onos-drivers.xml
index 3768b12..9316057 100644
--- a/drivers/default/src/main/resources/onos-drivers.xml
+++ b/drivers/default/src/main/resources/onos-drivers.xml
@@ -295,5 +295,11 @@
                    impl="org.onosproject.driver.pipeline.JuniperPipeliner"/>
     </driver>
 
+    <driver name="ciscoof" extends="default"
+        manufacturer="Cisco Systems, Inc." hwVersion=".*" swVersion="7.0\(3\).*">
+        <behaviour api="org.onosproject.net.behaviour.Pipeliner"
+           impl="org.onosproject.driver.pipeline.CiscoN9kPipeliner" />
+    </driver>
+
 </drivers>
 
