diff --git a/src/vnet/udp/udp_cli.c b/src/vnet/udp/udp_cli.c
index 97760f4..3b7bb38 100644
--- a/src/vnet/udp/udp_cli.c
+++ b/src/vnet/udp/udp_cli.c
@@ -13,6 +13,9 @@
  * limitations under the License.
  */
 
+#include <vppinfra/error.h>
+#include <vppinfra/format.h>
+#include <vppinfra/format_table.h>
 #include <vnet/udp/udp.h>
 #include <vnet/session/session_types.h>
 
@@ -171,6 +174,96 @@
 };
 /* *INDENT-ON* */
 
+static void
+table_format_udp_port_ (vlib_main_t *vm, udp_main_t *um, table_t *t, int *c,
+			int port, int bind, int is_ip4)
+{
+  const udp_dst_port_info_t *pi = udp_get_dst_port_info (um, port, is_ip4);
+  if (!pi)
+    return;
+  if (bind && ~0 == pi->node_index)
+    return;
+  table_format_cell (t, *c, 0, "%d", pi->dst_port);
+  table_format_cell (t, *c, 1, is_ip4 ? "ip4" : "ip6");
+  table_format_cell (t, *c, 2, ~0 == pi->node_index ? "none" : "%U",
+		     format_vlib_node_name, vm, pi->node_index);
+  table_format_cell (t, *c, 3, "%s", pi->name);
+  (*c)++;
+}
+
+static void
+table_format_udp_port (vlib_main_t *vm, udp_main_t *um, table_t *t, int *c,
+		       int port, int bind, int ip4, int ip6)
+{
+  if (ip4)
+    table_format_udp_port_ (vm, um, t, c, port, bind, 1 /* is_ip4 */);
+  if (ip6)
+    table_format_udp_port_ (vm, um, t, c, port, bind, 0 /* is_ip4 */);
+}
+
+static clib_error_t *
+show_udp_ports (vlib_main_t *vm, unformat_input_t *input,
+		vlib_cli_command_t *cmd)
+{
+  table_t table = {}, *t = &table;
+  udp_main_t *um = &udp_main;
+  clib_error_t *err = 0;
+  int ip4 = 1, ip6 = 1;
+  int port = -1;
+  int bind = 1;
+  int c = 0;
+
+  while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+    {
+      if (unformat (input, "ip4"))
+	ip6 = 0;
+      else if (unformat (input, "ip6"))
+	ip4 = 0;
+      else if (unformat (input, "bind"))
+	bind = 1;
+      else if (unformat (input, "all"))
+	bind = 0;
+      else if (unformat (input, "%d", &port))
+	;
+      else
+	{
+	  err = clib_error_return (0, "unknown input `%U'",
+				   format_unformat_error, input);
+	  goto out;
+	}
+    }
+
+  table_add_header_col (t, 4, "port", "proto", "node", "desc");
+
+  if (port > 65535)
+    {
+      err = clib_error_return (0, "wrong port %d", port);
+      goto out;
+    }
+  else if (port < 0)
+    {
+      for (port = 0; port < 65536; port++)
+	table_format_udp_port (vm, um, t, &c, port, bind, ip4, ip6);
+    }
+  else
+    {
+      table_format_udp_port (vm, um, t, &c, port, bind, ip4, ip6);
+    }
+
+  vlib_cli_output (vm, "%U", format_table, t);
+
+out:
+  table_free (t);
+  return err;
+}
+
+VLIB_CLI_COMMAND (show_udp_ports_cmd, static) = {
+  .path = "show udp ports",
+  .function = show_udp_ports,
+  .short_help = "show udp ports [ip4|ip6] [bind|all|<port>]",
+  .is_mp_safe = 1,
+};
+
 /*
  * fd.io coding-style-patch-verification: ON
  *
