diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 8460a00..31e2b91 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.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,
@@ -137,7 +137,7 @@
   }
 
   Face* outFace = this->getFace(mi.lastNexthop);
-  if (outFace == nullptr || !fibEntry.hasNextHop(*outFace)) {
+  if (outFace == nullptr || !fibEntry.hasNextHop(*outFace, 0)) {
     NFD_LOG_DEBUG(pitEntry->getInterest() << " last-nexthop-gone");
     return false;
   }
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index 0f7f4e1..bb96009 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.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,
@@ -81,7 +81,7 @@
   size_t nUpstreams = nexthops.size();
 
   shared_ptr<Face> bestFace = meInfo.getBestFace();
-  if (bestFace != nullptr && fibEntry.hasNextHop(*bestFace) &&
+  if (bestFace != nullptr && fibEntry.hasNextHop(*bestFace, 0) &&
       !wouldViolateScope(inFace, interest, *bestFace) &&
       canForwardToLegacy(*pitEntry, *bestFace)) {
     // TODO Should we use `randlow = 100 + nrand48(h->seed) % 4096U;` ?
@@ -111,7 +111,7 @@
   }
 
   shared_ptr<Face> previousFace = meInfo.previousFace.lock();
-  if (previousFace != nullptr && fibEntry.hasNextHop(*previousFace) &&
+  if (previousFace != nullptr && fibEntry.hasNextHop(*previousFace, 0) &&
       !wouldViolateScope(inFace, interest, *previousFace) &&
       canForwardToLegacy(*pitEntry, *previousFace)) {
     --nUpstreams;
@@ -157,7 +157,7 @@
   MeasurementsEntryInfo& meInfo = this->getMeasurementsEntryInfo(pitEntry);
 
   shared_ptr<Face> previousFace = meInfo.previousFace.lock();
-  if (previousFace != nullptr && fibEntry.hasNextHop(*previousFace) &&
+  if (previousFace != nullptr && fibEntry.hasNextHop(*previousFace, 0) &&
       !wouldViolateScope(*inFace, interest, *previousFace) &&
       canForwardToLegacy(*pitEntry, *previousFace)) {
     this->sendInterest(pitEntry, *previousFace, interest);
diff --git a/daemon/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index 5c04977..b73698d 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-manager.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,
@@ -78,7 +78,7 @@
   }
 
   fib::Entry* entry = m_fib.insert(prefix).first;
-  entry->addNextHop(*face, cost);
+  entry->addOrUpdateNextHop(*face, 0, cost);
 
   NFD_LOG_TRACE("fib/add-nexthop(" << prefix << ',' << faceId << ',' << cost << "): OK");
   return done(ControlResponse(200, "Success").setBody(parameters.wireEncode()));
@@ -107,7 +107,7 @@
     return;
   }
 
-  entry->removeNextHop(*face);
+  entry->removeNextHop(*face, 0);
   if (!entry->hasNextHops()) {
     m_fib.erase(*entry);
     NFD_LOG_TRACE("fib/remove-nexthop(" << prefix << ',' << faceId << "): OK entry-erased");
diff --git a/daemon/nfd.cpp b/daemon/nfd.cpp
index 28f6989..f4d136a 100644
--- a/daemon/nfd.cpp
+++ b/daemon/nfd.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,
@@ -169,7 +169,7 @@
 
   // add FIB entry for NFD Management Protocol
   Name topPrefix("/localhost/nfd");
-  m_forwarder->getFib().insert(topPrefix).first->addNextHop(*m_internalFace, 0);
+  m_forwarder->getFib().insert(topPrefix).first->addOrUpdateNextHop(*m_internalFace, 0, 0);
   m_dispatcher->addTopPrefix(topPrefix, false);
 }
 
diff --git a/daemon/table/cleanup.cpp b/daemon/table/cleanup.cpp
index 104bdf1..5a45bf7 100644
--- a/daemon/table/cleanup.cpp
+++ b/daemon/table/cleanup.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,
@@ -36,7 +36,7 @@
   for (const name_tree::Entry& nte : nt) {
     fib::Entry* fibEntry = nte.getFibEntry();
     if (fibEntry != nullptr) {
-      fib.removeNextHop(*fibEntry, face);
+      fib.removeNextHopByFace(*fibEntry, face);
     }
 
     for (const auto& pitEntry : nte.getPitEntries()) {
diff --git a/daemon/table/fib-entry.cpp b/daemon/table/fib-entry.cpp
index c2e299f..cf14936 100644
--- a/daemon/table/fib-entry.cpp
+++ b/daemon/table/fib-entry.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,
@@ -35,43 +35,52 @@
 }
 
 NextHopList::iterator
-Entry::findNextHop(const Face& face)
+Entry::findNextHop(const Face& face, uint64_t endpointId)
 {
   return std::find_if(m_nextHops.begin(), m_nextHops.end(),
-                      [&face] (const NextHop& nexthop) {
-                        return &nexthop.getFace() == &face;
+                      [&face, endpointId] (const NextHop& nexthop) {
+                        return &nexthop.getFace() == &face && nexthop.getEndpointId() == endpointId;
                       });
 }
 
 bool
-Entry::hasNextHop(const Face& face) const
+Entry::hasNextHop(const Face& face, uint64_t endpointId) const
 {
-  return const_cast<Entry*>(this)->findNextHop(face) != m_nextHops.end();
+  return const_cast<Entry*>(this)->findNextHop(face, endpointId) != m_nextHops.end();
 }
 
 void
-Entry::addNextHop(Face& face, uint64_t cost)
+Entry::addOrUpdateNextHop(Face& face, uint64_t endpointId, uint64_t cost)
 {
-  auto it = this->findNextHop(face);
+  auto it = this->findNextHop(face, endpointId);
   if (it == m_nextHops.end()) {
-    m_nextHops.emplace_back(face);
+    m_nextHops.emplace_back(face, endpointId);
     it = std::prev(m_nextHops.end());
   }
-
   it->setCost(cost);
   this->sortNextHops();
 }
 
 void
-Entry::removeNextHop(const Face& face)
+Entry::removeNextHop(const Face& face, uint64_t endpointId)
 {
-  auto it = this->findNextHop(face);
+  auto it = this->findNextHop(face, endpointId);
   if (it != m_nextHops.end()) {
     m_nextHops.erase(it);
   }
 }
 
 void
+Entry::removeNextHopByFace(const Face& face)
+{
+  auto it = std::remove_if(m_nextHops.begin(), m_nextHops.end(),
+                           [&face] (const NextHop& nexthop) {
+                             return &nexthop.getFace() == &face;
+                           });
+  m_nextHops.erase(it, m_nextHops.end());
+}
+
+void
 Entry::sortNextHops()
 {
   std::sort(m_nextHops.begin(), m_nextHops.end(),
diff --git a/daemon/table/fib-entry.hpp b/daemon/table/fib-entry.hpp
index 24489b9..2b86f66 100644
--- a/daemon/table/fib-entry.hpp
+++ b/daemon/table/fib-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,
@@ -74,32 +74,36 @@
     return !m_nextHops.empty();
   }
 
-  /** \return whether there is a NextHop record for \p face
+  /** \return whether there is a NextHop record for \p face with the given \p endpointId
    */
   bool
-  hasNextHop(const Face& face) const;
+  hasNextHop(const Face& face, uint64_t endpointId) const;
 
   /** \brief adds a NextHop record
    *
-   *  If a NextHop record for \p face already exists, its cost is updated.
+   *  If a NextHop record for \p face and \p endpointId already exists,
+   *  its cost is updated.
    */
   void
-  addNextHop(Face& face, uint64_t cost);
+  addOrUpdateNextHop(Face& face, uint64_t endpointId, uint64_t cost);
 
-  /** \brief removes a NextHop record
-   *
-   *  If no NextHop record for face exists, do nothing.
+  /** \brief removes the NextHop record for \p face with the given \p endpointId
    */
   void
-  removeNextHop(const Face& face);
+  removeNextHop(const Face& face, uint64_t endpointId);
+
+  /** \brief removes all NextHop records on \p face for any \p endpointId
+   */
+  void
+  removeNextHopByFace(const Face& face);
 
 private:
   /** \note This method is non-const because mutable iterators are needed by callers.
    */
   NextHopList::iterator
-  findNextHop(const Face& face);
+  findNextHop(const Face& face, uint64_t endpointId);
 
-  /** \brief sorts the nexthop list
+  /** \brief sorts the nexthop list by cost
    */
   void
   sortNextHops();
diff --git a/daemon/table/fib-nexthop.cpp b/daemon/table/fib-nexthop.cpp
index e554362..e456c15 100644
--- a/daemon/table/fib-nexthop.cpp
+++ b/daemon/table/fib-nexthop.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 fib {
 
-NextHop::NextHop(Face& face)
+NextHop::NextHop(Face& face, uint64_t endpointId)
   : m_face(&face)
+  , m_endpointId(endpointId)
   , m_cost(0)
 {
 }
diff --git a/daemon/table/fib-nexthop.hpp b/daemon/table/fib-nexthop.hpp
index 83b774f..313508d 100644
--- a/daemon/table/fib-nexthop.hpp
+++ b/daemon/table/fib-nexthop.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,
@@ -39,7 +39,7 @@
 {
 public:
   explicit
-  NextHop(Face& face);
+  NextHop(Face& face, uint64_t endpointId);
 
   Face&
   getFace() const
@@ -48,6 +48,12 @@
   }
 
   uint64_t
+  getEndpointId() const
+  {
+    return m_endpointId;
+  }
+
+  uint64_t
   getCost() const
   {
     return m_cost;
@@ -61,6 +67,7 @@
 
 private:
   Face* m_face;
+  uint64_t m_endpointId;
   uint64_t m_cost;
 };
 
diff --git a/daemon/table/fib.cpp b/daemon/table/fib.cpp
index 7b6d21a..ccde921 100644
--- a/daemon/table/fib.cpp
+++ b/daemon/table/fib.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,
@@ -134,16 +134,28 @@
 }
 
 void
-Fib::removeNextHop(Entry& entry, const Face& face)
+Fib::eraseIfEmpty(Entry& entry)
 {
-  entry.removeNextHop(face);
-
   if (!entry.hasNextHops()) {
     name_tree::Entry* nte = m_nameTree.getEntry(entry);
     this->erase(nte, false);
   }
 }
 
+void
+Fib::removeNextHop(Entry& entry, const Face& face, uint64_t endpointId)
+{
+  entry.removeNextHop(face, endpointId);
+  this->eraseIfEmpty(entry);
+}
+
+void
+Fib::removeNextHopByFace(Entry& entry, const Face& face)
+{
+  entry.removeNextHopByFace(face);
+  this->eraseIfEmpty(entry);
+}
+
 Fib::Range
 Fib::getRange() const
 {
diff --git a/daemon/table/fib.hpp b/daemon/table/fib.hpp
index 4b94c21..cfdc4f1 100644
--- a/daemon/table/fib.hpp
+++ b/daemon/table/fib.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,
@@ -105,10 +105,15 @@
   void
   erase(const Entry& entry);
 
-  /** \brief removes the NextHop record for face
+  /** \brief removes the NextHop record for \p face with a given \p endpointId
    */
   void
-  removeNextHop(Entry& entry, const Face& face);
+  removeNextHop(Entry& entry, const Face& face, uint64_t endpointId);
+
+  /** \brief removes the NextHop record for \p face for any \p endpointId
+   */
+  void
+  removeNextHopByFace(Entry& entry, const Face& face);
 
 public: // enumeration
   typedef boost::transformed_range<name_tree::GetTableEntry<Entry>, const name_tree::Range> Range;
@@ -144,6 +149,11 @@
   void
   erase(name_tree::Entry* nte, bool canDeleteNte = true);
 
+  /** \brief erase \p entry if it contains no nexthop record
+   */
+  void
+  eraseIfEmpty(Entry& entry);
+
   Range
   getRange() const;
 
diff --git a/tests/daemon/fw/best-route-strategy2.t.cpp b/tests/daemon/fw/best-route-strategy2.t.cpp
index 2337e07..c0d9ba8 100644
--- a/tests/daemon/fw/best-route-strategy2.t.cpp
+++ b/tests/daemon/fw/best-route-strategy2.t.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,
@@ -78,9 +78,9 @@
 BOOST_AUTO_TEST_CASE(Forward)
 {
   fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face1, 10);
-  fibEntry.addNextHop(*face2, 20);
-  fibEntry.addNextHop(*face3, 30);
+  fibEntry.addOrUpdateNextHop(*face1, 0, 10);
+  fibEntry.addOrUpdateNextHop(*face2, 0, 20);
+  fibEntry.addOrUpdateNextHop(*face3, 0, 30);
 
   shared_ptr<Interest> interest = makeInterest("ndn:/BzgFBchqA");
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
@@ -129,7 +129,7 @@
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory[4].outFaceId, face1->getId());
   BOOST_CHECK_EQUAL(strategy.sendInterestHistory[5].outFaceId, face3->getId());
 
-  fibEntry.removeNextHop(*face1);
+  fibEntry.removeNextHop(*face1, 0);
 
   strategy.sendInterestHistory.clear();
   for (int i = 0; i < 3; ++i) {
diff --git a/tests/daemon/fw/forwarder.t.cpp b/tests/daemon/fw/forwarder.t.cpp
index 82a93ea..85e77d0 100644
--- a/tests/daemon/fw/forwarder.t.cpp
+++ b/tests/daemon/fw/forwarder.t.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,
@@ -52,7 +52,7 @@
   forwarder.addFace(face2);
 
   Fib& fib = forwarder.getFib();
-  fib.insert("/A").first->addNextHop(*face2, 0);
+  fib.insert("/A").first->addOrUpdateNextHop(*face2, 0, 0);
 
   BOOST_CHECK_EQUAL(forwarder.getCounters().nInInterests, 0);
   BOOST_CHECK_EQUAL(forwarder.getCounters().nOutInterests, 0);
@@ -98,7 +98,7 @@
   dataA->setTag(make_shared<lp::IncomingFaceIdTag>(face3->getId()));
 
   Fib& fib = forwarder.getFib();
-  fib.insert("/A").first->addNextHop(*face2, 0);
+  fib.insert("/A").first->addOrUpdateNextHop(*face2, 0, 0);
 
   Pit& pit = forwarder.getPit();
   BOOST_CHECK_EQUAL(pit.size(), 0);
@@ -163,7 +163,7 @@
   forwarder.addFace(face3);
 
   Fib& fib = forwarder.getFib();
-  fib.insert("/A").first->addNextHop(*face3, 0);
+  fib.insert("/A").first->addOrUpdateNextHop(*face3, 0, 0);
 
   shared_ptr<Interest> interest = makeInterest("/A/B");
   interest->setTag(make_shared<lp::NextHopFaceIdTag>(face2->getId()));
@@ -498,7 +498,7 @@
   forwarder.addFace(face4);
 
   Fib& fib = forwarder.getFib();
-  fib.insert("/zT4XwK0Hnx").first->addNextHop(*face4, 0);
+  fib.insert("/zT4XwK0Hnx").first->addOrUpdateNextHop(*face4, 0, 0);
 
   // receive Interest on face1
   face1->sentNacks.clear();
@@ -550,7 +550,7 @@
   });
 
   Fib& fib = forwarder.getFib();
-  fib.insert("/A").first->addNextHop(*face2, 0);
+  fib.insert("/A").first->addOrUpdateNextHop(*face2, 0, 0);
 
   // receive an Interest
   shared_ptr<Interest> interest = makeInterest("ndn:/A/1");
diff --git a/tests/daemon/fw/multicast-strategy.t.cpp b/tests/daemon/fw/multicast-strategy.t.cpp
index d57f801..04de9b2 100644
--- a/tests/daemon/fw/multicast-strategy.t.cpp
+++ b/tests/daemon/fw/multicast-strategy.t.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,
@@ -70,9 +70,9 @@
 BOOST_AUTO_TEST_CASE(Forward2)
 {
   fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face1, 0);
-  fibEntry.addNextHop(*face2, 0);
-  fibEntry.addNextHop(*face3, 0);
+  fibEntry.addOrUpdateNextHop(*face1, 0, 0);
+  fibEntry.addOrUpdateNextHop(*face2, 0, 0);
+  fibEntry.addOrUpdateNextHop(*face3, 0, 0);
 
   shared_ptr<Interest> interest = makeInterest("ndn:/H0D6i5fc");
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
@@ -124,7 +124,7 @@
 BOOST_AUTO_TEST_CASE(RejectLoopback)
 {
   fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face1, 0);
+  fibEntry.addOrUpdateNextHop(*face1, 0, 0);
 
   shared_ptr<Interest> interest = makeInterest("ndn:/H0D6i5fc");
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
diff --git a/tests/daemon/fw/ncc-strategy.t.cpp b/tests/daemon/fw/ncc-strategy.t.cpp
index 2e9ee18..38a2401 100644
--- a/tests/daemon/fw/ncc-strategy.t.cpp
+++ b/tests/daemon/fw/ncc-strategy.t.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,
@@ -63,8 +63,8 @@
 
   Fib& fib = forwarder.getFib();
   fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face1, 10);
-  fibEntry.addNextHop(*face2, 20);
+  fibEntry.addOrUpdateNextHop(*face1, 0, 10);
+  fibEntry.addOrUpdateNextHop(*face2, 0, 20);
 
   Pit& pit = forwarder.getPit();
 
@@ -122,7 +122,7 @@
 
   Fib& fib = forwarder.getFib();
   fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face1, 10);
+  fibEntry.addOrUpdateNextHop(*face1, 0, 10);
 
   Pit& pit = forwarder.getPit();
 
@@ -153,7 +153,7 @@
   strategy.afterReceiveInterest(*face3, *interest2, pitEntry2);
 
   // FIB entry is changed before doPropagate executes
-  fibEntry.addNextHop(*face2, 20);
+  fibEntry.addOrUpdateNextHop(*face2, 0, 20);
   this->advanceClocks(time::milliseconds(10), time::milliseconds(1000));// should not crash
 }
 
@@ -173,8 +173,8 @@
 
   Fib& fib = forwarder.getFib();
   fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face1, 10);
-  fibEntry.addNextHop(*face2, 20);
+  fibEntry.addOrUpdateNextHop(*face1, 0, 10);
+  fibEntry.addOrUpdateNextHop(*face2, 0, 20);
 
   Pit& pit = forwarder.getPit();
 
@@ -228,7 +228,7 @@
 
   Fib& fib = forwarder.getFib();
   fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face2, 10);
+  fibEntry.addOrUpdateNextHop(*face2, 0, 10);
 
   Pit& pit = forwarder.getPit();
 
@@ -273,8 +273,8 @@
 
   Fib& fib = forwarder.getFib();
   fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face1, 10); // face1 is top-ranked nexthop
