diff --git a/daemon/mgmt/manager-base.cpp b/daemon/mgmt/manager-base.cpp
new file mode 100644
index 0000000..418c3d6
--- /dev/null
+++ b/daemon/mgmt/manager-base.cpp
@@ -0,0 +1,120 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "manager-base.hpp"
+
+namespace nfd {
+
+using ndn::mgmt::ValidateParameters;
+using ndn::mgmt::Authorization;
+
+ManagerBase::ManagerBase(Dispatcher& dispatcher,
+                         CommandValidator& validator,
+                         const std::string& module)
+  : m_dispatcher(dispatcher)
+  , m_validator(validator)
+  , m_mgmtModuleName(module)
+{
+  m_validator.addSupportedPrivilege(module);
+}
+
+void
+ManagerBase::registerStatusDatasetHandler(const std::string& verb,
+                                          const ndn::mgmt::StatusDatasetHandler& handler)
+{
+  m_dispatcher.addStatusDataset(makeRelPrefix(verb),
+                                ndn::mgmt::makeAcceptAllAuthorization(),
+                                handler);
+}
+
+ndn::mgmt::PostNotification
+ManagerBase::registerNotificationStream(const std::string& verb)
+{
+  return m_dispatcher.addNotificationStream(makeRelPrefix(verb));
+}
+
+void
+ManagerBase::authorize(const Name& prefix, const Interest& interest,
+                       const ndn::mgmt::ControlParameters* params,
+                       ndn::mgmt::AcceptContinuation accept,
+                       ndn::mgmt::RejectContinuation reject)
+{
+  BOOST_ASSERT(params != nullptr);
+  BOOST_ASSERT(typeid(*params) == typeid(ndn::nfd::ControlParameters));
+
+  m_validator.validate(interest,
+                       bind(&ManagerBase::extractRequester, this, interest, accept),
+                       bind([&] { reject(ndn::mgmt::RejectReply::STATUS403); }));
+}
+
+void
+ManagerBase::extractRequester(const Interest& interest,
+                              ndn::mgmt::AcceptContinuation accept)
+{
+  const Name& interestName = interest.getName();
+
+  try {
+    ndn::SignatureInfo sigInfo(interestName.at(ndn::signed_interest::POS_SIG_INFO).blockFromValue());
+    if (!sigInfo.hasKeyLocator() ||
+        sigInfo.getKeyLocator().getType() != ndn::KeyLocator::KeyLocator_Name) {
+      return accept("");
+    }
+
+    accept(sigInfo.getKeyLocator().getName().toUri());
+  }
+  catch (const tlv::Error&) {
+    accept("");
+  }
+}
+
+bool
+ManagerBase::validateParameters(const nfd::ControlCommand& command, const ndn::mgmt::ControlParameters& parameters)
+{
+  BOOST_ASSERT(dynamic_cast<const ControlParameters*>(&parameters) != nullptr);
+
+  try {
+    command.validateRequest(static_cast<const ControlParameters&>(parameters));
+  }
+  catch (const ControlCommand::ArgumentError&) {
+    return false;
+  }
+  return true;
+}
+
+void
+ManagerBase::handleCommand(shared_ptr<nfd::ControlCommand> command,
+                           const ControlCommandHandler& handler,
+                           const Name& prefix, const Interest& interest,
+                           const ndn::mgmt::ControlParameters& params,
+                           ndn::mgmt::CommandContinuation done)
+{
+  BOOST_ASSERT(dynamic_cast<const ControlParameters*>(&params) != nullptr);
+  ControlParameters parameters = static_cast<const ControlParameters&>(params);
+  command->applyDefaultsToRequest(parameters);
+  handler(*command, prefix, interest, parameters, done);
+}
+
+
+} // namespace nfd
diff --git a/daemon/mgmt/manager-base.hpp b/daemon/mgmt/manager-base.hpp
new file mode 100644
index 0000000..988fff1
--- /dev/null
+++ b/daemon/mgmt/manager-base.hpp
@@ -0,0 +1,180 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2015,  Regents of the University of California,
+ *                           Arizona Board of Regents,
+ *                           Colorado State University,
+ *                           University Pierre & Marie Curie, Sorbonne University,
+ *                           Washington University in St. Louis,
+ *                           Beijing Institute of Technology,
+ *                           The University of Memphis.
+ *
+ * This file is part of NFD (Named Data Networking Forwarding Daemon).
+ * See AUTHORS.md for complete list of NFD authors and contributors.
+ *
+ * NFD is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NFD 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NFD, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NFD_DAEMON_MGMT_MANAGER_BASE_HPP
+#define NFD_DAEMON_MGMT_MANAGER_BASE_HPP
+
+#include "common.hpp"
+#include "mgmt/command-validator.hpp"
+
+#include <ndn-cxx/mgmt/dispatcher.hpp>
+#include <ndn-cxx/management/nfd-control-command.hpp>
+#include <ndn-cxx/management/nfd-control-response.hpp>
+#include <ndn-cxx/management/nfd-control-parameters.hpp>
+
+namespace nfd {
+
+using ndn::mgmt::Dispatcher;
+
+using ndn::nfd::ControlCommand;
+using ndn::nfd::ControlResponse;
+using ndn::nfd::ControlParameters;
+
+/**
+ * @brief a collection of common functions shared by all NFD managers,
+ *        such as communicating with the dispatcher and command validator.
+ */
+class ManagerBase : public noncopyable
+{
+public:
+  class Error : public std::runtime_error
+  {
+  public:
+    explicit
+    Error(const std::string& what)
+      : std::runtime_error(what)
+    {
+    }
+  };
+
+public:
+  ManagerBase(Dispatcher& dispatcher,
+              CommandValidator& validator,
+              const std::string& module);
+
+PUBLIC_WITH_TESTS_ELSE_PROTECTED: // registrations to the dispatcher
+
+  // difference from mgmt::ControlCommand: accepts nfd::ControlParameters
+  typedef function<void(const ControlCommand& command,
+                        const Name& prefix, const Interest& interest,
+                        const ControlParameters& parameters,
+                        const ndn::mgmt::CommandContinuation done)> ControlCommandHandler;
+
+  template<typename Command>
+  void
+  registerCommandHandler(const std::string& verb,
+                         const ControlCommandHandler& handler);
+
+  void
+  registerStatusDatasetHandler(const std::string& verb,
+                               const ndn::mgmt::StatusDatasetHandler& handler);
+
+  ndn::mgmt::PostNotification
+  registerNotificationStream(const std::string& verb);
+
+PUBLIC_WITH_TESTS_ELSE_PRIVATE: // command validation
+  /**
+   * @brief validate a request for ControlCommand.
+   *
+   * This is called by the dispatcher.
+   *
+   * @pre params != null
+   * @pre typeid(*params) == typeid(ndn::nfd::ControlParameters)
+   *
+   * @param prefix the top prefix
+   * @param interest a request for ControlCommand
+   * @param params the parameters for ControlCommand
+   * @param accept callback of successful validation, take the requester string as a argument
+   * @param reject callback of failure in validation, take the action code as a argument
+   */
+  void
+  authorize(const Name& prefix, const Interest& interest,
+            const ndn::mgmt::ControlParameters* params,
+            ndn::mgmt::AcceptContinuation accept,
+            ndn::mgmt::RejectContinuation reject);
+
+  /**
+   * @brief extract a requester from a ControlCommand request
+   *
+   * This is called after the signature is validated.
+   *
+   * @param interest a request for ControlCommand
+   * @param accept callback of successful validation, take the requester string as a argument
+   */
+  void
+  extractRequester(const Interest& interest,
+                   ndn::mgmt::AcceptContinuation accept);
+
+PUBLIC_WITH_TESTS_ELSE_PRIVATE: // helpers
+  /**
+   * @brief validate the @p parameters for a given @p command
+   *
+   * @param parameters the original ControlParameters
+   *
+   * @return whether the original ControlParameters can be validated
+   */
+  static bool
+  validateParameters(const nfd::ControlCommand& command,
+                     const ndn::mgmt::ControlParameters& parameters);
+
+  /** @brief Handle control command
+   */
+  static void
+  handleCommand(shared_ptr<nfd::ControlCommand> command,
+                const ControlCommandHandler& handler,
+                const Name& prefix, const Interest& interest,
+                const ndn::mgmt::ControlParameters& params,
+                ndn::mgmt::CommandContinuation done);
+
+  /**
+   * @brief generate the relative prefix for a handler,
+   *        by appending the verb name to the module name.
+   *
+   * @param verb the verb name
+   *
+   * @return the generated relative prefix
+   */
+  PartialName
+  makeRelPrefix(const std::string& verb);
+
+private:
+  Dispatcher&       m_dispatcher;
+  CommandValidator& m_validator;
+  std::string       m_mgmtModuleName;
+};
+
+inline PartialName
+ManagerBase::makeRelPrefix(const std::string& verb)
+{
+  return PartialName(m_mgmtModuleName).append(verb);
+}
+
+template<typename Command>
+inline void
+ManagerBase::registerCommandHandler(const std::string& verb,
+                                    const ControlCommandHandler& handler)
+{
+  auto command = make_shared<Command>();
+
+  m_dispatcher.addControlCommand<ControlParameters>(
+    makeRelPrefix(verb),
+    bind(&ManagerBase::authorize, this, _1, _2, _3, _4, _5),
+    bind(&ManagerBase::validateParameters, cref(*command), _1),
+    bind(&ManagerBase::handleCommand, command, handler, _1, _2, _3, _4));
+}
+
+} // namespace nfd
+
+#endif // NFD_DAEMON_MGMT_MANAGER_BASE_HPP
diff --git a/daemon/nfd.cpp b/daemon/nfd.cpp
index 66ab514..741e495 100644
--- a/daemon/nfd.cpp
+++ b/daemon/nfd.cpp
@@ -39,6 +39,9 @@
 // #include "mgmt/status-server.hpp"
 #include "mgmt/general-config-section.hpp"
 #include "mgmt/tables-config-section.hpp"
