diff --git a/src/vpp-api/vom/bridge_domain_entry.cpp b/src/vpp-api/vom/bridge_domain_entry.cpp
index 9723bde..9ac5cea 100644
--- a/src/vpp-api/vom/bridge_domain_entry.cpp
+++ b/src/vpp-api/vom/bridge_domain_entry.cpp
@@ -79,8 +79,8 @@
 bridge_domain_entry::sweep()
 {
   if (m_hw) {
-    HW::enqueue(
-      new bridge_domain_entry_cmds::delete_cmd(m_hw, m_mac, m_bd->id()));
+    HW::enqueue(new bridge_domain_entry_cmds::delete_cmd(
+      m_hw, m_mac, m_bd->id(), interface::type_t::BVI == m_tx_itf->type()));
   }
   HW::write();
 }
@@ -90,7 +90,8 @@
 {
   if (m_hw) {
     HW::enqueue(new bridge_domain_entry_cmds::create_cmd(
-      m_hw, m_mac, m_bd->id(), m_tx_itf->handle()));
+      m_hw, m_mac, m_bd->id(), m_tx_itf->handle(),
+      interface::type_t::BVI == m_tx_itf->type()));
   }
 }
 std::string
@@ -111,7 +112,8 @@
    */
   if (rc_t::OK != m_hw.rc()) {
     HW::enqueue(new bridge_domain_entry_cmds::create_cmd(
-      m_hw, m_mac, m_bd->id(), m_tx_itf->handle()));
+      m_hw, m_mac, m_bd->id(), m_tx_itf->handle(),
+      interface::type_t::BVI == m_tx_itf->type()));
   }
 }
 
diff --git a/src/vpp-api/vom/bridge_domain_entry_cmds.cpp b/src/vpp-api/vom/bridge_domain_entry_cmds.cpp
index ddb8bf1..f2a3ed9 100644
--- a/src/vpp-api/vom/bridge_domain_entry_cmds.cpp
+++ b/src/vpp-api/vom/bridge_domain_entry_cmds.cpp
@@ -20,11 +20,13 @@
 create_cmd::create_cmd(HW::item<bool>& item,
                        const mac_address_t& mac,
                        uint32_t bd,
-                       handle_t tx_itf)
+                       handle_t tx_itf,
+                       bool is_bvi)
   : rpc_cmd(item)
   , m_mac(mac)
   , m_bd(bd)
   , m_tx_itf(tx_itf)
+  , m_is_bvi(is_bvi)
 {
 }
 
@@ -32,7 +34,7 @@
 create_cmd::operator==(const create_cmd& other) const
 {
   return ((m_mac == other.m_mac) && (m_tx_itf == other.m_tx_itf) &&
-          (m_bd == other.m_bd));
+          (m_bd == other.m_bd) && (m_is_bvi == other.m_is_bvi));
 }
 
 rc_t
@@ -45,6 +47,7 @@
   payload.is_add = 1;
   m_mac.to_bytes(payload.mac, 6);
   payload.sw_if_index = m_tx_itf.value();
+  payload.bvi_mac = m_is_bvi;
 
   VAPI_CALL(req.execute());
 
@@ -58,24 +61,28 @@
 {
   std::ostringstream s;
   s << "bridge-domain-entry-create: " << m_hw_item.to_string() << " bd:" << m_bd
-    << " mac:" << m_mac.to_string() << " tx:" << m_tx_itf;
+    << " mac:" << m_mac.to_string() << " tx:" << m_tx_itf
+    << " bvi:" << m_is_bvi;
 
   return (s.str());
 }
 
 delete_cmd::delete_cmd(HW::item<bool>& item,
                        const mac_address_t& mac,
-                       uint32_t bd)
+                       uint32_t bd,
+                       bool is_bvi)
   : rpc_cmd(item)
   , m_mac(mac)
   , m_bd(bd)
+  , m_is_bvi(is_bvi)
 {
 }
 
 bool
 delete_cmd::operator==(const delete_cmd& other) const
 {
-  return ((m_mac == other.m_mac) && (m_bd == other.m_bd));
+  return ((m_mac == other.m_mac) && (m_bd == other.m_bd) &&
+          (m_is_bvi == other.m_is_bvi));
 }
 
 rc_t
@@ -85,9 +92,10 @@
 
   auto& payload = req.get_request().get_payload();
   payload.bd_id = m_bd;
-  payload.is_add = 1;
+  payload.is_add = 0;
   m_mac.to_bytes(payload.mac, 6);
   payload.sw_if_index = ~0;
+  payload.bvi_mac = m_is_bvi;
 
   VAPI_CALL(req.execute());
 
@@ -102,7 +110,7 @@
 {
   std::ostringstream s;
   s << "bridge-domain-entry-delete: " << m_hw_item.to_string() << " bd:" << m_bd
-    << " mac:" << m_mac.to_string();
+    << " mac:" << m_mac.to_string() << " bvi:" << m_is_bvi;
 
   return (s.str());
 }
diff --git a/src/vpp-api/vom/bridge_domain_entry_cmds.hpp b/src/vpp-api/vom/bridge_domain_entry_cmds.hpp
index 780c376..dc46719 100644
--- a/src/vpp-api/vom/bridge_domain_entry_cmds.hpp
+++ b/src/vpp-api/vom/bridge_domain_entry_cmds.hpp
@@ -37,7 +37,8 @@
   create_cmd(HW::item<bool>& item,
              const mac_address_t& mac,
              uint32_t id,
-             handle_t tx_intf);
+             handle_t tx_intf,
+             bool is_bvi);
 
   /**
    * Issue the command to VPP/HW
@@ -58,6 +59,7 @@
   mac_address_t m_mac;
   uint32_t m_bd;
   handle_t m_tx_itf;
+  bool m_is_bvi;
 };
 
 /**
@@ -69,7 +71,10 @@
   /**
    * Constructor
    */
-  delete_cmd(HW::item<bool>& item, const mac_address_t& mac, uint32_t id);
+  delete_cmd(HW::item<bool>& item,
+             const mac_address_t& mac,
+             uint32_t id,
+             bool is_bvi);
 
   /**
    * Issue the command to VPP/HW
@@ -89,6 +94,7 @@
 private:
   mac_address_t m_mac;
   uint32_t m_bd;
+  bool m_is_bvi;
 };
 
 /**
