diff --git a/src/configure.ac b/src/configure.ac
index b4c0c70..0e75403 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -222,6 +222,7 @@
 PLUGIN_ENABLED(sixrd)
 PLUGIN_ENABLED(nat)
 PLUGIN_ENABLED(stn)
+PLUGIN_ENABLED(l2e)
 
 ###############################################################################
 # Dependency checks
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 746b4e0..03aef22 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -87,6 +87,10 @@
 include stn.am
 endif
 
+if ENABLE_L2E_PLUGIN
+include l2e.am
+endif
+
 include ../suffix-rules.mk
 
 # Remove *.la files
diff --git a/src/plugins/l2e.am b/src/plugins/l2e.am
new file mode 100644
index 0000000..da2c456
--- /dev/null
+++ b/src/plugins/l2e.am
@@ -0,0 +1,28 @@
+# Copyright (c) 2016 Cisco Systems, Inc.
+# 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.
+
+vppplugins_LTLIBRARIES += l2e_plugin.la
+
+l2e_plugin_la_SOURCES = 	\
+	l2e/l2e.c		\
+	l2e/l2e_api.c
+
+API_FILES += l2e/l2e.api
+
+noinst_HEADERS += 		\
+	l2e/l2e.h		\
+	l2e/l2e_all_api_h.h	\
+	l2e/l2e_msg_enum.h	\
+	l2e/l2e.api.h
+
+# vi:syntax=automake
diff --git a/src/plugins/l2e/l2e.api b/src/plugins/l2e/l2e.api
new file mode 100644
index 0000000..172ed48
--- /dev/null
+++ b/src/plugins/l2e/l2e.api
@@ -0,0 +1,38 @@
+/* Hey Emacs use -*- mode: C -*- */
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ * 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.
+ */
+
+vl_api_version 1.0.0
+
+/** \brief L2 emulation at L3
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param sw_if_index - interface the operation is applied to
+    @param enable - Turn the service on or off
+*/
+autoreply define l2_emulation
+{
+  u32 client_index;
+  u32 context;
+  u32 sw_if_index;
+  u32 ip_table_id;
+  u8  enable;
+};
+
+/*
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/src/plugins/l2e/l2e.c b/src/plugins/l2e/l2e.c
new file mode 100644
index 0000000..633d1f9
--- /dev/null
+++ b/src/plugins/l2e/l2e.c
@@ -0,0 +1,485 @@
+/*
+ * l2_emulation.h : Extract L3 packets from the L2 input and feed
+ *                   them into the L3 path.
+ *
+ * Copyright (c) 2013 Cisco and/or its affiliates.
+ * 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.
+ */
+
+#include <plugins/l2e/l2e.h>
+#include <vnet/l2/l2_input.h>
+
+/**
+ * Grouping of global data for the L2 emulation feature
+ */
+typedef struct l2_emulation_main_t_
+{
+  /**
+   * Next nodes for L2 output features
+   */
+  u32 l2_input_feat_next[32];
+} l2_emulation_main_t;
+
+static l2_emulation_main_t l2_emulation_main;
+
+/**
+ * Per-interface L2 configuration
+ */
+typedef struct l2_emulation_t_
+{
+  /**
+   * Enabled or Disabled.
+   *  this is required since one L3 protocl can be enabled, but others not
+   */
+  u8 enabled;
+} l2_emulation_t;
+
+/**
+ * A zero'd out struct we can use in the vec_validate
+ */
+static const l2_emulation_t ezero = { };
+
+/**
+ * Per-interface vector of emulation configs
+ */
+l2_emulation_t *l2_emulations;
+
+void
+l2_emulation_enable (u32 sw_if_index)
+{
+  vec_validate_init_empty (l2_emulations, sw_if_index, ezero);
+
+  l2_emulation_t *l23e = &l2_emulations[sw_if_index];
+
+  l23e->enabled = 1;
+
+  /*
+   * L3 enable the interface - using IP unnumbered from the control
+   * plane may not be possible since there may be no BVI interface
+   * to which to unnumber
+   */
+  ip4_sw_interface_enable_disable (sw_if_index, 1);
+  ip6_sw_interface_enable_disable (sw_if_index, 1);
+
+  l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_L2_EMULATION, 1);
+}
+
+
+void
+l2_emulation_disable (u32 sw_if_index)
+{
+  if (vec_len (l2_emulations) >= sw_if_index)
+    {
+      l2_emulation_t *l23e = &l2_emulations[sw_if_index];
+      memset (l23e, 0, sizeof (*l23e));
+
+      l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_L2_EMULATION, 0);
+      ip4_sw_interface_enable_disable (sw_if_index, 0);
+      ip6_sw_interface_enable_disable (sw_if_index, 0);
+    }
+}
+
+static clib_error_t *
+l2_emulation_interface_add_del (vnet_main_t * vnm,
+				u32 sw_if_index, u32 is_add)
+{
+  if (is_add)
+    {
+      vec_validate_init_empty (l2_emulations, sw_if_index, ezero);
+    }
+
+  return (NULL);
+}
+
+VNET_SW_INTERFACE_ADD_DEL_FUNCTION (l2_emulation_interface_add_del);
+
+static clib_error_t *
+l2_emulation_cli (vlib_main_t * vm,
+		  unformat_input_t * input, vlib_cli_command_t * cmd)
+{
+  vnet_main_t *vnm = vnet_get_main ();
+  u32 sw_if_index = ~0;
+  u8 enable = 1;
+
+  while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (input, "%U", unformat_vnet_sw_interface,
+		    vnm, &sw_if_index))
+	;
+      else if (unformat (input, "enable"))
+	enable = 1;
+      else if (unformat (input, "disable"))
+	enable = 0;
+      else
+	break;
+    }
+
+  if (~0 == sw_if_index)
+    return clib_error_return (0, "interface must be specified");
+
+  if (enable)
+    l2_emulation_enable (sw_if_index);
+  else
+    l2_emulation_disable (sw_if_index);
+
+  return (NULL);
+}
+
+/*?
+ * Configure l2 emualtion.
+ *  When the interface is in L2 mode, configure the extraction of L3
+ *  packets out of the L2 path and into the L3 path.
+ *
+ * @cliexpar
+ * @cliexstart{set interface l2 input l2-emulation <interface-name> [disable]
+ * @cliexend
+ ?*/
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (l2_emulation_cli_node, static) = {
+  .path = "set interface l2 l2-emulation",
+  .short_help =
+  "set interface l2 l2-emulation <interface-name> [disable|enable]\n",
+  .function = l2_emulation_cli,
+};
+/* *INDENT-ON* */
+
+static clib_error_t *
+l2_emulation_show (vlib_main_t * vm,
+		   unformat_input_t * input, vlib_cli_command_t * cmd)
+{
+  vnet_main_t *vnm = vnet_get_main ();
+  l2_emulation_t *l23e;
+  u32 sw_if_index;
+
+  vec_foreach_index (sw_if_index, l2_emulations)
+  {
+    l23e = &l2_emulations[sw_if_index];
+    if (l23e->enabled)
+      {
+	vlib_cli_output (vm, "%U\n",
+			 format_vnet_sw_if_index_name, vnm, sw_if_index);
+      }
+  }
+  return (NULL);
+}
+
+/*?
+ * Show l2 emulation.
+ *  When the interface is in L2 mode, configure the extraction of L3
+ *  packets out of the L2 path and into the L3 path.
+ *
+ * @cliexpar
+ * @cliexstart{show interface l2 l2-emulation
+ * @cliexend
+ ?*/
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (l2_emulation_show_node, static) = {
+  .path = "show interface l2 l2-emulation",
+  .short_help = "show interface l2 l2-emulation\n",
+  .function = l2_emulation_show,
+};
+/* *INDENT-ON* */
+
+#define foreach_l2_emulation                    \
+  _(IP4, "Extract IPv4")                        \
+  _(IP6, "Extract IPv6")
+
+typedef enum
+{
+#define _(sym,str) L2_EMULATION_ERROR_##sym,
+  foreach_l2_emulation
+#undef _
+    L2_EMULATION_N_ERROR,
+} l2_emulation_error_t;
+
+static char *l2_emulation_error_strings[] = {
+#define _(sym,string) string,
+  foreach_l2_emulation
+#undef _
+};
+
+typedef enum
+{
+#define _(sym,str) L2_EMULATION_NEXT_##sym,
+  foreach_l2_emulation
+#undef _
+    L2_EMULATION_N_NEXT,
+} l2_emulation_next_t;
+
+/**
+ * per-packet trace data
+ */
+typedef struct l2_emulation_trace_t_
+{
+  /* per-pkt trace data */
+  u8 extracted;
+} l2_emulation_trace_t;
+
+static uword
+l2_emulation_node_fn (vlib_main_t * vm,
+		      vlib_node_runtime_t * node, vlib_frame_t * frame)
+{
+  l2_emulation_main_t *em = &l2_emulation_main;
+  u32 n_left_from, *from, *to_next;
+  l2_emulation_next_t next_index;
+  u32 ip4_hits = 0;
+  u32 ip6_hits = 0;
+
+  next_index = 0;
+  n_left_from = frame->n_vectors;
+  from = vlib_frame_vector_args (frame);
+
+  while (n_left_from > 0)
+    {
+      u32 n_left_to_next;
+
+      vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
+      while (n_left_from >= 4 && n_left_to_next >= 2)
+	{
+	  vlib_buffer_t *b0, *b1;
+	  u32 sw_if_index0, sw_if_index1;
+	  u16 ether_type0, ether_type1;
+	  u32 next0 = ~0, next1 = ~0;
+	  u8 l2_len0, l2_len1;
+	  u32 bi0, bi1;
+	  u8 *h0, *h1;
+
+	  bi0 = to_next[0] = from[0];
+	  bi1 = to_next[1] = from[1];
+
+	  from += 2;
+	  n_left_from -= 2;
+	  to_next += 2;
+	  n_left_to_next -= 2;
+
+	  b0 = vlib_get_buffer (vm, bi0);
+	  b1 = vlib_get_buffer (vm, bi1);
+	  l2_len0 = vnet_buffer (b0)->l2.l2_len;
+	  l2_len1 = vnet_buffer (b1)->l2.l2_len;
+
+	  h0 = vlib_buffer_get_current (b0);
+	  h1 = vlib_buffer_get_current (b1);
+
+	  ether_type0 = clib_net_to_host_u16 (*(u16 *) (h0 + l2_len0 - 2));
+	  ether_type1 = clib_net_to_host_u16 (*(u16 *) (h1 + l2_len1 - 2));
+	  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
+	  sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX];
+
+	  /*
+	   * only extract unicast
+	   */
+	  if (PREDICT_TRUE (!(h0[0] & 0x1)))
+	    {
+	      switch (ether_type0)
+		{
+		case ETHERNET_TYPE_IP4:
+		  ASSERT (l2_emulations[sw_if_index0].enabled);
+		  ++ip4_hits;
+		  next0 = L2_EMULATION_NEXT_IP4;
+		  vlib_buffer_advance (b0, l2_len0);
+		  break;
+		case ETHERNET_TYPE_IP6:
+		  ASSERT (l2_emulations[sw_if_index0].enabled);
+		  ++ip6_hits;
+		  next0 = L2_EMULATION_NEXT_IP6;
+		  vlib_buffer_advance (b0, l2_len0);
+		default:
+		  break;
+		}
+	    }
+	  if (PREDICT_TRUE (!(h1[0] & 0x1)))
+	    {
+	      switch (ether_type1)
+		{
+		case ETHERNET_TYPE_IP4:
+		  ASSERT (l2_emulations[sw_if_index1].enabled);
+		  ++ip4_hits;
+		  next1 = L2_EMULATION_NEXT_IP4;
+		  vlib_buffer_advance (b1, l2_len1);
+		  break;
+		case ETHERNET_TYPE_IP6:
+		  ASSERT (l2_emulations[sw_if_index1].enabled);
+		  ++ip6_hits;
+		  next1 = L2_EMULATION_NEXT_IP6;
+		  vlib_buffer_advance (b1, l2_len1);
+		default:
+		  break;
+		}
+	    }
+	  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)
+			     && (b0->flags & VLIB_BUFFER_IS_TRACED)))
+	    {
+	      l2_emulation_trace_t *t =
+		vlib_add_trace (vm, node, b0, sizeof (*t));
+	      t->extracted = (next0 != ~0);
+	    }
+	  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)
+			     && (b1->flags & VLIB_BUFFER_IS_TRACED)))
+	    {
+	      l2_emulation_trace_t *t =
+		vlib_add_trace (vm, node, b1, sizeof (*t));
+	      t->extracted = (next1 != ~0);
+	    }
+
+	  /* Determine the next node and remove ourself from bitmap */
+	  if (PREDICT_TRUE (next0 == ~0))
+	    next0 = vnet_l2_feature_next (b0, em->l2_input_feat_next,
+					  L2INPUT_FEAT_L2_EMULATION);
+
+	  /* Determine the next node and remove ourself from bitmap */
+	  if (PREDICT_TRUE (next1 == ~0))
+	    next1 = vnet_l2_feature_next (b1, em->l2_input_feat_next,
+					  L2INPUT_FEAT_L2_EMULATION);
+
+	  vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
+					   to_next, n_left_to_next,
+					   bi0, bi1, next0, next1);
+	}
+      while (n_left_from > 0 && n_left_to_next > 0)
+	{
+	  vlib_buffer_t *b0;
+	  u32 sw_if_index0;
+	  u16 ether_type0;
+	  u32 next0 = ~0;
+	  u8 l2_len0;
+	  u32 bi0;
+	  u8 *h0;
+
+	  bi0 = from[0];
+	  to_next[0] = bi0;
+	  from += 1;
+	  to_next += 1;
+	  n_left_from -= 1;
+	  n_left_to_next -= 1;
+
+	  b0 = vlib_get_buffer (vm, bi0);
+	  l2_len0 = vnet_buffer (b0)->l2.l2_len;
+
+	  h0 = vlib_buffer_get_current (b0);
+	  ether_type0 = clib_net_to_host_u16 (*(u16 *) (h0 + l2_len0 - 2));
+	  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
+
+	  /*
+	   * only extract unicast
+	   */
+	  if (PREDICT_TRUE (!(h0[0] & 0x1)))
+	    {
+	      switch (ether_type0)
+		{
+		case ETHERNET_TYPE_IP4:
+		  ASSERT (l2_emulations[sw_if_index0].enabled);
+		  ++ip4_hits;
+		  next0 = L2_EMULATION_NEXT_IP4;
+		  vlib_buffer_advance (b0, l2_len0);
+		  break;
+		case ETHERNET_TYPE_IP6:
+		  ASSERT (l2_emulations[sw_if_index0].enabled);
+		  ++ip6_hits;
+		  next0 = L2_EMULATION_NEXT_IP6;
+		  vlib_buffer_advance (b0, l2_len0);
+		default:
+		  break;
+		}
+	    }
+
+	  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)
+			     && (b0->flags & VLIB_BUFFER_IS_TRACED)))
+	    {
+	      l2_emulation_trace_t *t =
+		vlib_add_trace (vm, node, b0, sizeof (*t));
+	      t->extracted = (next0 != ~0);
+	    }
+
+	  /* Determine the next node and remove ourself from bitmap */
+	  if (PREDICT_TRUE (next0 == ~0))
+	    next0 = vnet_l2_feature_next (b0, em->l2_input_feat_next,
+					  L2INPUT_FEAT_L2_EMULATION);
+
+	  /* verify speculative enqueue, maybe switch current next frame */
+	  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
+					   to_next, n_left_to_next,
+					   bi0, next0);
+	}
+
+      vlib_put_next_frame (vm, node, next_index, n_left_to_next);
+    }
+
+  vlib_node_increment_counter (vm, node->node_index,
+			       L2_EMULATION_ERROR_IP4, ip4_hits);
+  vlib_node_increment_counter (vm, node->node_index,
+			       L2_EMULATION_ERROR_IP6, ip6_hits);
+
+  return frame->n_vectors;
+}
+
+/* packet trace format function */
+static u8 *
+format_l2_emulation_trace (u8 * s, va_list * args)
+{
+  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
+  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
+  l2_emulation_trace_t *t = va_arg (*args, l2_emulation_trace_t *);
+
+  s = format (s, "l2-emulation: %s", (t->extracted ? "yes" : "no"));
+
+  return s;
+}
+
+/* *INDENT-OFF* */
+VLIB_REGISTER_NODE (l2_emulation_node) = {
+  .function = l2_emulation_node_fn,
+  .name = "l2-emulation",
+  .vector_size = sizeof (u32),
+  .format_trace = format_l2_emulation_trace,
+  .type = VLIB_NODE_TYPE_INTERNAL,
+
+  .n_errors = ARRAY_LEN(l2_emulation_error_strings),
+  .error_strings = l2_emulation_error_strings,
+
+  .n_next_nodes = L2_EMULATION_N_NEXT,
+
+  /* edit / add dispositions here */
+  .next_nodes = {
+    [L2_EMULATION_NEXT_IP4] = "ip4-input",
+    [L2_EMULATION_NEXT_IP6] = "ip6-input",
+  },
+};
+/* *INDENT-ON* */
+
+VLIB_NODE_FUNCTION_MULTIARCH (l2_emulation_node, l2_emulation_node_fn);
+
+
+static clib_error_t *
+l2_emulation_init (vlib_main_t * vm)
+{
+  l2_emulation_main_t *em = &l2_emulation_main;
+
+  /* Initialize the feature next-node indexes */
+  feat_bitmap_init_next_nodes (vm,
+			       l2_emulation_node.index,
+			       L2INPUT_N_FEAT,
+			       l2input_get_feat_names (),
+			       em->l2_input_feat_next);
+
+  return 0;
+}
+
+VLIB_INIT_FUNCTION (l2_emulation_init);
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/src/plugins/l2e/l2e.h b/src/plugins/l2e/l2e.h
new file mode 100644
index 0000000..9549501
--- /dev/null
+++ b/src/plugins/l2e/l2e.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2013 Cisco and/or its affiliates.
+ * 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.
+ */
+
+#ifndef included_vnet_l2_emulation_h
+#define included_vnet_l2_emulation_h
+
+#include <vlib/vlib.h>
+#include <vnet/vnet.h>
+
+/**
+ * L2 Emulation is a feautre that is applied to L2 ports to 'extract'
+ * IP packets from the L2 path and inject them into the L3 path (i.e.
+ * into the appropriate ip[4|6]_input node).
+ * L3 routes in the table_id for that interface should then be configured
+ * as DVR routes, therefore the forwarded packet has the L2 header
+ * preserved and togehter the L3 routed system behaves like an L2 bridge.
+ */
+extern void l2_emulation_enable (u32 sw_if_index);
+extern void l2_emulation_disable (u32 sw_if_index);
+
+#endif
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/src/plugins/l2e/l2e_all_api_h.h b/src/plugins/l2e/l2e_all_api_h.h
new file mode 100644
index 0000000..44fad6b
--- /dev/null
+++ b/src/plugins/l2e/l2e_all_api_h.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ * 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.
+ */
+/* Include the generated file, see BUILT_SOURCES in Makefile.am */
+#include <l2e/l2e.api.h>
+
diff --git a/src/plugins/l2e/l2e_api.c b/src/plugins/l2e/l2e_api.c
new file mode 100644
index 0000000..470427e
--- /dev/null
+++ b/src/plugins/l2e/l2e_api.c
@@ -0,0 +1,162 @@
+/*
+ *------------------------------------------------------------------
+ * l2e_api.c - layer 2 emulation api
+ *
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ * 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.
+ *------------------------------------------------------------------
+ */
+
+#include <vnet/vnet.h>
+#include <vnet/plugin/plugin.h>
+
+#include <vnet/interface.h>
+#include <vnet/api_errno.h>
+#include <vpp/app/version.h>
+
+#include <l2e/l2e.h>
+
+#include <vlibapi/api.h>
+#include <vlibmemory/api.h>
+
+/* define message IDs */
+#include <l2e/l2e_msg_enum.h>
+
+#define vl_typedefs		/* define message structures */
+#include <l2e/l2e_all_api_h.h>
+#undef vl_typedefs
+
+#define vl_endianfun		/* define message structures */
+#include <l2e/l2e_all_api_h.h>
+#undef vl_endianfun
+
+/* instantiate all the print functions we know about */
+#define vl_print(handle, ...) vlib_cli_output (handle, __VA_ARGS__)
+#define vl_printfun
+#include <l2e/l2e_all_api_h.h>
+#undef vl_printfun
+
+/* Get the API version number */
+#define vl_api_version(n,v) static u32 api_version=(v);
+#include <acl/acl_all_api_h.h>
+#undef vl_api_version
+
+#include <vlibapi/api_helper_macros.h>
+
+#define foreach_l2e_api_msg                                 \
+_(L2_EMULATION, l2_emulation)
+
+/**
+ * L2 Emulation Main
+ */
+typedef struct l2_emulation_main_t_
+{
+  u16 msg_id_base;
+} l2_emulation_main_t;
+
+static l2_emulation_main_t l2_emulation_main;
+
+#define L2E_MSG_BASE l2_emulation_main.msg_id_base
+
+static void
+vl_api_l2_emulation_t_handler (vl_api_l2_emulation_t * mp)
+{
+  vl_api_l2_emulation_reply_t *rmp;
+  int rv = 0;
+
+  VALIDATE_SW_IF_INDEX (mp);
+
+  u32 sw_if_index = ntohl (mp->sw_if_index);
+
+  if (mp->enable)
+    l2_emulation_enable (sw_if_index);
+  else
+    l2_emulation_disable (sw_if_index);
+
+  BAD_SW_IF_INDEX_LABEL;
+
+  REPLY_MACRO (VL_API_L2_EMULATION_REPLY + L2E_MSG_BASE);
+}
+
+/*
+ * l2_api_hookup
+ * Add vpe's API message handlers to the table.
+ * vlib has alread mapped shared memory and
+ * added the client registration handlers.
+ * See .../vlib-api/vlibmemory/memclnt_vlib.c:memclnt_process()
+ */
+#define vl_msg_name_crc_list
+#include <l2e/l2e_all_api_h.h>
+#undef vl_msg_name_crc_list
+
+static void
+setup_message_id_table (api_main_t * am)
+{
+#define _(id,n,crc)                                     \
+  vl_msg_api_add_msg_name_crc (am, #n "_" #crc, id + L2E_MSG_BASE);
+  foreach_vl_msg_name_crc_l2e;
+#undef _
+}
+
+static void
+l2e_api_hookup (vlib_main_t * vm)
+{
+#define _(N,n)                                                  \
+    vl_msg_api_set_handlers(VL_API_##N + L2E_MSG_BASE,          \
+                            #n,                                 \
+                            vl_api_##n##_t_handler,             \
+                            vl_noop_handler,                    \
+                            vl_api_##n##_t_endian,              \
+                            vl_api_##n##_t_print,               \
+                            sizeof(vl_api_##n##_t), 1);
+  foreach_l2e_api_msg;
+#undef _
+}
+
+static clib_error_t *
+l2e_init (vlib_main_t * vm)
+{
+  api_main_t *am = &api_main;
+  l2_emulation_main_t *l2em = &l2_emulation_main;
+  u8 *name = format (0, "l2e_%08x%c", api_version, 0);
+
+  /* Ask for a correctly-sized block of API message decode slots */
+  l2em->msg_id_base = vl_msg_api_get_msg_ids ((char *) name,
+					      VL_MSG_FIRST_AVAILABLE);
+
+  l2e_api_hookup (vm);
+
+  /* Add our API messages to the global name_crc hash table */
+  setup_message_id_table (am);
+
+  vec_free (name);
+  return (NULL);
+}
+
+VLIB_API_INIT_FUNCTION (l2e_init);
+
+/* *INDENT-OFF* */
+VLIB_PLUGIN_REGISTER () = {
+    .version = VPP_BUILD_VER,
+    .description = "L2 Emulation",
+};
+/* *INDENT-ON* */
+
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "gnu")
+ * End:
+ */
diff --git a/src/plugins/l2e/l2e_msg_enum.h b/src/plugins/l2e/l2e_msg_enum.h
new file mode 100644
index 0000000..85c8328
--- /dev/null
+++ b/src/plugins/l2e/l2e_msg_enum.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2016 Cisco and/or its affiliates.
+ * 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.
+ */
+#ifndef included_l2e_msg_enum_h
+#define included_l2e_msg_enum_h
+
+#include <vppinfra/byte_order.h>
+
+#define vl_msg_id(n,h) n,
+typedef enum {
+#include <l2e/l2e_all_api_h.h>
+    /* We'll want to know how many messages IDs we need... */
+    VL_MSG_FIRST_AVAILABLE,
+} vl_msg_id_t;
+#undef vl_msg_id
+
+#endif
diff --git a/src/vnet/dpo/l2_bridge_dpo.c b/src/vnet/dpo/l2_bridge_dpo.c
index 7317fcd..fd92a61 100644
--- a/src/vnet/dpo/l2_bridge_dpo.c
+++ b/src/vnet/dpo/l2_bridge_dpo.c
@@ -312,7 +312,7 @@
             vnet_buffer(b0)->sw_if_index[VLIB_TX] = l2b0->l2b_sw_if_index;
 
             /*
-             * take that, and rewind it back...
+             * take that, rewind it back...
              */
             len0 = ((u8*)vlib_buffer_get_current(b0) -
                     (u8*)ethernet_buffer_get_header(b0));
diff --git a/src/vnet/l2/l2_input.h b/src/vnet/l2/l2_input.h
index e8a6c77..dc9d954 100644
--- a/src/vnet/l2/l2_input.h
+++ b/src/vnet/l2/l2_input.h
@@ -112,6 +112,7 @@
  _(FWD,           "l2-fwd")                     \
  _(RW,            "l2-rw")                      \
  _(LEARN,         "l2-learn")                   \
+ _(L2_EMULATION,  "l2-emulation")               \
  _(VTR,           "l2-input-vtr")               \
  _(VPATH,         "vpath-input-l2")             \
  _(ACL,           "l2-input-acl")               \
diff --git a/src/vpp-api/vom/Makefile.am b/src/vpp-api/vom/Makefile.am
index 8eab140..b1fbfee 100644
--- a/src/vpp-api/vom/Makefile.am
+++ b/src/vpp-api/vom/Makefile.am
@@ -72,6 +72,8 @@
 	ip_unnumbered.cpp		\
 	l2_binding_cmds.cpp		\
 	l2_binding.cpp			\
+	l2_emulation_cmds.cpp		\
+	l2_emulation.cpp		\
 	l3_binding_cmds.cpp		\
 	l3_binding.cpp			\
 	lldp_binding_cmds.cpp		\
@@ -130,6 +132,7 @@
 	interface_span.hpp		\
 	ip_unnumbered.hpp		\
 	l2_binding.hpp			\
+	l2_emulation.hpp		\
 	l3_binding.hpp			\
 	lldp_binding.hpp		\
 	lldp_global.hpp			\
diff --git a/src/vpp-api/vom/bridge_domain.cpp b/src/vpp-api/vom/bridge_domain.cpp
index ef737d9..17144a6 100644
--- a/src/vpp-api/vom/bridge_domain.cpp
+++ b/src/vpp-api/vom/bridge_domain.cpp
@@ -67,7 +67,7 @@
 bool
 bridge_domain::operator==(const bridge_domain& b) const
 {
-  return (id() == b.id());
+  return ((m_learning_mode == b.m_learning_mode) && id() == b.id());
 }
 
 void
diff --git a/src/vpp-api/vom/l2_emulation.cpp b/src/vpp-api/vom/l2_emulation.cpp
new file mode 100644
index 0000000..2a27576
--- /dev/null
+++ b/src/vpp-api/vom/l2_emulation.cpp
@@ -0,0 +1,167 @@
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * 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.
+ */
+
+#include "vom/l2_emulation.hpp"
+#include "vom/l2_emulation_cmds.hpp"
+
+namespace VOM {
+/**
+ * A DB of all the L2 Configs
+ */
+singular_db<l2_emulation::key_t, l2_emulation> l2_emulation::m_db;
+
+l2_emulation::event_handler l2_emulation::m_evh;
+
+/**
+ * Construct a new object matching the desried state
+ */
+l2_emulation::l2_emulation(const interface& itf)
+  : m_itf(itf.singular())
+  , m_emulation(0)
+{
+}
+
+l2_emulation::l2_emulation(const l2_emulation& o)
+  : m_itf(o.m_itf)
+  , m_emulation(0)
+{
+}
+
+const l2_emulation::key_t&
+l2_emulation::key() const
+{
+  return (m_itf->key());
+}
+
+bool
+l2_emulation::operator==(const l2_emulation& l) const
+{
+  return ((*m_itf == *l.m_itf));
+}
+
+std::shared_ptr<l2_emulation>
+l2_emulation::find(const key_t& key)
+{
+  return (m_db.find(key));
+}
+
+void
+l2_emulation::sweep()
+{
+  if (m_emulation && handle_t::INVALID != m_itf->handle()) {
+    HW::enqueue(
+      new l2_emulation_cmds::enable_cmd(m_emulation, m_itf->handle()));
+  }
+
+  // no need to undo the VTR operation.
+  HW::write();
+}
+
+void
+l2_emulation::replay()
+{
+  if (m_emulation && handle_t::INVALID != m_itf->handle()) {
+    HW::enqueue(
+      new l2_emulation_cmds::disable_cmd(m_emulation, m_itf->handle()));
+  }
+}
+
+l2_emulation::~l2_emulation()
+{
+  sweep();
+
+  // not in the DB anymore.
+  m_db.release(m_itf->key(), this);
+}
+
+std::string
+l2_emulation::to_string() const
+{
+  std::ostringstream s;
+  s << "L2-emulation:[" << m_itf->to_string() << "]";
+
+  return (s.str());
+}
+
+void
+l2_emulation::update(const l2_emulation& desired)
+{
+  /*
+   * the desired state is always that the interface should be created
+   */
+  if (rc_t::OK != m_emulation.rc()) {
+    HW::enqueue(
+      new l2_emulation_cmds::enable_cmd(m_emulation, m_itf->handle()));
+  }
+}
+
+std::shared_ptr<l2_emulation>
+l2_emulation::find_or_add(const l2_emulation& temp)
+{
+  return (m_db.find_or_add(temp.m_itf->key(), temp));
+}
+
+std::shared_ptr<l2_emulation>
+l2_emulation::singular() const
+{
+  return find_or_add(*this);
+}
+
+void
+l2_emulation::dump(std::ostream& os)
+{
+  m_db.dump(os);
+}
+
+l2_emulation::event_handler::event_handler()
+{
+  OM::register_listener(this);
+  inspect::register_handler({ "l2e" }, "L2 Emulation", this);
+}
+
+void
+l2_emulation::event_handler::handle_replay()
+{
+  m_db.replay();
+}
+
+void
+l2_emulation::event_handler::handle_populate(const client_db::key_t& key)
+{
+  /**
+   * This is done while populating the bridge-domain
+   */
+}
+
+dependency_t
+l2_emulation::event_handler::order() const
+{
+  return (dependency_t::BINDING);
+}
+
+void
+l2_emulation::event_handler::show(std::ostream& os)
+{
+  m_db.dump(os);
+}
+}
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "mozilla")
+ * End:
+ */
diff --git a/src/vpp-api/vom/l2_emulation.hpp b/src/vpp-api/vom/l2_emulation.hpp
new file mode 100644
index 0000000..faf4df8
--- /dev/null
+++ b/src/vpp-api/vom/l2_emulation.hpp
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * 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.
+ */
+
+#ifndef __VOM_L2_EMULATION_H__
+#define __VOM_L2_EMULATION_H__
+
+#include "vom/bridge_domain.hpp"
+#include "vom/hw.hpp"
+#include "vom/inspect.hpp"
+#include "vom/interface.hpp"
+#include "vom/object_base.hpp"
+#include "vom/om.hpp"
+#include "vom/singular_db.hpp"
+
+namespace VOM {
+/**
+ * A Clas representing the binding of an L2 interface to a bridge-domain
+ * and the properties of that binding.
+ */
+class l2_emulation : public object_base
+{
+public:
+  /**
+   * Key type for an L2 emulation in the singular DB
+   */
+  typedef interface::key_t key_t;
+
+  /**
+   * Construct a new object matching the desried state
+   */
+  l2_emulation(const interface& itf);
+
+  /**
+   * Copy Constructor
+   */
+  l2_emulation(const l2_emulation& o);
+
+  /**
+   * Destructor
+   */
+  ~l2_emulation();
+
+  /**
+   * Return the binding's key
+   */
+  const key_t& key() const;
+
+  /**
+   * Comparison operator - for UT
+   */
+  bool operator==(const l2_emulation& l) const;
+
+  /**
+   * Return the 'singular instance' of the L2 config that matches this
+   * object
+   */
+  std::shared_ptr<l2_emulation> singular() const;
+
+  /**
+   * convert to string format for debug purposes
+   */
+  std::string to_string() const;
+
+  /**
+   * Dump all l2_emulations into the stream provided
+   */
+  static void dump(std::ostream& os);
+
+  /**
+   * Static function to find the bridge_domain in the model
+   */
+  static std::shared_ptr<l2_emulation> find(const key_t& key);
+
+private:
+  /**
+   * Class definition for listeners to OM events
+   */
+  class event_handler : public OM::listener, public inspect::command_handler
+  {
+  public:
+    event_handler();
+    virtual ~event_handler() = default;
+
+    /**
+     * Handle a populate event
+     */
+    void handle_populate(const client_db::key_t& key);
+
+    /**
+     * Handle a replay event
+     */
+    void handle_replay();
+
+    /**
+     * Show the object in the Singular DB
+     */
+    void show(std::ostream& os);
+
+    /**
+     * Get the sortable Id of the listener
+     */
+    dependency_t order() const;
+  };
+
+  /**
+   * event_handler to register with OM
+   */
+  static event_handler m_evh;
+
+  /**
+   * Enquue commonds to the VPP command Q for the update
+   */
+  void update(const l2_emulation& obj);
+
+  /**
+   * Find or Add the singular instance in the DB
+   */
+  static std::shared_ptr<l2_emulation> find_or_add(const l2_emulation& temp);
+
+  /*
+   * It's the OM class that calls singular()
+   */
+  friend class OM;
+
+  /**
+   * It's the singular_db class that calls replay()
+   */
+  friend class singular_db<key_t, l2_emulation>;
+
+  /**
+   * Sweep/reap the object if still stale
+   */
+  void sweep(void);
+
+  /**
+   * replay the object to create it in hardware
+   */
+  void replay(void);
+
+  /**
+   * A reference counting pointer the interface that this L2 layer
+   * represents. By holding the reference here, we can guarantee that
+   * this object will outlive the interface
+   */
+  const std::shared_ptr<interface> m_itf;
+
+  /**
+   * HW configuration for the emulation. The bool representing the
+   * enable/disable.
+   */
+  HW::item<bool> m_emulation;
+
+  /**
+   * A map of all L2 emulation configurations
+   */
+  static singular_db<key_t, l2_emulation> m_db;
+};
+};
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "mozilla")
+ * End:
+ */
+
+#endif
diff --git a/src/vpp-api/vom/l2_emulation_cmds.cpp b/src/vpp-api/vom/l2_emulation_cmds.cpp
new file mode 100644
index 0000000..07107d6
--- /dev/null
+++ b/src/vpp-api/vom/l2_emulation_cmds.cpp
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * 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.
+ */
+
+#include "vom/l2_emulation_cmds.hpp"
+
+DEFINE_VAPI_MSG_IDS_L2E_API_JSON;
+
+namespace VOM {
+namespace l2_emulation_cmds {
+enable_cmd::enable_cmd(HW::item<bool>& item, const handle_t& itf)
+  : rpc_cmd(item)
+  , m_itf(itf)
+{
+}
+
+bool
+enable_cmd::operator==(const enable_cmd& other) const
+{
+  return (m_itf == other.m_itf);
+}
+
+rc_t
+enable_cmd::issue(connection& con)
+{
+  msg_t req(con.ctx(), std::ref(*this));
+
+  auto& payload = req.get_request().get_payload();
+  payload.sw_if_index = m_itf.value();
+  payload.enable = 1;
+
+  VAPI_CALL(req.execute());
+
+  m_hw_item.set(wait());
+
+  return (rc_t::OK);
+}
+
+std::string
+enable_cmd::to_string() const
+{
+  std::ostringstream s;
+  s << "L2-emulation: " << m_hw_item.to_string()
+    << " itf:" << m_itf.to_string();
+
+  return (s.str());
+}
+
+disable_cmd::disable_cmd(HW::item<bool>& item, const handle_t& itf)
+  : rpc_cmd(item)
+  , m_itf(itf)
+{
+}
+
+bool
+disable_cmd::operator==(const disable_cmd& other) const
+{
+  return (m_itf == other.m_itf);
+}
+
+rc_t
+disable_cmd::issue(connection& con)
+{
+  msg_t req(con.ctx(), std::ref(*this));
+
+  auto& payload = req.get_request().get_payload();
+  payload.sw_if_index = m_itf.value();
+  payload.enable = 0;
+
+  VAPI_CALL(req.execute());
+
+  wait();
+
+  return (rc_t::OK);
+}
+
+std::string
+disable_cmd::to_string() const
+{
+  std::ostringstream s;
+  s << "L2-emulation: " << m_hw_item.to_string()
+    << " itf:" << m_itf.to_string();
+
+  return (s.str());
+}
+
+}; // namespace l2_emulation_cmds
+}; // namespace VOM
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "mozilla")
+ * End:
+ */
diff --git a/src/vpp-api/vom/l2_emulation_cmds.hpp b/src/vpp-api/vom/l2_emulation_cmds.hpp
new file mode 100644
index 0000000..aeff3a8
--- /dev/null
+++ b/src/vpp-api/vom/l2_emulation_cmds.hpp
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2017 Cisco and/or its affiliates.
+ * 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.
+ */
+
+#ifndef __VOM_L2_EMULATION_CMDS_H__
+#define __VOM_L2_EMULATION_CMDS_H__
+
+#include "vom/l2_emulation.hpp"
+#include "vom/rpc_cmd.hpp"
+
+#include <vapi/l2e.api.vapi.hpp>
+
+namespace VOM {
+namespace l2_emulation_cmds {
+
+/**
+ * A functor class that enable L2 emulation to an interface
+ */
+class enable_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::L2_emulation>
+{
+public:
+  /**
+   * Constructor
+   */
+  enable_cmd(HW::item<bool>& item, const handle_t& itf);
+
+  /**
+   * Issue the command to VPP/HW
+   */
+  rc_t issue(connection& con);
+  /**
+   * convert to string format for debug purposes
+   */
+  std::string to_string() const;
+
+  /**
+   * Comparison operator - only used for UT
+   */
+  bool operator==(const enable_cmd& i) const;
+
+private:
+  /**
+   * The interface to bind
+   */
+  const handle_t m_itf;
+};
+
+/**
+ * A cmd class that Unbinds L2 configuration from an interface
+ */
+class disable_cmd : public rpc_cmd<HW::item<bool>, rc_t, vapi::L2_emulation>
+{
+public:
+  /**
+   * Constructor
+   */
+  disable_cmd(HW::item<bool>& item, const handle_t& itf);
+
+  /**
+   * Issue the command to VPP/HW
+   */
+  rc_t issue(connection& con);
+  /**
+   * convert to string format for debug purposes
+   */
+  std::string to_string() const;
+
+  /**
+   * Comparison operator - only used for UT
+   */
+  bool operator==(const disable_cmd& i) const;
+
+private:
+  /**
+   * The interface to bind
+   */
+  const handle_t m_itf;
+};
+
+}; // namespace l2_emulation_cmds
+}; // namespace VOM
+
+/*
+ * fd.io coding-style-patch-verification: ON
+ *
+ * Local Variables:
+ * eval: (c-set-style "mozilla")
+ * End:
+ */
+
+#endif