-  fibEntry.addNextHop(*face2, 20);
+  fibEntry.addOrUpdateNextHop(*face1, 0, 10); // face1 is top-ranked nexthop
+  fibEntry.addOrUpdateNextHop(*face2, 0, 20);
 
   Pit& pit = forwarder.getPit();
 
@@ -376,7 +376,7 @@
   // NccStrategy has selected one path as the best.
   // When we reduce the RTT of the other path, ideally it should be selected as the best face.
   // However, this won't happen due to a weakness in NccStrategy.
-  // See http://redmine.named-data.net/issues/3411#note-4
+  // See https://redmine.named-data.net/issues/3411#note-4
   shared_ptr<Face> bestFace1 = getMeInfo()->bestFace.lock();
   if (bestFace1.get() == &linkAB->getFace(nodeA)) {
     linkCD->setDelay(time::milliseconds(5));
diff --git a/tests/daemon/fw/strategy-nack-return.t.cpp b/tests/daemon/fw/strategy-nack-return.t.cpp
index b9c2421..aea8d88 100644
--- a/tests/daemon/fw/strategy-nack-return.t.cpp
+++ b/tests/daemon/fw/strategy-nack-return.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  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,
@@ -96,9 +96,9 @@
                                  S, Strategies, StrategyNackReturnFixture<S>)
 {
   fib::Entry& fibEntry = *this->fib.insert(Name()).first;
-  fibEntry.addNextHop(*this->face3, 10);
-  fibEntry.addNextHop(*this->face4, 20);
-  fibEntry.addNextHop(*this->face5, 30);
+  fibEntry.addOrUpdateNextHop(*this->face3, 0, 10);
+  fibEntry.addOrUpdateNextHop(*this->face4, 0, 20);
+  fibEntry.addOrUpdateNextHop(*this->face5, 0, 30);
 
   shared_ptr<Interest> interest1 = makeInterest("/McQYjMbm", 992);
   shared_ptr<Interest> interest2 = makeInterest("/McQYjMbm", 114);
@@ -131,9 +131,9 @@
                                  S, Strategies, StrategyNackReturnFixture<S>)
 {
   fib::Entry& fibEntry = *this->fib.insert(Name()).first;
-  fibEntry.addNextHop(*this->face3, 10);
-  fibEntry.addNextHop(*this->face4, 20);
-  fibEntry.addNextHop(*this->face5, 30);
+  fibEntry.addOrUpdateNextHop(*this->face3, 0, 10);
+  fibEntry.addOrUpdateNextHop(*this->face4, 0, 20);
+  fibEntry.addOrUpdateNextHop(*this->face5, 0, 30);
 
   shared_ptr<Interest> interest1 = makeInterest("/aS9FAyUV19", 286);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest1).first;
