diff --git a/src/vnet/ip/ip.api b/src/vnet/ip/ip.api
index f49fc16..c8d4c39 100644
--- a/src/vnet/ip/ip.api
+++ b/src/vnet/ip/ip.api
@@ -20,7 +20,7 @@
     called through a shared memory interface.
 */
 
-option version = "3.0.3";
+option version = "3.1.0";
 
 import "vnet/interface_types.api";
 import "vnet/fib/fib_types.api";
@@ -135,6 +135,8 @@
   @param stats_index The index of the route in the stats segment
   @param prefix the prefix for the route
   @param n_paths The number of paths the route has
+  @param src The entity adding the route. either 0 for default
+             or a value returned from fib_source_sdd.
   @param paths The paths of the route
 */
 typedef ip_route
@@ -145,6 +147,15 @@
   u8 n_paths;
   vl_api_fib_path_t paths[n_paths];
 };
+typedef ip_route_v2
+{
+  u32 table_id;
+  u32 stats_index;
+  vl_api_prefix_t prefix;
+  u8 n_paths;
+  u8 src;
+  vl_api_fib_path_t paths[n_paths];
+};
 
 /** \brief Add / del route request
     @param client_index - opaque cookie to identify the sender
@@ -163,15 +174,33 @@
   bool is_multipath;
   vl_api_ip_route_t route;
 };
+define ip_route_add_del_v2
+{
+  option in_progress;
+  u32 client_index;
+  u32 context;
+  bool is_add [default=true];
+  bool is_multipath;
+  vl_api_ip_route_v2_t route;
+};
 define ip_route_add_del_reply
 {
   u32 context;
   i32 retval;
   u32 stats_index;
 };
+define ip_route_add_del_v2_reply
+{
+  option in_progress;
+  u32 context;
+  i32 retval;
+  u32 stats_index;
+};
 
 /** \brief Dump IP routes from a table
     @param client_index - opaque cookie to identify the sender
+    @param src The entity adding the route. either 0 for default
+               or a value returned from fib_source_sdd.
     @param table - The table from which to dump routes (ony ID an AF are needed)
 */
 define ip_route_dump
@@ -180,6 +209,15 @@
   u32 context;
   vl_api_ip_table_t table;
 };
