diff --git a/accton/accton_util.py b/accton/accton_util.py
index 9ac96c8..1eb2946 100755
--- a/accton/accton_util.py
+++ b/accton/accton_util.py
@@ -388,7 +388,33 @@
     logging.info("Add port table, match port %lx" % 0x10000)
     ctrl.message_send(request)
     
-    
+
+def pop_vlan_flow(ctrl, ports, vlan_id=1):
+    # table 10: vlan
+    # goto to table 20
+    msgs=[]
+    for of_port in ports:
+            match = ofp.match()
+            match.oxm_list.append(ofp.oxm.in_port(of_port))
+            match.oxm_list.append(ofp.oxm.vlan_vid(0x1000+vlan_id))
+            request = ofp.message.flow_add(
+                table_id=10,
+                cookie=42,
+                match=match,
+                instructions=[
+                  ofp.instruction.apply_actions(
+                    actions=[
+                      ofp.action.pop_vlan()
+                    ]
+                  ),
+                  ofp.instruction.goto_table(20)
+                ],
+                priority=0)
+            logging.info("Add vlan %d tagged packets on port %d and go to table 20" %( vlan_id, of_port))
+            ctrl.message_send(request)
+
+
+    return msgs
 
 def add_vlan_table_flow(ctrl, ports, vlan_id=1, flag=VLAN_TABLE_FLAG_ONLY_BOTH, send_barrier=False):
     # table 10: vlan
@@ -404,6 +430,11 @@
                 cookie=42,
                 match=match,
                 instructions=[
+                  ofp.instruction.apply_actions(
+                    actions=[
+                      ofp.action.pop_vlan()
+                    ]
+                  ),
                   ofp.instruction.goto_table(20)
                 ],
                 priority=0)
@@ -698,7 +729,39 @@
         do_barrier(ctrl)   
 
     return request        
-        
+
+def add_mpls_flow(ctrl, action_group_id, label=100 ,ethertype=0x0800, bos=True, send_barrier=False):
+    match = ofp.match()
+    match.oxm_list.append(ofp.oxm.eth_type(0x8847))
+    match.oxm_list.append(ofp.oxm.mpls_label(label))
+    match.oxm_list.append(ofp.oxm.mpls_bos(bos))
+    actions = [ofp.action.dec_mpls_ttl(),
+               ofp.action.copy_ttl_in(),
+               ofp.action.pop_mpls(ethertype)]
+    request = ofp.message.flow_add(
+            table_id=24,
+            cookie=43,
+            match=match,
+            instructions=[
+                    ofp.instruction.apply_actions(
+                        actions=actions
+                    ),
+                    ofp.instruction.write_actions(
+                        actions=[ofp.action.group(action_group_id)]),
+                    ofp.instruction.goto_table(60)
+                ],
+            buffer_id=ofp.OFP_NO_BUFFER,
+            priority=1)
+
+    logging.info("Inserting MPLS flow , label %ld", label)
+    ctrl.message_send(request)
+
+    if send_barrier:
+        do_barrier(ctrl)
+
+    return request
+
+
 def add_mcast4_routing_flow(ctrl, vlan_id, src_ip, src_ip_mask, dst_ip, action_group_id, send_barrier=False):
     match = ofp.match()
     match.oxm_list.append(ofp.oxm.eth_type(0x0800))
diff --git a/accton/group_test.py b/accton/group_test.py
index 8acb025..84fbde4 100755
--- a/accton/group_test.py
+++ b/accton/group_test.py
@@ -620,7 +620,7 @@
                                                           oam_lm_tx_count=False,
                                                           set_pri_from_table=False
                                                           )
-            
+        mpls_intf_msg.group_id
         stats = get_stats(self, ofp.message.group_desc_stats_request())
         
         verify_group_stats=[]
