diff --git a/ndn/experiments/arguments_experiment.py b/ndn/experiments/arguments_experiment.py
index e7ed6f9..6baacd5 100644
--- a/ndn/experiments/arguments_experiment.py
+++ b/ndn/experiments/arguments_experiment.py
@@ -1,10 +1,36 @@
+# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+#
+# Copyright (C) 2015-2018, 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/>.
+
 from ndn.experiments.experiment import Experiment
 
 class ArgumentsExperiment(Experiment):
     def __init__(self, args):
         Experiment.__init__(self, args)
-        self.ds = self.arguments.ds
-        self.logging = self.arguments.logging
+        self.ds = self.options.arguments.ds
+        self.logging = self.options.arguments.logging
+
+    def start(self):
+        pass
 
     def setup(self):
         pass
diff --git a/ndn/experiments/convergence_experiment.py b/ndn/experiments/convergence_experiment.py
deleted file mode 100644
index f95da58..0000000
--- a/ndn/experiments/convergence_experiment.py
+++ /dev/null
@@ -1,37 +0,0 @@
-# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
-#
-# Copyright (C) 2015-2018, 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/>.
-
-from ndn.experiments.experiment import Experiment
-
-class ConvergenceExperiment(Experiment):
-
-    def __init__(self, args):
-        Experiment.__init__(self, args)
-
-    def setup(self):
-        self.checkConvergence()
-
-    def run(self):
-        pass
-
-Experiment.register("convergence", ConvergenceExperiment)
diff --git a/ndn/experiments/experiment.py b/ndn/experiments/experiment.py
index 347655d..8a2f49c 100644
--- a/ndn/experiments/experiment.py
+++ b/ndn/experiments/experiment.py
@@ -23,46 +23,71 @@
 
 import time
 import sys
-from ndn.apps.ndn_ping_client import NDNPingClient
 from itertools import cycle
 
+from mininet.log import info
+
 from ndn import ExperimentManager
 from ndn.apps.nfdc import Nfdc
 
+from ndn.apps.nlsr import Nlsr, NlsrConfigGenerator
+from ndn.apps.ndn_ping_client import NDNPingClient
+
 class Experiment:
 
     def __init__(self, args):
         self.net = args["net"]
-        self.convergenceTime = args["ctime"]
-        self.nPings = args["nPings"]
-        self.strategy = args["strategy"]
-        self.pctTraffic = args["pctTraffic"]
-        self.nlsrSecurity = args["nlsrSecurity"]
-        self.arguments = args["arguments"]
+        self.options = args["options"]
 
         # Used to restart pings on the recovered node if any
         self.pingedDict = {}
 
+    def afterNfdStart(self):
+        pass
+
     def start(self):
+        self.afterNfdStart()
+        if self.options.isNlsrEnabled is True:
+            self.startNlsr()
         self.setup()
         self.run()
 
     def setup(self):
         for host in self.net.hosts:
             # Set strategy
-            Nfdc.setStrategy(host, "/ndn/", self.strategy)
+            Nfdc.setStrategy(host, "/ndn/", self.options.strategy)
 
             # Start ping server
-            host.cmd("ndnpingserver /ndn/{}-site/{} > ping-server &".format(host, host))
+            host.cmd("ndnpingserver /ndn/{}-site/{} > ping-server &".format(host.name, host.name))
 
             # Create folder to store ping data
             host.cmd("mkdir ping-data")
 
-        self.checkConvergence()
+    def startNlsr(self, checkConvergence = True):
+        # NLSR Security
+        if self.options.nlsrSecurity is True:
+            Nlsr.createKeysAndCertificates(self.net, self.options.workDir)
+
+        # NLSR initialization
+        info('Starting NLSR on nodes\n')
+        for host in self.net.hosts:
+            host.nlsr = Nlsr(host, self.options)
+            host.nlsr.start()
+
+        for host in self.net.hosts:
+            nlsrStatus = host.cmd("ps -g | grep 'nlsr -f {}/[n]lsr.conf'".format(host.homeFolder))
+            if not host.nlsr.isRunning or not nlsrStatus:
+                print("NLSR on host {} is not running. Printing log file and exiting...".format(host.name))
+                print(host.cmd("tail {}/log/nlsr.log".format(host.homeFolder)))
+                self.net.stop()
+                sys.exit(1)
+
+        if checkConvergence:
+            self.checkConvergence()
 
     def checkConvergence(self, convergenceTime = None):
         if convergenceTime is None:
