diff --git a/tools/ping/server/ping-server.cpp b/tools/ping/server/ping-server.cpp
new file mode 100644
index 0000000..e75f649
--- /dev/null
+++ b/tools/ping/server/ping-server.cpp
@@ -0,0 +1,86 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2015,  Arizona Board of Regents.
+ *
+ * This file is part of ndn-tools (Named Data Networking Essential Tools).
+ * See AUTHORS.md for complete list of ndn-tools authors and contributors.
+ *
+ * ndn-tools 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.
+ *
+ * ndn-tools 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
+ * ndn-tools, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Eric Newberry <enewberry@email.arizona.edu>
+ * @author Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
+ */
+
+#include "ping-server.hpp"
+
+namespace ndn {
+namespace ping {
+namespace server {
+
+PingServer::PingServer(Face& face, const Options& options)
+  : m_options(options)
+  , m_name(options.prefix)
+  , m_nPings(0)
+  , m_face(face)
+{
+}
+
+void
+PingServer::run()
+{
+  m_name.append("ping");
+  m_face.setInterestFilter(m_name,
+                           bind(&PingServer::onInterest,
+                                this, _2),
+                           bind(&PingServer::onRegisterFailed,
+                                this, _2));
+
+  m_face.processEvents();
+}
+
+int
+PingServer::getNPings() const
+{
+  return m_nPings;
+}
+
+void
+PingServer::onInterest(const Interest& interest)
+{
+  Name interestName = interest.getName();
+
+  afterReceive(interestName);
+
+  char responseContent[] = "NDN TLV Ping Response";
+  shared_ptr<Data> data = make_shared<Data>(interestName);
+  data->setFreshnessPeriod(m_options.freshnessPeriod);
+  data->setContent(reinterpret_cast<const uint8_t*>(responseContent),
+                   sizeof(responseContent));
+  m_keyChain.sign(*data);
+  m_face.put(*data);
+
+  ++m_nPings;
+  if (m_options.shouldLimitSatisfied && m_options.nMaxPings > 0 && m_options.nMaxPings == m_nPings) {
+    m_face.shutdown();
+    m_face.getIoService().stop();
+  }
+}
+
+void
+PingServer::onRegisterFailed(const std::string& reason)
+{
+  throw "Failed to register prefix in local hub's daemon, REASON: " + reason;
+}
+
+} // namespace server
+} // namespace ping
+} // namespace ndn
\ No newline at end of file
