diff --git a/src/lp/cache-policy.hpp b/src/lp/cache-policy.hpp
index a67a9c3..5c5c5d1 100644
--- a/src/lp/cache-policy.hpp
+++ b/src/lp/cache-policy.hpp
@@ -25,6 +25,7 @@
 #define NDN_CXX_LP_CACHE_POLICY_HPP
 
 #include "../common.hpp"
+#include "../tag.hpp"
 #include "../encoding/encoding-buffer.hpp"
 #include "../encoding/block-helpers.hpp"
 
@@ -109,4 +110,4 @@
 } // namespace lp
 } // namespace ndn
 
-#endif // NDN_CXX_LP_CACHE_POLICY_HPP
\ No newline at end of file
+#endif // NDN_CXX_LP_CACHE_POLICY_HPP
diff --git a/src/lp/detail/field-decl.hpp b/src/lp/detail/field-decl.hpp
index 02a3677..44df431 100644
--- a/src/lp/detail/field-decl.hpp
+++ b/src/lp/detail/field-decl.hpp
@@ -22,14 +22,11 @@
 #ifndef NDN_CXX_LP_DETAIL_FIELD_DECL_HPP
 #define NDN_CXX_LP_DETAIL_FIELD_DECL_HPP
 
-#include "../../common.hpp"
-
 #include "../field.hpp"
-#include "../sequence.hpp"
-#include "../cache-policy.hpp"
-#include "../nack.hpp"
 #include "../tlv.hpp"
 
+#include "../../encoding/block-helpers.hpp"
+#include "../../util/concepts.hpp"
 #include <boost/concept/requires.hpp>
 
 namespace ndn {
diff --git a/src/lp/field.hpp b/src/lp/field.hpp
index 199fb16..712bd86 100644
--- a/src/lp/field.hpp
+++ b/src/lp/field.hpp
@@ -25,6 +25,8 @@
 #include "../common.hpp"
 #include "../encoding/encoding-buffer.hpp"
 
+#include <boost/concept/assert.hpp>
+#include <boost/concept/usage.hpp>
 #include <boost/type_traits.hpp>
 
 namespace ndn {
@@ -79,4 +81,4 @@
 } // namespace lp
 } // namespace ndn
 
-#endif // NDN_CXX_LP_FIELD_HPP
\ No newline at end of file
+#endif // NDN_CXX_LP_FIELD_HPP
diff --git a/src/lp/fields.hpp b/src/lp/fields.hpp
index ad656be..ff9db28 100644
--- a/src/lp/fields.hpp
+++ b/src/lp/fields.hpp
@@ -22,11 +22,11 @@
 #ifndef NDN_CXX_LP_FIELDS_HPP
 #define NDN_CXX_LP_FIELDS_HPP
 
-#include "../common.hpp"
-
-#include "tlv.hpp"
 #include "detail/field-decl.hpp"
-#include "field.hpp"
+
+#include "sequence.hpp"
+#include "cache-policy.hpp"
+#include "nack-header.hpp"
 
 #include <boost/mpl/set.hpp>
 
@@ -94,4 +94,4 @@
 } // namespace lp
 } // namespace ndn
 
-#endif // NDN_CXX_LP_FIELDS_HPP
\ No newline at end of file
+#endif // NDN_CXX_LP_FIELDS_HPP
diff --git a/src/lp/nack.hpp b/src/lp/nack.hpp
index a50221c..3b23cf6 100644
--- a/src/lp/nack.hpp
+++ b/src/lp/nack.hpp
@@ -27,16 +27,15 @@
 #include "../common.hpp"
 #include "../tag-host.hpp"
 #include "../interest.hpp"
