diff --git a/extras/vom/vom/bridge_domain_cmds.hpp b/extras/vom/vom/bridge_domain_cmds.hpp
index 0216236..3257d83 100644
--- a/extras/vom/vom/bridge_domain_cmds.hpp
+++ b/extras/vom/vom/bridge_domain_cmds.hpp
@@ -101,7 +101,7 @@
 };
 
 /**
- * A cmd class that Dumps all the IPv4 L3 configs
+ * A cmd class that Dumps all the bridge domains
  */
 class dump_cmd : public VOM::dump_cmd<vapi::Bridge_domain_dump>
 {
diff --git a/extras/vom/vom/ip_unnumbered.cpp b/extras/vom/vom/ip_unnumbered.cpp
index caeeb41..74a6ede 100644
--- a/extras/vom/vom/ip_unnumbered.cpp
+++ b/extras/vom/vom/ip_unnumbered.cpp
@@ -117,7 +117,27 @@
 void
 ip_unnumbered::event_handler::handle_populate(const client_db::key_t& key)
 {
-  // VPP provides no dump for IP unnumbered
+  std::shared_ptr<ip_unnumbered_cmds::dump_cmd> cmd =
+    std::make_shared<ip_unnumbered_cmds::dump_cmd>();
+
+  HW::enqueue(cmd);
+  HW::write();
+
+  for (auto& ip_record : *cmd) {
+    auto& payload = ip_record.get_payload();
+
+    VOM_LOG(log_level_t::DEBUG) << "ip-unnumbered dump: "
+                                << " itf: " << payload.sw_if_index
+                                << " ip: " << payload.ip_sw_if_index;
+
+    std::shared_ptr<interface> itf = interface::find(payload.sw_if_index);
+    std::shared_ptr<interface> ip_itf = interface::find(payload.ip_sw_if_index);
+
+    if (itf && ip_itf) {
+      ip_unnumbered ipun(*itf, *ip_itf);
+      OM::commit(key, ipun);
+    }
+  }
 }
 
 dependency_t
diff --git a/extras/vom/vom/ip_unnumbered_cmds.cpp b/extras/vom/vom/ip_unnumbered_cmds.cpp
index 4c1fcf6..fa7a115 100644
--- a/extras/vom/vom/ip_unnumbered_cmds.cpp
+++ b/extras/vom/vom/ip_unnumbered_cmds.cpp
@@ -105,6 +105,33 @@
   return (s.str());
 }
 
+bool
+dump_cmd::operator==(const dump_cmd& other) const
+{
+  return (true);
+}
+
+rc_t
+dump_cmd::issue(connection& con)
+{
+  m_dump.reset(new msg_t(con.ctx(), std::ref(*this)));
+
+  auto& payload = m_dump->get_request().get_payload();
+  payload.sw_if_index = ~0;
+
+  VAPI_CALL(m_dump->execute());
+
+  wait();
+
+  return rc_t::OK;
+}
+
+std::string
+dump_cmd::to_string() const
+{
+  return ("ip-unnumbered-dump");
+}
+
 }; // namespace ip_unnumbered_cmds
 }; // namespace VOM
 
diff --git a/extras/vom/vom/ip_unnumbered_cmds.hpp b/extras/vom/vom/ip_unnumbered_cmds.hpp
index 0bb7027..4003013 100644
--- a/extras/vom/vom/ip_unnumbered_cmds.hpp
+++ b/extras/vom/vom/ip_unnumbered_cmds.hpp
@@ -16,6 +16,7 @@
 #ifndef __VOM_IP_UNNUMBERED_CMDS_H__
 #define __VOM_IP_UNNUMBERED_CMDS_H__
 
+#include "vom/dump_cmd.hpp"
 #include "vom/ip_unnumbered.hpp"
 #include "vom/rpc_cmd.hpp"
 
@@ -100,6 +101,37 @@
   const handle_t& m_l3_itf;
 };
 
+/**
+ * A cmd class that Dumps all the IP unnumbered interfaces
+ */
+class dump_cmd : public VOM::dump_cmd<vapi::Ip_unnumbered_dump>
+{
+public:
+  /**
+   * Constructor
+   */
+  dump_cmd() = default;
+
+  /**
+   * 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 dump_cmd& i) const;
+
+private:
+  /**
+   * HW reutrn code
+   */
+  HW::item<bool> item;
+};
 }; // namespace ip_unnumbered_cmds
 }; // namespace VOM
 
