diff --git a/daemon/table/cleanup.cpp b/daemon/table/cleanup.cpp
index 5a45bf7..d45b363 100644
--- a/daemon/table/cleanup.cpp
+++ b/daemon/table/cleanup.cpp
@@ -40,7 +40,7 @@
     }
 
     for (const auto& pitEntry : nte.getPitEntries()) {
-      pit.deleteInOutRecords(pitEntry.get(), face);
+      pit.deleteInOutRecordsByFace(pitEntry.get(), face);
     }
 
     if (!nte.hasTableEntries()) {
diff --git a/daemon/table/pit-entry.cpp b/daemon/table/pit-entry.cpp
index ee4b726..2edbc9f 100644
--- a/daemon/table/pit-entry.cpp
+++ b/daemon/table/pit-entry.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -50,21 +50,25 @@
 }
 
 InRecordCollection::iterator
-Entry::getInRecord(const Face& face)
+Entry::getInRecord(const Face& face, uint64_t endpointId)
 {
   return std::find_if(m_inRecords.begin(), m_inRecords.end(),
-    [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
+    [&face, endpointId] (const InRecord& inRecord) {
+      return &inRecord.getFace() == &face && inRecord.getEndpointId() == endpointId;
+    });
 }
 
 InRecordCollection::iterator
-Entry::insertOrUpdateInRecord(Face& face, const Interest& interest)
+Entry::insertOrUpdateInRecord(Face& face, uint64_t endpointId, const Interest& interest)
 {
   BOOST_ASSERT(this->canMatch(interest));
 
   auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
-    [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
+    [&face, endpointId] (const InRecord& inRecord) {
+      return &inRecord.getFace() == &face && inRecord.getEndpointId() == endpointId;
+    });
   if (it == m_inRecords.end()) {
-    m_inRecords.emplace_front(face);
+    m_inRecords.emplace_front(face, endpointId);
     it = m_inRecords.begin();
   }
 
@@ -73,10 +77,12 @@
 }
 
 void
-Entry::deleteInRecord(const Face& face)
+Entry::deleteInRecord(const Face& face, uint64_t endpointId)
 {
   auto it = std::find_if(m_inRecords.begin(), m_inRecords.end(),
-    [&face] (const InRecord& inRecord) { return &inRecord.getFace() == &face; });
+    [&face, endpointId] (const InRecord& inRecord) {
+      return &inRecord.getFace() == &face && inRecord.getEndpointId() == endpointId;
+    });
   if (it != m_inRecords.end()) {
     m_inRecords.erase(it);
   }
@@ -89,21 +95,25 @@
 }
 
 OutRecordCollection::iterator
-Entry::getOutRecord(const Face& face)
+Entry::getOutRecord(const Face& face, uint64_t endpointId)
 {
   return std::find_if(m_outRecords.begin(), m_outRecords.end(),
-    [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
+    [&face, endpointId] (const OutRecord& outRecord) {
+      return &outRecord.getFace() == &face && outRecord.getEndpointId() == endpointId;
+    });
 }
 
 OutRecordCollection::iterator
-Entry::insertOrUpdateOutRecord(Face& face, const Interest& interest)
+Entry::insertOrUpdateOutRecord(Face& face, uint64_t endpointId, const Interest& interest)
 {
   BOOST_ASSERT(this->canMatch(interest));
 
   auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
-    [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
+    [&face, endpointId] (const OutRecord& outRecord) {
+      return &outRecord.getFace() == &face && outRecord.getEndpointId() == endpointId;
+    });
   if (it == m_outRecords.end()) {
-    m_outRecords.emplace_front(face);
+    m_outRecords.emplace_front(face, endpointId);
     it = m_outRecords.begin();
   }
 
@@ -112,14 +122,27 @@
 }
 
 void
-Entry::deleteOutRecord(const Face& face)
+Entry::deleteOutRecord(const Face& face, uint64_t endpointId)
 {
   auto it = std::find_if(m_outRecords.begin(), m_outRecords.end(),
-    [&face] (const OutRecord& outRecord) { return &outRecord.getFace() == &face; });
+    [&face, endpointId] (const OutRecord& outRecord) {
+      return &outRecord.getFace() == &face && outRecord.getEndpointId() == endpointId;
+    });
   if (it != m_outRecords.end()) {
     m_outRecords.erase(it);
   }
 }
 
