diff --git a/core/program-options-ext.cpp b/core/program-options-ext.cpp
new file mode 100644
index 0000000..5667aab
--- /dev/null
+++ b/core/program-options-ext.cpp
@@ -0,0 +1,45 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014-2022,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of ndn-tools (Named Data Networking Essential Tools).
+ * See AUTHORS.md for complete list of ndn-tools authors and contributors.
+ *
+ * ndn-tools is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * ndn-tools, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "core/program-options-ext.hpp"
+
+namespace ndn {
+
+void
+validate(boost::any& v, const std::vector<std::string>& values, Name*, int)
+{
+  using namespace boost::program_options;
+
+  validators::check_first_occurrence(v);
+  const std::string& s = validators::get_single_string(values);
+
+  try {
+    v = Name(s);
+  } catch (const Name::Error&) {
+    throw invalid_option_value(s);
+  }
+}
+
+} // namespace ndn
diff --git a/core/program-options-ext.hpp b/core/program-options-ext.hpp
new file mode 100644
index 0000000..16b4e41
--- /dev/null
+++ b/core/program-options-ext.hpp
@@ -0,0 +1,42 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2014-2022,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of ndn-tools (Named Data Networking Essential Tools).
+ * See AUTHORS.md for complete list of ndn-tools authors and contributors.
+ *
+ * ndn-tools is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * ndn-tools, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NDN_TOOLS_CORE_PROGRAM_OPTIONS_EXT_HPP
+#define NDN_TOOLS_CORE_PROGRAM_OPTIONS_EXT_HPP
+
+#include <ndn-cxx/name.hpp>
+#include <boost/program_options/value_semantic.hpp>
+
+namespace ndn {
+
+/**
+ * @brief Provide a Boost.Program_options custom validator for ndn::Name type.
+ */
+void
+validate(boost::any& v, const std::vector<std::string>& values, Name*, int);
+
+} // namespace ndn
+
+#endif // NDN_TOOLS_CORE_PROGRAM_OPTIONS_EXT_HPP
diff --git a/manpages/ndnpeek.rst b/manpages/ndnpeek.rst
index 2b50603..9d42a7a 100644
--- a/manpages/ndnpeek.rst
+++ b/manpages/ndnpeek.rst
@@ -28,8 +28,9 @@
 ``-f, --fresh``
   If specified, include ``MustBeFresh`` element in the Interest packet.
 
-``--link-file <file>``
-  Read Link object from ``file`` and add it as ``ForwardingHint`` to the Interest packet.
+``-F, --fwhint <name>``
+  Add a delegation name to the ``ForwardingHint`` of the Interest packet.
+  This option may be repeated to specify multiple delegation names.
 
 ``-l, --lifetime <lifetime>``
   Set ``lifetime`` (in milliseconds) as the ``InterestLifetime``.
diff --git a/tests/peek/ndnpeek.t.cpp b/tests/peek/ndnpeek.t.cpp
index 9951e5c..336b1de 100644
--- a/tests/peek/ndnpeek.t.cpp
+++ b/tests/peek/ndnpeek.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020,  Arizona Board of Regents.
+ * Copyright (c) 2014-2022,  Arizona Board of Regents.
  *
  * This file is part of ndn-tools (Named Data Networking Essential Tools).
  * See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -155,12 +155,13 @@
 
   OutputCheck::checkOutput(output, *data);
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
-  BOOST_CHECK_EQUAL(face.sentInterests.back().getCanBePrefix(), false);
-  BOOST_CHECK_EQUAL(face.sentInterests.back().getMustBeFresh(), false);
-  BOOST_CHECK_EQUAL(face.sentInterests.back().getForwardingHint().empty(), true);
-  BOOST_CHECK_EQUAL(face.sentInterests.back().getInterestLifetime(), DEFAULT_INTEREST_LIFETIME);
-  BOOST_CHECK(face.sentInterests.back().getHopLimit() == nullopt);
-  BOOST_CHECK(!face.sentInterests.back().hasApplicationParameters());
+  const auto& interest = face.sentInterests.back();
+  BOOST_CHECK_EQUAL(interest.getCanBePrefix(), false);
+  BOOST_CHECK_EQUAL(interest.getMustBeFresh(), false);
+  BOOST_CHECK_EQUAL(interest.getForwardingHint().empty(), true);
+  BOOST_CHECK_EQUAL(interest.getInterestLifetime(), DEFAULT_INTEREST_LIFETIME);
+  BOOST_CHECK(interest.getHopLimit() == nullopt);
+  BOOST_CHECK(!interest.hasApplicationParameters());
   BOOST_CHECK(peek->getResult() == NdnPeek::Result::DATA);
 }
 
@@ -169,6 +170,7 @@
   auto options = OutputCheck::makeOptions();
   options.canBePrefix = true;
   options.mustBeFresh = true;
+  options.forwardingHint.emplace_back("/fh");
   options.interestLifetime = 200_ms;
   options.hopLimit = 64;
   initialize(options);
@@ -187,12 +189,14 @@
 
   OutputCheck::checkOutput(output, *data);
   BOOST_REQUIRE_EQUAL(face.sentInterests.size(), 1);
