diff --git a/rib/readvertise/client-to-nlsr-readvertise-policy.cpp b/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
new file mode 100644
index 0000000..aba5fdb
--- /dev/null
+++ b/rib/readvertise/client-to-nlsr-readvertise-policy.cpp
@@ -0,0 +1,49 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017,  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 NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "client-to-nlsr-readvertise-policy.hpp"
+
+namespace nfd {
+namespace rib {
+
+ndn::optional<ReadvertiseAction>
+ClientToNlsrReadvertisePolicy::handleNewRoute(const RibRouteRef& ribRoute) const
+{
+  if (ribRoute.route->origin == ndn::nfd::ROUTE_ORIGIN_CLIENT) {
+    return ReadvertiseAction{ribRoute.entry->getName(), ndn::security::SigningInfo()};
+  }
+  else {
+    return ndn::nullopt;
+  }
+}
+
+time::milliseconds
+ClientToNlsrReadvertisePolicy::getRefreshInterval() const
+{
+  return time::seconds(3600);
+}
+
+} // namespace rib
+} // namespace nfd
diff --git a/rib/readvertise/client-to-nlsr-readvertise-policy.hpp b/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
new file mode 100644
index 0000000..af1481a
--- /dev/null
+++ b/rib/readvertise/client-to-nlsr-readvertise-policy.hpp
@@ -0,0 +1,54 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017,  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 NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_RIB_READVERTISE_CLIENT_TO_NLSR_READVERTISE_POLICY_HPP
+#define NFD_RIB_READVERTISE_CLIENT_TO_NLSR_READVERTISE_POLICY_HPP
+
+#include "readvertise-policy.hpp"
+
+namespace nfd {
+namespace rib {
+
+/** \brief a policy to readvertise routes registered by end hosts into NLSR
+ */
+class ClientToNlsrReadvertisePolicy : public ReadvertisePolicy
+{
+public:
+  /** \brief advertise if the route's origin is client
+   *
+   *  If the route origin is "client" (typically from auto prefix propagation), readvertise it
+   *  using the default signing identity.
+   */
+  ndn::optional<ReadvertiseAction>
+  handleNewRoute(const RibRouteRef& ribRoute) const override;
+
+  time::milliseconds
+  getRefreshInterval() const override;
+};
+
+} // namespace rib
+} // namespace nfd
+
+#endif // NFD_RIB_READVERTISE_CLIENT_TO_NLSR_READVERTISE_POLICY_HPP
diff --git a/rib/readvertise/readvertise-policy.hpp b/rib/readvertise/readvertise-policy.hpp
new file mode 100644
index 0000000..ebcc6c0
--- /dev/null
+++ b/rib/readvertise/readvertise-policy.hpp
@@ -0,0 +1,62 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2017,  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 NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD 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.
+ *
+ * NFD 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
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_RIB_READVERTISE_READVERTISE_POLICY_HPP
+#define NFD_RIB_READVERTISE_READVERTISE_POLICY_HPP
+
+#include "../rib.hpp"
+#include <ndn-cxx/security/signing-info.hpp>
+
+namespace nfd {
+namespace rib {
+
+/** \brief a decision made by readvertise policy
+ */
+struct ReadvertiseAction
+{
+  Name prefix; ///< the prefix that should be readvertised
+  ndn::security::SigningInfo signer; ///< credentials for command signing
+};
+
+/** \brief a policy to decide whether to readvertise a route, and what prefix to readvertise
+ */
+class ReadvertisePolicy : noncopyable
+{
+public:
+  /** \brief decide whether to readvertise a route, and what prefix to readvertise
+   */
+  virtual ndn::optional<ReadvertiseAction>
+  handleNewRoute(const RibRouteRef& ribRoute) const = 0;
+
+  /** \return how often readvertisements made by this policy should be refreshed.
+   */
+  virtual time::milliseconds
+  getRefreshInterval() const = 0;
+};
+
+} // namespace rib
+} // namespace nfd
+
+#endif // NFD_RIB_READVERTISE_READVERTISE_POLICY_HPP
diff --git a/rib/readvertise/readvertised-route.hpp b/rib/readvertise/readvertised-route.hpp
index 1a896b1..0692ccd 100644
--- a/rib/readvertise/readvertised-route.hpp
+++ b/rib/readvertise/readvertised-route.hpp
@@ -48,19 +48,13 @@
   mutable scheduler::ScopedEventId retryEvt; ///< retry or refresh event
 };
 
-/** \brief a less than comparison functor for ReadvertisedRoute prefix
- */
-class ReadvertisedRoutePrefixCompare
+inline bool
+operator<(const ReadvertisedRoute& lhs, const ReadvertisedRoute& rhs)
 {
-public:
-  bool
-  operator()(const ReadvertisedRoute& lhs, const ReadvertisedRoute& rhs)
-  {
-    return lhs.prefix < rhs.prefix;
-  }
-};
+  return lhs.prefix < rhs.prefix;
+}
 
-using ReadvertisedRouteContainer = std::set<ReadvertisedRoute, ReadvertisedRoutePrefixCompare>;
+using ReadvertisedRouteContainer = std::set<ReadvertisedRoute>;
 
 } // namespace rib
 } // namespace nfd