@@ -164,9 +164,9 @@
                                  S, Strategies, StrategyNackReturnFixture<S>)
 {
   fib::Entry& fibEntry = *this->fib.insert(Name()).first;
-  fibEntry.addNextHop(*this->face3, 10);
-  fibEntry.addNextHop(*this->face4, 20);
-  fibEntry.addNextHop(*this->face5, 30);
+  fibEntry.addOrUpdateNextHop(*this->face3, 0, 10);
+  fibEntry.addOrUpdateNextHop(*this->face4, 0, 20);
+  fibEntry.addOrUpdateNextHop(*this->face5, 0, 30);
 
   shared_ptr<Interest> interest1 = makeInterest("/sIYw0TXWDj", 115);
   interest1->setInterestLifetime(time::milliseconds(400));
@@ -317,9 +317,9 @@
                                  StrategyNackReturnFixture<BestRouteStrategy2>)
 {
   fib::Entry& fibEntry = *fib.insert(Name()).first;
-  fibEntry.addNextHop(*face3, 10);
-  fibEntry.addNextHop(*face4, 20);
-  fibEntry.addNextHop(*face5, 30);
+  fibEntry.addOrUpdateNextHop(*face3, 0, 10);
+  fibEntry.addOrUpdateNextHop(*face4, 0, 20);
+  fibEntry.addOrUpdateNextHop(*face5, 0, 30);
 
   shared_ptr<Interest> interest1 = makeInterest("/F6sEwB24I", 282);
   shared_ptr<pit::Entry> pitEntry = pit.insert(*interest1).first;
diff --git a/tests/daemon/fw/strategy-no-route.t.cpp b/tests/daemon/fw/strategy-no-route.t.cpp
index 18f45a8..8183caf 100644
--- a/tests/daemon/fw/strategy-no-route.t.cpp
+++ b/tests/daemon/fw/strategy-no-route.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  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,
@@ -117,7 +117,7 @@
   void
   insertFibEntry(StrategyNoRouteFixture<S>* fixture)
   {
-    fixture->fib.insert(Name()).first->addNextHop(*fixture->face1, 10);
+    fixture->fib.insert(Name()).first->addOrUpdateNextHop(*fixture->face1, 0, 10);
   }
 };
 
