diff --git a/vpp-api-test/vat/api_format.c b/vpp-api-test/vat/api_format.c
index f13e983..7f0f9fa 100644
--- a/vpp-api-test/vat/api_format.c
+++ b/vpp-api-test/vat/api_format.c
@@ -2428,7 +2428,33 @@
   vat_json_object_add_uint (node, "vni", clib_net_to_host_u32 (mp->vni));
 }
 
+static void
+  vl_api_lisp_eid_table_vni_details_t_handler
+  (vl_api_lisp_eid_table_vni_details_t * mp)
+{
+  vat_main_t *vam = &vat_main;
 
+  u8 *line = format (0, "%d", clib_net_to_host_u32 (mp->vni));
+  fformat (vam->ofp, "%v\n", line);
+  vec_free (line);
+}
+
+static void
+  vl_api_lisp_eid_table_vni_details_t_handler_json
+  (vl_api_lisp_eid_table_vni_details_t * mp)
+{
+  vat_main_t *vam = &vat_main;
+  vat_json_node_t *node = NULL;
+
+  if (VAT_JSON_ARRAY != vam->json_tree.type)
+    {
+      ASSERT (VAT_JSON_NONE == vam->json_tree.type);
+      vat_json_init_array (&vam->json_tree);
+    }
+  node = vat_json_array_add (&vam->json_tree);
+  vat_json_init_object (node);
+  vat_json_object_add_uint (node, "vni", clib_net_to_host_u32 (mp->vni));
+}
 
 static u8 *
 format_decap_next (u8 * s, va_list * args)
@@ -3544,6 +3570,7 @@
 _(LISP_LOCATOR_DETAILS, lisp_locator_details)                           \
 _(LISP_EID_TABLE_DETAILS, lisp_eid_table_details)                       \
 _(LISP_EID_TABLE_MAP_DETAILS, lisp_eid_table_map_details)               \
+_(LISP_EID_TABLE_VNI_DETAILS, lisp_eid_table_vni_details)               \
 _(LISP_GPE_TUNNEL_DETAILS, lisp_gpe_tunnel_details)                     \
 _(LISP_MAP_RESOLVER_DETAILS, lisp_map_resolver_details)                 \
 _(SHOW_LISP_STATUS_REPLY, show_lisp_status_reply)                       \
@@ -13117,6 +13144,35 @@
 }
 
 static int
+api_lisp_eid_table_vni_dump (vat_main_t * vam)
+{
+  vl_api_lisp_eid_table_vni_dump_t *mp;
+  f64 timeout = ~0;
+
+  if (!vam->json_output)
+    {
+      fformat (vam->ofp, "VNI\n");
+    }
+
+  M (LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump);
+
+  /* send it... */
+  S;
+
+  /* Use a control ping for synchronization */
+  {
+    vl_api_control_ping_t *mp;
+    M (CONTROL_PING, control_ping);
+    S;
+  }
+  /* Wait for a reply... */
+  W;
+
+  /* NOTREACHED */
+  return 0;
+}
+
+static int
 get_locator_set (vat_main_t * vam)
 {
   vl_api_lisp_locator_set_dump_t *mp;
@@ -15652,6 +15708,7 @@
 _(lisp_eid_table_dump, "[eid <ipv4|ipv6>/<prefix> | <mac>] [vni] "      \
                        "[local] | [remote]")                            \
 _(lisp_eid_table_map_dump, "")                                          \
+_(lisp_eid_table_vni_dump, "")                                          \
 _(lisp_gpe_tunnel_dump, "")                                             \
 _(lisp_map_resolver_dump, "")                                           \
 _(show_lisp_status, "")                                                 \
diff --git a/vpp/vpp-api/api.c b/vpp/vpp-api/api.c
index 15a7bf4..b10baf0 100644
--- a/vpp/vpp-api/api.c
+++ b/vpp/vpp-api/api.c
@@ -345,6 +345,7 @@
 _(LISP_GPE_TUNNEL_DUMP, lisp_gpe_tunnel_dump)                           \
 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump)                       \
 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump)                     \