+#include "mgmt/command-validator.hpp"
+
+#include <ndn-cxx/mgmt/dispatcher.hpp>
 
 namespace nfd {
 
@@ -131,6 +134,9 @@
   m_internalFace = make_shared<InternalFace>();
   m_forwarder->getFaceTable().addReserved(m_internalFace, FACEID_INTERNAL_FACE);
   m_internalClientFace = makeInternalClientFace(m_internalFace, m_keyChain);
+  m_dispatcher.reset(new ndn::mgmt::Dispatcher(*m_internalClientFace, m_keyChain));
+
+  m_validator.reset(new CommandValidator());
 
   // m_fibManager.reset(new FibManager(m_forwarder->getFib(),
   //                                   bind(&Forwarder::getFace, m_forwarder.get(), _1),
@@ -153,9 +159,7 @@
                                    m_forwarder->getMeasurements());
   tablesConfig.setConfigFile(config);
 
-  // m_internalFace->getValidator().setConfigFile(config);
-
-  m_forwarder->getFaceTable().addReserved(m_internalFace, FACEID_INTERNAL_FACE);
+  m_validator->setConfigFile(config);
 
   // m_faceManager->setConfigFile(config);
 
@@ -172,8 +176,10 @@
   tablesConfig.ensureTablesAreConfigured();
 
   // add FIB entry for NFD Management Protocol