-            convergenceTime = self.convergenceTime
+            convergenceTime = self.options.ctime
 
         # Wait for convergence time period
         print "Waiting " + str(convergenceTime) + " seconds for convergence..."
@@ -79,8 +104,8 @@
             didNodeConverge = True
             for node in self.net.hosts:
                 # Node has its own router name in the fib list, but not name prefix
-                if ( ("/ndn/" + node.name + "-site/%C1.Router/cs/" + node.name) not in statusRouter or
-                      host.name != node.name and ("/ndn/" + node.name + "-site/" + node.name) not in statusPrefix ):
+                if ( ("/ndn/{}-site/%C1.Router/cs/{}".format(node.name, node.name)) not in statusRouter or
+                      host.name != node.name and ("/ndn/{}-site/{}".format(node.name, node.name)) not in statusPrefix ):
                     didNodeConverge = False
                     didNlsrConverge = False
 
@@ -98,23 +123,23 @@
             for other in self.net.hosts:
                 # Do not ping self
                 if host.name != other.name:
-                    NDNPingClient.ping(host, other, self.nPings)
+                    NDNPingClient.ping(host, other, self.options.nPings)
 
     def failNode(self, host):
-        print("Bringing %s down" % host.name)
+        print("Bringing {} down".format(host.name))
         host.nfd.stop()
 
     def recoverNode(self, host):
-        print("Bringing %s up" % host.name)
+        print("Bringing {} up".format(host.name))
         host.nfd.start()
         host.nlsr.createFaces()
         host.nlsr.start()
-        Nfdc.setStrategy(host, "/ndn/", self.strategy)
-        host.cmd("ndnpingserver /ndn/{}-site/{} > ping-server &".format(host, host))
+        Nfdc.setStrategy(host, "/ndn/", self.options.strategy)
+        host.cmd("ndnpingserver /ndn/{}-site/{} > ping-server &".format(host.name, host.name))
 
     def startPctPings(self):
-        nNodesToPing = int(round(len(self.net.hosts)*self.pctTraffic))
-        print "Each node will ping %d node(s)" % nNodesToPing
+        nNodesToPing = int(round(len(self.net.hosts) * self.options.pctTraffic))
+        print "Each node will ping {} node(s)".format(nNodesToPing)
         # Temporarily store all the nodes being pinged by a particular node
         nodesPingedList = []
 
@@ -133,7 +158,7 @@
 
                 # Do not ping self
                 if host.name != other.name:
-                    NDNPingClient.ping(host, other, self.nPings)
+                    NDNPingClient.ping(host, other, self.options.nPings)
                     nodesPingedList.append(other)
 
                 # Always increment because in 100% case a node should not ping itself
@@ -144,4 +169,4 @@
 
     @staticmethod
     def register(name, experimentClass):
