diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c
index 05dfb60..f3ac6f6 100644
--- a/src/plugins/ikev2/ikev2.c
+++ b/src/plugins/ikev2/ikev2.c
@@ -1856,13 +1856,17 @@
 			       IPSEC_PROTOCOL_ESP, a->encr_type,
 			       &a->loc_ckey, a->integ_type, &a->loc_ikey,
 			       a->flags, 0, a->salt_local, &zero_addr,
-			       &zero_addr, NULL, a->src_port, a->dst_port);
+			       &zero_addr, TUNNEL_ENCAP_DECAP_FLAG_NONE,
+			       IP_DSCP_CS0, NULL, a->src_port, a->dst_port);
+
   rv |= ipsec_sa_add_and_lock (a->remote_sa_id, a->remote_spi,
 			       IPSEC_PROTOCOL_ESP, a->encr_type, &a->rem_ckey,
 			       a->integ_type, &a->rem_ikey,
 			       (a->flags | IPSEC_SA_FLAG_IS_INBOUND), 0,
 			       a->salt_remote, &zero_addr,
-			       &zero_addr, NULL, a->ipsec_over_udp_port,
+			       &zero_addr, TUNNEL_ENCAP_DECAP_FLAG_NONE,
+			       IP_DSCP_CS0, NULL,
+			       a->ipsec_over_udp_port,
 			       a->ipsec_over_udp_port);
 
   rv |= ipsec_tun_protect_update (sw_if_index, NULL, a->local_sa_id, sas_in);
diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c
index bceb529..062f5e7 100644
--- a/src/vnet/ip/ip.c
+++ b/src/vnet/ip/ip.c
@@ -155,6 +155,24 @@
   return (format (s, "unknown"));
 }
 
+uword
+unformat_ip_dscp (unformat_input_t * input, va_list * args)
+{
+  ip_dscp_t *dscp = va_arg (*args, ip_dscp_t *);
+
+  if (0)
+    ;
+#define _(n,v)                                                  \
+  else if (unformat (input, #v))                                \
+    *dscp = IP_DSCP_##v;
+  foreach_ip_dscp
+#undef _
+    else
+    return 0;
+
+  return 1;
+}
+
 u8 *
 format_ip_ecn (u8 * s, va_list * va)
 {
diff --git a/src/vnet/ip/ip6_packet.h b/src/vnet/ip/ip6_packet.h
index 7bbdd19..34bc7a8 100644
--- a/src/vnet/ip/ip6_packet.h
+++ b/src/vnet/ip/ip6_packet.h
@@ -310,31 +310,36 @@
   ip6_address_t src_address, dst_address;
 } ip6_header_t;
 
+#define IP6_PACKET_TC_MASK 0x0FF00000
+#define IP6_PACKET_DSCP_MASK 0x0FC00000
+#define IP6_PACKET_ECN_MASK 0x00300000
+
 always_inline ip_dscp_t
 ip6_traffic_class (const ip6_header_t * i)
 {
-  return (i->ip_version_traffic_class_and_flow_label & 0x0FF00000) >> 20;
+  return (i->ip_version_traffic_class_and_flow_label & IP6_PACKET_TC_MASK) >>
+    20;
 }
 
 static_always_inline ip_dscp_t
 ip6_traffic_class_network_order (const ip6_header_t * ip6)
 {
   return (clib_net_to_host_u32 (ip6->ip_version_traffic_class_and_flow_label)
-	  & 0x0ff00000) >> 20;
+	  & IP6_PACKET_TC_MASK) >> 20;
 }
 
 static_always_inline ip_dscp_t
 ip6_dscp_network_order (const ip6_header_t * ip6)
 {
   return (clib_net_to_host_u32 (ip6->ip_version_traffic_class_and_flow_label)
-	  & 0x0fc00000) >> 22;
+	  & IP6_PACKET_DSCP_MASK) >> 22;
 }
 
 static_always_inline ip_ecn_t
 ip6_ecn_network_order (const ip6_header_t * ip6)
 {
   return (clib_net_to_host_u32 (ip6->ip_version_traffic_class_and_flow_label)
-	  & 0x00300000) >> 20;
+	  & IP6_PACKET_ECN_MASK) >> 20;
 }
 
 static_always_inline void
diff --git a/src/vnet/ip/ip_packet.h b/src/vnet/ip/ip_packet.h
index 52a65e7..e1089ec 100644
--- a/src/vnet/ip/ip_packet.h
+++ b/src/vnet/ip/ip_packet.h
@@ -42,6 +42,7 @@
 
 #include <vppinfra/byte_order.h>
 #include <vppinfra/error.h>
+#include <vppinfra/format.h>
 
 typedef enum ip_protocol
 {
@@ -119,6 +120,7 @@
 } __clib_packed ip_dscp_t;
 
 extern u8 *format_ip_dscp (u8 * s, va_list * va);