-  shared_ptr<fib::Entry> entry = m_forwarder->getFib().insert("/localhost/nfd").first;
+  Name topPrefix("/localhost/nfd");
+  auto entry = m_forwarder->getFib().insert(topPrefix).first;
   entry->addNextHop(m_internalFace, 0);
+  m_dispatcher->addTopPrefix(topPrefix, false);
 }
 
 void
@@ -196,8 +202,8 @@
 
   tablesConfig.setConfigFile(config);
 
-  // m_internalFace->getValidator().setConfigFile(config);
   // m_faceManager->setConfigFile(config);
+  m_validator->setConfigFile(config);
 
   if (!m_configFile.empty()) {
     config.parse(m_configFile, false);
diff --git a/daemon/nfd.hpp b/daemon/nfd.hpp
index 1240835..7dc7148 100644
--- a/daemon/nfd.hpp
+++ b/daemon/nfd.hpp
@@ -33,6 +33,14 @@
 #include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/util/network-monitor.hpp>
 
+namespace ndn {
+namespace mgmt {
+
+class Dispatcher;
+
+}
+}
+
 namespace nfd {
 
 class Forwarder;
@@ -42,6 +50,7 @@
 class StrategyChoiceManager;
 class StatusServer;
 class InternalClientFace;
+class CommandValidator;
 
 /**
  * \brief Class representing NFD instance
@@ -101,6 +110,9 @@
   ndn::KeyChain&                    m_keyChain;
   shared_ptr<InternalFace>          m_internalFace;
   shared_ptr<InternalClientFace>    m_internalClientFace;
+  unique_ptr<CommandValidator>      m_validator;
+
+  unique_ptr<ndn::mgmt::Dispatcher> m_dispatcher;
   // unique_ptr<FibManager>            m_fibManager;
   // unique_ptr<FaceManager>           m_faceManager;
   // unique_ptr<StrategyChoiceManager> m_strategyChoiceManager;