-        ExperimentManager.register(name, experimentClass)
\ No newline at end of file
+        ExperimentManager.register(name, experimentClass)
diff --git a/ndn/experiments/mcn_failure_convergence_experiment.py b/ndn/experiments/mcn_failure_convergence_experiment.py
deleted file mode 100644
index 376d91f..0000000
--- a/ndn/experiments/mcn_failure_convergence_experiment.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
-#
-# Copyright (C) 2015-2018, 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/>.
-
-from ndn.experiments.experiment import Experiment
-from ndn.experiments.mcn_failure_experiment import MCNFailureExperiment
-
-import time
-
-class MCNFailureConvergenceExperiment(MCNFailureExperiment):
-
-    def __init__(self, args):
-        MCNFailureExperiment.__init__(self, args)
-
-    def run(self):
-        mostConnectedNode = self.getMostConnectedNode()
-
-        # After the pings are scheduled, collect pings for 1 minute
-        time.sleep(self.PING_COLLECTION_TIME_BEFORE_FAILURE)
-
-        # Bring down MCN
-        self.failNode(mostConnectedNode)
-
-        # MCN is down for 2 minutes
-        time.sleep(120)
-
-        # Bring MCN back up
-        self.recoverNode(mostConnectedNode)
-
-        self.checkConvergence()
-
-Experiment.register("mcn-failure-convergence", MCNFailureConvergenceExperiment)
diff --git a/ndn/experiments/nlsr/__init__.py b/ndn/experiments/nlsr/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ndn/experiments/nlsr/__init__.py
diff --git a/ndn/experiments/nlsr/advertise-delayed-start.py b/ndn/experiments/nlsr/advertise-delayed-start.py
new file mode 100644
index 0000000..cbd8ac8
--- /dev/null
+++ b/ndn/experiments/nlsr/advertise-delayed-start.py
@@ -0,0 +1,73 @@
+# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+#
+# Copyright (C) 2015-2018, 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/>.
+
+from ndn.experiments.experiment import Experiment
+from ndn.apps.nlsr import Nlsr, NlsrConfigGenerator
+
+from mininet.log import info
+
+import time, sys
+
+class AdvertiseDelayedStartExperiment(Experiment):
+    '''Tests Name LSA data segmentation'''
+
+    def __init__(self, args):
+        Experiment.__init__(self, args)
+
+    def setup(self):
+        pass
+
+    def run(self):
+        pass
+
+    def startNlsr(self, checkConvergence = True):
+        # NLSR Security
+        if self.options.nlsrSecurity is True:
+            Nlsr.createKeysAndCertificates(self.net, self.options.workDir)
+
+        host1 = self.net.hosts[0]
+        host1.nlsr = Nlsr(host1, self.options)
+        host1.nlsr.start()
+
+        expectedTotalCount = 500
+        for i in range(0, expectedTotalCount):
+            host1.cmd("nlsrc advertise /long/name/to/exceed/max/packet/size/host1/{}".format(i))
+
+        time.sleep(60)
+
+        host2 = self.net.hosts[1]
+        host2.nlsr = Nlsr(host2, self.options)
+        host2.nlsr.start()
+
+        time.sleep(60)
+
+        advertiseCount = int(host2.cmd("nfdc fib | grep host1 | wc -l"))
+        info(advertiseCount)
+        if advertiseCount == expectedTotalCount:
+            info('\nSuccessfully advertised {} prefixes\n'.format(expectedTotalCount))
+        else:
+            info('\nAdvertising {} prefixes failed. Exiting...\n'.format(expectedTotalCount))
+            self.net.stop()
+            sys.exit(1)
+
+Experiment.register("advertise-delayed-start", AdvertiseDelayedStartExperiment)
diff --git a/ndn/experiments/nlsr/delayed-start.py b/ndn/experiments/nlsr/delayed-start.py
new file mode 100644
index 0000000..e995c50
--- /dev/null
+++ b/ndn/experiments/nlsr/delayed-start.py
@@ -0,0 +1,66 @@
+# -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
+#
+# Copyright (C) 2015-2018, 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/>.
+
+from ndn.experiments.experiment import Experiment
+from ndn.apps.nlsr import Nlsr, NlsrConfigGenerator
+
+from mininet.log import info
+
+import time
+
+class NlsrDelayedStartExperiment(Experiment):
+
+    def __init__(self, args):
+        Experiment.__init__(self, args)
+
+    def setup(self):
+        pass
+
+    def run(self):
+        pass
+
+    def startNlsr(self, checkConvergence = True):
+        # NLSR Security
+        if self.options.nlsrSecurity is True:
+            Nlsr.createKeysAndCertificates(self.net, self.options.workDir)
+
+        i = 1
+        # NLSR initialization
+        info('Starting NLSR on nodes\n')
+        for host in self.net.hosts:
+            host.nlsr = Nlsr(host, self.options)
+            host.nlsr.start()
+
+            # Wait 1/2 minute between starting NLSRs
+            # Wait 1 hour before starting last NLSR
+            if i == len(self.net.hosts) - 1:
+                info('Sleeping 1 hour before starting last NLSR')
+                time.sleep(3600)
+            else:
+                time.sleep(30)
+            i += 1
+
+        if checkConvergence:
+            self.checkConvergence()
+
+Experiment.register("nlsr-delayed-start", NlsrDelayedStartExperiment)
diff --git a/ndn/experiments/failure_experiment.py b/ndn/experiments/nlsr/failure_experiment.py
similarity index 97%
rename from ndn/experiments/failure_experiment.py
rename to ndn/experiments/nlsr/failure_experiment.py
index a27b0a6..783bac4 100644
--- a/ndn/experiments/failure_experiment.py
+++ b/ndn/experiments/nlsr/failure_experiment.py
@@ -22,7 +22,6 @@
 # If not, see <http://www.gnu.org/licenses/>.
 
 from ndn.experiments.experiment import Experiment