+unformat_function_t unformat_ip_dscp;
 
 /**
  * IP DSCP bit shift
diff --git a/src/vnet/ipsec/ah_encrypt.c b/src/vnet/ipsec/ah_encrypt.c
index b4e9af3..d89cb09 100644
--- a/src/vnet/ipsec/ah_encrypt.c
+++ b/src/vnet/ipsec/ah_encrypt.c
@@ -22,6 +22,7 @@
 #include <vnet/ipsec/ipsec.h>
 #include <vnet/ipsec/esp.h>
 #include <vnet/ipsec/ah.h>
+#include <vnet/tunnel/tunnel_dp.h>
 
 #define foreach_ah_encrypt_next \
   _ (DROP, "error-drop")                           \
@@ -111,12 +112,13 @@
 {
   union
   {
+    /* Variable fields in the IP header not covered by the AH
+     * integrity check */
     struct
     {
       u8 hop_limit;
       u32 ip_version_traffic_class_and_flow_label;
     };
-
     struct
     {
       u8 ttl;
@@ -209,8 +211,6 @@
 
       ssize_t adv;
       ih0 = vlib_buffer_get_current (b[0]);
-      pd->ttl = ih0->ip4.ttl;
-      pd->tos = ih0->ip4.tos;
 
       if (PREDICT_TRUE (ipsec_sa_is_set_IS_TUNNEL (sa0)))
 	{
@@ -246,10 +246,20 @@
 	  ip_hdr_size = sizeof (ip6_header_t);
 	  oh6_0 = vlib_buffer_get_current (b[0]);
 	  pd->current_data = b[0]->current_data;
-
 	  pd->hop_limit = ih6_0->ip6.hop_limit;
-	  pd->ip_version_traffic_class_and_flow_label =
+
+	  oh6_0->ip6.ip_version_traffic_class_and_flow_label =
 	    ih6_0->ip6.ip_version_traffic_class_and_flow_label;
+
+	  ip6_set_dscp_network_order (&oh6_0->ip6, sa0->dscp);
+
+	  tunnel_encap_fixup_6o6 (sa0->tunnel_flags,
+				  &ih6_0->ip6, &oh6_0->ip6);
+
+	  pd->ip_version_traffic_class_and_flow_label =
+	    oh6_0->ip6.ip_version_traffic_class_and_flow_label;
+	  oh6_0->ip6.ip_version_traffic_class_and_flow_label = 0;
+
 	  if (PREDICT_TRUE (ipsec_sa_is_set_IS_TUNNEL (sa0)))
 	    {
 	      next_hdr_type = IP_PROTOCOL_IPV6;
@@ -275,8 +285,24 @@
 	{
 	  ip_hdr_size = sizeof (ip4_header_t);
 	  oh0 = vlib_buffer_get_current (b[0]);
-	  clib_memset (oh0, 0, sizeof (ip4_and_ah_header_t));
+	  pd->ttl = ih0->ip4.ttl;
+
+	  if (sa0->dscp)
+	    pd->tos = sa0->dscp << 2;
+	  else
+	    {
+	      pd->tos = ih0->ip4.tos;
+	      if (!
+		  (sa0->tunnel_flags &
+		   TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP))
+		pd->tos &= 0x3;
+	      if (!
+		  (sa0->tunnel_flags &
+		   TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN))
+		pd->tos &= 0xfc;
+	    }
 	  pd->current_data = b[0]->current_data;
+	  clib_memset (oh0, 0, sizeof (ip4_and_ah_header_t));
 
 	  if (PREDICT_TRUE (ipsec_sa_is_set_IS_TUNNEL (sa0)))
 	    {
diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c
index f546168..ed49cdc 100644
--- a/src/vnet/ipsec/esp_encrypt.c
+++ b/src/vnet/ipsec/esp_encrypt.c
@@ -24,6 +24,7 @@
 #include <vnet/ipsec/ipsec.h>
 #include <vnet/ipsec/ipsec_tun.h>
 #include <vnet/ipsec/esp.h>
+#include <vnet/tunnel/tunnel_dp.h>
 
 #define foreach_esp_encrypt_next                   \
 _(DROP4, "ip4-drop")                               \
@@ -743,9 +744,22 @@
 	      u16 len = sizeof (ip6_header_t);
 	      hdr_len += len;
 	      ip6 = (ip6_header_t *) (payload - hdr_len);
-	      clib_memcpy_fast (ip6, &sa0->ip6_hdr, len);
-	      *next_hdr_ptr = (is_ip6 ?
-			       IP_PROTOCOL_IPV6 : IP_PROTOCOL_IP_IN_IP);
+	      clib_memcpy_fast (ip6, &sa0->ip6_hdr, sizeof (ip6_header_t));
+
+	      if (is_ip6)
+		{
+		  *next_hdr_ptr = IP_PROTOCOL_IPV6;
+		  tunnel_encap_fixup_6o6 (sa0->tunnel_flags,
+					  (const ip6_header_t *) payload,
+					  ip6);
+		}
+	      else
+		{
+		  *next_hdr_ptr = IP_PROTOCOL_IP_IN_IP;
+		  tunnel_encap_fixup_4o6 (sa0->tunnel_flags,
+					  (const ip4_header_t *) payload,
+					  ip6);
+		}
 	      len = payload_len_total + hdr_len - len;
 	      ip6->payload_length = clib_net_to_host_u16 (len);
 	    }
@@ -755,9 +769,22 @@
 	      u16 len = sizeof (ip4_header_t);
 	      hdr_len += len;
 	      ip4 = (ip4_header_t *) (payload - hdr_len);
-	      clib_memcpy_fast (ip4, &sa0->ip4_hdr, len);
-	      *next_hdr_ptr = (is_ip6 ?
-			       IP_PROTOCOL_IPV6 : IP_PROTOCOL_IP_IN_IP);
+	      clib_memcpy_fast (ip4, &sa0->ip4_hdr, sizeof (ip4_header_t));
+
+	      if (is_ip6)
+		{
+		  *next_hdr_ptr = IP_PROTOCOL_IPV6;
+		  tunnel_encap_fixup_6o4_w_chksum (sa0->tunnel_flags,
+						   (const ip6_header_t *)
+						   payload, ip4);
+		}
+	      else
+		{
+		  *next_hdr_ptr = IP_PROTOCOL_IP_IN_IP;
+		  tunnel_encap_fixup_4o4_w_chksum (sa0->tunnel_flags,
+						   (const ip4_header_t *)
+						   payload, ip4);
+		}
 	      len = payload_len_total + hdr_len;
 	      esp_update_ip4_hdr (ip4, len, /* is_transport */ 0, 0);
 	    }
diff --git a/src/vnet/ipsec/ipsec.api b/src/vnet/ipsec/ipsec.api
index 89dcdb7..178c7c6 100644
--- a/src/vnet/ipsec/ipsec.api
+++ b/src/vnet/ipsec/ipsec.api
@@ -196,12 +196,25 @@
   bool is_add;
   vl_api_ipsec_sad_entry_t entry;
 };
+define ipsec_sad_entry_add_del_v2
+{
+  u32 client_index;
+  u32 context;
+  bool is_add;
+  vl_api_ipsec_sad_entry_v2_t entry;
+};
 define ipsec_sad_entry_add_del_reply
 {
   u32 context;
   i32 retval;
   u32 stat_index;
 };
+define ipsec_sad_entry_add_del_v2_reply
+{
+  u32 context;
+  i32 retval;
+  u32 stat_index;
+};
 
 /** \brief Add or Update Protection for a tunnel with IPSEC
 
@@ -439,25 +452,17 @@
   u32 context;
   u32 sa_id;
 };
+define ipsec_sa_v2_dump
+{
+  u32 client_index;
+  u32 context;
+  u32 sa_id;
+};
 
 /** \brief IPsec security association database response
     @param context - sender context which was passed in the request
-    @param sa_id - SA ID, policy-based SAs >=0, tunnel interface SAs = 0
+    @param entry - The SA details
     @param sw_if_index - sw_if_index of tunnel interface, policy-based SAs = ~0
-    @param spi - security parameter index
-    @param protocol - IPsec protocol (value from ipsec_protocol_t)
-    @param crypto_alg - crypto algorithm (value from ipsec_crypto_alg_t)
-    @param crypto_key_len - length of crypto_key in bytes
-    @param crypto_key - crypto keying material
-    @param integ_alg - integrity algorithm (value from ipsec_integ_alg_t)
-    @param integ_key_len - length of integ_key in bytes
-    @param integ_key - integrity keying material
-    @param use_esn - using extended sequence numbers when non-zero
-    @param use_anti_replay - using anti-replay window when non-zero
-    @param is_tunnel - IPsec tunnel mode when non-zero, else transport mode
-    @param is_tunnel_ipv6 - If using tunnel mode, endpoints are IPv6
-    @param tunnel_src_addr - Tunnel source address if using tunnel mode
-    @param tunnel_dst_addr - Tunnel destination address is using tunnel mode
     @param salt - 4 byte salt
     @param seq - current sequence number for outbound
     @param seq_hi - high 32 bits of ESN for outbound
@@ -465,7 +470,6 @@
     @param last_seq_hi - high 32 bits of highest ESN received inbound
     @param replay_window - bit map of seq nums received relative to last_seq if using anti-replay
     @param stat_index - index for the SA in the stats segment @ /net/ipsec/sa
-    @param udp_encap - 1 if UDP encap enabled, 0 otherwise
 */
 define ipsec_sa_details {
   u32 context;
@@ -479,6 +483,18 @@
 
   u32 stat_index;
 };
+define ipsec_sa_v2_details {
+  u32 context;
+  vl_api_ipsec_sad_entry_v2_t entry;
+
+  vl_api_interface_index_t sw_if_index;
+  u32 salt;
+  u64 seq_outbound;
+  u64 last_seq_inbound;
+  u64 replay_window;
+
+  u32 stat_index;
+};
 
 /** \brief Set new SA on IPsec interface
 
diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c
index f623cce..7003791 100644
--- a/src/vnet/ipsec/ipsec_api.c
+++ b/src/vnet/ipsec/ipsec_api.c
@@ -28,6 +28,7 @@
 #include <vnet/tunnel/tunnel_types_api.h>
 #include <vnet/fib/fib.h>
 #include <vnet/ipip/ipip.h>
+#include <vnet/tunnel/tunnel_types_api.h>
 
 #include <vnet/vnet_msg_enum.h>
 
@@ -58,7 +59,9 @@
 _(IPSEC_INTERFACE_ADD_DEL_SPD, ipsec_interface_add_del_spd)     \
 _(IPSEC_SPD_ENTRY_ADD_DEL, ipsec_spd_entry_add_del)             \
 _(IPSEC_SAD_ENTRY_ADD_DEL, ipsec_sad_entry_add_del)             \
+_(IPSEC_SAD_ENTRY_ADD_DEL_V2, ipsec_sad_entry_add_del_v2)       \
 _(IPSEC_SA_DUMP, ipsec_sa_dump)                                 \
+_(IPSEC_SA_V2_DUMP, ipsec_sa_v2_dump)                           \
 _(IPSEC_SPDS_DUMP, ipsec_spds_dump)                             \
 _(IPSEC_SPD_DUMP, ipsec_spd_dump)                               \
 _(IPSEC_SPD_INTERFACE_DUMP, ipsec_spd_interface_dump)		\
@@ -380,7 +383,10 @@
 				crypto_alg, &crypto_key,
 				integ_alg, &integ_key, flags,
 				0, mp->entry.salt, &tun_src, &tun_dst,
-				&sa_index, htons (mp->entry.udp_src_port),
+				TUNNEL_ENCAP_DECAP_FLAG_NONE,
+				IP_DSCP_CS0,
+				&sa_index,
+				htons (mp->entry.udp_src_port),
 				htons (mp->entry.udp_dst_port));
   else
     rv = ipsec_sa_unlock_id (id);
@@ -398,6 +404,83 @@
   /* *INDENT-ON* */
 }
 
+static void vl_api_ipsec_sad_entry_add_del_v2_t_handler
+  (vl_api_ipsec_sad_entry_add_del_v2_t * mp)
+{
+  vlib_main_t *vm __attribute__ ((unused)) = vlib_get_main ();
+  vl_api_ipsec_sad_entry_add_del_v2_reply_t *rmp;
+  ip46_address_t tun_src = { }, tun_dst =
+  {
+  };
+  tunnel_encap_decap_flags_t tunnel_flags;
+  ipsec_key_t crypto_key, integ_key;
+  ipsec_crypto_alg_t crypto_alg;
+  ipsec_integ_alg_t integ_alg;
+  ipsec_protocol_t proto;
+  ipsec_sa_flags_t flags;
+  u32 id, spi, sa_index = ~0;
+  int rv;
+
+#if WITH_LIBSSL > 0
+
+  id = ntohl (mp->entry.sad_id);
+  spi = ntohl (mp->entry.spi);
+
+  rv = ipsec_proto_decode (mp->entry.protocol, &proto);
+
+  if (rv)
+    goto out;
+
+  rv = ipsec_crypto_algo_decode (mp->entry.crypto_algorithm, &crypto_alg);
+
+  if (rv)
+    goto out;
+
+  rv = ipsec_integ_algo_decode (mp->entry.integrity_algorithm, &integ_alg);
+
+  if (rv)
+    goto out;
+
+  rv =
+    tunnel_encap_decap_flags_decode (mp->entry.tunnel_flags, &tunnel_flags);
+
+  if (rv)
+    goto out;
+
+  ipsec_key_decode (&mp->entry.crypto_key, &crypto_key);
+  ipsec_key_decode (&mp->entry.integrity_key, &integ_key);
+
+  flags = ipsec_sa_flags_decode (mp->entry.flags);
+
+  ip_address_decode (&mp->entry.tunnel_src, &tun_src);
+  ip_address_decode (&mp->entry.tunnel_dst, &tun_dst);
+
+  if (mp->is_add)
+    rv = ipsec_sa_add_and_lock (id, spi, proto,
+				crypto_alg, &crypto_key,
+				integ_alg, &integ_key, flags,
+				0, mp->entry.salt, &tun_src, &tun_dst,
+				tunnel_flags,
+				ip_dscp_decode (mp->entry.dscp),
+				&sa_index,
+				htons (mp->entry.udp_src_port),
+				htons (mp->entry.udp_dst_port));
+  else
+    rv = ipsec_sa_unlock_id (id);
+
+#else
+  rv = VNET_API_ERROR_UNIMPLEMENTED;
+#endif
+
+out:
+  /* *INDENT-OFF* */
+  REPLY_MACRO2 (VL_API_IPSEC_SAD_ENTRY_ADD_DEL_V2_REPLY,
+  {
+    rmp->stat_index = htonl (sa_index);
+  });
+  /* *INDENT-ON* */
+}
+
 static void
 send_ipsec_spds_details (ipsec_spd_t * spd, vl_api_registration_t * reg,
 			 u32 context)
@@ -671,7 +754,9 @@
 				  &integ_key,
 				  (flags | IPSEC_SA_FLAG_IS_INBOUND),
 				  ntohl (mp->tx_table_id),
-				  mp->salt, &remote_ip, &local_ip, NULL,
+				  mp->salt, &remote_ip, &local_ip,
+				  TUNNEL_ENCAP_DECAP_FLAG_NONE,
+				  IP_DSCP_CS0, NULL,
 				  IPSEC_UDP_PORT_NONE, IPSEC_UDP_PORT_NONE);
 
       if (rv)
