diff --git a/CustomerExample/CertusNet.py b/CustomerExample/CertusNet.py
new file mode 100644
index 0000000..7f44b48
--- /dev/null
+++ b/CustomerExample/CertusNet.py
@@ -0,0 +1,174 @@
+# Distributed under the OpenFlow Software License (see LICENSE)
+# Copyright (c) 2010 The Board of Trustees of The Leland Stanford Junior University
+# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
+# Copyright (c) 2012, 2013 CPqD
+# Copyright (c) 2012, 2013 Ericsson
+# Copyright (c) 2015 Research Education and Advanced Network New Zealand Ltd.
+"""
+Basic test cases
+
+Test cases in other modules depend on this functionality.
+"""
+
+import logging
+
+from oftest import config
+import oftest.base_tests as base_tests
+import ofp
+import time
+from oftest.testutils import *
+
+
+
+class case1(base_tests.SimpleDataPlane):
+
+    def runTest(self):
+        ports = sorted(config["port_map"].keys())
+
+        delete_all_flows(self.controller)
+        delete_all_groups(self.controller)    
+
+        #l2-interface-grup_port1_vlann100_untag
+        grouptype = 0
+        vlanid = 100
+        of_port=1
+        group_id = of_port + (vlanid << 16) + (grouptype << 28)
+        actions = [
+            ofp.action.pop_vlan(),
+            ofp.action.output(of_port),
+        ]
+        buckets = [
+            ofp.bucket(actions=actions),
+        ]
+        request = ofp.message.group_add(
+            group_type=ofp.OFPGT_INDIRECT,
+            group_id=group_id,
+            buckets=buckets
+        )
+        self.controller.message_send(request) 
+        #l2-interface-grup_port2_vlann100_untag
+        grouptype = 0
+        vlanid = 100
+        of_port=2
+        group_id = of_port + (vlanid << 16) + (grouptype << 28)
+        actions = [
+            ofp.action.pop_vlan(),
+            ofp.action.output(of_port),
+        ]
+        buckets = [
+            ofp.bucket(actions=actions),
+        ]
+        request = ofp.message.group_add(
+            group_type=ofp.OFPGT_INDIRECT,
+            group_id=group_id,
+            buckets=buckets
+        )
+        self.controller.message_send(request)     
+
+        #10_add_port1_allow_rx_tag_vid_100
+        match = ofp.match()
+        of_port=1
+        vlanid=100
+        match.oxm_list.append(ofp.oxm.in_port(of_port))
+        match.oxm_list.append(ofp.oxm.vlan_vid(0x1000|vlanid))
+        request = ofp.message.flow_add(
+            table_id=10,
+            cookie=42,
+            match=match,
+            instructions=[
+              ofp.instruction.goto_table(20)
+            ],
+            priority=0)
+        logging.info("Set vlan-1 tagged on port %d, and goto table 20" % of_port)
+        self.controller.message_send(request)
+        """        
+        #50_mac_0000000010_vlan_100
+        grouptype = 0
+        vlanid = 100
+        out_port=2
+        group_id = out_port + (vlanid << 16) + (grouptype << 28)
+        match = ofp.match()
+        match.oxm_list.append(ofp.oxm.eth_dst([0x00, 0x00, 0x00, 0x00, 0x00, 0x10]))
+        match.oxm_list.append(ofp.oxm.vlan_vid(vlanid))
+        request = ofp.message.flow_add(
+                table_id=50,
+                cookie=42,
+                match=match,
+                instructions=[
+                    ofp.instruction.write_actions(
+                        actions=[
+                            ofp.action.group(group_id)]),
+                        ofp.instruction.goto_table(60)
+                    ],
+                buffer_id=ofp.OFP_NO_BUFFER,
+                priority=1000)
+
+        logging.info("Inserting Bridge flow sending matching packets to port %d", out_port)
+        self.controller.message_send(request)
+        do_barrier(self.controller)        
+        """
+        #60_acl
+
+        grouptype = 0
+        vlanid = 100
+        out_port=2
+        group_id = out_port + (vlanid << 16) + (grouptype << 28)
+        match = ofp.match()
+        match.oxm_list.append(ofp.oxm.eth_dst([0x00, 0x00, 0x00, 0x00, 0x00, 0x10]))
+        match.oxm_list.append(ofp.oxm.vlan_vid(vlanid))
+        match.oxm_list.append(ofp.oxm.eth_type(0x0800))        
+        match.oxm_list.append(ofp.oxm.ipv4_dst_masked(0xc0010164, 32))        
+        request = ofp.message.flow_add(
+                table_id=60,
+                cookie=42,
+                match=match,
+                instructions=[
+                    ofp.instruction.apply_actions(
+                        actions=[
+                            ofp.action.group(group_id)])
+                    ],
+                buffer_id=ofp.OFP_NO_BUFFER,
+                priority=1000)
+
+        logging.info("Inserting ACL flow sending matching packets to port %d", out_port)
+        self.controller.message_send(request)
+        do_barrier(self.controller)        
+
+        #send packet on port 1
+        in_port=1
+        out_port=2
+        parsed_pkt = simple_tcp_packet(pktlen=104, 
+                                       eth_dst='00:00:00:00:00:10', 
+                                       dl_vlan_enable=True,
+                                       vlan_vid=100,
+                                       ip_dst='192.168.1.100')
+        pkt = str(parsed_pkt)
+        logging.info("Send packet on port %d, out port %d", in_port, out_port)
+        self.dataplane.send(in_port, pkt)
+        #construct verify packet content
+        parsed_pkt = simple_tcp_packet(pktlen=100, 
+                                       eth_dst='00:00:00:00:00:10', 
+                                       ip_dst='192.168.1.100')
+        verify_packet(self, parsed_pkt, out_port)
+        
+        verify_no_other_packets(self)   
+
+        #send packet on port 1, again but diff DST IP
+        in_port=1
+        out_port=2
+        parsed_pkt = simple_tcp_packet(pktlen=104, 
+                                       eth_dst='00:00:00:00:00:10', 
+                                       dl_vlan_enable=True,
+                                       vlan_vid=100,
+                                       ip_dst='192.168.1.200')
+        pkt = str(parsed_pkt)
+        logging.info("Send packet on port %d, out port %d", in_port, out_port)
+        self.dataplane.send(in_port, pkt)
+        #construct verify packet content
+        parsed_pkt = simple_tcp_packet(pktlen=100, 
+                                       eth_dst='00:00:00:00:00:10', 
+                                       ip_dst='192.168.1.200')
+        verify_no_packet(self, parsed_pkt, out_port)
+        
+        verify_no_other_packets(self)  
+        
\ No newline at end of file