@@ -134,7 +134,7 @@
   void
   insertFibEntry(StrategyNoRouteFixture<S>* fixture)
   {
-    fixture->fib.insert("/localhop").first->addNextHop(*fixture->face2, 10);
+    fixture->fib.insert("/localhop").first->addOrUpdateNextHop(*fixture->face2, 0, 10);
     // face1 and face2 are both non-local; Interest from face1 cannot be forwarded to face2
   }
 };
diff --git a/tests/daemon/fw/strategy-scope-control.t.cpp b/tests/daemon/fw/strategy-scope-control.t.cpp
index 4c6494a..bd59838 100644
--- a/tests/daemon/fw/strategy-scope-control.t.cpp
+++ b/tests/daemon/fw/strategy-scope-control.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2017,  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,
@@ -118,7 +118,7 @@
                                  T, Tests, StrategyScopeControlFixture<typename T::Strategy>)
 {
   fib::Entry* fibEntry = this->fib.insert("/localhost/A").first;
-  fibEntry->addNextHop(*this->localFace4, 10);
+  fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 10);
 
   shared_ptr<Interest> interest = makeInterest("/localhost/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
@@ -137,7 +137,7 @@
                                  T, Tests, StrategyScopeControlFixture<typename T::Strategy>)
 {
   fib::Entry* fibEntry = this->fib.insert("/localhost/A").first;
-  fibEntry->addNextHop(*this->nonLocalFace2, 10);
+  fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
 
   shared_ptr<Interest> interest = makeInterest("/localhost/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
@@ -159,8 +159,8 @@
                                  T, Tests, StrategyScopeControlFixture<typename T::Strategy>)
 {
   fib::Entry* fibEntry = this->fib.insert("/localhost/A").first;
-  fibEntry->addNextHop(*this->nonLocalFace2, 10);
-  fibEntry->addNextHop(*this->localFace4, 20);
+  fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
+  fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 20);
 
   shared_ptr<Interest> interest = makeInterest("/localhost/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
@@ -180,7 +180,7 @@
                                  T, Tests, StrategyScopeControlFixture<typename T::Strategy>)
 {
   fib::Entry* fibEntry = this->fib.insert("/localhop/A").first;
-  fibEntry->addNextHop(*this->nonLocalFace2, 10);
+  fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
 
   shared_ptr<Interest> interest = makeInterest("/localhop/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
@@ -202,8 +202,8 @@
                                  T, Tests, StrategyScopeControlFixture<typename T::Strategy>)
 {
   fib::Entry* fibEntry = this->fib.insert("/localhop/A").first;
-  fibEntry->addNextHop(*this->nonLocalFace2, 10);
-  fibEntry->addNextHop(*this->localFace4, 20);
+  fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 10);
+  fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 20);
 
   shared_ptr<Interest> interest = makeInterest("/localhop/A/1");
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
@@ -223,8 +223,8 @@
                                  T, Tests, StrategyScopeControlFixture<typename T::Strategy>)
 {
   fib::Entry* fibEntry = this->fib.insert("/localhost/A").first;
-  fibEntry->addNextHop(*this->localFace4, 10);
-  fibEntry->addNextHop(*this->nonLocalFace2, 20);
+  fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 10);
+  fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 20);
 
   shared_ptr<Interest> interest = makeInterest("/localhost/A/1", 1460);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
