diff --git a/ndn/placer.py b/ndn/placer.py
new file mode 100644
index 0000000..ba521b8
--- /dev/null
+++ b/ndn/placer.py
@@ -0,0 +1,87 @@
+# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+#
+# Copyright (C) 2015-2017, The University of Memphis,
+#                          Arizona Board of Regents,
+#                          Regents of the University of California.
+#
+# This file is part of Mini-NDN.
+# See AUTHORS.md for a complete list of Mini-NDN authors and contributors.
+#
+# Mini-NDN 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.
+#
+# Mini-NDN 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 Mini-NDN, e.g., in COPYING.md file.
+# If not, see <http://www.gnu.org/licenses/>.
+#
+# This file incorporates work covered by the following copyright and
+# permission notice:
+#
+#   Mininet 2.3.0d1 License
+#
+#   Copyright (c) 2013-2016 Open Networking Laboratory
+#   Copyright (c) 2009-2012 Bob Lantz and The Board of Trustees of
+#   The Leland Stanford Junior University
+#
+#   Original authors: Bob Lantz and Brandon Heller
+#
+#   We are making Mininet available for public use and benefit with the
+#   expectation that others will use, modify and enhance the Software and
+#   contribute those enhancements back to the community. However, since we
+#   would like to make the Software available for broadest use, with as few
+#   restrictions as possible permission is hereby granted, free of charge, to
+#   any person obtaining a copy of this Software to deal in the Software
+#   under the copyrights without restriction, including without limitation
+#   the rights to use, copy, modify, merge, publish, distribute, sublicense,
+#   and/or sell copies of the Software, and to permit persons to whom the
+#   Software is furnished to do so, subject to the following conditions:
+#
+#   The above copyright notice and this permission notice shall be included
+#   in all copies or substantial portions of the Software.
+#
+#   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+#   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+#   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+#   IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+#   CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+#   TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+#   SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+#   The name and trademarks of copyright holder(s) may NOT be used in
+#   advertising or publicity pertaining to the Software or any derivatives
+#   without specific, written prior permission.
+
+from mininet.examples.cluster import Placer
+
+nodePlace = []
+
+class PopulatePlacement():
+    def __init__( self, placeList ):
+        global nodePlace
+        nodePlace = placeList
+
+class GuidedPlacer( Placer ):
+    "Guided placement"
+    def __init__( self, *args, **kwargs ):
+        Placer.__init__( self, *args, **kwargs )
+        self.count = 0
+
+    def place( self, nodename ):
+        assert nodename  #please pylint
+        while(True):
+            global nodePlace
+            if nodePlace[self.count] != 0:
+                nodePlace[self.count] -= 1
+                # args[self.count] is not zero, hence return the server at that position
+                # so that if args[0] is 7 and servers[0] is Europa then place 7 nodes on Europa
+                return self.servers[self.count]
+            else:
+                # while makes sure we go back to the if after this
+                self.count += 1