diff --git a/ofdpa/onos.py b/ofdpa/onos.py
index bdc1e13..608ae6f 100644
--- a/ofdpa/onos.py
+++ b/ofdpa/onos.py
@@ -10,13 +10,23 @@
 8) MTU 4500
 """
 
-import logging
-
 from oftest import config
-import oftest.base_tests as base_tests
 import ofp
 from oftest.testutils import *
+from accton.accton_util import add_mpls_flow
 from accton_util import *
+import src.python.oftest.testutils
+from src.python.oftest.testutils import do_barrier
+from src.python.oftest.testutils import delete_all_flows
+from src.python.oftest.testutils import delete_all_groups
+from src.python.oftest.testutils import simple_tcp_packet
+from src.python.oftest.testutils import verify_packet_in
+from src.python.oftest.testutils import verify_no_other_packets
+from src.python.oftest.testutils import verify_no_packet
+from src.python.oftest.testutils import verify_packets
+from src.python.oftest.testutils import verify_packet
+from src.python.oftest.testutils import mpls_packet
+
 
 class PacketInSrcMacMiss(base_tests.SimpleDataPlane):
     """
@@ -292,14 +302,14 @@
     Port1(vid=in_port, src=00:00:00:22:22:in_port, 192.168.outport.1) , 
     Port2(vid=outport, dst=00:00:00:22:22:outport, 192.168.outport.1)
     """
-    def runTest(self):          
+    def runTest(self):
         delete_all_flows(self.controller)
         delete_all_groups(self.controller)
 
         if len(config["port_map"]) <2:
             logging.info("Port count less than 2, can't run this case")
             return
-        
+
         intf_src_mac=[0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc]
         dst_mac=[0x00, 0x00, 0x00, 0x22, 0x22, 0x00]
         dip=0xc0a80001
@@ -313,16 +323,16 @@
             #add vlan flow table
             add_one_vlan_table_flow(self.controller, port, vlan_id, flag=VLAN_TABLE_FLAG_ONLY_BOTH)
             #add termination flow
-            add_termination_flow(self.controller, port, 0x0800, intf_src_mac, vlan_id)           
+            add_termination_flow(self.controller, port, 0x0800, intf_src_mac, vlan_id)
             #add unicast routing flow
-            dst_ip = dip + (vlan_id<<8)           
+            dst_ip = dip + (vlan_id<<8)
             add_unicast_routing_flow(self.controller, 0x0800, dst_ip, 0, l3_msg.group_id)
             #add entries in the Bridging table to avoid packet-in from mac learning
             group_id = encode_l2_interface_group_id(vlan_id, port)
             add_bridge_flow(self.controller, dst_mac, vlan_id, group_id, True)
-        
-        do_barrier(self.controller)  
-        
+
+        do_barrier(self.controller)
+
         switch_mac = ':'.join(['%02X' % x for x in intf_src_mac])
         for in_port in ports:
             mac_src='00:00:00:22:22:%02X' % in_port
@@ -333,23 +343,23 @@
                 ip_dst='192.168.%02d.1' % out_port
                 parsed_pkt = simple_tcp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=in_port,
                     eth_dst=switch_mac, eth_src=mac_src, ip_ttl=64, ip_src=ip_src,
-                    ip_dst=ip_dst)            
+                    ip_dst=ip_dst)
                 pkt=str(parsed_pkt)
                 self.dataplane.send(in_port, pkt)
                 #build expected packet
                 mac_dst='00:00:00:22:22:%02X' % out_port
-                exp_pkt = simple_tcp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=out_port, 
+                exp_pkt = simple_tcp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=out_port,
                                        eth_dst=mac_dst, eth_src=switch_mac, ip_ttl=63,
                                        ip_src=ip_src, ip_dst=ip_dst)
                 pkt=str(exp_pkt)
                 verify_packet(self, pkt, out_port)
                 verify_no_other_packets(self)
 
-class L3VPNMPLS(base_tests.SimpleDataPlane): 
-	'''
-	Insert IP packet
-	Receive MPLS packet
-	'''
+class L3VPNMPLS(base_tests.SimpleDataPlane):
+    """
+	    Insert IP packet
+	    Receive MPLS packet
+    """
     def runTest(self):
         delete_all_flows(self.controller)
         delete_all_groups(self.controller)
@@ -371,7 +381,7 @@
             #add MPLS interface group
             mpls_gid, mpls_msg = add_mpls_intf_group(self.controller, l2_gid, dst_mac, intf_src_mac, vlan_id, port)
             #add MPLS L3 VPN group
-            mpls_label_gid, mpls_label_msg = add_mpls_label_group(self.controller, subtype=OFDPA_MPLS_GROUP_SUBTYPE_L3_VPN_LABEL, 
+            mpls_label_gid, mpls_label_msg = add_mpls_label_group(self.controller, subtype=OFDPA_MPLS_GROUP_SUBTYPE_L3_VPN_LABEL,
 		     index=port, ref_gid= mpls_gid, push_mpls_header=True, set_mpls_label=port, set_bos=1, set_ttl=32)
             #add vlan flow table
             add_one_vlan_table_flow(self.controller, port, vlan_id, flag=VLAN_TABLE_FLAG_ONLY_BOTH)
@@ -402,8 +412,68 @@
                 #build expect packet
                 mac_dst='00:00:00:22:22:%02X' % out_port
                 label = (out_port, 0, 1, 32)
-                exp_pkt = mpls_packet(dl_vlan_enable=True, vlan_vid=out_port, ip_ttl=64, ip_src=ip_src, 
+                exp_pkt = mpls_packet(dl_vlan_enable=True, vlan_vid=out_port, ip_ttl=64, ip_src=ip_src,
                             ip_dst=ip_dst, eth_dst=mac_dst, eth_src=switch_mac, label=[label])
                 pkt=str(exp_pkt)
                 verify_packet(self, pkt, out_port)
                 verify_no_other_packets(self)
+
+class MplsTermination(base_tests.SimpleDataPlane):
+    '''
+	Insert IP packet
+	Receive MPLS packet
+    '''
+    def runTest(self):
+        delete_all_flows(self.controller)
+        delete_all_groups(self.controller)
+
+        if len(config["port_map"]) <2:
+            logging.info("Port count less than 2, can't run this case")
+            return
+
+        intf_src_mac=[0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc]
+        dst_mac=[0x00, 0x00, 0x00, 0x22, 0x22, 0x00]
+        dip=0xc0a80001
+        index=1
+        ports = config["port_map"].keys()
+        for port in ports:
+            #add l2 interface group
+            vlan_id=port
+            l2_gid, l2_msg = add_one_l2_interface_grouop(self.controller, port, vlan_id, True, False)
+            dst_mac[5]=vlan_id
+            #add L3 Unicast  group
+            l3_msg=add_l3_unicast_group(self.controller, port, vlanid=vlan_id, id=vlan_id, src_mac=intf_src_mac, dst_mac=dst_mac)
+            #add vlan flow table
+            add_one_vlan_table_flow(self.controller, port, vlan_id, flag=VLAN_TABLE_FLAG_ONLY_BOTH)
+            #add termination flow
+            add_termination_flow(self.controller, port, 0x0800, intf_src_mac, vlan_id)
+            #add routing flow
+            dst_ip = dip + (vlan_id<<8)
+            add_mpls_flow(self.controller, l3_msg.group_id, port)
+            #add entries in the Bridging table to avoid packet-in from mac learning
+            group_id = encode_l2_interface_group_id(vlan_id, port)
+            add_bridge_flow(self.controller, dst_mac, vlan_id, group_id, True)
+
+        do_barrier(self.controller)
+
+        switch_mac = ':'.join(['%02X' % x for x in intf_src_mac])
+        for in_port in ports:
+            mac_src='00:00:00:22:22:%02X' % in_port
+            ip_src='192.168.%02d.1' % in_port
+            for out_port in ports:
+                if in_port == out_port:
+                     continue
+                ip_dst='192.168.%02d.1' % out_port
+                parsed_pkt = simple_tcp_packet(pktlen=100, dl_vlan_enable=True, vlan_vid=in_port,
+                    eth_dst=switch_mac, eth_src=mac_src, ip_ttl=64, ip_src=ip_src,
+                    ip_dst=ip_dst)
+                pkt=str(parsed_pkt)
+                self.dataplane.send(in_port, pkt)
+                #build expect packet
+                mac_dst='00:00:00:22:22:%02X' % out_port
+                label = (out_port, 0, 1, 32)
+                exp_pkt = mpls_packet(dl_vlan_enable=True, vlan_vid=out_port, ip_ttl=64, ip_src=ip_src,
+                            ip_dst=ip_dst, eth_dst=mac_dst, eth_src=switch_mac, label=[label])
+                pkt=str(exp_pkt)
+                verify_packet(self, pkt, out_port)
+                verify_no_other_packets(self)
\ No newline at end of file
