diff --git a/ndn/experiments/__init__.py b/ndn/experiments/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ndn/experiments/__init__.py
diff --git a/ndn/experiments/experiment.py b/ndn/experiments/experiment.py
new file mode 100644
index 0000000..9487e22
--- /dev/null
+++ b/ndn/experiments/experiment.py
@@ -0,0 +1,70 @@
+#!/usr/bin/python
+
+import time
+import sys
+
+class Experiment:
+
+    def __init__(self, net, nodes, convergenceTime, nPings, strategy):
+        self.net = net
+        self.nodes = nodes
+        self.convergenceTime = convergenceTime
+        self.nPings = nPings
+        self.strategy = strategy
+
+    def start(self):
+        self.setup()
+        self.run()
+
+    def setup(self):
+        for host in self.net.hosts:
+            # Set strategy
+            host.nfd.setStrategy("/ndn/edu", self.strategy)
+
+            # Start ping server
+            host.cmd("ndnpingserver /ndn/edu/" + str(host) + " > ping-server &")
+
+            # Create folder to store ping data
+            host.cmd("mkdir ping-data")
+
+        # Wait for convergence time period
+        print "Waiting " + str(self.convergenceTime) + " seconds for convergence..."
+        time.sleep(self.convergenceTime)
+        print "...done"
+
+        # To check whether all the nodes of NLSR have converged
+        didNlsrConverge = True
+
+        # Checking for convergence
+        for host in self.net.hosts:
+            statusRouter = host.cmd("nfd-status -b | grep /ndn/edu/%C1.Router/cs/")
+            statusPrefix = host.cmd("nfd-status -b | grep /ndn/edu/")
+            didNodeConverge = True
+            for node in self.nodes.split(","):
+                    if ("/ndn/edu/%C1.Router/cs/" + node) not in statusRouter:
+                        didNodeConverge = False
+                        didNlsrConverge = False
+                    if str(host) != node and ("/ndn/edu/" + node) not in statusPrefix:
+                        didNodeConverge = False
+                        didNlsrConverge = False
+
+            host.cmd("echo " + str(didNodeConverge) + " > convergence-result &")
+
+        if didNlsrConverge:
+            print("NLSR has successfully converged.")
+        else:
+            print("NLSR has not converged. Exiting...")
+            for host in self.net.hosts:
+                host.nfd.stop()
+            sys.exit(1)
+
+    def startPings(self):
+        for host in self.net.hosts:
+            for other in self.net.hosts:
+                # Do not ping self
+                if host.name != other.name:
+                    # Use "&" to run in background and perform parallel pings
+                    print "Scheduling ping(s) from %s to %s" % (host.name, other.name)
+                    host.cmd("ndnping -t -c "+ str(self.nPings) + " /ndn/edu/" + other.name + " > ping-data/" + other.name + ".txt &")
+                    time.sleep(0.2)
+
diff --git a/ndn/experiments/failure_experiment.py b/ndn/experiments/failure_experiment.py
new file mode 100644
index 0000000..d4e9380
--- /dev/null
+++ b/ndn/experiments/failure_experiment.py
@@ -0,0 +1,42 @@
+#!/usr/bin/python
+
+from ndn.experiments.experiment import Experiment
+from ndn.nlsr import Nlsr
+
+import time
+
+class FailureExperiment(Experiment):
+
+    def __init__(self, net, nodes, convergenceTime, strategy):
+
+        Experiment.__init__(self, net, nodes, convergenceTime, 300, strategy)
+        self.PING_COLLECTION_TIME_BEFORE_FAILURE = 60
+        self.PING_COLLECTION_TIME_AFTER_RECOVERY = 90
+
+    def run(self):
+        self.startPings()
+
+        # After the pings are scheduled, collect pings for 1 minute
+        time.sleep(self.PING_COLLECTION_TIME_BEFORE_FAILURE)
+
+        # Bring down CSU
+        for host in self.net.hosts:
+            if host.name == "csu":
+                print("Bringing CSU down")
+                host.nfd.stop()
+                break
+
+        # CSU is down for 2 minutes
+        time.sleep(120)
+
+        # Bring CSU back up
+        for host in self.net.hosts:
+            if host.name == "csu":
+                print("Bringing CSU up")
+                host.nfd.start()
+                host.nlsr.start()
+                host.nfd.setStrategy("/ndn/edu", self.strategy)
+                host.cmd("ndnpingserver /ndn/edu/" + str(host) + " > ping-server &")
+
+        # Collect pings for more seconds after CSU is up
+        time.sleep(self.PING_COLLECTION_TIME_AFTER_RECOVERY)
diff --git a/ndn/experiments/pingall_experiment.py b/ndn/experiments/pingall_experiment.py
new file mode 100644
index 0000000..3bbfc1f
--- /dev/null
+++ b/ndn/experiments/pingall_experiment.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+from ndn.experiments.experiment import Experiment
+
+import time
+
+class PingallExperiment(Experiment):
+
+    def __init__(self, net, nodes, convergenceTime, nPings, strategy):
+
+        Experiment.__init__(self, net, nodes, convergenceTime, nPings, strategy)
+        self.COLLECTION_PERIOD_BUFFER = 10
+
+
+    def run(self):
+        self.startPings()
+
+        # For pingall experiment sleep for the number of pings + some offset
+        time.sleep(self.nPings + self.COLLECTION_PERIOD_BUFFER)
