diff --git a/src/main.cpp b/src/main.cpp
index f7ba8b0..36fc952 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -72,6 +72,7 @@
   catch (std::exception& e) {
     std::cerr << "ERROR: " << e.what() << std::endl;
     nlsr.getFib().clean();
+    nlsr.destroyFaces();
   }
   return EXIT_SUCCESS;
 }
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index 5484336..2618634 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -110,23 +110,28 @@
   m_fib.setEntryRefreshTime(2 * m_confParam.getLsaRefreshTime());
   m_sequencingManager.setSeqFileName(m_confParam.getSeqFileDir());
   m_sequencingManager.initiateSeqNoFromFile();
+  m_syncLogicHandler.setSyncPrefix(m_confParam.getChronosyncPrefix().toUri());
+  intializeKey();
   /* Logging start */
   m_confParam.writeLog();
   m_adjacencyList.writeLog();
   m_namePrefixList.writeLog();
   /* Logging end */
+
+  createFaces();
+}
+
+void
+Nlsr::start()
+{
   registerPrefixes();
   setInfoInterestFilter();
   setLsaInterestFilter();
   m_nlsrLsdb.buildAndInstallOwnNameLsa();
   m_nlsrLsdb.buildAndInstallOwnCoordinateLsa();
-  m_syncLogicHandler.setSyncPrefix(m_confParam.getChronosyncPrefix().toUri());
   m_syncLogicHandler.createSyncSocket(boost::ref(*this));
-  //m_interestManager.scheduleInfoInterest(10);
-  m_helloProtocol.scheduleInterest(10);
-
-  intializeKey();
   registerKeyPrefix();
+  m_helloProtocol.scheduleInterest(10);
 }
 
 void
@@ -191,6 +196,104 @@
 }
 
 void
+Nlsr::createFace(const std::string& faceUri,
+                 uint64_t faceCost,
+                 const CommandSucceedCallback& onSuccess,
+                 const CommandFailCallback& onFailure)
+{
+  ndn::nfd::ControlParameters faceParameters;
+  faceParameters
+    .setUri(faceUri)
+    .setCost(faceCost);
+  m_controller.start<ndn::nfd::FaceCreateCommand>(faceParameters,
+                                                  onSuccess,
+                                                  onFailure);
+}
+
+void
+Nlsr::onCreateFaceSuccess(const ndn::nfd::ControlParameters& commandSuccessResult)
+{
+  m_nFacesCreated++;
+  if (m_nFacesToCreate == m_nFacesCreated)
+  {
+    start();
+  }
+}
+
+void
+Nlsr::onCreateFaceFailure(int32_t code, const std::string& error)
+{
+  _LOG_DEBUG(error << " (code: " << code << ")");
+  destroyFaces();
+  throw Error("Error: Face creation failed");
+}
+
+void
+Nlsr::createFaces()
+{
+  std::list<Adjacent>& adjacents = m_adjacencyList.getAdjList();
+  for (std::list<Adjacent>::iterator it = adjacents.begin();
+       it != adjacents.end(); it++) {
+    createFace((*it).getConnectingFaceUri(),
+               (*it).getLinkCost(),
+               ndn::bind(&Nlsr::onCreateFaceSuccess, this, _1),
+               ndn::bind(&Nlsr::onCreateFaceFailure, this, _1, _2));
+    m_nFacesToCreate++;
+  }
+}
+
+
+void
+Nlsr::onDestroyFaceSuccess(const ndn::nfd::ControlParameters& commandSuccessResult)
+{
+
+}
+
+void
+Nlsr::onDestroyFaceFailure(int32_t code, const std::string& error)
+{
+  std::cerr << error << " (code: " << code << ")";
+  throw Error("Error: Face destruction failed");
+}
+
+void
+Nlsr::destroyFaces()
+{
+  std::list<Adjacent>& adjacents = m_adjacencyList.getAdjList();
+  for (std::list<Adjacent>::iterator it = adjacents.begin();
+       it != adjacents.end(); it++) {
+    destroyFace((*it).getConnectingFaceUri());
+  }
+}
+
+void
+Nlsr::destroyFace(const std::string& faceUri)
+{
+  ndn::nfd::ControlParameters faceParameters;
+  faceParameters
+    .setUri(faceUri);
+  m_controller.start<ndn::nfd::FaceCreateCommand>(faceParameters,
+                                                  ndn::bind(&Nlsr::destroyFaceInNfd,
+                                                            this, _1),
+                                                  ndn::bind(&Nlsr::onDestroyFaceFailure,
+                                                            this, _1, _2));
+}
+
+void
+Nlsr::destroyFaceInNfd(const ndn::nfd::ControlParameters& faceDestroyResult)
+{
+  ndn::nfd::ControlParameters faceParameters;
+  faceParameters
+    .setFaceId(faceDestroyResult.getFaceId());
+  m_controller.start<ndn::nfd::FaceDestroyCommand>(faceParameters,
+                                                   ndn::bind(&Nlsr::onDestroyFaceSuccess,
+                                                             this, _1),
+                                                   ndn::bind(&Nlsr::onDestroyFaceFailure,
+                                                             this, _1, _2));
+}
+
+
+void
 Nlsr::startEventLoop()
 {
   m_nlsrFace.processEvents();
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index b0d5126..68fbcc7 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -62,6 +62,10 @@
   };
 
 public:
