diff --git a/daemon/fw/forwarder.cpp b/daemon/fw/forwarder.cpp
index 76e4127..1e01e02 100644
--- a/daemon/fw/forwarder.cpp
+++ b/daemon/fw/forwarder.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-2017,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -146,6 +146,15 @@
     return;
   }
 
+  // strip Link object if Interest has reached producer region
+  if (interest.hasLink() && m_networkRegionTable.isInProducerRegion(interest.getLink())) {
+    NFD_LOG_DEBUG("onIncomingInterest face=" << inFace.getId() <<
+                  " interest=" << interest.getName() << " reaching-producer-region");
+    Interest& interestRef = const_cast<Interest&>(interest);
+    interestRef.unsetLink();
+    interestRef.unsetSelectedDelegation();
+  }
+
   // PIT insert
   shared_ptr<pit::Entry> pitEntry = m_pit.insert(interest).first;
 
diff --git a/daemon/fw/strategy.cpp b/daemon/fw/strategy.cpp
index 4aeb015..0419a22 100644
--- a/daemon/fw/strategy.cpp
+++ b/daemon/fw/strategy.cpp
@@ -196,7 +196,6 @@
 Strategy::lookupFib(const pit::Entry& pitEntry) const
 {
   const Fib& fib = m_forwarder.getFib();
-  const NetworkRegionTable& nrt = m_forwarder.getNetworkRegionTable();
 
   const Interest& interest = pitEntry.getInterest();
   // has Link object?
@@ -209,13 +208,8 @@
 
   const Link& link = interest.getLink();
 
-  // in producer region?
-  if (nrt.isInProducerRegion(link)) {
-    // FIB lookup with Interest name
-    const fib::Entry& fibEntry = fib.findLongestPrefixMatch(pitEntry);
-    NFD_LOG_TRACE("lookupFib inProducerRegion found=" << fibEntry.getPrefix());
-    return fibEntry;
-  }
+  // Link should have been stripped by incoming Interest pipeline when reaching producer region
+  BOOST_ASSERT(!m_forwarder.getNetworkRegionTable().isInProducerRegion(link));
 
   // has SelectedDelegation?
   if (interest.hasSelectedDelegation()) {
diff --git a/tests/daemon/fw/link-forwarding.t.cpp b/tests/daemon/fw/link-forwarding.t.cpp
index 864d598..8bf1dfb 100644
--- a/tests/daemon/fw/link-forwarding.t.cpp
+++ b/tests/daemon/fw/link-forwarding.t.cpp
@@ -70,13 +70,11 @@
       topo.setStrategy<BestRouteStrategy2>(node);
     }
 
-    topo.getForwarder(nodeA).getNetworkRegionTable().insert("/arizona/cs/avenir");
     topo.getForwarder(nodeH).getNetworkRegionTable().insert("/arizona/cs/hobo");
     topo.getForwarder(nodeT).getNetworkRegionTable().insert("/telia/terabits/router");
-    topo.getForwarder(nodeP).getNetworkRegionTable().insert("/telia/terabits/serverP");
     topo.getForwarder(nodeC).getNetworkRegionTable().insert("/ucsd/caida/click");
     topo.getForwarder(nodeS).getNetworkRegionTable().insert("/ucla/cs/spurs");
-    topo.getForwarder(nodeQ).getNetworkRegionTable().insert("/ucla/cs/serverQ");
+    // NetworkRegionTable configuration is unnecessary on end hosts
 
     linkAH = topo.addLink("AH", time::milliseconds(10), {nodeA, nodeH});
     linkHT = topo.addLink("HT", time::milliseconds(10), {nodeH, nodeT});
@@ -139,12 +137,11 @@
   BOOST_CHECK_EQUAL(interestHT.hasSelectedDelegation(), true);
   BOOST_CHECK_EQUAL(interestHT.getSelectedDelegation(), "/telia/terabits");
 
-  // T forwards to P, no change to Link and SelectedDelegation
+  // T forwards to P, Link and SelectedDelegation are stripped when Interest reaches producer region
   BOOST_CHECK_EQUAL(linkTP->getFace(nodeT).getCounters().nOutInterests, 1);
   const Interest& interestTP = topo.getPcap(linkTP->getFace(nodeT)).sentInterests.at(0);
-  BOOST_CHECK_EQUAL(interestTP.hasLink(), true);
-  BOOST_CHECK_EQUAL(interestTP.hasSelectedDelegation(), true);
-  BOOST_CHECK_EQUAL(interestTP.getSelectedDelegation(), "/telia/terabits");
+  BOOST_CHECK_EQUAL(interestTP.hasLink(), false);
+  BOOST_CHECK_EQUAL(interestTP.hasSelectedDelegation(), false);
 
   // Data is served by P and reaches A
   BOOST_CHECK_EQUAL(producerP->getForwarderFace().getCounters().nInData, 1);
@@ -180,12 +177,11 @@
   BOOST_CHECK_EQUAL(interestCS.hasSelectedDelegation(), true);
   BOOST_CHECK_EQUAL(interestCS.getSelectedDelegation(), "/ucla/cs");
 
-  // S forwards to Q, no change to Link and SelectedDelegation
+  // S forwards to Q, Link and SelectedDelegation are stripped when Interest reaches producer region
   BOOST_CHECK_EQUAL(linkSQ->getFace(nodeS).getCounters().nOutInterests, 1);
   const Interest& interestSQ = topo.getPcap(linkSQ->getFace(nodeS)).sentInterests.at(0);
-  BOOST_CHECK_EQUAL(interestSQ.hasLink(), true);
-  BOOST_CHECK_EQUAL(interestSQ.hasSelectedDelegation(), true);
-  BOOST_CHECK_EQUAL(interestSQ.getSelectedDelegation(), "/ucla/cs");
+  BOOST_CHECK_EQUAL(interestSQ.hasLink(), false);
+  BOOST_CHECK_EQUAL(interestSQ.hasSelectedDelegation(), false);
 
   // Data is served by Q and reaches A
   BOOST_CHECK_EQUAL(producerQ->getForwarderFace().getCounters().nInData, 1);
