diff --git a/daemon/fw/retx-suppression-fixed.cpp b/daemon/fw/retx-suppression-fixed.cpp
new file mode 100644
index 0000000..74f2302
--- /dev/null
+++ b/daemon/fw/retx-suppression-fixed.cpp
@@ -0,0 +1,64 @@
+/* -*- 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/>.
+ */
+
+#include "retx-suppression-fixed.hpp"
+
+namespace nfd {
+namespace fw {
+
+const time::milliseconds RetxSuppressionFixed::DEFAULT_MIN_RETX_INTERVAL(100);
+
+RetxSuppressionFixed::RetxSuppressionFixed(const time::milliseconds& minRetxInterval)
+  : m_minRetxInterval(minRetxInterval)
+{
+  BOOST_ASSERT(minRetxInterval > time::milliseconds::zero());
+}
+
+RetxSuppression::Result
+RetxSuppressionFixed::decide(const Face& inFace, const Interest& interest,
+                             const pit::Entry& pitEntry) const
+{
+  bool isNewPitEntry = !pitEntry.hasUnexpiredOutRecords();
+  if (isNewPitEntry) {
+    return NEW;
+  }
+
+  // when was the last outgoing Interest?
+  const pit::OutRecordCollection& outRecords = pitEntry.getOutRecords();
+  pit::OutRecordCollection::const_iterator lastOutgoing = std::max_element(
+      outRecords.begin(), outRecords.end(),
+      [] (const pit::OutRecord& a, const pit::OutRecord& b) {
+        return a.getLastRenewed() < b.getLastRenewed();
+      });
+  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 shouldSuppress = sinceLastOutgoing < m_minRetxInterval;
+  return shouldSuppress ? SUPPRESS : FORWARD;
+}
+
+} // namespace fw
+} // namespace nfd
