diff --git a/src/logic.cpp b/src/logic.cpp
index 81d84c8..c987109 100644
--- a/src/logic.cpp
+++ b/src/logic.cpp
@@ -110,7 +110,8 @@
              const time::milliseconds& resetInterestLifetime,
              const time::milliseconds& syncInterestLifetime,
              const time::milliseconds& syncReplyFreshness,
-             const time::milliseconds& recoveryInterestLifetime)
+             const time::milliseconds& recoveryInterestLifetime,
+             const name::Component& session)
   : m_face(face)
   , m_syncPrefix(syncPrefix)
   , m_defaultUserPrefix(defaultUserPrefix)
@@ -134,7 +135,7 @@
 {
   _LOG_DEBUG_ID(">> Logic::Logic");
 
-  addUserNode(m_defaultUserPrefix, defaultSigningId);
+  addUserNode(m_defaultUserPrefix, defaultSigningId, session);
 
   m_syncReset = m_syncPrefix;
   m_syncReset.append("reset");
@@ -194,7 +195,7 @@
 }
 
 void
-Logic::addUserNode(const Name& userPrefix, const Name& signingId)
+Logic::addUserNode(const Name& userPrefix, const Name& signingId, const name::Component& session)
 {
   if (userPrefix == EMPTY_NAME)
     return;
@@ -205,7 +206,12 @@
     m_nodeList[userPrefix].userPrefix = userPrefix;
     m_nodeList[userPrefix].signingId = signingId;
     Name sessionName = userPrefix;
-    sessionName.appendNumber(ndn::time::toUnixTimestamp(ndn::time::system_clock::now()).count());
+    if (!session.empty()) {
+      sessionName.append(session);
+    }
+    else {
+      sessionName.appendNumber(ndn::time::toUnixTimestamp(ndn::time::system_clock::now()).count());
+    }
     m_nodeList[userPrefix].sessionName = sessionName;
     m_nodeList[userPrefix].seqNo = 0;
     reset(false);
diff --git a/src/logic.hpp b/src/logic.hpp
index 1aef992..a2fec3b 100644
--- a/src/logic.hpp
+++ b/src/logic.hpp
@@ -117,6 +117,7 @@
    * @param syncInterestLifetime The lifetime of sync interest
    * @param syncReplyFreshness The FreshnessPeriod of sync reply
    * @param recoveryInterestLifetime The lifetime of recovery interest
+   * @param session Manually defined session ID
    */
   Logic(ndn::Face& face,
         const Name& syncPrefix,
@@ -129,7 +130,8 @@
         const time::milliseconds& resetInterestLifetime = DEFAULT_RESET_INTEREST_LIFETIME,
         const time::milliseconds& syncInterestLifetime = DEFAULT_SYNC_INTEREST_LIFETIME,
         const time::milliseconds& syncReplyFreshness = DEFAULT_SYNC_REPLY_FRESHNESS,
-        const time::milliseconds& recoveryInterestLifetime = DEFAULT_RECOVERY_INTEREST_LIFETIME);
+        const time::milliseconds& recoveryInterestLifetime = DEFAULT_RECOVERY_INTEREST_LIFETIME,
+        const name::Component& session = {});
 
   ~Logic();
 
@@ -165,9 +167,10 @@
    *
    * @param userPrefix prefix of the added node
    * @param signingId signing Id of the added node
+   * @param session manually defined session ID
    */
   void
-  addUserNode(const Name& userPrefix, const Name& signingId = DEFAULT_NAME);
+  addUserNode(const Name& userPrefix, const Name& signingId = DEFAULT_NAME, const name::Component& session = {});
 
   /// @brief remove the node from the local session
   void
diff --git a/src/socket.cpp b/src/socket.cpp
index a4c1673..4468fb7 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -39,12 +39,14 @@
                const UpdateCallback& updateCallback,
                const Name& signingId,
                std::shared_ptr<Validator> validator,