+define ip_route_v2_dump
+{
+  option in_progress;
+  u32 client_index;
+  u32 context;
+  /* vl_api_fib_source_t src; */
+  u8 src;
+  vl_api_ip_table_t table;
+};
 
 /** \brief IP FIB table entry response
     @param route The route entry in the table
@@ -189,6 +227,12 @@
   u32 context;
   vl_api_ip_route_t route;
 };
+define ip_route_v2_details
+{
+  option in_progress;
+  u32 context;
+  vl_api_ip_route_v2_t route;
+};
 
 /** \brief Lookup IP route from a table
     @param client_index - opaque cookie to identify the sender
@@ -204,6 +248,15 @@
   u8 exact;
   vl_api_prefix_t prefix;
 };
+define ip_route_lookup_v2
+{
+  option in_progress;
+  u32 client_index;
+  u32 context;
+  u32 table_id;
+  u8 exact;
+  vl_api_prefix_t prefix;
+};
 
 /** \brief IP FIB table lookup response
     @param retval - return code of the lookup
@@ -215,6 +268,13 @@
   i32 retval;
   vl_api_ip_route_t route;
 };
+define ip_route_lookup_v2_reply
+{
+  option in_progress;
+  u32 context;
+  i32 retval;
+  vl_api_ip_route_v2_t route;
+};
 
 /** \brief Set the ip flow hash config for a fib request
     @param client_index - opaque cookie to identify the sender
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 5b87f7c..91b12e5 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -72,6 +72,7 @@
   _ (SW_INTERFACE_IP6_ENABLE_DISABLE, sw_interface_ip6_enable_disable)        \
   _ (IP_TABLE_DUMP, ip_table_dump)                                            \
   _ (IP_ROUTE_DUMP, ip_route_dump)                                            \
+  _ (IP_ROUTE_V2_DUMP, ip_route_v2_dump)                                      \
   _ (IP_MTABLE_DUMP, ip_mtable_dump)                                          \
   _ (IP_MROUTE_DUMP, ip_mroute_dump)                                          \
   _ (IP_MROUTE_ADD_DEL, ip_mroute_add_del)                                    \
@@ -83,7 +84,9 @@
   _ (IP_TABLE_REPLACE_END, ip_table_replace_end)                              \
   _ (IP_TABLE_FLUSH, ip_table_flush)                                          \
   _ (IP_ROUTE_ADD_DEL, ip_route_add_del)                                      \
+  _ (IP_ROUTE_ADD_DEL_V2, ip_route_add_del_v2)                                \
   _ (IP_ROUTE_LOOKUP, ip_route_lookup)                                        \
+  _ (IP_ROUTE_LOOKUP_V2, ip_route_lookup_v2)                                  \
   _ (IP_TABLE_ADD_DEL, ip_table_add_del)                                      \
   _ (IP_PUNT_POLICE, ip_punt_police)                                          \
   _ (IP_PUNT_REDIRECT, ip_punt_redirect)                                      \
@@ -235,6 +238,47 @@
   vec_free (rpaths);
 }
 
+static void
+send_ip_route_v2_details (vpe_api_main_t *am, vl_api_registration_t *reg,
+			  u32 context, fib_node_index_t fib_entry_index)
+{
+  fib_route_path_t *rpaths, *rpath;
+  vl_api_ip_route_v2_details_t *mp;
+  const fib_prefix_t *pfx;
+  vl_api_fib_path_t *fp;
+  int path_count;
+
+  rpaths = NULL;
+  pfx = fib_entry_get_prefix (fib_entry_index);
+  rpaths = fib_entry_encode (fib_entry_index);
+
+  path_count = vec_len (rpaths);
+  mp = vl_msg_api_alloc (sizeof (*mp) + path_count * sizeof (*fp));
+  if (!mp)
+    return;
+  clib_memset (mp, 0, sizeof (*mp));
+  mp->_vl_msg_id = ntohs (VL_API_IP_ROUTE_V2_DETAILS);
+  mp->context = context;
+
+  ip_prefix_encode (pfx, &mp->route.prefix);
+  mp->route.table_id = htonl (fib_table_get_table_id (
+    fib_entry_get_fib_index (fib_entry_index), pfx->fp_proto));
+  mp->route.n_paths = path_count;
+  mp->route.src = fib_entry_get_best_source (fib_entry_index);
+  mp->route.stats_index = htonl (fib_table_entry_get_stats_index (
+    fib_entry_get_fib_index (fib_entry_index), pfx));
+
+  fp = mp->route.paths;
+  vec_foreach (rpath, rpaths)
+    {
+      fib_api_path_encode (rpath, fp);
+      fp++;
+    }
+
+  vl_api_send_msg (reg, (u8 *) mp);
+  vec_free (rpaths);
+}
+
 typedef struct apt_ip6_fib_show_ctx_t_
 {
   fib_node_index_t *entries;
@@ -274,6 +318,45 @@
 }
 
 static void
+vl_api_ip_route_v2_dump_t_handler (vl_api_ip_route_v2_dump_t *mp)
+{
+  vpe_api_main_t *am = &vpe_api_main;
+  fib_node_index_t *fib_entry_index;
+  vl_api_registration_t *reg;
+  fib_protocol_t fproto;
+  fib_source_t src;
+  u32 fib_index;
+
+  reg = vl_api_client_index_to_registration (mp->client_index);
+  if (!reg)
+    return;
+
+  vl_api_ip_fib_dump_walk_ctx_t ctx = {
+    .feis = NULL,
+  };
+
+  fproto = (mp->table.is_ip6 ? FIB_PROTOCOL_IP6 : FIB_PROTOCOL_IP4);
+  fib_index = fib_table_find (fproto, ntohl (mp->table.table_id));
+  src = mp->src;
+
+  if (INDEX_INVALID == fib_index)
+    return;
+
+  if (src)
+    fib_table_walk_w_src (fib_index, fproto, src, vl_api_ip_fib_dump_walk,
+			  &ctx);
+  else
+    fib_table_walk (fib_index, fproto, vl_api_ip_fib_dump_walk, &ctx);
+
+  vec_foreach (fib_entry_index, ctx.feis)
+    {
+      send_ip_route_v2_details (am, reg, mp->context, *fib_entry_index);
+    }
+
+  vec_free (ctx.feis);
+}
+
+static void
 send_ip_mtable_details (vl_api_registration_t * reg,
 			u32 context, const mfib_table_t * mfib_table)
 {
@@ -584,9 +667,60 @@
 	goto out;
     }
 
-  rv = fib_api_route_add_del (mp->is_add,
-			      mp->is_multipath,
-			      fib_index, &pfx, entry_flags, rpaths);
+  rv = fib_api_route_add_del (mp->is_add, mp->is_multipath, fib_index, &pfx,
+			      FIB_SOURCE_API, entry_flags, rpaths);
+
+  if (mp->is_add && 0 == rv)
+    *stats_index = fib_table_entry_get_stats_index (fib_index, &pfx);
+
+out:
+  vec_free (rpaths);
+
+  return (rv);
+}
+
+static int
+ip_route_add_del_v2_t_handler (vl_api_ip_route_add_del_v2_t *mp,
+			       u32 *stats_index)
+{
+  fib_route_path_t *rpaths = NULL, *rpath;
+  fib_entry_flag_t entry_flags;
+  vl_api_fib_path_t *apath;
+  fib_source_t src;
+  fib_prefix_t pfx;
+  u32 fib_index;
+  int rv, ii;
+
+  entry_flags = FIB_ENTRY_FLAG_NONE;
+  ip_prefix_decode (&mp->route.prefix, &pfx);
+
+  rv = fib_api_table_id_decode (pfx.fp_proto, ntohl (mp->route.table_id),
+				&fib_index);
+  if (0 != rv)
+    goto out;
+
+  if (0 != mp->route.n_paths)
+    vec_validate (rpaths, mp->route.n_paths - 1);
+
+  for (ii = 0; ii < mp->route.n_paths; ii++)
+    {
+      apath = &mp->route.paths[ii];
+      rpath = &rpaths[ii];
+
+      rv = fib_api_path_decode (apath, rpath);
+
+      if ((rpath->frp_flags & FIB_ROUTE_PATH_LOCAL) &&
+	  (~0 == rpath->frp_sw_if_index))
+	entry_flags |= (FIB_ENTRY_FLAG_CONNECTED | FIB_ENTRY_FLAG_LOCAL);
+
+      if (0 != rv)
+	goto out;
+    }
+
+  src = (0 == mp->route.src ? FIB_SOURCE_API : mp->route.src);
+
+  rv = fib_api_route_add_del (mp->is_add, mp->is_multipath, fib_index, &pfx,
+			      src, entry_flags, rpaths);
 
   if (mp->is_add && 0 == rv)
     *stats_index = fib_table_entry_get_stats_index (fib_index, &pfx);
@@ -615,6 +749,23 @@
 }
 
 void
+vl_api_ip_route_add_del_v2_t_handler (vl_api_ip_route_add_del_v2_t *mp)
+{
+  vl_api_ip_route_add_del_v2_reply_t *rmp;
+  u32 stats_index = ~0;
+  int rv;
+
+  rv = ip_route_add_del_v2_t_handler (mp, &stats_index);
+
+  /* clang-format off */
+  REPLY_MACRO2 (VL_API_IP_ROUTE_ADD_DEL_V2_REPLY,
+  ({
+    rmp->stats_index = htonl (stats_index);
+  }))
+  /* clang-format on */
+}
+
+void
 vl_api_ip_route_lookup_t_handler (vl_api_ip_route_lookup_t * mp)
 {
   vl_api_ip_route_lookup_reply_t *rmp = NULL;
@@ -671,6 +822,65 @@
 }
 
 void
