diff --git a/daemon/mgmt/face-manager.cpp b/daemon/mgmt/face-manager.cpp
index 237a914..e4769ff 100644
--- a/daemon/mgmt/face-manager.cpp
+++ b/daemon/mgmt/face-manager.cpp
@@ -12,6 +12,8 @@
 #include "face/tcp-factory.hpp"
 #include "face/udp-factory.hpp"
 
+#include <ndn-cpp-dev/management/nfd-face-event-notification.hpp>
+
 #ifdef HAVE_UNIX_SOCKETS
 #include "face/unix-stream-factory.hpp"
 #endif // HAVE_UNIX_SOCKETS
@@ -54,18 +56,24 @@
                              Name::Component("list"),
                              &FaceManager::listFaces
                              ),
+
+    UnsignedVerbAndProcessor(
+                             Name::Component("events"),
+                             &FaceManager::ignoreUnsignedVerb
+                             ),
   };
 
 const Name FaceManager::LIST_COMMAND_PREFIX("/localhost/nfd/faces/list");
 const size_t FaceManager::LIST_COMMAND_NCOMPS = LIST_COMMAND_PREFIX.size();
 
-
+const Name FaceManager::EVENTS_COMMAND_PREFIX("/localhost/nfd/faces/events");
 
 FaceManager::FaceManager(FaceTable& faceTable,
                          shared_ptr<InternalFace> face)
   : ManagerBase(face, FACE_MANAGER_PRIVILEGE)
   , m_faceTable(faceTable)
   , m_statusPublisher(m_faceTable, m_face, LIST_COMMAND_PREFIX)
+  , m_notificationStream(m_face, EVENTS_COMMAND_PREFIX)
   , m_signedVerbDispatch(SIGNED_COMMAND_VERBS,
                    SIGNED_COMMAND_VERBS +
                    (sizeof(SIGNED_COMMAND_VERBS) / sizeof(SignedVerbAndProcessor)))
@@ -76,6 +84,9 @@
 {
   face->setInterestFilter("/localhost/nfd/faces",
                           bind(&FaceManager::onFaceRequest, this, _2));
+
+  m_faceTable.onAdd    += bind(&FaceManager::onAddFace, this, _1);
+  m_faceTable.onRemove += bind(&FaceManager::onRemoveFace, this, _1);
 }
 
 FaceManager::~FaceManager()
@@ -632,15 +643,35 @@
                          ndn::nfd::FaceManagementOptions& options)
 {
   shared_ptr<Face> target = m_faceTable.get(options.getFaceId());
-  if (target)
+  if (static_cast<bool>(target))
     {
-      // don't call m_faceTable.remove(target): it's called by target->close() via onFail
       target->close();
     }
   sendResponse(requestName, 200, "Success");
 }
 
 void
+FaceManager::onAddFace(shared_ptr<Face> face)
+{
+  ndn::nfd::FaceEventNotification faceCreated(ndn::nfd::FACE_EVENT_CREATED,
+                                              face->getId(),
+                                              face->getUri().toString());
+
+  m_notificationStream.postNotification(faceCreated);
+}
+
+void
+FaceManager::onRemoveFace(shared_ptr<Face> face)
+{
+  ndn::nfd::FaceEventNotification faceDestroyed(ndn::nfd::FACE_EVENT_DESTROYED,
+                                                face->getId(),
+                                                face->getUri().toString());
+
+  m_notificationStream.postNotification(faceDestroyed);
+}
+
+
+void
 FaceManager::listFaces(const Interest& request)
 {
   const Name& command = request.getName();
diff --git a/daemon/mgmt/face-manager.hpp b/daemon/mgmt/face-manager.hpp
index 8efb509..6787084 100644
--- a/daemon/mgmt/face-manager.hpp
+++ b/daemon/mgmt/face-manager.hpp
@@ -13,6 +13,7 @@
 #include "mgmt/manager-base.hpp"
 #include "mgmt/config-file.hpp"
 #include "mgmt/face-status-publisher.hpp"
+#include "mgmt/notification-stream.hpp"
 #include "fw/face-table.hpp"
 
 #include <ndn-cpp-dev/management/nfd-face-management-options.hpp>
@@ -69,6 +70,9 @@
   destroyFace(const Name& requestName,
               ndn::nfd::FaceManagementOptions& options);
 
+  void
+  ignoreUnsignedVerb(const Interest& request);
+
   bool
   extractOptions(const Interest& request,
                  ndn::nfd::FaceManagementOptions& extractedOptions);
@@ -81,6 +85,12 @@
   void
   onConnectFailed(const Name& requestName, const std::string& reason);
 
+  void
+  onAddFace(shared_ptr<Face> face);
+
+  void
+  onRemoveFace(shared_ptr<Face> face);
+
 private:
   void
   onConfig(const ConfigSection& configSection, bool isDryRun, const std::string& filename);
@@ -115,6 +125,7 @@
   FactoryMap m_factories;
   FaceTable& m_faceTable;
   FaceStatusPublisher m_statusPublisher;
+  NotificationStream m_notificationStream;
 
   typedef function<void(FaceManager*,
                         const Name&,
@@ -147,6 +158,8 @@
 
   static const Name LIST_COMMAND_PREFIX;
   static const size_t LIST_COMMAND_NCOMPS;
+
+  static const Name EVENTS_COMMAND_PREFIX;
 };
 
 inline bool
@@ -170,6 +183,12 @@
 
 }
 
+inline void
+FaceManager::ignoreUnsignedVerb(const Interest& request)
+{
+  // do nothing
+}
+
 } // namespace nfd
 
 #endif // NFD_MGMT_FACE_MANAGER_HPP
diff --git a/daemon/mgmt/notification-stream.hpp b/daemon/mgmt/notification-stream.hpp
new file mode 100644
index 0000000..2741035
--- /dev/null
+++ b/daemon/mgmt/notification-stream.hpp
@@ -0,0 +1,60 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (C) 2014 Named Data Networking Project
+ * See COPYING for copyright and distribution information.
+ */
+#ifndef NFD_MGMT_NOTIFICATION_STREAM_HPP
+#define NFD_MGMT_NOTIFICATION_STREAM_HPP
+
+#include "mgmt/app-face.hpp"
+
+namespace nfd {
+
+class NotificationStream
+{
+public:
+  NotificationStream(shared_ptr<AppFace> face, const Name& prefix);
+
+  ~NotificationStream();
+
+  template <typename T> void
+  postNotification(const T& notification);
+
+private:
+  shared_ptr<AppFace> m_face;
+  const Name m_prefix;
+  uint64_t m_sequenceNo;
+};
+
+inline
+NotificationStream::NotificationStream(shared_ptr<AppFace> face, const Name& prefix)
+  : m_face(face)
+  , m_prefix(prefix)
+  , m_sequenceNo(0)
+{
+}
+
+template <typename T>
+inline void
+NotificationStream::postNotification(const T& notification)
+{
+  Name dataName(m_prefix);
+  dataName.appendSegment(m_sequenceNo);
+  shared_ptr<Data> data(make_shared<Data>(dataName));
+  data->setContent(notification.wireEncode());
+
+  m_face->sign(*data);
+  m_face->put(*data);
+
+  ++m_sequenceNo;
+}
+
+inline
+NotificationStream::~NotificationStream()
+{
+}
+
+} // namespace nfd
+
+
+#endif // NFD_MGMT_NOTIFICATION_STREAM_HPP