-from ndn.nlsr import Nlsr
 from ndn.apps.ndn_ping_client import NDNPingClient
 
 import time
@@ -30,7 +29,7 @@
 class FailureExperiment(Experiment):
 
     def __init__(self, args):
-        args["nPings"] = 300
+        args["options"].nPings = 300
         Experiment.__init__(self, args)
 
         self.PING_COLLECTION_TIME_BEFORE_FAILURE = 60
diff --git a/ndn/experiments/mcn_failure_experiment.py b/ndn/experiments/nlsr/mcn_failure_experiment.py
similarity index 66%
rename from ndn/experiments/mcn_failure_experiment.py
rename to ndn/experiments/nlsr/mcn_failure_experiment.py
index 62bdcab..cd448cc 100644
--- a/ndn/experiments/mcn_failure_experiment.py
+++ b/ndn/experiments/nlsr/mcn_failure_experiment.py
@@ -29,7 +29,6 @@
 class MCNFailureExperiment(Experiment):
 
     def __init__(self, args):
-        args["nPings"] = 300
         Experiment.__init__(self, args)
 
         self.PING_COLLECTION_TIME_BEFORE_FAILURE = 60
@@ -37,13 +36,18 @@
 
     def getMostConnectedNode(self):
         mcn = max(self.net.hosts, key=lambda host: len(host.intfNames()))
-        print "The most connected node is: %s" % mcn.name
+        print "The most connected node is: {}".format(mcn.name)
         return mcn
 
+    def setup(self):
+        if self.options.nPings != 0:
+            Experiment.setup(self)
+
     def run(self):
         mostConnectedNode = self.getMostConnectedNode()
 
-        self.startPctPings()
+        if self.options.nPings != 0:
+            self.startPctPings()
 
         # After the pings are scheduled, collect pings for 1 minute
         time.sleep(self.PING_COLLECTION_TIME_BEFORE_FAILURE)
@@ -52,16 +56,24 @@
         self.failNode(mostConnectedNode)
 
         # MCN is down for 2 minutes
-        time.sleep(120)
+        time.sleep(int(self.options.arguments.waitTime))
 
         # Bring MCN back up
         self.recoverNode(mostConnectedNode)
 
         # Restart pings
-        for nodeToPing in self.pingedDict[mostConnectedNode]:
-            NDNPingClient.ping(mostConnectedNode, nodeToPing, self.PING_COLLECTION_TIME_AFTER_RECOVERY)
+        if self.options.nPings != 0:
+            for nodeToPing in self.pingedDict[mostConnectedNode]:
+                 NDNPingClient.ping(mostConnectedNode, nodeToPing, self.PING_COLLECTION_TIME_AFTER_RECOVERY)
 
-        # Collect pings for more seconds after MCN is up
-        time.sleep(self.PING_COLLECTION_TIME_AFTER_RECOVERY)
+            # Collect pings for more seconds after MCN is up
+            time.sleep(self.PING_COLLECTION_TIME_AFTER_RECOVERY)
+        else:
+            self.checkConvergence()
 