+vl_api_ip_route_lookup_v2_t_handler (vl_api_ip_route_lookup_v2_t *mp)
+{
+  vl_api_ip_route_lookup_v2_reply_t *rmp = NULL;
+  fib_route_path_t *rpaths = NULL, *rpath;
+  const fib_prefix_t *pfx = NULL;
+  fib_prefix_t lookup;
+  vl_api_fib_path_t *fp;
+  fib_node_index_t fib_entry_index;
+  u32 fib_index;
+  int npaths = 0;
+  fib_source_t src = 0;
+  int rv;
+
+  ip_prefix_decode (&mp->prefix, &lookup);
+  rv = fib_api_table_id_decode (lookup.fp_proto, ntohl (mp->table_id),
+				&fib_index);
+  if (PREDICT_TRUE (!rv))
+    {
+      if (mp->exact)
+	fib_entry_index = fib_table_lookup_exact_match (fib_index, &lookup);
+      else
+	fib_entry_index = fib_table_lookup (fib_index, &lookup);
+      if (fib_entry_index == FIB_NODE_INDEX_INVALID)
+	rv = VNET_API_ERROR_NO_SUCH_ENTRY;
+      else
+	{
+	  pfx = fib_entry_get_prefix (fib_entry_index);
+	  rpaths = fib_entry_encode (fib_entry_index);
+	  npaths = vec_len (rpaths);
+	  src = fib_entry_get_best_source (fib_entry_index);
+	}
+    }
+
+  /* clang-format off */
+  REPLY_MACRO3_ZERO(VL_API_IP_ROUTE_LOOKUP_V2_REPLY,
+                    npaths * sizeof (*fp),
+  ({
+    if (!rv)
+      {
+        ip_prefix_encode (pfx, &rmp->route.prefix);
+        rmp->route.table_id = mp->table_id;
+        rmp->route.n_paths = npaths;
+        rmp->route.src = src;
+        rmp->route.stats_index = fib_table_entry_get_stats_index (fib_index, pfx);
+        rmp->route.stats_index = htonl (rmp->route.stats_index);
+
+        fp = rmp->route.paths;
+        vec_foreach (rpath, rpaths)
+          {
+            fib_api_path_encode (rpath, fp);
+            fp++;
+          }
+      }
+  }));
+  /* clang-format on */
+  vec_free (rpaths);
+}
+
+void
 ip_table_create (fib_protocol_t fproto,
 		 u32 table_id, u8 is_api, const u8 * name)
 {
@@ -1797,6 +2007,8 @@
    */
   am->is_mp_safe[VL_API_IP_ROUTE_ADD_DEL] = 1;
   am->is_mp_safe[VL_API_IP_ROUTE_ADD_DEL_REPLY] = 1;
+  am->is_mp_safe[VL_API_IP_ROUTE_ADD_DEL_V2] = 1;
+  am->is_mp_safe[VL_API_IP_ROUTE_ADD_DEL_V2_REPLY] = 1;
 
   /*
    * Set up the (msg_name, crc, message-id) table