-#include "../management/nfd-local-control-header.hpp"
 
 #include "nack-header.hpp"
 
 namespace ndn {
 namespace lp {
 
-/**
- * \brief represents a Network NACK
- * \details This type binds a NackHeader and an Interest, and is intended for use in network layer.
+/** \brief represents a Network Nack
+ *
+ *  This type binds a NackHeader and an Interest, and is intended for use in network layer.
  */
 class Nack : public TagHost
 {
@@ -88,18 +87,6 @@
     return *this;
   }
 
-  nfd::LocalControlHeader&
-  getLocalControlHeader()
-  {
-    return m_interest.getLocalControlHeader();
-  }
-
-  const nfd::LocalControlHeader&
-  getLocalControlHeader() const
-  {
-    return m_interest.getLocalControlHeader();
-  }
-
 public: // NackHeader proxy
   NackReason
   getReason() const
diff --git a/src/lp/tags.cpp b/src/lp/tags.cpp
new file mode 100644
index 0000000..53e0138
--- /dev/null
+++ b/src/lp/tags.cpp
@@ -0,0 +1,131 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2015 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "tags.hpp"
+#include "../encoding/nfd-constants.hpp"
+
+namespace ndn {
+namespace lp {
+
+#ifdef NDN_LP_KEEP_LOCAL_CONTROL_HEADER
+
+using ndn::nfd::INVALID_FACE_ID;
+
+LocalControlHeaderFacade::LocalControlHeaderFacade(TagHost& pkt)
+  : m_pkt(pkt)
+{
+}
+
+bool
+LocalControlHeaderFacade::hasIncomingFaceId() const
+{
+  return m_pkt.getTag<IncomingFaceIdTag>() != nullptr;
+}
+
+uint64_t
+LocalControlHeaderFacade::getIncomingFaceId() const
+{
+  shared_ptr<IncomingFaceIdTag> tag = m_pkt.getTag<IncomingFaceIdTag>();
+  if (tag == nullptr) {
+    return INVALID_FACE_ID;
+  }
+  return *tag;
+}
+
+void
+LocalControlHeaderFacade::setIncomingFaceId(uint64_t incomingFaceId)
+{
+  if (incomingFaceId == INVALID_FACE_ID) {
+    m_pkt.removeTag<IncomingFaceIdTag>();
+    return;
+  }
+
+  auto tag = make_shared<IncomingFaceIdTag>(incomingFaceId);
+  m_pkt.setTag(tag);
+}
+
+bool
+LocalControlHeaderFacade::hasNextHopFaceId() const
+{
+  return m_pkt.getTag<NextHopFaceIdTag>() != nullptr;
+}
+
+uint64_t
+LocalControlHeaderFacade::getNextHopFaceId() const
+{
+  shared_ptr<NextHopFaceIdTag> tag = m_pkt.getTag<NextHopFaceIdTag>();
+  if (tag == nullptr) {
+    return INVALID_FACE_ID;
+  }
+  return *tag;
+}
+
+void
+LocalControlHeaderFacade::setNextHopFaceId(uint64_t nextHopFaceId)
+{
+  if (nextHopFaceId == INVALID_FACE_ID) {
+    m_pkt.removeTag<NextHopFaceIdTag>();
+    return;
+  }
+
+  auto tag = make_shared<NextHopFaceIdTag>(nextHopFaceId);
+  m_pkt.setTag(tag);
+}
+
+bool
+LocalControlHeaderFacade::hasCachingPolicy() const
+{
+  return m_pkt.getTag<CachePolicyTag>() != nullptr;
+}
+
+LocalControlHeaderFacade::CachingPolicy
+LocalControlHeaderFacade::getCachingPolicy() const
+{
+  shared_ptr<CachePolicyTag> tag = m_pkt.getTag<CachePolicyTag>();
+  if (tag == nullptr) {
+    return INVALID_POLICY;
+  }
+  switch (tag->get().getPolicy()) {
+    case CachePolicyType::NO_CACHE:
+      return NO_CACHE;
+    default:
+      return INVALID_POLICY;
+  }
+}
+
+void
+LocalControlHeaderFacade::setCachingPolicy(CachingPolicy cachingPolicy)
+{
+  switch (cachingPolicy) {
+    case NO_CACHE: {
+      m_pkt.setTag(make_shared<CachePolicyTag>(CachePolicy().setPolicy(CachePolicyType::NO_CACHE)));
+      break;
+    }
+    default:
+      m_pkt.removeTag<CachePolicyTag>();
+      break;
+  }
+}
+
+#endif // NDN_LP_KEEP_LOCAL_CONTROL_HEADER
+
+} // namespace lp
+} // namespace ndn
diff --git a/src/lp/tags.hpp b/src/lp/tags.hpp
new file mode 100644
index 0000000..f91b3f1
--- /dev/null
+++ b/src/lp/tags.hpp
@@ -0,0 +1,111 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2015 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#ifndef NDN_CXX_LP_TAGS_HPP
+#define NDN_CXX_LP_TAGS_HPP
+
+#include "cache-policy.hpp"
+#include "../tag-host.hpp"
+
+namespace ndn {
+namespace lp {
+
+/** \class IncomingFaceIdTag
+ *  \brief a packet tag for IncomingFaceId field
+ *
+ *  This tag can be attached to Interest, Data, Nack.
+ */
+typedef SimpleTag<uint64_t, 10> IncomingFaceIdTag;
+
+/** \class NextHopFaceIdTag
+ *  \brief a packet tag for NextHopFaceId field
+ *
+ *  This tag can be attached to Interest.
+ */
+typedef SimpleTag<uint64_t, 11> NextHopFaceIdTag;
+
+/** \class CachePolicyTag
+ *  \brief a packet tag for CachePolicy field
+ *
+ *  This tag can be attached to Data.
+ */
+typedef SimpleTag<CachePolicy, 12> CachePolicyTag;
+
+
+#define NDN_LP_KEEP_LOCAL_CONTROL_HEADER
+
+#ifdef NDN_LP_KEEP_LOCAL_CONTROL_HEADER
+/** \brief expose NDNLPv2 tags as LocalControlHeader API
+ *
+ *  This class has the same public API as ndn::nfd::LocalControlHeader,
+ *  but internally accesses IncomingFaceIdTag, NextHopFaceIdTag, CachePolicyTag
+ *  on the host packet.
+ *
+ *  \deprecated use getTag and setTag with IncomingFaceIdTag, NextHopFaceIdTag, CachePolicyTag
+ */
+class LocalControlHeaderFacade
+{
+public:
+  DEPRECATED(
+  explicit
+  LocalControlHeaderFacade(TagHost& pkt));
+
+  bool
+  hasIncomingFaceId() const;
+
+  uint64_t
+  getIncomingFaceId() const;
+
+  void
+  setIncomingFaceId(uint64_t incomingFaceId);
+
+  bool
+  hasNextHopFaceId() const;
+
+  uint64_t
+  getNextHopFaceId() const;
+
+  void
+  setNextHopFaceId(uint64_t nextHopFaceId);
+
+  bool
+  hasCachingPolicy() const;
+
+  enum CachingPolicy : uint8_t {
+    INVALID_POLICY = 0,
+    NO_CACHE       = 1
+  };
+
+  CachingPolicy
+  getCachingPolicy() const;
+
+  void
+  setCachingPolicy(CachingPolicy cachingPolicy);
+
+private:
+  TagHost& m_pkt;
+};
+#endif // NDN_LP_KEEP_LOCAL_CONTROL_HEADER
+
+} // namespace lp
+} // namespace ndn
+
+#endif // NDN_CXX_LP_TAGS_HPP
