diff --git a/src/mgmt/nfd/face-event-notification.cpp b/src/mgmt/nfd/face-event-notification.cpp
index a65c7ba..a322ae9 100644
--- a/src/mgmt/nfd/face-event-notification.cpp
+++ b/src/mgmt/nfd/face-event-notification.cpp
@@ -50,6 +50,8 @@
   size_t totalLength = 0;
 
   totalLength += prependNonNegativeIntegerBlock(encoder,
+                 tlv::nfd::Flags, m_flags);
+  totalLength += prependNonNegativeIntegerBlock(encoder,
                  tlv::nfd::LinkType, m_linkType);
   totalLength += prependNonNegativeIntegerBlock(encoder,
                  tlv::nfd::FacePersistency, m_facePersistency);
@@ -150,6 +152,13 @@
   else {
     BOOST_THROW_EXCEPTION(Error("missing required LinkType field"));
   }
+
+  if (val != m_wire.elements_end() && val->type() == tlv::nfd::Flags) {
+    m_flags = readNonNegativeInteger(*val);
+  }
+  else {
+    BOOST_THROW_EXCEPTION(Error("missing required Flags field"));
+  }
 }
 
 FaceEventNotification&
@@ -192,8 +201,13 @@
      << "LocalUri: " << notification.getLocalUri() << ", "
      << "FaceScope: " << notification.getFaceScope() << ", "
      << "FacePersistency: " << notification.getFacePersistency() << ", "
-     << "LinkType: " << notification.getLinkType()
-     << ")";
+     << "LinkType: " << notification.getLinkType() << ", ";
+
+  auto osFlags = os.flags();
+  os << "Flags: " << std::showbase << std::hex << notification.getFlags();
+  os.flags(osFlags);
+
+  os << ")";
   return os;
 }
 
diff --git a/src/mgmt/nfd/face-status.cpp b/src/mgmt/nfd/face-status.cpp
index 584208c..d54f072 100644
--- a/src/mgmt/nfd/face-status.cpp
+++ b/src/mgmt/nfd/face-status.cpp
@@ -43,7 +43,6 @@
   , m_nOutNacks(0)
   , m_nInBytes(0)
   , m_nOutBytes(0)
-  , m_flags(0)
 {
 }
 
@@ -334,43 +333,6 @@
   return *this;
 }
 
-FaceStatus&
-FaceStatus::setFlags(uint64_t flags)
-{
-  m_wire.reset();
-  m_flags = flags;
-  return *this;
-}
-
-bool
-FaceStatus::getFlagBit(size_t bit) const
-{
-  if (bit >= 64) {
-    BOOST_THROW_EXCEPTION(std::out_of_range("bit must be within range [0, 64)"));
-  }
-
-  return m_flags & (1 << bit);
-}
-
-FaceStatus&
-FaceStatus::setFlagBit(size_t bit, bool value)
-{
-  if (bit >= 64) {
-    BOOST_THROW_EXCEPTION(std::out_of_range("bit must be within range [0, 64)"));
-  }
-
-  m_wire.reset();
-
-  if (value) {
-    m_flags |= (1 << bit);
-  }
-  else {
-    m_flags &= ~(1 << bit);
-  }
-
-  return *this;
-}
-
 void
 FaceStatus::wireReset() const
 {
diff --git a/src/mgmt/nfd/face-status.hpp b/src/mgmt/nfd/face-status.hpp
index a2ea259..4f20e53 100644
--- a/src/mgmt/nfd/face-status.hpp
+++ b/src/mgmt/nfd/face-status.hpp
@@ -147,21 +147,6 @@
   FaceStatus&
   setNOutBytes(uint64_t nOutBytes);
 
-  uint64_t
-  getFlags() const
-  {
-    return m_flags;
-  }
-
-  FaceStatus&
-  setFlags(uint64_t flags);
-
-  bool
-  getFlagBit(size_t bit) const;
-
-  FaceStatus&
-  setFlagBit(size_t bit, bool value);
-
 protected:
   void
   wireReset() const;
@@ -177,7 +162,6 @@
   uint64_t m_nOutNacks;
   uint64_t m_nInBytes;
   uint64_t m_nOutBytes;
-  uint64_t m_flags;
 
   mutable Block m_wire;
 };
diff --git a/src/mgmt/nfd/face-traits.hpp b/src/mgmt/nfd/face-traits.hpp
index d9422c3..48c2624 100644
--- a/src/mgmt/nfd/face-traits.hpp
+++ b/src/mgmt/nfd/face-traits.hpp
@@ -51,6 +51,7 @@
     , m_faceScope(FACE_SCOPE_NON_LOCAL)
     , m_facePersistency(FACE_PERSISTENCY_PERSISTENT)
     , m_linkType(LINK_TYPE_POINT_TO_POINT)
+    , m_flags(0x0)
   {
   }
 
@@ -138,6 +139,49 @@
     return static_cast<C&>(*this);
   }
 
+  uint64_t
+  getFlags() const
+  {
+    return m_flags;
+  }
+
+  C&
+  setFlags(uint64_t flags)
+  {
+    wireReset();
+    m_flags = flags;
+    return static_cast<C&>(*this);
+  }
+
+  bool
+  getFlagBit(size_t bit) const
+  {
+    if (bit >= 64) {
+      BOOST_THROW_EXCEPTION(std::out_of_range("bit must be within range [0, 64)"));
+    }
+
+    return m_flags & (1 << bit);
+  }
+
+  C&
+  setFlagBit(size_t bit, bool value)
+  {
+    if (bit >= 64) {
+      BOOST_THROW_EXCEPTION(std::out_of_range("bit must be within range [0, 64)"));
+    }
+
+    wireReset();
+
+    if (value) {
+      m_flags |= (1 << bit);
+    }
+    else {
+      m_flags &= ~(1 << bit);
+    }
+
+    return static_cast<C&>(*this);
+  }
+
 protected:
   virtual void
   wireReset() const = 0;
@@ -149,6 +193,7 @@
   FaceScope m_faceScope;
   FacePersistency  m_facePersistency;
   LinkType m_linkType;
+  uint64_t m_flags;
 };
 
 } // namespace nfd