-Experiment.register("failure-mcn", MCNFailureExperiment)
+    @staticmethod
+    def parseArguments(parser):
+        parser.add_argument("--wait-time", dest="waitTime", default="120",
+                            help="[Experiment] Generic wait time for experiment use")
+
+Experiment.register("mcn-failure", MCNFailureExperiment)
diff --git a/ndn/experiments/multiple_failure_experiment.py b/ndn/experiments/nlsr/multiple_failure_experiment.py
similarity index 89%
rename from ndn/experiments/multiple_failure_experiment.py
rename to ndn/experiments/nlsr/multiple_failure_experiment.py
index 6b4ce6b..efbba60 100644
--- a/ndn/experiments/multiple_failure_experiment.py
+++ b/ndn/experiments/nlsr/multiple_failure_experiment.py
@@ -22,7 +22,6 @@
 # If not, see <http://www.gnu.org/licenses/>.
 
 from ndn.experiments.experiment import Experiment
-from ndn.nlsr import Nlsr
 from ndn.apps.ndn_ping_client import NDNPingClient
 
 import time
@@ -38,12 +37,11 @@
 
         # This is the number of pings required to make it through the full experiment
         nInitialPings = (self.PING_COLLECTION_TIME_BEFORE_FAILURE +
-                         len(args["net"].hosts)*(self.FAILURE_INTERVAL + self.RECOVERY_INTERVAL))
-        print("Scheduling with %s initial pings" % nInitialPings)
-
-        args["nPings"] = nInitialPings
+                         len(args["net"].hosts) * (self.FAILURE_INTERVAL + self.RECOVERY_INTERVAL))
+        print("Scheduling with {} initial pings".format(nInitialPings))
 
         Experiment.__init__(self, args)
+        self.options.nPings = nInitialPings
 
     def run(self):
         self.startPctPings()
@@ -71,7 +69,7 @@
             nPings = ((self.RECOVERY_INTERVAL - recovery_time) +
                       nNodesRemainingToFail*(self.FAILURE_INTERVAL + self.RECOVERY_INTERVAL))
 
-            print("Scheduling with %s remaining pings" % nPings)
+            print("Scheduling with {} remaining pings".format(nPings))
 
             # Restart pings
             for nodeToPing in self.pingedDict[host]:
diff --git a/ndn/experiments/pingall_experiment.py b/ndn/experiments/nlsr/pingall_experiment.py
similarity index 82%
rename from ndn/experiments/pingall_experiment.py
rename to ndn/experiments/nlsr/pingall_experiment.py
index cad27e2..56a70bd 100644
--- a/ndn/experiments/pingall_experiment.py
+++ b/ndn/experiments/nlsr/pingall_experiment.py
@@ -31,12 +31,19 @@
 
         Experiment.__init__(self, args)
         self.COLLECTION_PERIOD_BUFFER = 10
-        print "Using %f traffic" % self.pctTraffic
+        print "Using {} traffic".format(self.options.pctTraffic)
+
+    def setup(self):
+        if self.options.nPings != 0:
+            Experiment.setup(self)
 
     def run(self):
+        if self.options.nPings == 0:
+            return
+
         self.startPctPings()
 
         # For pingall experiment sleep for the number of pings + some offset
-        time.sleep(self.nPings + self.COLLECTION_PERIOD_BUFFER)
+        time.sleep(self.options.nPings + self.COLLECTION_PERIOD_BUFFER)
 
 Experiment.register("pingall", PingallExperiment)
diff --git a/ndn/experiments/prefix_propogation.py b/ndn/experiments/nlsr/prefix_propogation.py
similarity index 98%
rename from ndn/experiments/prefix_propogation.py
rename to ndn/experiments/nlsr/prefix_propogation.py
index a4f83b3..ae8301a 100644
--- a/ndn/experiments/prefix_propogation.py
+++ b/ndn/experiments/nlsr/prefix_propogation.py
@@ -36,7 +36,7 @@
     def run(self):
         firstNode = self.net.hosts[0]
 
-        if self.nlsrSecurity:
+        if self.options.nlsrSecurity:
             firstNode.cmd("ndnsec-set-default /ndn/{}-site/%C1.Operator/op".format(firstNode.name))
 
         print("Testing advertise")