+  typedef ndn::function<void(const ndn::nfd::ControlParameters&)> CommandSucceedCallback;
+
+  typedef ndn::function<void(uint32_t/*code*/,const std::string&/*reason*/)> CommandFailCallback;
+
   Nlsr()
     : m_scheduler(m_nlsrFace.getIoService())
     , m_confParam()
@@ -83,6 +87,10 @@
 
     , m_certificateCache(new ndn::CertificateCacheTtl(m_nlsrFace.getIoService()))
     , m_validator(m_nlsrFace, DEFAULT_BROADCAST_PREFIX, m_certificateCache)
+
+    , m_controller(m_nlsrFace)
+    , m_nFacesToCreate(0)
+    , m_nFacesCreated(0)
   {}
 
   void
@@ -264,6 +272,9 @@
   initialize();
 
   void
+  start();
+
+  void
   intializeKey();
 
   void
@@ -312,6 +323,15 @@
     return m_defaultCertName;
   }
 
+  void
+  createFace(const std::string& faceUri,
+             uint64_t faceCost,
+             const CommandSucceedCallback& onSuccess,
+             const CommandFailCallback& onFailure);
+
+  void
+  destroyFaces();
+
 private:
   void
   registerPrefixes();
@@ -325,6 +345,27 @@
   void
   onKeyPrefixRegSuccess(const ndn::Name& name);
 
+  void
+  onCreateFaceSuccess(const ndn::nfd::ControlParameters& commandSuccessResult);
+
+  void
+  onCreateFaceFailure(int32_t code, const std::string& error);
+
+  void
+  createFaces();
+
+  void
+  onDestroyFaceSuccess(const ndn::nfd::ControlParameters& commandSuccessResult);
+
+  void
+  onDestroyFaceFailure(int32_t code, const std::string& error);
+
+  void
+  destroyFace(const std::string& faceUri);
+
+  void
+  destroyFaceInNfd(const ndn::nfd::ControlParameters& faceDestroyResult);
+
 private:
   typedef std::map<ndn::Name, ndn::shared_ptr<ndn::IdentityCertificate> > CertMap;
 
@@ -354,6 +395,10 @@
   ndn::KeyChain m_keyChain;
   ndn::Name m_defaultIdentity;
   ndn::Name m_defaultCertName;
+
+  ndn::nfd::Controller m_controller;
+  int32_t m_nFacesToCreate;
+  int32_t m_nFacesCreated;
 };
 
 } //namespace nlsr
