PlanetLab CCN multicast example
authorAlina Quereilhac <alina.quereilhac@inria.fr>
Sun, 6 May 2012 14:50:59 +0000 (16:50 +0200)
committerAlina Quereilhac <alina.quereilhac@inria.fr>
Sun, 6 May 2012 14:50:59 +0000 (16:50 +0200)
examples/ccnx/planetlab_ccnx_multicast.py
examples/ccnx/planetlab_ccnx_unicast.py

index 62a33c6..7f0785e 100644 (file)
@@ -1,5 +1,20 @@
 #!/usr/bin/env python
 
+##
+## Experiment topology:
+## 
+##  ccncatchunks                                ccnsendchunks
+##       |                                            |
+##       .->  node1 -- .. -- nodei -- .. -- nodeN   <-.
+##    
+##
+##  - Nodes are connected through an overlay network over the Intenet
+##  - On each node runs a CCNx daemon
+##  - Static multicast entries are added to the CCNx FIB on each node to communicate them in series.
+##    (Nodes only have FIB entries to at most two nodes)
+##
+
+
 from nepi.core.design import ExperimentDescription, FactoriesProvider
 from nepi.core.execute import ExperimentController
 from nepi.util.constants import ApplicationStatus as AS
@@ -33,7 +48,10 @@ def create_slice_desc(slicename, plc_host, pl_user, pl_pwd, pl_ssh_key,
     slice_desc.set_attribute_value("plcHost", plc_host)
     slice_desc.set_attribute_value("tapPortBase", port_base)
     # Kills all running processes before starting the experiment
-    slice_desc.set_attribute_value("dedicatedSlice", True)
+    slice_desc.set_attribute_value("cleanProc", True)
+    # NOTICE: Setting 'cleanHome' to 'True' will erase all previous
+    # folders in the sliver Home directory, including result files!
+    #slice_desc.set_attribute_value("cleanHome", True)
     slice_desc.set_attribute_value("plLogLevel", "DEBUG")
     return slice_desc
  
@@ -213,7 +231,7 @@ if __name__ == '__main__':
     default_hostnames = ['openlab02.pl.sophia.inria.fr',
                  'ple4.ipv6.lip6.fr',
                  'planetlab2.di.unito.it',
-                 'merkur.planetlab.haw-hamburg.de',
+                 #'merkur.planetlab.haw-hamburg.de',
                  'planetlab1.cs.uit.no',
                  'planetlab3.cs.st-andrews.ac.uk',
                  'planetlab2.cs.uoi.gr',
index 39c4489..0f1f422 100644 (file)
@@ -67,8 +67,10 @@ def create_node(hostname, pl_inet, slice_desc):
 
 def create_ccnd(pl_node, routes, slice_desc):
     pl_app = slice_desc.create("CCNxDaemon")
+    
     # We can specify a default ccnx version to be either ccnx-0.5.1 or ccnx-0.6.0
     #pl_app.set_attribute_value("ccnxversion", "ccnx-0.5.1")
+    
     # We can also specify a custom local source and build and install directives
     path_to_source = os.path.join(os.path.dirname(os.path.abspath(__file__)),
         "ccnx-0.6.0rc3.tar.gz")
@@ -80,6 +82,7 @@ def create_ccnd(pl_node, routes, slice_desc):
     pl_app.set_attribute_value("install", "cp -r ./ccnx-0.6.0rc3/bin ${SOURCES}")
     # We use a wildcard to replace the public IP address of the node during runtime
     routes = "|".join(map(lambda route: "udp {#[iface_%s].addr[0].[Address]#}" % route, routes))
+    
     # Add multicast ccn routes 
     pl_app.set_attribute_value("ccnroutes", routes)
     pl_app.enable_trace("stdout")
@@ -242,16 +245,6 @@ if __name__ == '__main__':
     pl_pwd = options.pl_pwd
     pl_ssh_key = options.pl_ssh_key
 
-    """
-    hostnames = ['nepi1.pl.sophia.inria.fr',
-        'nepi2.pl.sophia.inria.fr',
-        'nepi3.pl.sophia.inria.fr',
-        'nepi5.pl.sophia.inria.fr']
-
-    pl_host = "nepiplc.pl.sophia.inria.fr"
-    vsys_vnet = "192.168.2.0/24"
-    """
-
     run(hostnames, vsys_vnet, slicename, pl_host, pl_user, pl_pwd, pl_ssh_key, 
             port_base, root_dir)