@@ -248,8 +248,8 @@
                                  T, Tests, StrategyScopeControlFixture<typename T::Strategy>)
 {
   fib::Entry* fibEntry = this->fib.insert("/localhop/A").first;
-  fibEntry->addNextHop(*this->localFace4, 10);
-  fibEntry->addNextHop(*this->nonLocalFace2, 20);
+  fibEntry->addOrUpdateNextHop(*this->localFace4, 0, 10);
+  fibEntry->addOrUpdateNextHop(*this->nonLocalFace2, 0, 20);
 
   shared_ptr<Interest> interest = makeInterest("/localhop/A/1", 1377);
   shared_ptr<pit::Entry> pitEntry = this->pit.insert(*interest).first;
diff --git a/tests/daemon/fw/topology-tester.cpp b/tests/daemon/fw/topology-tester.cpp
index 41d5d8c..15bbc3c 100644
--- a/tests/daemon/fw/topology-tester.cpp
+++ b/tests/daemon/fw/topology-tester.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,
@@ -241,7 +241,7 @@
 {
   Forwarder& forwarder = this->getForwarder(i);
   Fib& fib = forwarder.getFib();
-  fib.insert(prefix).first->addNextHop(const_cast<Face&>(face), cost);
+  fib.insert(prefix).first->addOrUpdateNextHop(const_cast<Face&>(face), 0, cost);
 }
 
 void
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index f0a91ff..5fd193d 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.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,
@@ -301,9 +301,9 @@
   BOOST_REQUIRE_NE(face3, face::INVALID_FACEID);
 
   fib::Entry* entry = m_fib.insert("/hello").first;
-  entry->addNextHop(*m_faceTable.get(face1), 101);
-  entry->addNextHop(*m_faceTable.get(face2), 202);
-  entry->addNextHop(*m_faceTable.get(face3), 303);
+  entry->addOrUpdateNextHop(*m_faceTable.get(face1), 0, 101);
+  entry->addOrUpdateNextHop(*m_faceTable.get(face2), 0, 202);
+  entry->addOrUpdateNextHop(*m_faceTable.get(face3), 0, 303);
 
   testRemoveNextHop(makeParameters("/hello", face1));
   BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
@@ -354,8 +354,8 @@
   };
 
   fib::Entry* entry = m_fib.insert("/hello").first;