@@ -686,7 +771,9 @@
 				  &integ_key,
 				  flags,
 				  ntohl (mp->tx_table_id),
-				  mp->salt, &local_ip, &remote_ip, NULL,
+				  mp->salt, &local_ip, &remote_ip,
+				  TUNNEL_ENCAP_DECAP_FLAG_NONE,
+				  IP_DSCP_CS0, NULL,
 				  IPSEC_UDP_PORT_NONE, IPSEC_UDP_PORT_NONE);
 
       if (rv)
@@ -905,6 +992,101 @@
 #endif
 }
 
+static walk_rc_t
+send_ipsec_sa_v2_details (ipsec_sa_t * sa, void *arg)
+{
+  ipsec_dump_walk_ctx_t *ctx = arg;
+  vl_api_ipsec_sa_v2_details_t *mp;
+  ipsec_main_t *im = &ipsec_main;
+
+  mp = vl_msg_api_alloc (sizeof (*mp));
+  clib_memset (mp, 0, sizeof (*mp));
+  mp->_vl_msg_id = ntohs (VL_API_IPSEC_SA_V2_DETAILS);
+  mp->context = ctx->context;
+
+  mp->entry.sad_id = htonl (sa->id);
+  mp->entry.spi = htonl (sa->spi);
+  mp->entry.protocol = ipsec_proto_encode (sa->protocol);
+  mp->entry.tx_table_id =
+    htonl (fib_table_get_table_id (sa->tx_fib_index, FIB_PROTOCOL_IP4));
+
+  mp->entry.crypto_algorithm = ipsec_crypto_algo_encode (sa->crypto_alg);
+  ipsec_key_encode (&sa->crypto_key, &mp->entry.crypto_key);
+
+  mp->entry.integrity_algorithm = ipsec_integ_algo_encode (sa->integ_alg);
+  ipsec_key_encode (&sa->integ_key, &mp->entry.integrity_key);
+
+  mp->entry.flags = ipsec_sad_flags_encode (sa);
+  mp->entry.salt = clib_host_to_net_u32 (sa->salt);
+
+  if (ipsec_sa_is_set_IS_PROTECT (sa))
+    {
+      ipsec_sa_dump_match_ctx_t ctx = {
+        .sai = sa - im->sad,
+        .sw_if_index = ~0,
+      };
+      ipsec_tun_protect_walk (ipsec_sa_dump_match_sa, &ctx);
+
+      mp->sw_if_index = htonl (ctx.sw_if_index);
+    }
+  else
+    mp->sw_if_index = ~0;
+
+  if (ipsec_sa_is_set_IS_TUNNEL (sa))
+    {
+      ip_address_encode (&sa->tunnel_src_addr, IP46_TYPE_ANY,
+			 &mp->entry.tunnel_src);
+      ip_address_encode (&sa->tunnel_dst_addr, IP46_TYPE_ANY,
+			 &mp->entry.tunnel_dst);
+    }
+  if (ipsec_sa_is_set_UDP_ENCAP (sa))
+    {
+      mp->entry.udp_src_port = sa->udp_hdr.src_port;
+      mp->entry.udp_dst_port = sa->udp_hdr.dst_port;
+    }
+
+  mp->entry.tunnel_flags = tunnel_encap_decap_flags_encode (sa->tunnel_flags);
+  mp->entry.dscp = ip_dscp_encode (sa->dscp);
+
+  mp->seq_outbound = clib_host_to_net_u64 (((u64) sa->seq));
+  mp->last_seq_inbound = clib_host_to_net_u64 (((u64) sa->last_seq));
+  if (ipsec_sa_is_set_USE_ESN (sa))
+    {
+      mp->seq_outbound |= (u64) (clib_host_to_net_u32 (sa->seq_hi));
+      mp->last_seq_inbound |= (u64) (clib_host_to_net_u32 (sa->last_seq_hi));
+    }
+  if (ipsec_sa_is_set_USE_ANTI_REPLAY (sa))
+    mp->replay_window = clib_host_to_net_u64 (sa->replay_window);
+
+  mp->stat_index = clib_host_to_net_u32 (sa->stat_index);
+
+  vl_api_send_msg (ctx->reg, (u8 *) mp);
+
+  return (WALK_CONTINUE);
+}
+
+static void
+vl_api_ipsec_sa_v2_dump_t_handler (vl_api_ipsec_sa_dump_t * mp)
+{
+  vl_api_registration_t *reg;
+
+#if WITH_LIBSSL > 0
+  reg = vl_api_client_index_to_registration (mp->client_index);
+  if (!reg)
+    return;
+
+  ipsec_dump_walk_ctx_t ctx = {
+    .reg = reg,
+    .context = mp->context,
+  };
+
+  ipsec_sa_walk (send_ipsec_sa_v2_details, &ctx);
+
+#else
+  clib_warning ("unimplemented");
+#endif
+}
+
 static void
 vl_api_ipsec_tunnel_if_set_sa_t_handler (vl_api_ipsec_tunnel_if_set_sa_t * mp)
 {
diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c
index d737853..fc79c4c 100644
--- a/src/vnet/ipsec/ipsec_cli.c
+++ b/src/vnet/ipsec/ipsec_cli.c
@@ -90,6 +90,7 @@
   u16 udp_src, udp_dst;
   int is_add, rv;
   u32 m_args = 0;
+  ip_dscp_t dscp;
 
   salt = 0;
   error = NULL;
@@ -99,6 +100,7 @@
   integ_alg = IPSEC_INTEG_ALG_NONE;
   crypto_alg = IPSEC_CRYPTO_ALG_NONE;
   udp_src = udp_dst = IPSEC_UDP_PORT_NONE;
+  dscp = IP_DSCP_CS0;
 
   if (!unformat_user (input, unformat_line_input, line_input))
     return 0;
@@ -182,7 +184,9 @@
       rv = ipsec_sa_add_and_lock (id, spi, proto, crypto_alg,
 				  &ck, integ_alg, &ik, flags,
 				  0, clib_host_to_net_u32 (salt),
-				  &tun_src, &tun_dst, &sai, udp_src, udp_dst);
+				  &tun_src, &tun_dst,
+				  TUNNEL_ENCAP_DECAP_FLAG_NONE, dscp,
+				  &sai, udp_src, udp_dst);
     }
   else
     {
@@ -910,16 +914,18 @@
 			       local_spi, IPSEC_PROTOCOL_ESP, crypto_alg,
 			       &lck, integ_alg, &lik, flags, table_id,
 			       clib_host_to_net_u32 (salt), &local_ip,
-			       &remote_ip, NULL, IPSEC_UDP_PORT_NONE,
-			       IPSEC_UDP_PORT_NONE);
+			       &remote_ip, TUNNEL_ENCAP_DECAP_FLAG_NONE,
+			       IP_DSCP_CS0, NULL,
+			       IPSEC_UDP_PORT_NONE, IPSEC_UDP_PORT_NONE);
       rv |=
 	ipsec_sa_add_and_lock (ipsec_tun_mk_remote_sa_id (sw_if_index),
 			       remote_spi, IPSEC_PROTOCOL_ESP, crypto_alg,
 			       &rck, integ_alg, &rik,
 			       (flags | IPSEC_SA_FLAG_IS_INBOUND), table_id,
 			       clib_host_to_net_u32 (salt), &remote_ip,
-			       &local_ip, NULL, IPSEC_UDP_PORT_NONE,
-			       IPSEC_UDP_PORT_NONE);
+			       &local_ip, TUNNEL_ENCAP_DECAP_FLAG_NONE,
+			       IP_DSCP_CS0, NULL,
+			       IPSEC_UDP_PORT_NONE, IPSEC_UDP_PORT_NONE);
       rv |=
 	ipsec_tun_protect_update_one (sw_if_index, &nh,
 				      ipsec_tun_mk_local_sa_id (sw_if_index),
diff --git a/src/vnet/ipsec/ipsec_format.c b/src/vnet/ipsec/ipsec_format.c
index 6781fe5..bf5ea37 100644
--- a/src/vnet/ipsec/ipsec_format.c
+++ b/src/vnet/ipsec/ipsec_format.c
@@ -322,10 +322,12 @@
     {
       tx_table_id = fib_table_get_table_id (sa->tx_fib_index,
 					    FIB_PROTOCOL_IP4);
-      s = format (s, "\n   table-ID %d tunnel src %U dst %U",
+      s = format (s, "\n   table-ID %d tunnel %U src %U dst %U flags %U",
 		  tx_table_id,
+		  format_ip_dscp, sa->dscp,
 		  format_ip46_address, &sa->tunnel_src_addr, IP46_TYPE_ANY,
-		  format_ip46_address, &sa->tunnel_dst_addr, IP46_TYPE_ANY);
+		  format_ip46_address, &sa->tunnel_dst_addr, IP46_TYPE_ANY,
+		  format_tunnel_encap_decap_flags, sa->tunnel_flags);
       if (!ipsec_sa_is_set_IS_INBOUND (sa))
 	{
 	  s =
diff --git a/src/vnet/ipsec/ipsec_sa.c b/src/vnet/ipsec/ipsec_sa.c
index 9b2f2b5..71e86ac 100644
--- a/src/vnet/ipsec/ipsec_sa.c
+++ b/src/vnet/ipsec/ipsec_sa.c
@@ -178,8 +178,10 @@
 		       u32 tx_table_id,
 		       u32 salt,
 		       const ip46_address_t * tun_src,
-		       const ip46_address_t * tun_dst, u32 * sa_out_index,
-		       u16 src_port, u16 dst_port)
+		       const ip46_address_t * tun_dst,
+		       tunnel_encap_decap_flags_t tunnel_flags,
+		       ip_dscp_t dscp,
+		       u32 * sa_out_index, u16 src_port, u16 dst_port)
 {
   vlib_main_t *vm = vlib_get_main ();
   ipsec_main_t *im = &ipsec_main;
@@ -206,6 +208,8 @@
   sa->stat_index = sa_index;
   sa->protocol = proto;
   sa->flags = flags;
+  sa->tunnel_flags = tunnel_flags;
+  sa->dscp = dscp;
   sa->salt = salt;
   sa->encrypt_thread_index = (vlib_num_workers ())? ~0 : 0;
   sa->decrypt_thread_index = (vlib_num_workers ())? ~0 : 0;
@@ -297,6 +301,8 @@
       if (ipsec_sa_is_set_IS_TUNNEL_V6 (sa))
 	{
 	  sa->ip6_hdr.ip_version_traffic_class_and_flow_label = 0x60;
+	  ip6_set_dscp_network_order (&sa->ip6_hdr, sa->dscp);
+
 	  sa->ip6_hdr.hop_limit = 254;
 	  sa->ip6_hdr.src_address.as_u64[0] =
 	    sa->tunnel_src_addr.ip6.as_u64[0];
@@ -317,6 +323,7 @@
 	  sa->ip4_hdr.ttl = 254;
 	  sa->ip4_hdr.src_address.as_u32 = sa->tunnel_src_addr.ip4.as_u32;
 	  sa->ip4_hdr.dst_address.as_u32 = sa->tunnel_dst_addr.ip4.as_u32;
+	  sa->ip4_hdr.tos = sa->dscp << 2;
 
 	  if (ipsec_sa_is_set_UDP_ENCAP (sa))
 	    sa->ip4_hdr.protocol = IP_PROTOCOL_UDP;
diff --git a/src/vnet/ipsec/ipsec_sa.h b/src/vnet/ipsec/ipsec_sa.h
index 02f5eaf..6ed7132 100644
--- a/src/vnet/ipsec/ipsec_sa.h
+++ b/src/vnet/ipsec/ipsec_sa.h
@@ -19,6 +19,7 @@
 #include <vnet/crypto/crypto.h>
 #include <vnet/ip/ip.h>
 #include <vnet/fib/fib_node.h>
+#include <vnet/tunnel/tunnel.h>
 
 #define foreach_ipsec_crypto_alg    \
   _ (0, NONE, "none")               \
@@ -163,7 +164,9 @@
   u32 salt;
 
   ipsec_protocol_t protocol;
-  u8 __pad[3];
+  tunnel_encap_decap_flags_t tunnel_flags;
+  ip_dscp_t dscp;
+  u8 __pad[1];
 
   /* data accessed by dataplane code should be above this comment */
     CLIB_CACHE_LINE_ALIGN_MARK (cacheline2);
@@ -258,6 +261,8 @@
 				  u32 salt,
 				  const ip46_address_t * tunnel_src_addr,
 				  const ip46_address_t * tunnel_dst_addr,
+				  tunnel_encap_decap_flags_t tunnel_flags,
+				  ip_dscp_t dscp,
 				  u32 * sa_index, u16 src_port, u16 dst_port);
 extern index_t ipsec_sa_find_and_lock (u32 id);
 extern int ipsec_sa_unlock_id (u32 id);
diff --git a/src/vnet/ipsec/ipsec_types.api b/src/vnet/ipsec/ipsec_types.api
index 715f3de..ca1b378 100644
--- a/src/vnet/ipsec/ipsec_types.api
+++ b/src/vnet/ipsec/ipsec_types.api
@@ -17,6 +17,7 @@
 option version = "3.0.0";
 
 import "vnet/ip/ip_types.api";
+import "vnet/tunnel/tunnel_types.api";
 
 /*
  * @brief Support cryptographic algorithms
@@ -108,6 +109,8 @@
                           TX. It is ignored for RX.
     @param udp_dst_port - If using UDP Encapsulation, use this destination port
                           for TX. Expect traffic on this port for RX.
+    @param tunnel_flags - Flags controlling the copying of encap/decap value
+    @param dscp - Fixed DSCP vaule for tunnel encap
  */
 typedef ipsec_sad_entry
 {
@@ -133,6 +136,33 @@
   u16 udp_dst_port [default=4500];
 };
 
+typedef ipsec_sad_entry_v2
+{
+  u32 sad_id;
+
+  u32 spi;
+
+  vl_api_ipsec_proto_t protocol;
+
+  vl_api_ipsec_crypto_alg_t crypto_algorithm;
+  vl_api_key_t crypto_key;
+
+  vl_api_ipsec_integ_alg_t integrity_algorithm;
+  vl_api_key_t integrity_key;
+
+  vl_api_ipsec_sad_flags_t flags;
+
+  vl_api_address_t tunnel_src;
+  vl_api_address_t tunnel_dst;
+  vl_api_tunnel_encap_decap_flags_t tunnel_flags;
+  vl_api_ip_dscp_t dscp;
+  u32 tx_table_id;
+  u32 salt;
+  u16 udp_src_port [default=4500];
+  u16 udp_dst_port [default=4500];
+};
+
+
 /*
  * Local Variables:
  * eval: (c-set-style "gnu")
diff --git a/src/vnet/tunnel/tunnel_dp.h b/src/vnet/tunnel/tunnel_dp.h
index a00a3b3..f84e764 100644
--- a/src/vnet/tunnel/tunnel_dp.h
+++ b/src/vnet/tunnel/tunnel_dp.h
@@ -34,6 +34,41 @@
 }
 
 static_always_inline void
+tunnel_encap_fixup_4o4_w_chksum (tunnel_encap_decap_flags_t flags,
+				 const ip4_header_t * inner,
+				 ip4_header_t * outer)
+{
+  if (flags & (TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP |
+	       TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN))
+    {
+      ip_csum_t sum = outer->checksum;
+      u8 tos = outer->tos;
+
+      if (flags & TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP)
+	ip4_header_set_dscp (outer, ip4_header_get_dscp (inner));
+      if (flags & TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN)
+	ip4_header_set_ecn (outer, ip4_header_get_ecn (inner));
+
+      sum =
+	ip_csum_update (outer->checksum, tos, outer->tos, ip4_header_t, tos);
+      outer->checksum = ip_csum_fold (sum);
+    }
+  if ((flags & TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_DF) &&
+      ip4_header_get_df (inner))
+    {
+      ip_csum_t sum = outer->checksum;
+      u16 tos = outer->flags_and_fragment_offset;
+
+      ip4_header_set_df (outer);
+
+      sum =
+	ip_csum_update (outer->checksum, tos, outer->tos, ip4_header_t,
+			flags_and_fragment_offset);
+      outer->checksum = ip_csum_fold (sum);
+    }
+}
+
+static_always_inline void
 tunnel_encap_fixup_6o4 (tunnel_encap_decap_flags_t flags,
 			const ip6_header_t * inner, ip4_header_t * outer)
 {
@@ -44,6 +79,28 @@
 }
 
 static_always_inline void
+tunnel_encap_fixup_6o4_w_chksum (tunnel_encap_decap_flags_t flags,
+				 const ip6_header_t * inner,
+				 ip4_header_t * outer)
+{
+  if (flags & (TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP |
+	       TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN))
+    {
+      ip_csum_t sum = outer->checksum;
+      u8 tos = outer->tos;
+
+      if (flags & TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_DSCP)
+	ip4_header_set_dscp (outer, ip6_dscp_network_order (inner));
+      if (flags & TUNNEL_ENCAP_DECAP_FLAG_ENCAP_COPY_ECN)
+	ip4_header_set_ecn (outer, ip6_ecn_network_order ((inner)));
+
+      sum =
+	ip_csum_update (outer->checksum, tos, outer->tos, ip4_header_t, tos);
+      outer->checksum = ip_csum_fold (sum);
+    }
+}
+
+static_always_inline void
 tunnel_encap_fixup_6o6 (tunnel_encap_decap_flags_t flags,
 			const ip6_header_t * inner, ip6_header_t * outer)
 {
