diff --git a/rib/readvertise/nfd-rib-readvertise-destination.cpp b/rib/readvertise/nfd-rib-readvertise-destination.cpp
index dcf3d93..3d19004 100644
--- a/rib/readvertise/nfd-rib-readvertise-destination.cpp
+++ b/rib/readvertise/nfd-rib-readvertise-destination.cpp
@@ -24,61 +24,74 @@
  */
 
 #include "nfd-rib-readvertise-destination.hpp"
+#include "core/logger.hpp"
+
+#include <ndn-cxx/mgmt/nfd/command-options.hpp>
+#include <ndn-cxx/mgmt/nfd/control-command.hpp>
+#include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
+#include <ndn-cxx/mgmt/nfd/control-response.hpp>
 
 namespace nfd {
 namespace rib {
 
+NFD_LOG_INIT("NfdRibReadvertiseDestination");
+
+using ndn::nfd::CommandOptions;
 using ndn::nfd::ControlParameters;
 using ndn::nfd::ControlResponse;
 
 NfdRibReadvertiseDestination::NfdRibReadvertiseDestination(ndn::nfd::Controller& controller,
-                                                           const ndn::Name& commandPrefix,
+                                                           const Name& commandPrefix,
                                                            Rib& rib)
   : m_controller(controller)
   , m_commandPrefix(commandPrefix)
 {
-  m_ribAddConn = rib.afterInsertEntry.connect(
-    std::bind(&NfdRibReadvertiseDestination::handleRibAdd, this, _1));
-  m_ribRemoveConn = rib.afterEraseEntry.connect(
-    std::bind(&NfdRibReadvertiseDestination::handleRibRemove, this, _1));
+  m_ribInsertConn = rib.afterInsertEntry.connect(
+    std::bind(&NfdRibReadvertiseDestination::handleRibInsert, this, _1));
+  m_ribEraseConn = rib.afterEraseEntry.connect(
+    std::bind(&NfdRibReadvertiseDestination::handleRibErase, this, _1));
 }
 
 void
-NfdRibReadvertiseDestination::advertise(nfd::rib::ReadvertisedRoute& rr,
+NfdRibReadvertiseDestination::advertise(const nfd::rib::ReadvertisedRoute& rr,
                                         std::function<void()> successCb,
                                         std::function<void(const std::string&)> failureCb)
 {
-  m_controller.start<ndn::nfd::RibRegisterCommand>(ControlParameters()
-                                                   .setName(rr.getPrefix())
-                                                   .setOrigin(ndn::nfd::ROUTE_ORIGIN_CLIENT),
+  NFD_LOG_DEBUG("advertise " << rr.prefix << " on " << m_commandPrefix);
+
+  m_controller.start<ndn::nfd::RibRegisterCommand>(
+    ControlParameters().setName(rr.prefix).setOrigin(ndn::nfd::ROUTE_ORIGIN_CLIENT),
     [=] (const ControlParameters& cp) { successCb(); },
-    [=] (const ControlResponse& cr) { failureCb(cr.getText()); });
+    [=] (const ControlResponse& cr) { failureCb(cr.getText()); },
+    CommandOptions().setPrefix(m_commandPrefix).setSigningInfo(rr.signer));
 }
 
 void
-NfdRibReadvertiseDestination::withdraw(nfd::rib::ReadvertisedRoute& rr,
+NfdRibReadvertiseDestination::withdraw(const nfd::rib::ReadvertisedRoute& rr,
                                        std::function<void()> successCb,
                                        std::function<void(const std::string&)> failureCb)
 {
-  m_controller.start<ndn::nfd::RibUnregisterCommand>(ControlParameters()
-                                                     .setName(rr.getPrefix())
-                                                     .setOrigin(ndn::nfd::ROUTE_ORIGIN_CLIENT),
+  NFD_LOG_DEBUG("withdraw " << rr.prefix << " on " << m_commandPrefix);
+
+  m_controller.start<ndn::nfd::RibUnregisterCommand>(
+    ControlParameters().setName(rr.prefix).setOrigin(ndn::nfd::ROUTE_ORIGIN_CLIENT),
     [=] (const ControlParameters& cp) { successCb(); },
-    [=] (const ControlResponse& cr) { failureCb(cr.getText()); });
+    [=] (const ControlResponse& cr) { failureCb(cr.getText()); },
+    CommandOptions().setPrefix(m_commandPrefix).setSigningInfo(rr.signer));
 }
 
 void
-NfdRibReadvertiseDestination::handleRibAdd(const ndn::Name& name)
+NfdRibReadvertiseDestination::handleRibInsert(const ndn::Name& name)
 {
-  if (name == m_commandPrefix) {
+  if (name.isPrefixOf(m_commandPrefix)) {
     setAvailability(true);
   }
 }
 
 void
-NfdRibReadvertiseDestination::handleRibRemove(const ndn::Name& name)
+NfdRibReadvertiseDestination::handleRibErase(const ndn::Name& name)
 {
-  if (name == m_commandPrefix) {
+  if (name.isPrefixOf(m_commandPrefix)) {
     setAvailability(false);
   }
 }
diff --git a/rib/readvertise/nfd-rib-readvertise-destination.hpp b/rib/readvertise/nfd-rib-readvertise-destination.hpp
index b737d3a..ec71d98 100644
--- a/rib/readvertise/nfd-rib-readvertise-destination.hpp
+++ b/rib/readvertise/nfd-rib-readvertise-destination.hpp
@@ -26,14 +26,10 @@
 #ifndef NFD_RIB_READVERTISE_NFD_RIB_READVERTISE_DESTINATION_HPP
 #define NFD_RIB_READVERTISE_NFD_RIB_READVERTISE_DESTINATION_HPP
 
-#include "readvertised-route.hpp"
 #include "readvertise-destination.hpp"
+#include "../rib.hpp"
 
-#include <ndn-cxx/mgmt/nfd/command-options.hpp>
 #include <ndn-cxx/mgmt/nfd/controller.hpp>
-#include <ndn-cxx/mgmt/nfd/control-command.hpp>
-#include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
-#include <ndn-cxx/mgmt/nfd/control-response.hpp>
 
 namespace nfd {
 namespace rib {
@@ -44,36 +40,36 @@
 {
 public:
   NfdRibReadvertiseDestination(ndn::nfd::Controller& controller,
-                               const ndn::Name& commandPrefix,
+                               const Name& commandPrefix,
                                Rib& rib);
 
   /** \brief add a name prefix into NFD RIB
    */
   void
-  advertise(nfd::rib::ReadvertisedRoute& rr,
+  advertise(const ReadvertisedRoute& rr,
             std::function<void()> successCb,
             std::function<void(const std::string&)> failureCb) override;
 
   /** \brief remove a name prefix from NFD RIB
    */
   void
-  withdraw(nfd::rib::ReadvertisedRoute& rr,
+  withdraw(const ReadvertisedRoute& rr,
            std::function<void()> successCb,
            std::function<void(const std::string&)> failureCb) override;
 
 private:
   void
-  handleRibAdd(const ndn::Name& name);
+  handleRibInsert(const Name& name);
 
   void
-  handleRibRemove(const ndn::Name& name);
+  handleRibErase(const Name& name);
 
 private:
   ndn::nfd::Controller& m_controller;
   Name m_commandPrefix;
 
-  signal::ScopedConnection m_ribAddConn;
-  signal::ScopedConnection m_ribRemoveConn;
+  signal::ScopedConnection m_ribInsertConn;
+  signal::ScopedConnection m_ribEraseConn;
 };
 
 } // namespace rib
diff --git a/rib/readvertise/readvertise-destination.cpp b/rib/readvertise/readvertise-destination.cpp
index c064b23..3c577c7 100644
--- a/rib/readvertise/readvertise-destination.cpp
+++ b/rib/readvertise/readvertise-destination.cpp
@@ -24,14 +24,23 @@
  */
 
 #include "readvertise-destination.hpp"
+#include "core/logger.hpp"
 
 namespace nfd {
 namespace rib {
 
+NFD_LOG_INIT("ReadvertiseDestination");
+
 void
 ReadvertiseDestination::setAvailability(bool isAvailable)
 {
   if (m_isAvailable != isAvailable) {
+    if (isAvailable) {
+      NFD_LOG_DEBUG("Destination has become available.");
+    }
+    else {
+      NFD_LOG_DEBUG("Destinatino has become unavailable.");
+    }
     m_isAvailable = isAvailable;
     afterAvailabilityChange(isAvailable);
   }
diff --git a/rib/readvertise/readvertise-destination.hpp b/rib/readvertise/readvertise-destination.hpp
index 204d2b6..1bfaeb7 100644
--- a/rib/readvertise/readvertise-destination.hpp
+++ b/rib/readvertise/readvertise-destination.hpp
@@ -28,8 +28,6 @@
 
 #include "readvertised-route.hpp"
 
-#include <ndn-cxx/mgmt/nfd/controller.hpp>
-
 namespace nfd {
 namespace rib {
 
@@ -42,12 +40,12 @@
   ~ReadvertiseDestination() = default;
 
   virtual void
-  advertise(nfd::rib::ReadvertisedRoute& rr,
+  advertise(const ReadvertisedRoute& rr,
             std::function<void()> successCb,
             std::function<void(const std::string&)> failureCb) = 0;
 
   virtual void
-  withdraw(nfd::rib::ReadvertisedRoute& rr,
+  withdraw(const ReadvertisedRoute& rr,
            std::function<void()> successCb,
            std::function<void(const std::string&)> failureCb) = 0;
 
@@ -64,8 +62,7 @@
 public:
   /** \brief signals when the destination becomes available or unavailable
    */
-  ndn::util::signal::Signal<ReadvertiseDestination, bool>
-  afterAvailabilityChange;
+  signal::Signal<ReadvertiseDestination, bool> afterAvailabilityChange;
 
 private:
   bool m_isAvailable = false;
diff --git a/rib/readvertise/readvertised-route.cpp b/rib/readvertise/readvertised-route.cpp
index 719ab46..7028697 100644
--- a/rib/readvertise/readvertised-route.cpp
+++ b/rib/readvertise/readvertised-route.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+ * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -24,23 +24,16 @@
  */
 
 #include "readvertised-route.hpp"
+#include "core/random.hpp"
 
 namespace nfd {
 namespace rib {
 
-ReadvertisedRoute::ReadvertisedRoute(const ndn::Name& prefix, const ndn::security::SigningInfo& signer,
-                                     const std::vector<RibRouteRef>& routes)
-  : m_prefix(prefix)
-  , m_signer(signer)
-  , m_ribRoutes(routes)
+ReadvertisedRoute::ReadvertisedRoute(const Name& prefix)
+  : prefix(prefix)
+  , nRibRoutes(0)
 {
 }
 
-bool
-operator<(const ReadvertisedRoute& lhs, const ReadvertisedRoute& rhs)
-{
-  return lhs.getPrefix() < rhs.getPrefix();
-}
-
 } // namespace rib
 } // namespace nfd
diff --git a/rib/readvertise/readvertised-route.hpp b/rib/readvertise/readvertised-route.hpp
index 702974c..1a896b1 100644
--- a/rib/readvertise/readvertised-route.hpp
+++ b/rib/readvertise/readvertised-route.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2016,  Regents of the University of California,
+ * Copyright (c) 2014-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -26,55 +26,41 @@
 #ifndef NFD_RIB_READVERTISE_READVERTISED_ROUTE_HPP
 #define NFD_RIB_READVERTISE_READVERTISED_ROUTE_HPP
 
-#include "../rib.hpp"
+#include "core/scheduler.hpp"
 #include <ndn-cxx/security/signing-info.hpp>
 
 namespace nfd {
 namespace rib {
 
-/** \brief a readvertised route
+/** \brief state of a readvertised route
  */
-class ReadvertisedRoute
+class ReadvertisedRoute : noncopyable
 {
 public:
-  /** \brief standard constructor
-   */
-  ReadvertisedRoute(const ndn::Name& prefix, const ndn::security::SigningInfo& signer,
-                    const std::vector<RibRouteRef>& routes);
+  explicit
+  ReadvertisedRoute(const Name& prefix);
 
-  /** \return name prefix being advertised
-   */
-  const Name&
-  getPrefix() const
-  {
-    return m_prefix;
-  }
-
-  /** \return signer
-   */
-  const ndn::security::SigningInfo&
-  getSigner() const
-  {
-    return m_signer;
-  }
-
-  /** \return routes that caused the creation of this readvertised route
-   */
-  const std::vector<RibRouteRef>&
-  getRibRoutes() const
-  {
-    return m_ribRoutes;
-  }
-
-
-private:
-  Name m_prefix;
-  ndn::security::SigningInfo m_signer;
-  std::vector<RibRouteRef> m_ribRoutes;
+public:
+  Name prefix; ///< readvertised prefix
+  mutable ndn::security::SigningInfo signer; ///< signer for commands
+  mutable size_t nRibRoutes; ///< number of RIB routes that cause the readvertisement
+  mutable time::milliseconds retryDelay; ///< retry interval (not used for refresh)
+  mutable scheduler::ScopedEventId retryEvt; ///< retry or refresh event
 };
 
-bool
-operator<(const ReadvertisedRoute& lhs, const ReadvertisedRoute& rhs);
+/** \brief a less than comparison functor for ReadvertisedRoute prefix
+ */
+class ReadvertisedRoutePrefixCompare
+{
+public:
+  bool
+  operator()(const ReadvertisedRoute& lhs, const ReadvertisedRoute& rhs)
+  {
+    return lhs.prefix < rhs.prefix;
+  }
+};
+
+using ReadvertisedRouteContainer = std::set<ReadvertisedRoute, ReadvertisedRoutePrefixCompare>;
 
 } // namespace rib
 } // namespace nfd
diff --git a/tests/rib/readvertise/nfd-rib-readvertise-destination.t.cpp b/tests/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
index 61cfb62..75e8cfa 100644
--- a/tests/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
+++ b/tests/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
@@ -23,15 +23,13 @@
  * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "tests/test-common.hpp"
-
 #include "rib/readvertise/nfd-rib-readvertise-destination.hpp"
 
+#include "tests/test-common.hpp"
+#include "tests/identity-management-fixture.hpp"
 #include <ndn-cxx/util/dummy-client-face.hpp>
 #include <ndn-cxx/security/signing-info.hpp>
 
-#include "tests/identity-management-fixture.hpp"
-
 namespace nfd {
 namespace rib {
 namespace tests {
@@ -46,8 +44,8 @@
     , nFailureCallbacks(0)
     , face(getGlobalIoService(), m_keyChain, {true, false})
     , controller(face, m_keyChain)
-    , dest(controller, Name("/localhop/nfd/rib/readvertise"), rib)
-    , successCallback([this] () {
+    , dest(controller, Name("/localhost/nlsr"), rib)
+    , successCallback([this] {
         nSuccessCallbacks++;
       })
     , failureCallback([this] (const std::string& str) {
@@ -69,6 +67,7 @@
   std::function<void(const std::string&)> failureCallback;
 };
 
+BOOST_AUTO_TEST_SUITE(Readvertise)
 BOOST_FIXTURE_TEST_SUITE(TestNfdRibReadvertiseDestination, NfdRibReadvertiseDestinationFixture)
 
 class AdvertiseSuccessScenario
@@ -118,16 +117,14 @@
   }
 };
 
-typedef boost::mpl::vector<AdvertiseSuccessScenario, AdvertiseFailureScenario> AdvertiseScenarios;
+using AdvertiseScenarios = boost::mpl::vector<AdvertiseSuccessScenario, AdvertiseFailureScenario>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Advertise, Scenario, AdvertiseScenarios)
 {
   Scenario scenario;
   Name prefix("/ndn/memphis/test");
-  ndn::security::SigningInfo secInfo;
-  std::vector<RibRouteRef> routes;
-  ReadvertisedRoute rr(prefix, secInfo, routes);
-  const Name RIB_REGISTER_COMMAND_PREFIX("/localhost/nfd/rib/register");
+  ReadvertisedRoute rr(prefix);
+  const Name RIB_REGISTER_COMMAND_PREFIX("/localhost/nlsr/rib/register");
 
   dest.advertise(rr, successCallback, failureCallback);
   advanceClocks(time::milliseconds(100));
@@ -198,16 +195,14 @@
   }
 };
 
-typedef boost::mpl::vector<WithdrawSuccessScenario, WithdrawFailureScenario> WithdrawScenarios;
+using WithdrawScenarios = boost::mpl::vector<WithdrawSuccessScenario, WithdrawFailureScenario>;
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(Withdraw, Scenario, WithdrawScenarios)
 {
   Scenario scenario;
   Name prefix("/ndn/memphis/test");
-  ndn::security::SigningInfo secInfo;
-  std::vector<RibRouteRef> routes;
-  ReadvertisedRoute rr(prefix, secInfo, routes);
-  const Name RIB_UNREGISTER_COMMAND_PREFIX("/localhost/nfd/rib/unregister");
+  ReadvertisedRoute rr(prefix);
+  const Name RIB_UNREGISTER_COMMAND_PREFIX("/localhost/nlsr/rib/unregister");
 
   dest.withdraw(rr, successCallback, failureCallback);
   this->advanceClocks(time::milliseconds(10));
@@ -235,28 +230,28 @@
 BOOST_AUTO_TEST_CASE(DestinationAvailability)
 {
   std::vector<bool> availabilityChangeHistory;
-  Name prefix("/localhop/nfd/rib/readvertise");
+  Name commandPrefix("/localhost/nlsr");
   Route route;
 
   dest.afterAvailabilityChange.connect(
     std::bind(&std::vector<bool>::push_back, &availabilityChangeHistory, _1));
   BOOST_CHECK_EQUAL(dest.isAvailable(), false);
 
-  rib.insert(prefix, route);
-  this->advanceClocks(time::milliseconds(100), 1);
+  rib.insert(commandPrefix, route);
+  this->advanceClocks(time::milliseconds(100));
   BOOST_CHECK_EQUAL(dest.isAvailable(), true);
-  BOOST_CHECK_EQUAL(availabilityChangeHistory.size(), 1);
+  BOOST_REQUIRE_EQUAL(availabilityChangeHistory.size(), 1);
   BOOST_CHECK_EQUAL(availabilityChangeHistory.back(), true);
 
-  rib.erase(prefix, route);
-
-  this->advanceClocks(time::milliseconds(100), 1);
+  rib.erase(commandPrefix, route);
+  this->advanceClocks(time::milliseconds(100));
   BOOST_CHECK_EQUAL(dest.isAvailable(), false);
-  BOOST_CHECK_EQUAL(availabilityChangeHistory.size(), 2);
+  BOOST_REQUIRE_EQUAL(availabilityChangeHistory.size(), 2);
   BOOST_CHECK_EQUAL(availabilityChangeHistory.back(), false);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestNfdRibReadvertiseDestination
+BOOST_AUTO_TEST_SUITE_END() // Readvertise
 
 } // namespace tests
 } // namespace rib