-  entry->addNextHop(*m_faceTable.get(face1), 101);
-  entry->addNextHop(*m_faceTable.get(face2), 202);
+  entry->addOrUpdateNextHop(*m_faceTable.get(face1), 0, 101);
+  entry->addOrUpdateNextHop(*m_faceTable.get(face2), 0, 202);
 
   testWithImplicitFaceId(ControlParameters().setName("/hello").setFaceId(0), face1);
   BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
@@ -385,7 +385,7 @@
     receiveInterest(req);
   };
 
-  m_fib.insert("/hello").first->addNextHop(*m_faceTable.get(face1), 101);
+  m_fib.insert("/hello").first->addOrUpdateNextHop(*m_faceTable.get(face1), 0, 101);
 
   testRemoveNextHop(makeParameters("/hello", face2 + 100));
   BOOST_REQUIRE_EQUAL(m_responses.size(), 1); // face does not exist
@@ -410,8 +410,8 @@
     Name prefix = Name("test").appendSegment(i);
     actualPrefixes.insert(prefix);
     fib::Entry* fibEntry = m_fib.insert(prefix).first;
-    fibEntry->addNextHop(*m_faceTable.get(addFace()), std::numeric_limits<uint8_t>::max() - 1);
-    fibEntry->addNextHop(*m_faceTable.get(addFace()), std::numeric_limits<uint8_t>::max() - 2);
+    fibEntry->addOrUpdateNextHop(*m_faceTable.get(addFace()), 0, std::numeric_limits<uint8_t>::max() - 1);
+    fibEntry->addOrUpdateNextHop(*m_faceTable.get(addFace()), 0, std::numeric_limits<uint8_t>::max() - 2);
   }
 
   receiveInterest(Interest("/localhost/nfd/fib/list").setCanBePrefix(true));