-               const time::milliseconds& syncInterestLifetime)
+               const time::milliseconds& syncInterestLifetime,
+               const name::Component& session)
   : m_userPrefix(userPrefix)
   , m_face(face)
   , m_logic(face, syncPrefix, userPrefix, updateCallback, Logic::DEFAULT_NAME, Logic::DEFAULT_VALIDATOR,
             Logic::DEFAULT_RESET_TIMER, Logic::DEFAULT_CANCEL_RESET_TIMER, Logic::DEFAULT_RESET_INTEREST_LIFETIME,
-            syncInterestLifetime)
+            syncInterestLifetime, Logic::DEFAULT_SYNC_REPLY_FRESHNESS, Logic::DEFAULT_RECOVERY_INTEREST_LIFETIME,
+            session)
   , m_signingId(signingId)
   , m_validator(validator)
 {
@@ -67,7 +69,7 @@
 }
 
 void
-Socket::addSyncNode(const Name& prefix, const Name& signingId)
+Socket::addSyncNode(const Name& prefix, const Name& signingId, const name::Component& session)
 {
   if (prefix == DEFAULT_NAME)
     return;
@@ -80,7 +82,7 @@
 
   if (m_userPrefix == DEFAULT_NAME)
     m_userPrefix = prefix;
-  m_logic.addUserNode(prefix, signingId);
+  m_logic.addUserNode(prefix, signingId, session);
   m_registeredPrefixList[prefix] =
     m_face.setInterestFilter(prefix,
                              bind(&Socket::onInterest, this, _1, _2),
@@ -103,7 +105,6 @@
 
   m_ims.erase(prefix);
   m_logic.removeUserNode(prefix);
-
 }
 
 void
diff --git a/src/socket.hpp b/src/socket.hpp
index b7b0858..81fc806 100644
--- a/src/socket.hpp
+++ b/src/socket.hpp
@@ -65,7 +65,8 @@
          const UpdateCallback& updateCallback,
          const Name& signingId = DEFAULT_NAME,
          std::shared_ptr<Validator> validator = DEFAULT_VALIDATOR,
-         const time::milliseconds& syncInterestLifetime = Logic::DEFAULT_SYNC_INTEREST_LIFETIME);
+         const time::milliseconds& syncInterestLifetime = Logic::DEFAULT_SYNC_INTEREST_LIFETIME,
+         const name::Component& session = {});
 
   ~Socket();
 
@@ -82,9 +83,10 @@
    *
    * @param prefix Prefix of the new node
    * @param signingId Signing ID for the packet sent out by the new node
+   * @param session Manually defined session number
    */
   void
-  addSyncNode(const Name& prefix, const Name& signingId = DEFAULT_NAME);
+  addSyncNode(const Name& prefix, const Name& signingId = DEFAULT_NAME, const name::Component& session = {});
 
   /**
    * @brief Remove a sync node under same logic
diff --git a/tests/unit-tests/test-socket.cpp b/tests/unit-tests/test-socket.cpp
index 3fd0d26..4c4984b 100644
--- a/tests/unit-tests/test-socket.cpp
+++ b/tests/unit-tests/test-socket.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2012-2017 University of California, Los Angeles
+ * Copyright (c) 2012-2018 University of California, Los Angeles
  *
  * This file is part of ChronoSync, synchronization library for distributed realtime
  * applications for NDN.
@@ -50,7 +50,11 @@
              userPrefix,
              face,
              isNum ? bind(&SocketTestApp::fetchNumbers, this, _1) :
-                     bind(&SocketTestApp::fetchAll, this, _1))
+                          bind(&SocketTestApp::fetchAll, this, _1),
+             Logic::DEFAULT_NAME,
+             Logic::DEFAULT_VALIDATOR,
+             Logic::DEFAULT_SYNC_INTEREST_LIFETIME,
+             name::Component::fromEscapedString("override"))
   {
   }
 
@@ -325,6 +329,9 @@
 
   BOOST_CHECK_EQUAL(app[0]->toString(), app[1]->toString());
   BOOST_CHECK_EQUAL(app[0]->toString(), app[2]->toString());
+
+  BOOST_CHECK_EQUAL(sessionName[0], Name("/user0/override"));
+  BOOST_CHECK_EQUAL(sessionName[1], Name("/user1/override"));
 }
 
 BOOST_AUTO_TEST_CASE(BasicNumber)
