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