diff --git a/tests/daemon/table/cleanup.t.cpp b/tests/daemon/table/cleanup.t.cpp
index 20638ab..3365a50 100644
--- a/tests/daemon/table/cleanup.t.cpp
+++ b/tests/daemon/table/cleanup.t.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,
@@ -50,7 +50,7 @@
     Name name = Name("/P").appendVersion(i);
 
     fib::Entry* fibEntry = fib.insert(name).first;
-    fibEntry->addNextHop(*face1, 0);
+    fibEntry->addOrUpdateNextHop(*face1, 0, 0);
 
     shared_ptr<Interest> interest = makeInterest(name);
     shared_ptr<pit::Entry> pitEntry = pit.insert(*interest).first;
@@ -89,24 +89,24 @@
   BOOST_CHECK_EQUAL(fib.size(), 0);
 
   fib::Entry* entryA = fib.insert("/A").first;
-  entryA->addNextHop(*face1, 0);
-  entryA->addNextHop(*face2, 0);
+  entryA->addOrUpdateNextHop(*face1, 0, 0);
+  entryA->addOrUpdateNextHop(*face2, 0, 0);
   // {'/A':[1,2]}
 
   fib::Entry* entryB = fib.insert("/B").first;
-  entryB->addNextHop(*face1, 0);
+  entryB->addOrUpdateNextHop(*face1, 0, 0);
   // {'/A':[1,2], '/B':[1]}
 
   fib::Entry* entryC = fib.insert("/C").first;
-  entryC->addNextHop(*face2, 1);
+  entryC->addOrUpdateNextHop(*face2, 0, 1);
   // {'/A':[1,2], '/B':[1], '/C':[2]}
 
   fib::Entry* entryB1 = fib.insert("/B/1").first;
-  entryB1->addNextHop(*face1, 0);
+  entryB1->addOrUpdateNextHop(*face1, 0, 0);
   // {'/A':[1,2], '/B':[1], '/B/1':[1], '/C':[2]}
 
   fib::Entry* entryB12 = fib.insert("/B/1/2").first;
-  entryB12->addNextHop(*face1, 0);
+  entryB12->addOrUpdateNextHop(*face1, 0, 0);
   // {'/A':[1,2], '/B':[1], '/B/1':[1], '/B/1/2':[1], '/C':[2]}
 
   // ---- close face1 ----
diff --git a/tests/daemon/table/fib.t.cpp b/tests/daemon/table/fib.t.cpp
index 204c5a3..0a6ccff 100644
--- a/tests/daemon/table/fib.t.cpp
+++ b/tests/daemon/table/fib.t.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,
@@ -51,71 +51,138 @@
   // []
   BOOST_CHECK_EQUAL(entry.getNextHops().size(), 0);
 
-  entry.addNextHop(*face1, 20);
-  // [(face1,20)]
+  // [(face, cost, endpointId)]
+  entry.addOrUpdateNextHop(*face1, 200, 20);
+  // [(face1,200,20)]
   BOOST_CHECK_EQUAL(entry.getNextHops().size(), 1);
   BOOST_CHECK_EQUAL(&entry.getNextHops().begin()->getFace(), face1.get());
+  BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getEndpointId(), 200);
   BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getCost(), 20);
 
-  entry.addNextHop(*face1, 30);
-  // [(face1,30)]
-  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 1);
-  BOOST_CHECK_EQUAL(&entry.getNextHops().begin()->getFace(), face1.get());
-  BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getCost(), 30);
-
-  entry.addNextHop(*face2, 40);
-  // [(face1,30), (face2,40)]
+  entry.addOrUpdateNextHop(*face1, 300, 30);
+  // [(face1,200,20), (face1,300,30)]
   BOOST_CHECK_EQUAL(entry.getNextHops().size(), 2);