+void
+Entry::deleteInOutRecordsByFace(const Face& face)
+{
+  m_inRecords.remove_if([&face] (const InRecord& inRecord) {
+    return &inRecord.getFace() == &face;
+  });
+  m_outRecords.remove_if([&face] (const OutRecord& outRecord) {
+    return &outRecord.getFace() == &face;
+  });
+}
+
 } // namespace pit
 } // namespace nfd
diff --git a/daemon/table/pit-entry.hpp b/daemon/table/pit-entry.hpp
index 2e49824..b1dc9ee 100644
--- a/daemon/table/pit-entry.hpp
+++ b/daemon/table/pit-entry.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -132,22 +132,22 @@
     return m_inRecords.end();
   }
 
-  /** \brief get the in-record for \p face
+  /** \brief get the in-record for \p face and \p endpointId
    *  \return an iterator to the in-record, or .in_end() if it does not exist
    */
   InRecordCollection::iterator
-  getInRecord(const Face& face);
+  getInRecord(const Face& face, uint64_t endpointId);
 
   /** \brief insert or update an in-record
    *  \return an iterator to the new or updated in-record
    */
   InRecordCollection::iterator
-  insertOrUpdateInRecord(Face& face, const Interest& interest);
+  insertOrUpdateInRecord(Face& face, uint64_t endpointId, const Interest& interest);
 
-  /** \brief delete the in-record for \p face if it exists
+  /** \brief delete the in-record for \p face and \p endpointId if it exists
    */
   void
-  deleteInRecord(const Face& face);
+  deleteInRecord(const Face& face, uint64_t endpointId);
 
   /** \brief delete all in-records
    */
@@ -199,22 +199,28 @@
     return m_outRecords.end();
   }
 
-  /** \brief get the out-record for \p face
+  /** \brief get the out-record for \p face and \p endpointId
    *  \return an iterator to the out-record, or .out_end() if it does not exist
    */
   OutRecordCollection::iterator
-  getOutRecord(const Face& face);
+  getOutRecord(const Face& face, uint64_t endpointId);
 
   /** \brief insert or update an out-record
    *  \return an iterator to the new or updated out-record
    */
   OutRecordCollection::iterator
-  insertOrUpdateOutRecord(Face& face, const Interest& interest);
+  insertOrUpdateOutRecord(Face& face, uint64_t endpointId, const Interest& interest);
 
-  /** \brief delete the out-record for \p face if it exists
+  /** \brief delete the out-record for \p face and \p endpointId if it exists
    */
   void
