diff --git a/src/vnet/adj/adj.c b/src/vnet/adj/adj.c
index 5f7fe74..d28d519 100644
--- a/src/vnet/adj/adj.c
+++ b/src/vnet/adj/adj.c
@@ -338,6 +338,43 @@
     adj_walk (sw_if_index, adj_feature_update_walk_cb, &ctx);
 }
 
+static adj_walk_rc_t
+adj_mtu_update_walk_cb (adj_index_t ai,
+                        void *arg)
+{
+    ip_adjacency_t *adj;
+
+    adj = adj_get(ai);
+
+    vnet_rewrite_update_mtu (vnet_get_main(),
+                             &adj->rewrite_header);
+
+    return (ADJ_WALK_RC_CONTINUE);
+}
+
+static void
+adj_sw_mtu_update (vnet_main_t * vnm,
+                   u32 sw_if_index,
+                   void *ctx)
+{
+    /*
+     * Walk all the adjacencies on the interface to update the cached MTU
+     */
+    adj_walk (sw_if_index, adj_mtu_update_walk_cb, NULL);
+}
+
+void
+adj_mtu_update (u32 hw_if_index)
+{
+    /*
+     * Walk all the SW interfaces on the HW interface to update the cached MTU
+     */
+    vnet_hw_interface_walk_sw(vnet_get_main(),
+                              hw_if_index,
+                              adj_sw_mtu_update,
+                              NULL);
+}
+
 /**
  * @brief Walk the Adjacencies on a given interface
  */
diff --git a/src/vnet/adj/adj.h b/src/vnet/adj/adj.h
index fe77d16..bcf6c04 100644
--- a/src/vnet/adj/adj.h
+++ b/src/vnet/adj/adj.h
@@ -345,6 +345,12 @@
 extern void adj_feature_update (u32 sw_if_index, u8 arc_index, u8 is_enable);
 
 /**
+ * @brief Notify the adjacency subsystem that the MTU settings for
+ * an HW interface have changed
+ */
+extern void adj_mtu_update (u32 hw_if_index);
+
+/**
  * @brief
  * The global adjacnecy pool. Exposed for fast/inline data-plane access
  */
diff --git a/src/vnet/adj/rewrite.c b/src/vnet/adj/rewrite.c
index 9150f2c..c21495a 100644
--- a/src/vnet/adj/rewrite.c
+++ b/src/vnet/adj/rewrite.c
@@ -77,15 +77,14 @@
       vnet_sw_interface_t *si;
       si = vnet_get_sw_interface_safe (vnm, rw->sw_if_index);
       if (NULL != si)
-	s = format (s, "%U: ", format_vnet_sw_interface_name, vnm, si);
+	s = format (s, "%U:", format_vnet_sw_interface_name, vnm, si);
       else
 	s = format (s, "DELETED:%d", rw->sw_if_index);
     }
 
   /* Format rewrite string. */
   if (rw->data_bytes > 0)
-
-    s = format (s, "%U",
+    s = format (s, " %U",
 		format_hex_bytes,
 		rw->data + max_data_bytes - rw->data_bytes, rw->data_bytes);
 
@@ -111,6 +110,13 @@
 }
 
 void
+vnet_rewrite_update_mtu (vnet_main_t * vnm, vnet_rewrite_header_t * rw)
+{
+  rw->max_l3_packet_bytes =
+    vnet_sw_interface_get_mtu (vnm, rw->sw_if_index, VLIB_TX);
+}
+
+void
 vnet_rewrite_for_sw_interface (vnet_main_t * vnm,
 			       vnet_link_t link_type,
 			       u32 sw_if_index,
diff --git a/src/vnet/adj/rewrite.h b/src/vnet/adj/rewrite.h
index 1dea72f..005ac41 100644
--- a/src/vnet/adj/rewrite.h
+++ b/src/vnet/adj/rewrite.h
@@ -328,6 +328,9 @@
 			u32 this_node,
 			u32 next_node, vnet_rewrite_header_t * rw);
 
+void vnet_rewrite_update_mtu (struct vnet_main_t *vnm,
+			      vnet_rewrite_header_t * rw);
+
 u8 *vnet_build_rewrite_for_sw_interface (struct vnet_main_t *vnm,
 					 u32 sw_if_index,
 					 vnet_link_t packet_type,
diff --git a/src/vnet/interface.c b/src/vnet/interface.c
index a34bb79..7516aec 100644
--- a/src/vnet/interface.c
+++ b/src/vnet/interface.c
@@ -122,6 +122,22 @@
      /* helper_flags no redistribution */ 0);
 }
 
