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