-  deleteOutRecord(const Face& face);
+  deleteOutRecord(const Face& face, uint64_t endpointId);
+
+public: // cleanup
+  /** \brief delete all in-records and out-records for \p face if it exists
+   */
+  void
+  deleteInOutRecordsByFace(const Face& face);
 
 public:
   /** \brief expiry timer
diff --git a/daemon/table/pit-face-record.cpp b/daemon/table/pit-face-record.cpp
index d594cb9..61fef7e 100644
--- a/daemon/table/pit-face-record.cpp
+++ b/daemon/table/pit-face-record.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,9 @@
 namespace nfd {
 namespace pit {
 
-FaceRecord::FaceRecord(Face& face)
+FaceRecord::FaceRecord(Face& face, uint64_t endpointId)
   : m_face(face)
+  , m_endpointId(endpointId)
   , m_lastNonce(0)
   , m_lastRenewed(time::steady_clock::TimePoint::min())
   , m_expiry(time::steady_clock::TimePoint::min())
diff --git a/daemon/table/pit-face-record.hpp b/daemon/table/pit-face-record.hpp
index 90c3cdb..3e3f020 100644
--- a/daemon/table/pit-face-record.hpp
+++ b/daemon/table/pit-face-record.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -40,12 +40,14 @@
 class FaceRecord : public StrategyInfoHost
 {
 public:
-  explicit
-  FaceRecord(Face& face);
+  FaceRecord(Face& face, uint64_t endpointId);
 
   Face&
   getFace() const;
 
+  uint64_t
+  getEndpointId() const;
+
   uint32_t
   getLastNonce() const;
 
@@ -65,6 +67,7 @@
 
 private:
   Face& m_face;
+  uint64_t m_endpointId;
   uint32_t m_lastNonce;
   time::steady_clock::TimePoint m_lastRenewed;
   time::steady_clock::TimePoint m_expiry;
@@ -76,6 +79,12 @@
   return m_face;
 }
 
+inline uint64_t
+FaceRecord::getEndpointId() const
+{
+  return m_endpointId;
+}
+
 inline uint32_t
 FaceRecord::getLastNonce() const
 {
diff --git a/daemon/table/pit-in-record.cpp b/daemon/table/pit-in-record.cpp
index 8167190..7bb10b9 100644
--- a/daemon/table/pit-in-record.cpp
+++ b/daemon/table/pit-in-record.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,8 @@
 namespace nfd {
 namespace pit {
 
-InRecord::InRecord(Face& face)
-  : FaceRecord(face)
+InRecord::InRecord(Face& face, uint64_t endpointId)
+  : FaceRecord(face, endpointId)
 {
 }
 
diff --git a/daemon/table/pit-in-record.hpp b/daemon/table/pit-in-record.hpp
index 45167c3..d758097 100644
--- a/daemon/table/pit-in-record.hpp
+++ b/daemon/table/pit-in-record.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -36,8 +36,7 @@
 class InRecord : public FaceRecord
 {
 public:
-  explicit
-  InRecord(Face& face);
+  InRecord(Face& face, uint64_t endpointId);
 
   void
   update(const Interest& interest);
diff --git a/daemon/table/pit-out-record.cpp b/daemon/table/pit-out-record.cpp
index 8b4f609..75d7e7f 100644
--- a/daemon/table/pit-out-record.cpp
+++ b/daemon/table/pit-out-record.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -28,8 +28,8 @@
 namespace nfd {
 namespace pit {
 
-OutRecord::OutRecord(Face& face)
-  : FaceRecord(face)
+OutRecord::OutRecord(Face& face, uint64_t endpointId)
+  : FaceRecord(face, endpointId)
 {
 }
 
diff --git a/daemon/table/pit-out-record.hpp b/daemon/table/pit-out-record.hpp
index 4400fd4..c0537fd 100644
--- a/daemon/table/pit-out-record.hpp
+++ b/daemon/table/pit-out-record.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-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -36,8 +36,7 @@
 class OutRecord : public FaceRecord
 {
 public:
-  explicit
-  OutRecord(Face& face);
+  OutRecord(Face& face, uint64_t endpointId);
 
   /** \return last NACK returned by \p getFace()
    *
@@ -79,4 +78,4 @@
 } // namespace pit
 } // namespace nfd
 
-#endif // NFD_DAEMON_TABLE_PIT_IN_RECORD_HPP
+#endif // NFD_DAEMON_TABLE_PIT_OUT_RECORD_HPP
diff --git a/daemon/table/pit.cpp b/daemon/table/pit.cpp
index 7a708da..5e26fc0 100644
--- a/daemon/table/pit.cpp
+++ b/daemon/table/pit.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -113,12 +113,11 @@
 }
 
 void
-Pit::deleteInOutRecords(Entry* entry, const Face& face)
+Pit::deleteInOutRecordsByFace(Entry* entry, const Face& face)
 {
   BOOST_ASSERT(entry != nullptr);
 
-  entry->deleteInRecord(face);
-  entry->deleteOutRecord(face);
+  entry->deleteInOutRecordsByFace(face);
 
   /// \todo decide whether to delete PIT entry if there's no more in/out-record left
 }
diff --git a/daemon/table/pit.hpp b/daemon/table/pit.hpp
index 6e8af8a..eb2438b 100644
--- a/daemon/table/pit.hpp
+++ b/daemon/table/pit.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018,  Regents of the University of California,
+ * Copyright (c) 2014-2019,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -93,10 +93,10 @@
     this->erase(entry, true);
   }
 
-  /** \brief deletes in-record and out-record for face
+  /** \brief deletes all in-records and out-records for \p face
    */
   void
-  deleteInOutRecords(Entry* entry, const Face& face);
+  deleteInOutRecordsByFace(Entry* entry, const Face& face);
 
 public: // enumeration
   typedef Iterator const_iterator;
