diff --git a/daemon/fw/available-strategies.cpp b/daemon/fw/available-strategies.cpp
index c6f7d42..45be270 100644
--- a/daemon/fw/available-strategies.cpp
+++ b/daemon/fw/available-strategies.cpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  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
+ * Copyright (c) 2014,  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.
@@ -20,12 +21,13 @@
  *
  * 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 "best-route-strategy.hpp"
 #include "broadcast-strategy.hpp"
 #include "client-control-strategy.hpp"
 #include "ncc-strategy.hpp"
+#include "best-route-strategy2.hpp"
 
 namespace nfd {
 namespace fw {
@@ -33,7 +35,7 @@
 shared_ptr<Strategy>
 makeDefaultStrategy(Forwarder& forwarder)
 {
-  return make_shared<BestRouteStrategy>(ref(forwarder));
+  return make_shared<BestRouteStrategy2>(ref(forwarder));
 }
 
 template<typename S>
@@ -53,6 +55,7 @@
   installStrategy<BroadcastStrategy>(forwarder);
   installStrategy<ClientControlStrategy>(forwarder);
   installStrategy<NccStrategy>(forwarder);
+  installStrategy<BestRouteStrategy2>(forwarder);
 }
 
 } // namespace fw
diff --git a/daemon/fw/best-route-strategy.cpp b/daemon/fw/best-route-strategy.cpp
index 7e91df3..f64bb66 100644
--- a/daemon/fw/best-route-strategy.cpp
+++ b/daemon/fw/best-route-strategy.cpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  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
+ * Copyright (c) 2014,  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.
@@ -20,14 +21,14 @@
  *
  * 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 "best-route-strategy.hpp"
 
 namespace nfd {
 namespace fw {
 
-const Name BestRouteStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/best-route");
+const Name BestRouteStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/best-route/%FD%01");
 
 BestRouteStrategy::BestRouteStrategy(Forwarder& forwarder, const Name& name)
   : Strategy(forwarder, name)
diff --git a/daemon/fw/best-route-strategy.hpp b/daemon/fw/best-route-strategy.hpp
index d7737b3..aa11567 100644
--- a/daemon/fw/best-route-strategy.hpp
+++ b/daemon/fw/best-route-strategy.hpp
@@ -1,11 +1,12 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014  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
+ * Copyright (c) 2014,  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.
@@ -20,7 +21,7 @@
  *
  * 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_DAEMON_FW_BEST_ROUTE_STRATEGY_HPP
 #define NFD_DAEMON_FW_BEST_ROUTE_STRATEGY_HPP
@@ -30,9 +31,16 @@
 namespace nfd {
 namespace fw {
 
-/** \class BestRouteStrategy
- *  \brief a forwarding strategy that forwards Interest
- *         to the first nexthop
+/** \brief Best Route strategy version 1
+ *
+ *  This strategy forwards a new Interest to the lowest-cost nexthop
+ *  that is not same as the downstream, and does not violate scope.
+ *  Subsequent similar Interests or consumer retransmissions are suppressed
+ *  until after InterestLifetime expiry.
+ *
+ *  \deprecated This strategy is superceded by Best Route strategy version 2,
+ *              which allows consumer retransmissions. This version is kept for
+ *              comparison purposes and is not recommended for general usage.
  */
 class BestRouteStrategy : public Strategy
 {
diff --git a/daemon/fw/best-route-strategy2.cpp b/daemon/fw/best-route-strategy2.cpp
new file mode 100644
index 0000000..58300fe
--- /dev/null
+++ b/daemon/fw/best-route-strategy2.cpp
@@ -0,0 +1,175 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014,  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 "best-route-strategy2.hpp"
+#include "core/logger.hpp"
+
+namespace nfd {
+namespace fw {
+
+NFD_LOG_INIT("BestRouteStrategy2");
+
+/// \todo set to ndn:/localhost/nfd/strategy/best-route/%FD%02 after #1893 completion
+const Name BestRouteStrategy2::STRATEGY_NAME("ndn:/localhost/nfd/strategy/best-route");
+/// \todo don't use fixed interval; make it adaptive or use exponential back-off #1913
+const time::milliseconds BestRouteStrategy2::MIN_RETRANSMISSION_INTERVAL(100);
+
+BestRouteStrategy2::BestRouteStrategy2(Forwarder& forwarder, const Name& name)
+  : Strategy(forwarder, name)
+{
+}
+
+/** \brief determines whether a NextHop is eligible
+ *  \param currentDownstream incoming FaceId of current Interest
+ *  \param wantUnused if true, NextHop must not have unexpired OutRecord
+ *  \param now time::steady_clock::now(), ignored if !wantUnused
+ */
+static inline bool
+predicate_NextHop_eligible(const shared_ptr<pit::Entry>& pitEntry,
+  const fib::NextHop& nexthop, FaceId currentDownstream,
+  bool wantUnused = false,
+  time::steady_clock::TimePoint now = time::steady_clock::TimePoint::min())
+{
+  shared_ptr<Face> upstream = nexthop.getFace();
+
+  // upstream is current downstream
+  if (upstream->getId() == currentDownstream)
+    return false;
+
+  // forwarding would violate scope
+  if (pitEntry->violatesScope(*upstream))
+    return false;
+
+  if (wantUnused) {
+    // NextHop must not have unexpired OutRecord
+    pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(upstream);
+    if (outRecord != pitEntry->getOutRecords().end() &&
+        outRecord->getExpiry() > now) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
+static inline bool
+compare_OutRecord_lastRenewed(const pit::OutRecord& a, const pit::OutRecord& b)
+{
+  return a.getLastRenewed() < b.getLastRenewed();
+}
+
+/** \brief pick an eligible NextHop with earliest OutRecord
+ *  \note It is assumed that every nexthop has an OutRecord
+ */
+static inline fib::NextHopList::const_iterator
+findEligibleNextHopWithEarliestOutRecord(const shared_ptr<pit::Entry>& pitEntry,
+                                         const fib::NextHopList& nexthops,
+                                         FaceId currentDownstream)
+{
+  fib::NextHopList::const_iterator found = nexthops.end();
+  time::steady_clock::TimePoint earliestRenewed = time::steady_clock::TimePoint::max();
+  for (fib::NextHopList::const_iterator it = nexthops.begin(); it != nexthops.end(); ++it) {
+    if (!predicate_NextHop_eligible(pitEntry, *it, currentDownstream))
+      continue;
+    pit::OutRecordCollection::const_iterator outRecord = pitEntry->getOutRecord(it->getFace());
+    BOOST_ASSERT(outRecord != pitEntry->getOutRecords().end());
+    if (outRecord->getLastRenewed() < earliestRenewed) {
+      found = it;
+      earliestRenewed = outRecord->getLastRenewed();
+    }
+  }
+  return found;
+}
+
+void
+BestRouteStrategy2::afterReceiveInterest(const Face& inFace,
+                                         const Interest& interest,
+                                         shared_ptr<fib::Entry> fibEntry,
+                                         shared_ptr<pit::Entry> pitEntry)
+{
+  const fib::NextHopList& nexthops = fibEntry->getNextHops();
+  fib::NextHopList::const_iterator it = nexthops.end();
+
+  bool isNewPitEntry = !pitEntry->hasUnexpiredOutRecords();
+  if (isNewPitEntry) {
+    // forward to nexthop with lowest cost except downstream
+    it = std::find_if(nexthops.begin(), nexthops.end(),
+      bind(&predicate_NextHop_eligible, pitEntry, _1, inFace.getId(),
+           false, time::steady_clock::TimePoint::min()));
+
+    if (it == nexthops.end()) {
+      NFD_LOG_DEBUG(interest << " from=" << inFace.getId() << " noNextHop");
+      this->rejectPendingInterest(pitEntry);
+      return;
+    }
+
+    shared_ptr<Face> outFace = it->getFace();
+    this->sendInterest(pitEntry, outFace);
+    NFD_LOG_DEBUG(interest << " from=" << inFace.getId()
+                           << " newPitEntry-to=" << outFace->getId());
+    return;
+  }
+
+  // when was the last outgoing Interest?
+  const pit::OutRecordCollection& outRecords = pitEntry->getOutRecords();
+  pit::OutRecordCollection::const_iterator lastOutgoing = std::max_element(
+    outRecords.begin(), outRecords.end(), &compare_OutRecord_lastRenewed);
+  BOOST_ASSERT(lastOutgoing != outRecords.end()); // otherwise it's new PIT entry
+
+  time::steady_clock::TimePoint now = time::steady_clock::now();
+  time::steady_clock::Duration sinceLastOutgoing = now - lastOutgoing->getLastRenewed();
+  bool shouldRetransmit = sinceLastOutgoing >= MIN_RETRANSMISSION_INTERVAL;
+  if (!shouldRetransmit) {
+    NFD_LOG_DEBUG(interest << " from=" << inFace.getId()
+                           << " dontRetransmit sinceLastOutgoing=" << sinceLastOutgoing.count());
+    return;
+  }
+
+  // find an unused upstream with lowest cost except downstream
+  it = std::find_if(nexthops.begin(), nexthops.end(),
+    bind(&predicate_NextHop_eligible, pitEntry, _1, inFace.getId(), true, now));
+  if (it != nexthops.end()) {
+    shared_ptr<Face> outFace = it->getFace();
+    this->sendInterest(pitEntry, outFace);
+    NFD_LOG_DEBUG(interest << " from=" << inFace.getId()
+                           << " retransmit-unused-to=" << outFace->getId());
+    return;
+  }
+
+  // find an eligible upstream that is used earliest
+  it = findEligibleNextHopWithEarliestOutRecord(pitEntry, nexthops, inFace.getId());
+  if (it == nexthops.end()) {
+    NFD_LOG_DEBUG(interest << " from=" << inFace.getId() << " retransmitNoNextHop");
+  }
+  else {
+    shared_ptr<Face> outFace = it->getFace();
+    this->sendInterest(pitEntry, outFace);
+    NFD_LOG_DEBUG(interest << " from=" << inFace.getId()
+                           << " retransmit-retry-to=" << outFace->getId());
+  }
+}
+
+} // namespace fw
+} // namespace nfd
diff --git a/daemon/fw/best-route-strategy2.hpp b/daemon/fw/best-route-strategy2.hpp
new file mode 100644
index 0000000..72df544
--- /dev/null
+++ b/daemon/fw/best-route-strategy2.hpp
@@ -0,0 +1,61 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014,  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_DAEMON_FW_BEST_ROUTE_STRATEGY2_HPP
+#define NFD_DAEMON_FW_BEST_ROUTE_STRATEGY2_HPP
+
+#include "strategy.hpp"
+
+namespace nfd {
+namespace fw {
+
+/** \brief Best Route strategy version 2
+ *
+ *  This strategy forwards a new Interest to the lowest-cost nexthop (except downstream).
+ *  After that, it recognizes consumer retransmission:
+ *  if a similar Interest arrives from any downstream after MIN_RETRANSMISSION_INTERVAL,
+ *  the strategy forwards the Interest again to the lowest-cost nexthop (except downstream)
+ *  that is not previously used. If all nexthops have been used, the strategy starts over.
+ */
+class BestRouteStrategy2 : public Strategy
+{
+public:
+  BestRouteStrategy2(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
+
+  virtual void
+  afterReceiveInterest(const Face& inFace,
+                       const Interest& interest,
+                       shared_ptr<fib::Entry> fibEntry,
+                       shared_ptr<pit::Entry> pitEntry);
+
+public:
+  static const Name STRATEGY_NAME;
+  static const time::milliseconds MIN_RETRANSMISSION_INTERVAL;
+};
+
+} // namespace fw
+} // namespace nfd
+
+#endif // NFD_DAEMON_FW_BEST_ROUTE_STRATEGY2_HPP
