diff --git a/src/vnet/lisp-gpe/decap.c b/src/vnet/lisp-gpe/decap.c
index 637d4a7..5fd449c 100644
--- a/src/vnet/lisp-gpe/decap.c
+++ b/src/vnet/lisp-gpe/decap.c
@@ -89,6 +89,8 @@
     return &lgm->l3_ifaces;
   else if (LISP_GPE_INPUT_NEXT_L2_INPUT == next_index)
     return &lgm->l2_ifaces;
+  else if (LISP_GPE_INPUT_NEXT_NSH_INPUT == next_index)
+    return &lgm->nsh_ifaces;
   clib_warning ("next_index not associated to an interface!");
   return 0;
 }
@@ -492,6 +494,52 @@
 };
 /* *INDENT-ON* */
 
+/**
+ * Adds arc from lisp-gpe-input to nsh-input if nsh-input is available
+ */
+static void
+gpe_add_arc_from_input_to_nsh ()
+{
+  lisp_gpe_main_t *lgm = vnet_lisp_gpe_get_main ();
+  vlib_main_t *vm = lgm->vlib_main;
+  vlib_node_t *nsh_input;
+
+  /* Arc already exists */
+  if (next_proto_to_next_index[LISP_GPE_NEXT_PROTO_NSH]
+      != LISP_GPE_INPUT_NEXT_DROP)
+    return;
+
+  /* Check if nsh-input is available */
+  if ((nsh_input = vlib_get_node_by_name (vm, (u8 *) "nsh-input")))
+    {
+      u32 slot4, slot6;
+      slot4 = vlib_node_add_next_with_slot (vm, lisp_gpe_ip4_input_node.index,
+					    nsh_input->index,
+					    LISP_GPE_NEXT_PROTO_NSH);
+      slot6 = vlib_node_add_next_with_slot (vm, lisp_gpe_ip6_input_node.index,
+					    nsh_input->index,
+					    LISP_GPE_NEXT_PROTO_NSH);
+      ASSERT (slot4 == slot6 && slot4 == LISP_GPE_INPUT_NEXT_NSH_INPUT);
+
+      next_proto_to_next_index[LISP_GPE_NEXT_PROTO_NSH] = slot4;
+    }
+}
+
+/** GPE decap init function. */
+clib_error_t *
+gpe_decap_init (vlib_main_t * vm)
+{
+  clib_error_t *error = 0;
+
+  if ((error = vlib_call_init_function (vm, lisp_gpe_init)))
+    return error;
+
+  gpe_add_arc_from_input_to_nsh ();
+  return 0;
+}
+
+VLIB_INIT_FUNCTION (gpe_decap_init);
+
 /*
  * fd.io coding-style-patch-verification: ON
  *
diff --git a/src/vnet/lisp-gpe/interface.c b/src/vnet/lisp-gpe/interface.c
index 19ac22e..1335927 100644
--- a/src/vnet/lisp-gpe/interface.c
+++ b/src/vnet/lisp-gpe/interface.c
@@ -899,22 +899,6 @@
 	lisp_gpe_tenant_l3_iface_unlock (vni);
     }
 
-  if (nsh_iface)
-    {
-      if (is_add)
-	{
-	  if (~0 == lisp_gpe_add_nsh_iface (&lisp_gpe_main))
-	    {
-	      error = clib_error_return (0, "NSH interface not created");
-	      goto done;
-	    }
-	  else
-	    {
-	      lisp_gpe_del_nsh_iface (&lisp_gpe_main);
-	    }
-	}
-    }
-
 done:
   unformat_free (line_input);
 
diff --git a/src/vnet/lisp-gpe/lisp_gpe.c b/src/vnet/lisp-gpe/lisp_gpe.c
index f2fbcbd..479a626 100644
--- a/src/vnet/lisp-gpe/lisp_gpe.c
+++ b/src/vnet/lisp-gpe/lisp_gpe.c
@@ -326,6 +326,7 @@
 			 lisp_gpe_ip4_input_node.index, 1 /* is_ip4 */ );
   udp_register_dst_port (vm, UDP_DST_PORT_lisp_gpe6,
 			 lisp_gpe_ip6_input_node.index, 0 /* is_ip4 */ );
+
   return 0;
 }
 
diff --git a/src/vnet/lisp-gpe/lisp_gpe.h b/src/vnet/lisp-gpe/lisp_gpe.h
index e92df38..c498b7c 100644
--- a/src/vnet/lisp-gpe/lisp_gpe.h
+++ b/src/vnet/lisp-gpe/lisp_gpe.h
@@ -65,6 +65,9 @@
     LISP_GPE_INPUT_N_NEXT,
 } lisp_gpe_input_next_t;
 
+/* Arc to nsh-input added only if nsh-input exists */
+#define LISP_GPE_INPUT_NEXT_NSH_INPUT 4
+
 typedef enum
 {
 #define lisp_gpe_error(n,s) LISP_GPE_ERROR_##n,
diff --git a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
index 46cffda..2eb5ced 100644
--- a/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
+++ b/src/vnet/lisp-gpe/lisp_gpe_fwd_entry.c
@@ -808,13 +808,13 @@
  * @return next node index.
  */
 const dpo_id_t *
-lisp_nsh_fib_lookup (lisp_gpe_main_t * lgm, u32 spi_si)
+lisp_nsh_fib_lookup (lisp_gpe_main_t * lgm, u32 spi_si_net_order)
 {
   int rv;
   BVT (clib_bihash_kv) kv, value;
 
   memset (&kv, 0, sizeof (kv));
-  kv.key[0] = spi_si;
+  kv.key[0] = spi_si_net_order;
   rv = BV (clib_bihash_search_inline_2) (&lgm->nsh_fib, &kv, &value);
 
   if (rv != 0)
@@ -842,14 +842,14 @@
  * @return ~0 or value of overwritten entry.
  */
 static u32
-lisp_nsh_fib_add_del_entry (u32 spi_si, u32 lfei, u8 is_add)
+lisp_nsh_fib_add_del_entry (u32 spi_si_host_order, u32 lfei, u8 is_add)
 {
   lisp_gpe_main_t *lgm = &lisp_gpe_main;
   BVT (clib_bihash_kv) kv, value;
   u32 old_val = ~0;
 
   memset (&kv, 0, sizeof (kv));
-  kv.key[0] = spi_si;
+  kv.key[0] = clib_host_to_net_u32 (spi_si_host_order);
   kv.value = 0ULL;
 
   if (BV (clib_bihash_search) (&lgm->nsh_fib, &kv, &value) == 0)