+  BOOST_CHECK_EQUAL(&entry.getNextHops().begin()->getFace(), face1.get());
+  BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getEndpointId(), 200);
+  BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getCost(), 20);
+
+  entry.addOrUpdateNextHop(*face2, 400, 40);
+  // [(face1,200,20), (face1,300,30), (face2,400,40)]
+  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 3);
   {
     NextHopList::const_iterator it = entry.getNextHops().begin();
     BOOST_REQUIRE(it != entry.getNextHops().end());
     BOOST_CHECK_EQUAL(&it->getFace(), face1.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 200);
+    BOOST_CHECK_EQUAL(it->getCost(), 20);
+
+    ++it;
+    BOOST_REQUIRE(it != entry.getNextHops().end());
+    BOOST_CHECK_EQUAL(&it->getFace(), face1.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 300);
     BOOST_CHECK_EQUAL(it->getCost(), 30);
 
     ++it;
     BOOST_REQUIRE(it != entry.getNextHops().end());
     BOOST_CHECK_EQUAL(&it->getFace(), face2.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 400);
     BOOST_CHECK_EQUAL(it->getCost(), 40);
 
     ++it;
     BOOST_CHECK(it == entry.getNextHops().end());
   }
 
-  entry.addNextHop(*face2, 10);
-  // [(face2,10), (face1,30)]
-  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 2);
+  entry.addOrUpdateNextHop(*face2, 100, 10);
+  // [(face2,100,10), (face1,200,20), (face1,300,30), (face2,400,40)]
+  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 4);
   {
     NextHopList::const_iterator it = entry.getNextHops().begin();
     BOOST_REQUIRE(it != entry.getNextHops().end());
     BOOST_CHECK_EQUAL(&it->getFace(), face2.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 100);
     BOOST_CHECK_EQUAL(it->getCost(), 10);
 
     ++it;
     BOOST_REQUIRE(it != entry.getNextHops().end());
     BOOST_CHECK_EQUAL(&it->getFace(), face1.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 200);
+    BOOST_CHECK_EQUAL(it->getCost(), 20);
+
+    ++it;
+    BOOST_REQUIRE(it != entry.getNextHops().end());
+    BOOST_CHECK_EQUAL(&it->getFace(), face1.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 300);
     BOOST_CHECK_EQUAL(it->getCost(), 30);
 
     ++it;
+    BOOST_REQUIRE(it != entry.getNextHops().end());
+    BOOST_CHECK_EQUAL(&it->getFace(), face2.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 400);
+    BOOST_CHECK_EQUAL(it->getCost(), 40);
+
+    ++it;
     BOOST_CHECK(it == entry.getNextHops().end());
   }
 
-  entry.removeNextHop(*face1);
-  // [(face2,10)]
-  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 1);
+  entry.addOrUpdateNextHop(*face1, 200, 50);
+  // [(face2,100,10), (face1,300,30), (face2,400,40), (face1,200,50)]
+  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 4);
+  {
+    NextHopList::const_iterator it = entry.getNextHops().begin();
+    BOOST_REQUIRE(it != entry.getNextHops().end());
+    BOOST_CHECK_EQUAL(&it->getFace(), face2.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 100);
+    BOOST_CHECK_EQUAL(it->getCost(), 10);
+
+    ++it;
+    BOOST_REQUIRE(it != entry.getNextHops().end());
+    BOOST_CHECK_EQUAL(&it->getFace(), face1.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 300);
+    BOOST_CHECK_EQUAL(it->getCost(), 30);
+
+    ++it;
+    BOOST_REQUIRE(it != entry.getNextHops().end());
+    BOOST_CHECK_EQUAL(&it->getFace(), face2.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 400);
+    BOOST_CHECK_EQUAL(it->getCost(), 40);
+
+    ++it;
+    BOOST_REQUIRE(it != entry.getNextHops().end());
+    BOOST_CHECK_EQUAL(&it->getFace(), face1.get());
+    BOOST_CHECK_EQUAL(it->getEndpointId(), 200);
+    BOOST_CHECK_EQUAL(it->getCost(), 50);
+
+    ++it;
+    BOOST_CHECK(it == entry.getNextHops().end());
+  }
+
+  entry.removeNextHop(*face1, 200);
+  // [(face2,100,10), (face1,300,30), (face2,400,40)]
+  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 3);
   BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getFace().getId(), face2->getId());
+  BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getEndpointId(), 100);
   BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getCost(), 10);
 
-  entry.removeNextHop(*face1);
-  // [(face2,10)]
-  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 1);
+  entry.removeNextHop(*face1, 200);
+  // [(face2,100,10), (face1,300,30), (face2,400,40)]
+  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 3);
   BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getFace().getId(), face2->getId());
+  BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getEndpointId(), 100);
   BOOST_CHECK_EQUAL(entry.getNextHops().begin()->getCost(), 10);
 
-  entry.removeNextHop(*face2);
+  entry.removeNextHop(*face2,100);
+  // [(face1,300,30), (face2,400,40)]
+  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 2);
+
+  entry.removeNextHop(*face2,400);
+  // [(face1,300,30)]
+  BOOST_CHECK_EQUAL(entry.getNextHops().size(), 1);
+
+  entry.removeNextHop(*face1,300);
   // []
   BOOST_CHECK_EQUAL(entry.getNextHops().size(), 0);
 
-  entry.removeNextHop(*face2);
+  entry.removeNextHop(*face1,300);
   // []
   BOOST_CHECK_EQUAL(entry.getNextHops().size(), 0);
 }
