diff --git a/daemon/fw/client-control-strategy.cpp b/daemon/fw/client-control-strategy.cpp
index 0b1c5f5..37460f9 100644
--- a/daemon/fw/client-control-strategy.cpp
+++ b/daemon/fw/client-control-strategy.cpp
@@ -25,15 +25,13 @@
 
 #include "client-control-strategy.hpp"
 #include "core/logger.hpp"
-#include <ndn-cxx/lp/tags.hpp>
 
 namespace nfd {
 namespace fw {
 
 NFD_LOG_INIT("ClientControlStrategy");
 
-const Name
-ClientControlStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/client-control/%FD%01");
+const Name ClientControlStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/client-control/%FD%02");
 NFD_REGISTER_STRATEGY(ClientControlStrategy);
 
 ClientControlStrategy::ClientControlStrategy(Forwarder& forwarder, const Name& name)
@@ -45,24 +43,13 @@
 ClientControlStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
                                             const shared_ptr<pit::Entry>& pitEntry)
 {
-  shared_ptr<lp::NextHopFaceIdTag> tag = interest.getTag<lp::NextHopFaceIdTag>();
-  if (tag == nullptr) {
-    this->BestRouteStrategy::afterReceiveInterest(inFace, interest, pitEntry);
-    return;
+  if (m_isFirstUse) {
+    NFD_LOG_WARN("NextHopFaceId field is honored universally and "
+                 "it's unnecessary to set client-control strategy.");
+    m_isFirstUse = false;
   }
 
-  FaceId outFaceId = static_cast<FaceId>(*tag);
-  Face* outFace = this->getFace(outFaceId);
-  if (outFace == nullptr) {
-    // If outFace doesn't exist, it's better to reject the Interest
-    // than to use BestRouteStrategy.
-    NFD_LOG_WARN("Interest " << interest.getName() <<
-                 " NextHopFaceId=" << outFaceId << " non-existent face");
-    this->rejectPendingInterest(pitEntry);
-    return;
-  }
-
-  this->sendInterest(pitEntry, *outFace);
+  this->BestRouteStrategy::afterReceiveInterest(inFace, interest, pitEntry);
 }
 
 } // namespace fw
diff --git a/daemon/fw/client-control-strategy.hpp b/daemon/fw/client-control-strategy.hpp
index 68b4441..13ffd81 100644
--- a/daemon/fw/client-control-strategy.hpp
+++ b/daemon/fw/client-control-strategy.hpp
@@ -31,11 +31,8 @@
 namespace nfd {
 namespace fw {
 
-/** \brief a forwarding strategy controlled by client application
- *
- *  The consumer may specify the nexthop for an Interest in NDNLPv2 NextHopFaceId field.
- *  If NextHopFaceId field is omitted, the Interest is forwarded to
- *  the FIB nexthop with lowest routing cost.
+/** \brief identical to BestRouteStrategy v1, for backwards compatibility
+ *  \deprecated NextHopFaceId field is honored universally and it's unnecessary to set this strategy
  */
 class ClientControlStrategy : public BestRouteStrategy
 {
@@ -49,6 +46,9 @@
 
 public:
   static const Name STRATEGY_NAME;
+
+private:
+  bool m_isFirstUse = true;
 };
 
 } // namespace fw
diff --git a/tests/daemon/fw/client-control-strategy.t.cpp b/tests/daemon/fw/client-control-strategy.t.cpp
deleted file mode 100644
index 517d2aa..0000000
--- a/tests/daemon/fw/client-control-strategy.t.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016,  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 "fw/client-control-strategy.hpp"
-#include "strategy-tester.hpp"
-#include "tests/daemon/face/dummy-face.hpp"
-#include <ndn-cxx/lp/tags.hpp>
-
-#include "tests/test-common.hpp"
-
-namespace nfd {
-namespace fw {
-namespace tests {
-
-using namespace nfd::tests;
-
-BOOST_AUTO_TEST_SUITE(Fw)
-BOOST_FIXTURE_TEST_SUITE(TestClientControlStrategy, BaseFixture)
-
-BOOST_AUTO_TEST_CASE(Forward3)
-{
-  Forwarder forwarder;
-  typedef StrategyTester<fw::ClientControlStrategy> ClientControlStrategyTester;
-  ClientControlStrategyTester strategy(forwarder);
-
-  auto face1 = make_shared<DummyFace>();
-  auto face2 = make_shared<DummyFace>();
-  auto face3 = make_shared<DummyFace>();
-  auto face4 = make_shared<DummyFace>("dummy://", "dummy://", ndn::nfd::FACE_SCOPE_LOCAL);
-  forwarder.addFace(face1);
-  forwarder.addFace(face2);
-  forwarder.addFace(face3);
-  forwarder.addFace(face4);
-
-  Fib& fib = forwarder.getFib();
-  fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face2, 0);
-
-  Pit& pit = forwarder.getPit();
-
-  // Interest with valid NextHopFaceId
-  shared_ptr<Interest> interest1 = makeInterest("ndn:/0z8r6yDDe");
-  interest1->setTag(make_shared<lp::NextHopFaceIdTag>(face1->getId()));
-  shared_ptr<pit::Entry> pitEntry1 = pit.insert(*interest1).first;
-  pitEntry1->insertOrUpdateInRecord(*face4, *interest1);
-
-  strategy.sendInterestHistory.clear();
-  strategy.afterReceiveInterest(*face4, *interest1, pitEntry1);
-  BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 1);
-  BOOST_CHECK_EQUAL(strategy.sendInterestHistory[0].outFaceId, face1->getId());
-
-  // Interest without NextHopFaceId
-  shared_ptr<Interest> interest2 = makeInterest("ndn:/y6JQADGVz");
-  shared_ptr<pit::Entry> pitEntry2 = pit.insert(*interest2).first;
-  pitEntry2->insertOrUpdateInRecord(*face4, *interest2);
-
-  strategy.sendInterestHistory.clear();
-  strategy.afterReceiveInterest(*face4, *interest2, pitEntry2);
-  BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 1);
-  BOOST_CHECK_EQUAL(strategy.sendInterestHistory[0].outFaceId, face2->getId());
-
-  // Interest with invalid NextHopFaceId
-  shared_ptr<Interest> interest3 = makeInterest("ndn:/0z8r6yDDe");
-  interest3->setTag(make_shared<lp::NextHopFaceIdTag>(face3->getId()));
-  shared_ptr<pit::Entry> pitEntry3 = pit.insert(*interest3).first;
-  pitEntry3->insertOrUpdateInRecord(*face4, *interest3);
-
-  face3->close(); // face3 is closed and its FaceId becomes invalid
-  strategy.sendInterestHistory.clear();
-  strategy.rejectPendingInterestHistory.clear();
-  strategy.afterReceiveInterest(*face4, *interest3, pitEntry3);
-  BOOST_REQUIRE_EQUAL(strategy.sendInterestHistory.size(), 0);
-  BOOST_REQUIRE_EQUAL(strategy.rejectPendingInterestHistory.size(), 1);
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestClientControlStrategy
-BOOST_AUTO_TEST_SUITE_END() // Fw
-
-} // namespace tests
-} // namespace fw
-} // namespace nfd
