* Introduction
-The Makefile contained in this directory can be used by an experimenter
-to dynamically create an overlay network in a PlanetLab slice, using the
-sliver-openvswitch distribution. At present, the Makefile only supports
-the creation of the basic topology (nodes and links). All the additional
-configuration of the bridges/switches (in particular, connecting the
-switches to OpenFlow controllers or enabling the STP) has to be done
-using the tools available in the Open vSwitch distribution. This may
-change in the future.
+The Makefile contained in this directory can be used by an
+experimenter to dynamically create an overlay network in a PlanetLab
+slice, using the sliver-openvswitch distribution.
The overlay network supported by the Makefile may consist of:
- (optionally) the dot program from the graphviz distribution
Then, we can simply copy the Makefile in a working directory on the
-experimenter box. The directory must also contain subdirectories 'L'
-and 'cache':
+experimenter box
$ mkdir work
$ cp /path/to/Makefile work
$ cd work
-$ mkdir -p L cache
+$ make init
+
+The last command creates some subdirectories that are later used by the Makefile.
* Example usage
4) planetlab2.urv.cat
-Assume we have reserverd subnet 10.0.9.0/24 using vsys_net. We are
+Assume we have reserved subnet 10.0.9.0/24 using vsys_net. We are
goint to build the following overlay network:
10.0.9.1/24 10.0.9.2/24 10.0.9.3/24
In the same directory were we have put the Makefile we create a 'conf.mk'
file containing the following variables:
+----------
SLICE=myslice
HOST_1=onelab7.iet.unipi.it
IP_1=10.0.9.1/24
HOST_4=planetlab2.urv.cat
IP_4=10.0.9.4/24
-And a 'links' file containing the following lines:
+LINKS :=
+LINKS += 1-2
+LINKS += 2-3
+LINKS += 2-4
+----------
+
+NOTE. In this example we have chosen to use numbers (1,2,3,4) as ids
+for nodes, you can use any other name that is convenient for you.
+See the example files in this directory for an example of this.
-1-2
-2-3
-2-4
Then, we can just type:
can test that network is up by logging into a node and pinging some
other node using the private subnet addresses:
-$ source conf.mk
-$ ssh -l $SLICE $HOST_1 ping 10.0.9.4
+$ ssh -l myslice onelab7.iet.unipi.it ping 10.0.9.4
Links can be destroyed and created dynamically. Assume we now want the
the topology to match the following one:
|
|
|
- 4 ----------- 3
+ 4 ----------- 3
10.0.9.4/24 10.0.9.3/24
$ make graph.ps
-Or we can save the current state in the 'links' file (so that we can
-recreate it later):
+The current state of the nodes and links can be obtained by typing
+
+$ make snapshot > snapshot.mk
-$ ls L > links
+The snapshot.mk file follows the same format as conf.mk and can be used
+to recreate the topology at a later time:
+$ make CONF=snapshot.mk
* Command reference
-All targets can be issued with the '-j' flag to (greatly) speed up operations.
+All targets can be issued with the '-j' flag to (greatly) speed up operations (*)
It may also be useful to use the '-k' flag, so that errors on some nodes do not
stop the setup on the other nodes.
graph.ps create a postscript file containing a (simple) graphical
representation
of the current topology
+
+====================================================
+
+(*) To get the greatest speedup from make -j you should also enable
+connection reuse in your ssh setup, e.g., by having the following lines
+in your .ssh/config:
+host *
+ ControlMaster auto
+ ControlPath ~/.ssh/ssh_mux_%h_%p_%r
+ ControlPersist 4h
+
+Please note, however, that maximum concurrent per-node reuse is usually
+set to something low (typically 10), and this is a problem if some node
+in your topology has many links. In this case you should raise that limit
+on the slivers, or limit makefile concurrency (e.g., by using make -j10).