-  BOOST_CHECK_EQUAL(face.sentInterests.back().getCanBePrefix(), true);
-  BOOST_CHECK_EQUAL(face.sentInterests.back().getMustBeFresh(), true);
-  BOOST_CHECK_EQUAL(face.sentInterests.back().getForwardingHint().empty(), true);
-  BOOST_CHECK_EQUAL(face.sentInterests.back().getInterestLifetime(), 200_ms);
-  BOOST_CHECK(face.sentInterests.back().getHopLimit() == 64);
-  BOOST_CHECK(!face.sentInterests.back().hasApplicationParameters());
+  const auto& interest = face.sentInterests.back();
+  BOOST_CHECK_EQUAL(interest.getCanBePrefix(), true);
+  BOOST_CHECK_EQUAL(interest.getMustBeFresh(), true);
+  BOOST_TEST(interest.getForwardingHint() == std::vector<Name>({"/fh"}),
+             boost::test_tools::per_element());
+  BOOST_CHECK_EQUAL(interest.getInterestLifetime(), 200_ms);
+  BOOST_CHECK(interest.getHopLimit() == 64);
+  BOOST_CHECK(!interest.hasApplicationParameters());
   BOOST_CHECK(peek->getResult() == NdnPeek::Result::DATA);
 }
 
diff --git a/tools/peek/ndnpeek/main.cpp b/tools/peek/ndnpeek/main.cpp
index ff9f2af..22523b7 100644
--- a/tools/peek/ndnpeek/main.cpp
+++ b/tools/peek/ndnpeek/main.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,6 +28,7 @@
  */
 
 #include "ndnpeek.hpp"
+#include "core/program-options-ext.hpp"
 #include "core/version.hpp"
 
 #include <ndn-cxx/util/io.hpp>
@@ -85,7 +86,8 @@
   interestOptDesc.add_options()
     ("prefix,P",   po::bool_switch(&options.canBePrefix), "set CanBePrefix")
     ("fresh,f",    po::bool_switch(&options.mustBeFresh), "set MustBeFresh")
-    ("link-file",  po::value<std::string>(), "set ForwardingHint from a raw binary file")
+    ("fwhint,F",   po::value<std::vector<Name>>(&options.forwardingHint)->composing(),
+                   "add ForwardingHint delegation name")
     ("lifetime,l", po::value<time::milliseconds::rep>()->default_value(options.interestLifetime.count()),
                    "set InterestLifetime, in milliseconds")
     ("hop-limit,H",     po::value<int>(), "set HopLimit")
@@ -98,7 +100,7 @@
 
   po::options_description hiddenOptDesc;
   hiddenOptDesc.add_options()
-    ("name", po::value<std::string>(), "Interest name");
+    ("name", po::value<Name>(&options.name), "Interest name");
 
   po::options_description optDesc;
   optDesc.add(visibleOptDesc).add(hiddenOptDesc);
@@ -132,14 +134,6 @@
     return 2;
   }
 
-  try {
-    options.name = vm["name"].as<std::string>();
-  }
-  catch (const Name::Error& e) {
-    std::cerr << "ERROR: invalid name: " << e.what() << std::endl;
-    return 2;
-  }
-
   if (vm.count("timeout") > 0) {
     options.timeout = time::milliseconds(vm["timeout"].as<time::milliseconds::rep>());
     if (*options.timeout < 0_ms) {
@@ -148,19 +142,6 @@
     }
   }
 
-  if (vm.count("link-file") > 0) {
-    auto filename = vm["link-file"].as<std::string>();
-    std::ifstream linkFile = openBinaryFile(filename);
-    if (!linkFile) {
-      return 2;
-    }
-    options.link = io::load<Link>(linkFile, io::NO_ENCODING);
-    if (!options.link) {
-      std::cerr << "ERROR: cannot parse a valid Link object from file '" << filename << "'" << std::endl;
-      return 2;
-    }
-  }
-
   options.interestLifetime = time::milliseconds(vm["lifetime"].as<time::milliseconds::rep>());
   if (options.interestLifetime < 0_ms) {
     std::cerr << "ERROR: InterestLifetime cannot be negative" << std::endl;
diff --git a/tools/peek/ndnpeek/ndnpeek.cpp b/tools/peek/ndnpeek/ndnpeek.cpp
index cc9286c..01fd6de 100644
--- a/tools/peek/ndnpeek/ndnpeek.cpp
+++ b/tools/peek/ndnpeek/ndnpeek.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -63,9 +63,7 @@
   Interest interest(m_options.name);
   interest.setCanBePrefix(m_options.canBePrefix);
   interest.setMustBeFresh(m_options.mustBeFresh);
-  if (m_options.link) {
-    interest.setForwardingHint(m_options.link->getDelegationList());
-  }
+  interest.setForwardingHint(m_options.forwardingHint);
   interest.setInterestLifetime(m_options.interestLifetime);
   interest.setHopLimit(m_options.hopLimit);
   if (m_options.applicationParameters) {
diff --git a/tools/peek/ndnpeek/ndnpeek.hpp b/tools/peek/ndnpeek/ndnpeek.hpp
index afb0ea7..ce37712 100644
--- a/tools/peek/ndnpeek/ndnpeek.hpp
+++ b/tools/peek/ndnpeek/ndnpeek.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -47,7 +47,7 @@
   Name name;
   bool canBePrefix = false;
   bool mustBeFresh = false;
-  shared_ptr<Link> link;
+  std::vector<Name> forwardingHint;
   time::milliseconds interestLifetime = DEFAULT_INTEREST_LIFETIME;
   optional<uint8_t> hopLimit;
   shared_ptr<Buffer> applicationParameters;