diff --git a/src/vnet/ip/ip.api b/src/vnet/ip/ip.api
index d59297b..7f4f030 100644
--- a/src/vnet/ip/ip.api
+++ b/src/vnet/ip/ip.api
@@ -19,7 +19,7 @@
     called through a shared memory interface. 
 */
 
-option version = "1.2.3";
+option version = "1.2.4";
 import "vnet/fib/fib_types.api";
 
 /** \brief Add / del table request
@@ -525,6 +525,28 @@
   u8 is_ipv6;
 };
 
+/** \brief IP unnumbered configurations
+    @param sw_if_index The interface that has unnumbered configuration
+    @param ip_sw_if_index The IP interface that it is unnnumbered to
+*/
+define ip_unnumbered_details
+{
+  u32 client_index;
+  u32 context;
+  u32 sw_if_index;
+  u32 ip_sw_if_index;
+};
+
+/** \brief Dump IP unnumbered configurations
+    @param sw_if_index ~0 for all interfaces, else the interface desired
+*/
+define ip_unnumbered_dump
+{
+  u32 client_index;
+  u32 context;
+  u32 sw_if_index;
+};
+
 define ip_details
 {
   u32 sw_if_index;
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index d835773..ce3ff79 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -74,6 +74,7 @@
 _(IP_MROUTE_ADD_DEL, ip_mroute_add_del)                                 \
 _(MFIB_SIGNAL_DUMP, mfib_signal_dump)                                   \
 _(IP_ADDRESS_DUMP, ip_address_dump)                                     \
+_(IP_UNNUMBERED_DUMP, ip_unnumbered_dump)                               \
 _(IP_DUMP, ip_dump)                                                     \
 _(IP_NEIGHBOR_ADD_DEL, ip_neighbor_add_del)                             \
 _(SET_ARP_NEIGHBOR_LIMIT, set_arp_neighbor_limit)			\
@@ -1424,6 +1425,74 @@
 }
 
 static void
+send_ip_unnumbered_details (vpe_api_main_t * am,
+			    vl_api_registration_t * reg,
+			    u32 sw_if_index, u32 ip_sw_if_index, u32 context)
+{
+  vl_api_ip_unnumbered_details_t *mp;
+
+  mp = vl_msg_api_alloc (sizeof (*mp));
+  memset (mp, 0, sizeof (*mp));
+  mp->_vl_msg_id = ntohs (VL_API_IP_UNNUMBERED_DETAILS);
+
+  mp->context = context;
+  mp->sw_if_index = htonl (sw_if_index);
+  mp->ip_sw_if_index = htonl (ip_sw_if_index);
+
+  vl_api_send_msg (reg, (u8 *) mp);
+}
+
+static void
+vl_api_ip_unnumbered_dump_t_handler (vl_api_ip_unnumbered_dump_t * mp)
+{
+  vnet_main_t *vnm = vnet_get_main ();
+  vnet_interface_main_t *im = &vnm->interface_main;
+  int rv __attribute__ ((unused)) = 0;
+  vpe_api_main_t *am = &vpe_api_main;
+  vl_api_registration_t *reg;
+  vnet_sw_interface_t *si;
+  u32 sw_if_index;
+
+  sw_if_index = ntohl (mp->sw_if_index);
+
+  reg = vl_api_client_index_to_registration (mp->client_index);
+  if (!reg)
+    return;
+
+  if (~0 != sw_if_index)
+    {
+      VALIDATE_SW_IF_INDEX (mp);
+
+      si = vnet_get_sw_interface (vnm, ntohl (mp->sw_if_index));
+
+      if (!(si->flags & VNET_SW_INTERFACE_FLAG_UNNUMBERED))
+	{
+	  send_ip_unnumbered_details (am, reg,
+				      sw_if_index,
+				      si->unnumbered_sw_if_index,
+				      mp->context);
+	}
+    }
+  else
+    {
+      /* *INDENT-OFF* */
+      pool_foreach (si, im->sw_interfaces,
+      ({
+        if ((si->flags & VNET_SW_INTERFACE_FLAG_UNNUMBERED))
+          {
+            send_ip_unnumbered_details(am, reg,
+                                       si->sw_if_index,
+                                       si->unnumbered_sw_if_index,
+                                       mp->context);
+          }
+      }));
+      /* *INDENT-ON* */
+    }
+
+  BAD_SW_IF_INDEX_LABEL;
+}
+
+static void
 vl_api_ip_dump_t_handler (vl_api_ip_dump_t * mp)
 {
   vpe_api_main_t *am = &vpe_api_main;
