diff --git a/daemon/fw/access-strategy.hpp b/daemon/fw/access-strategy.hpp
new file mode 100644
index 0000000..7410b51
--- /dev/null
+++ b/daemon/fw/access-strategy.hpp
@@ -0,0 +1,177 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  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_ACCESS_STRATEGY_HPP
+#define NFD_DAEMON_FW_ACCESS_STRATEGY_HPP
+
+#include "strategy.hpp"
+#include "rtt-estimator.hpp"
+#include "retransmission-suppression.hpp"
+#include <unordered_set>
+#include <unordered_map>
+
+namespace nfd {
+namespace fw {
+
+/** \brief Access Router Strategy version 1
+ *
+ *  This strategy is designed for the last hop on the NDN testbed,
+ *  where each nexthop connects to a laptop, links are lossy, and FIB is mostly correct.
+ *
+ *  1. Multicast the first Interest to all nexthops.
+ *  2. When Data comes back, remember last working nexthop of the prefix;
+ *     the granularity of this knowledge is the parent of Data Name.
+ *  3. Forward subsequent Interests to the last working nexthop.
+ *     If it doesn't respond, multicast again.
+ */
+class AccessStrategy : public Strategy
+{
+public:
+  AccessStrategy(Forwarder& forwarder, const Name& name = STRATEGY_NAME);
+
+  virtual
+  ~AccessStrategy();
+
+public: // triggers
+  virtual void
+  afterReceiveInterest(const Face& inFace,
+                       const Interest& interest,
+                       shared_ptr<fib::Entry> fibEntry,
+                       shared_ptr<pit::Entry> pitEntry) DECL_OVERRIDE;
+
+  virtual void
+  beforeSatisfyInterest(shared_ptr<pit::Entry> pitEntry,
+                        const Face& inFace, const Data& data) DECL_OVERRIDE;
+
+private: // StrategyInfo
+  /** \brief StrategyInfo on PIT entry
+   */
+  class PitInfo : public StrategyInfo
+  {
+  public:
+    static constexpr int
+    getTypeId()
+    {
+      return 1010;
+    }
+
+  public:
+    scheduler::ScopedEventId rtoTimer;
+  };
+
+  /** \brief StrategyInfo in measurements table
+   */
+  class MtInfo : public StrategyInfo
+  {
+  public:
+    static constexpr int
+    getTypeId()
+    {
+      return 1011;
+    }
+
+    MtInfo();
+
+  public:
+    FaceId lastNexthop;
+    RttEstimator rtt;
+  };
+
+  /** \brief find per-prefix measurements for Interest
+   */
+  std::tuple<Name, shared_ptr<MtInfo>>
+  findPrefixMeasurements(const pit::Entry& pitEntry);
+
+  /** \brief get or create pre-prefix measurements for incoming Data
+   *  \note This function creates MtInfo but doesn't update it.
+   */
+  shared_ptr<MtInfo>
+  addPrefixMeasurements(const Data& data);
+
+  /** \brief global per-face StrategyInfo
+   */
+  class FaceInfo
+  {
+  public:
+    FaceInfo();
+
+  public:
+    RttEstimator rtt;
+  };
+
+  typedef std::unordered_map<FaceId, FaceInfo> FaceInfoTable;
+
+  void
+  removeFaceInfo(shared_ptr<Face> face);
+
+private: // forwarding procedures
+  void
+  afterReceiveNewInterest(const Face& inFace,
+                          const Interest& interest,
+                          shared_ptr<fib::Entry> fibEntry,
+                          shared_ptr<pit::Entry> pitEntry);
+
+  void
+  afterReceiveRetxInterest(const Face& inFace,
+                           const Interest& interest,
+                           shared_ptr<fib::Entry> fibEntry,
+                           shared_ptr<pit::Entry> pitEntry);
+
+  /** \brief send to last working nexthop
+   *  \return whether an Interest is sent
+   */
+  bool
+  sendToLastNexthop(const Face& inFace, shared_ptr<pit::Entry> pitEntry, MtInfo& mi,
+                    shared_ptr<fib::Entry> fibEntry);
+
+  void
+  afterRtoTimeout(weak_ptr<pit::Entry> pitWeak, weak_ptr<fib::Entry> fibWeak,
+                  FaceId inFace, FaceId firstOutFace);
+
+  /** \brief multicast to all nexthops
+   *  \param exceptFaces don't forward to those faces
+   */
+  void
+  multicast(shared_ptr<pit::Entry> pitEntry,
+            shared_ptr<fib::Entry> fibEntry,
+            std::unordered_set<FaceId> exceptFaces = std::unordered_set<FaceId>());
+
+  void
+  updateMeasurements(const Face& inFace, const Data& data,
+                     const RttEstimator::Duration& rtt);
+
+public:
+  static const Name STRATEGY_NAME;
+
+private:
+  FaceInfoTable m_fit;
+  RetransmissionSuppression m_retransmissionSuppression;
+  signal::ScopedConnection m_removeFaceInfoConn;
+};
+
+} // namespace fw
+} // namespace nfd
+
+#endif // NFD_DAEMON_FW_ACCESS_STRATEGY_HPP