+void
+vnet_hw_interface_set_mtu (vnet_main_t * vnm, u32 hw_if_index, u32 mtu)
+{
+  vnet_hw_interface_t *hi = vnet_get_hw_interface (vnm, hw_if_index);
+
+  if (hi->max_packet_bytes != mtu)
+    {
+      u16 l3_pad = hi->max_packet_bytes - hi->max_l3_packet_bytes[VLIB_TX];
+      hi->max_packet_bytes = mtu;
+      hi->max_l3_packet_bytes[VLIB_TX] =
+	hi->max_l3_packet_bytes[VLIB_RX] = mtu - l3_pad;
+      ethernet_set_flags (vnm, hw_if_index, ETHERNET_INTERFACE_FLAG_MTU);
+      adj_mtu_update (hw_if_index);
+    }
+}
+
 static void
 unserialize_vnet_hw_interface_set_flags (serialize_main_t * m, va_list * va)
 {
diff --git a/src/vnet/interface_api.c b/src/vnet/interface_api.c
index 0541f31..ed116bc 100644
--- a/src/vnet/interface_api.c
+++ b/src/vnet/interface_api.c
@@ -98,7 +98,6 @@
 {
   vl_api_sw_interface_set_mtu_reply_t *rmp;
   vnet_main_t *vnm = vnet_get_main ();
-  u32 flags = ETHERNET_INTERFACE_FLAG_MTU;
   u32 sw_if_index = ntohl (mp->sw_if_index);
   u16 mtu = ntohs (mp->mtu);
   ethernet_main_t *em = &ethernet_main;
@@ -134,11 +133,7 @@
       goto bad_sw_if_index;
     }
 
-  if (hi->max_packet_bytes != mtu)
-    {
-      hi->max_packet_bytes = mtu;
-      ethernet_set_flags (vnm, si->hw_if_index, flags);
-    }
+  vnet_hw_interface_set_mtu (vnm, si->hw_if_index, mtu);
 
   BAD_SW_IF_INDEX_LABEL;
   REPLY_MACRO (VL_API_SW_INTERFACE_SET_MTU_REPLY);
diff --git a/src/vnet/interface_cli.c b/src/vnet/interface_cli.c
index 5509e3f..8880d97 100644
--- a/src/vnet/interface_cli.c
+++ b/src/vnet/interface_cli.c
@@ -1132,7 +1132,6 @@
 {
   vnet_main_t *vnm = vnet_get_main ();
   u32 hw_if_index, mtu;
-  u32 flags = ETHERNET_INTERFACE_FLAG_MTU;
   ethernet_main_t *em = &ethernet_main;
 
   if (unformat (input, "%d %U", &mtu,
@@ -1153,11 +1152,7 @@
 	return clib_error_return (0, "Invalid mtu (%d): must be <= (%d)", mtu,
 				  hi->max_supported_packet_bytes);
 
-      if (hi->max_packet_bytes != mtu)
-	{
-	  hi->max_packet_bytes = mtu;
-	  ethernet_set_flags (vnm, hw_if_index, flags);
-	}
+      vnet_hw_interface_set_mtu (vnm, hw_if_index, mtu);
     }
   else
     return clib_error_return (0, "unknown input `%U'",
diff --git a/src/vnet/interface_funcs.h b/src/vnet/interface_funcs.h
index ac50e7c..5aecaff 100644
--- a/src/vnet/interface_funcs.h
+++ b/src/vnet/interface_funcs.h
@@ -292,6 +292,9 @@
 					       vnet_hw_interface_rx_mode
 					       mode);
 
+/* Set the MTU on the HW interface */
+void vnet_hw_interface_set_mtu (vnet_main_t * vnm, u32 hw_if_index, u32 mtu);
+
 /* Formats sw/hw interface. */
 format_function_t format_vnet_hw_interface;
 format_function_t format_vnet_hw_interface_rx_mode;
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index ae45106..b9875d7 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -2109,16 +2109,26 @@
 	  vnet_buffer (p1)->ip.save_rewrite_length = rw_len1;
 
 	  /* Check MTU of outgoing interface. */
-	  error0 =
-	    (vlib_buffer_length_in_chain (vm, p0) >
-	     adj0[0].
-	     rewrite_header.max_l3_packet_bytes ? IP4_ERROR_MTU_EXCEEDED :
-	     error0);
-	  error1 =
-	    (vlib_buffer_length_in_chain (vm, p1) >
-	     adj1[0].
-	     rewrite_header.max_l3_packet_bytes ? IP4_ERROR_MTU_EXCEEDED :
-	     error1);
+	  if (vlib_buffer_length_in_chain (vm, p0) >
+	      adj0[0].rewrite_header.max_l3_packet_bytes)
+	    {
+	      error0 = IP4_ERROR_MTU_EXCEEDED;
+	      next0 = IP4_REWRITE_NEXT_ICMP_ERROR;
+	      icmp4_error_set_vnet_buffer
+		(p0, ICMP4_destination_unreachable,
+		 ICMP4_destination_unreachable_fragmentation_needed_and_dont_fragment_set,
+		 0);
+	    }
+	  if (vlib_buffer_length_in_chain (vm, p1) >
+	      adj1[0].rewrite_header.max_l3_packet_bytes)
+	    {
+	      error1 = IP4_ERROR_MTU_EXCEEDED;
+	      next1 = IP4_REWRITE_NEXT_ICMP_ERROR;
+	      icmp4_error_set_vnet_buffer
+		(p1, ICMP4_destination_unreachable,
+		 ICMP4_destination_unreachable_fragmentation_needed_and_dont_fragment_set,
+		 0);
+	    }
 
 	  if (is_mcast)
 	    {
@@ -2290,9 +2300,16 @@
 	       vlib_buffer_length_in_chain (vm, p0) + rw_len0);
 
 	  /* Check MTU of outgoing interface. */
-	  error0 = (vlib_buffer_length_in_chain (vm, p0)
-		    > adj0[0].rewrite_header.max_l3_packet_bytes
-		    ? IP4_ERROR_MTU_EXCEEDED : error0);
+	  if (vlib_buffer_length_in_chain (vm, p0) >
+	      adj0[0].rewrite_header.max_l3_packet_bytes)
+	    {
+	      error0 = IP4_ERROR_MTU_EXCEEDED;
+	      next0 = IP4_REWRITE_NEXT_ICMP_ERROR;
+	      icmp4_error_set_vnet_buffer
+		(p0, ICMP4_destination_unreachable,
+		 ICMP4_destination_unreachable_fragmentation_needed_and_dont_fragment_set,
+		 0);
+	    }
 	  if (is_mcast)
 	    {
 	      error0 = ((adj0[0].rewrite_header.sw_if_index ==