+_(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump)                     \
 _(SHOW_LISP_STATUS, show_lisp_status)                                   \
 _(LISP_ADD_DEL_MAP_REQUEST_ITR_RLOCS,                                   \
   lisp_add_del_map_request_itr_rlocs)                                   \
@@ -5922,6 +5923,54 @@
 }
 
 static void
+send_eid_table_vni (u32 vni, unix_shared_memory_queue_t * q, u32 context)
+{
+  vl_api_lisp_eid_table_vni_details_t *rmp = 0;
+
+  rmp = vl_msg_api_alloc (sizeof (*rmp));
+  memset (rmp, 0, sizeof (*rmp));
+  rmp->_vl_msg_id = ntohs (VL_API_LISP_EID_TABLE_VNI_DETAILS);
+  rmp->context = context;
+  rmp->vni = clib_host_to_net_u32 (vni);
+  vl_msg_api_send_shmem (q, (u8 *) & rmp);
+}
+
+static void
+vl_api_lisp_eid_table_vni_dump_t_handler (vl_api_lisp_eid_table_vni_dump_t *
+					  mp)
+{
+  hash_pair_t *p;
+  u32 *vnis = 0;
+  unix_shared_memory_queue_t *q = 0;
+  lisp_cp_main_t *lcm = vnet_lisp_cp_get_main ();
+
+  q = vl_api_client_index_to_input_queue (mp->client_index);
+  if (q == 0)
+    {
+      return;
+    }
+
+  /* *INDENT-OFF* */
+  hash_foreach_pair (p, lcm->table_id_by_vni,
+  ({
+    hash_set (vnis, p->key, 0);
+  }));
+
+  hash_foreach_pair (p, lcm->bd_id_by_vni,
+  ({
+    hash_set (vnis, p->key, 0);
+  }));
+
+  hash_foreach_pair (p, vnis,
+  ({
+    send_eid_table_vni (p->key, q, mp->context);
+  }));
+  /* *INDENT-ON* */
+
+  hash_free (vnis);
+}
+
+static void
 vl_api_show_lisp_status_t_handler (vl_api_show_lisp_status_t * mp)
 {
   unix_shared_memory_queue_t *q = NULL;
diff --git a/vpp/vpp-api/custom_dump.c b/vpp/vpp-api/custom_dump.c
index db5ea64..4737d3b 100644
--- a/vpp/vpp-api/custom_dump.c
+++ b/vpp/vpp-api/custom_dump.c
@@ -2572,6 +2572,7 @@
 
 #define foreach_custom_print_no_arg_function                            \
 _(lisp_eid_table_map_dump)                                              \
+_(lisp_eid_table_vni_dump)                                              \
 _(lisp_map_resolver_dump)                                               \
 _(lisp_gpe_tunnel_dump)
 
@@ -2711,6 +2712,7 @@
 _(LISP_ADD_DEL_LOCATOR, lisp_add_del_locator)                           \
 _(LISP_EID_TABLE_DUMP, lisp_eid_table_dump)                             \
 _(LISP_EID_TABLE_MAP_DUMP, lisp_eid_table_map_dump)                     \
+_(LISP_EID_TABLE_VNI_DUMP, lisp_eid_table_vni_dump)                     \
 _(LISP_GPE_TUNNEL_DUMP, lisp_gpe_tunnel_dump)                           \
 _(LISP_MAP_RESOLVER_DUMP, lisp_map_resolver_dump)                       \
 _(LISP_LOCATOR_SET_DUMP, lisp_locator_set_dump)                         \
diff --git a/vpp/vpp-api/vpe.api b/vpp/vpp-api/vpe.api
index 3b3025d..fb0a414 100644
--- a/vpp/vpp-api/vpe.api
+++ b/vpp/vpp-api/vpe.api
@@ -2881,6 +2881,28 @@
   u32 context;
 };
 
+/** \brief Dumps all VNIs used in mappings
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+  */
+define lisp_eid_table_vni_dump
+{
+  u32 client_index;
+  u32 context;
+};
+
+/** \brief reply to lisp_eid_table_vni_dump
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param vni - virtual network instance
+ */
+define lisp_eid_table_vni_details
+{
+  u32 client_index;
+  u32 context;
+  u32 vni;
+};
+
 define lisp_gpe_tunnel_details
 {
   u32 context;
