diff --git a/src/test/utils/CordTestServer.py b/src/test/utils/CordTestServer.py
index e495afb..6e1ae31 100644
--- a/src/test/utils/CordTestServer.py
+++ b/src/test/utils/CordTestServer.py
@@ -31,6 +31,8 @@
 #
 from CordContainer import Container, Onos, OnosStopWrapper, OnosCord, OnosCordStopWrapper, Quagga, QuaggaStopWrapper, Radius, reinitContainerClients
 from OltConfig import OltConfig
+from OnosCtrl import OnosCtrl
+from CordTestUtils import get_controller
 from EapolAAA import get_radius_macs, get_radius_networks
 from nose.tools import nottest
 from SimpleXMLRPCServer import SimpleXMLRPCServer
@@ -53,6 +55,17 @@
 
     onos_cord = None
 
+    def __ovs_flow_add(self, in_port = 1, dl_vlan = 0):
+        if dl_vlan:
+            cmd = 'ovs-ofctl -O OpenFlow13 add-flow br-int in_port=%d,dl_vlan=%d,actions=CONTROLLER:65535' %(in_port, dl_vlan)
+        else:
+            cmd = 'ovs-ofctl -O OpenFlow13 add-flow br-int in_port=%d,actions=CONTROLLER:65535' %(in_port)
+        os.system(cmd)
+        return 'DONE'
+
+    def ovs_flow_add(self, kwargs):
+        return self.__ovs_flow_add(**kwargs)
+
     def __restart_onos(self, node = None, config = None, timeout = 10):
         if self.onos_cord:
             onos_config = '{}/network-cfg.json'.format(self.onos_cord.onos_config_dir)
@@ -235,9 +248,10 @@
     port = int(os.getenv('CORD_TEST_PORT', CORD_TEST_PORT))
     return host, port
 
-def rpc_server_instance():
+def rpc_server_instance(host = None, port = None):
     '''Stateless'''
-    host, port = get_cord_test_loc()
+    if host is None or port is None:
+        host, port = get_cord_test_loc()
     rpc_server = 'http://{}:{}'.format(host, port)
     return xmlrpclib.Server(rpc_server, allow_none = True)
 
@@ -357,3 +371,26 @@
     except: pass
 
     return True
+
+@nottest
+def __cord_test_ovs_flow_add(**kwargs):
+    controller = get_controller()
+    OnosCtrl.config_extraneous_flows(controller = controller)
+    try:
+        return rpc_server_instance(host = controller, port = CORD_TEST_PORT).ovs_flow_add(kwargs)
+    except:
+        pass
+
+    try:
+        return rpc_server_instance().ovs_flow_add(kwargs)
+    except:
+        pass
+
+    return 'FAIL'
+
+@nottest
+def cord_test_ovs_flow_add(in_port, dl_vlan = 0):
+    data = __cord_test_ovs_flow_add(in_port = in_port, dl_vlan = dl_vlan)
+    if data == 'DONE':
+        return True
+    return False
diff --git a/src/test/utils/OnosCtrl.py b/src/test/utils/OnosCtrl.py
index 457c05b..f460450 100644
--- a/src/test/utils/OnosCtrl.py
+++ b/src/test/utils/OnosCtrl.py
@@ -461,3 +461,13 @@
         cfg = dict(enableDhcpIgmpOnProvisioning = enableDhcpIgmpOnProvisioning, defaultVlan = defaultVlan)
         resp = requests.post(property_url, auth = cls.auth, data = json.dumps(cfg))
         return resp.ok, resp.status_code
+
+    @classmethod
+    def config_extraneous_flows(cls, controller = None, enable = True):
+        if controller is None:
+            controller = cls.controller
+        flow_property_url = 'configuration/org.onosproject.net.flow.impl.FlowRuleManager'
+        property_url = 'http://{}:8181/onos/v1/{}'.format(controller, flow_property_url)
+        cfg = dict(allowExtraneousRules = enable)
+        resp = requests.post(property_url, auth = cls.auth, data = json.dumps(cfg))
+        return resp.ok, resp.status_code
