wiki:GENIExperimenter/ExperimentExample-OF-FOAM

Version 27 (modified by lnevers@bbn.com, 7 years ago) (diff)

--

GENI OpenFlow Experiment Example 2

This page illustrates an OpenFlow (OF) example for the Omni How-to page. OpenFlow is used for the control of the network resources in the GENI backbone and at meso-scale campus locations. Experimenters can use GENI resources without learning OpenFlow. Experimenters can choose to control the network switching fabric in their slices by running an OpenFlow controller. Many experimenters use existing OpenFlow controller code as-is, some use controllers with relatively simple modifications, and some experimenters have written their own controller. The GPO is available to help design your controller and plan your experiment configuration. Feel free to contact us at help@geni.net.

The experiment in this page uses credentials from the GPO ProtoGENI Clearinghouse (pgeni.gpolab.bbn.com) to set up a 3 Meso-scale sites OpenFlow experiment. The sites are BBN, Wisconsin and Clemson each with a MyPLC compute resource. If you are interested in using PG resources, see the HelloGENI experiment page for an OpenFlow experiment using PG nodes.

No image "OF-Experiment-example.jpg" attached to GENIExperimenter/ExperimentExample-OF-FOAM

Omni tools are used to reserve resources in each of the site's FlowVisor OpenFlow Aggregate Manager (FOAM) and GENI Aggregate Managers. Steps required to set up this OpenFlow experiment are detailed in this page:

  • Authentication and Omni tools configuration
  • Determine Resources Availability
  • Define Compute Resources RSpecs
  • Define OpenFlow Network Resources Rspecs
  • Create Slice and Request Resources
  • Run Experiment
  • Release Resources

Note: FOAM sites must be federated in order to trust a Clearinghouse. This is an OpenFlow administrator task that must take place before any of the user OpenFlow operations can take place.

Authentication and Omni tools configuration

This example assumes that GENI credentials have been set up as detailed in the GENI Credentials section of the Omni how-to page.

The following omni_config was used for this experiment along with the credentials from the GPO Clearinghouse to access the GENI Aggregate Managers in this experiment:

[omni]
default_cf = pgeni
users = lnevers

# ---------- Users ----------
[lnevers]
urn = urn:publicid:IDN+pgeni.gpolab.bbn.com+user+lnevers
keys = ~/.ssh/id_rsa.pub

# ---------- Frameworks ----------
[pgeni]
type = pg
ch = https://www.emulab.net:443/protogeni/xmlrpc/ch
sa = https://www.pgeni.gpolab.bbn.com:443/protogeni/xmlrpc/sa
cert = ~/.ssl/pgeni/encrypted-cleartext.pem
key = ~/.ssl/pgeni/encrypted-cleartext.pem
verbose=false

[pg]
type=pg
ch = https://www.emulab.net:443/protogeni/xmlrpc/ch
sa = https://www.emulab.net:443/protogeni/xmlrpc/sa
cert = ~/.ssl/protogeni/encrypted-cleartext.pem
key = ~/.ssl/protogeni/encrypted-cleartext.pem

A complete list of Aggregate managers is compiled in the GENI Aggregate page, if your site is not listed on this page you should contact your site administrator, or help@geni.net.

Reserve GENI IP subnet

In the Meso-scale network a layer 3 experiment requires its own separate IP subnet in order to control all traffic without interfering with traffic from other experiments. Before you start this experiment, you need to request an IP subnet from the gpo-infra@geni.net mail list along with a duration for the subnet reservation. To view the current list of subnets and their current allocation see the GENI Network Core Subnet page.

Determine Resources Availability

Each of the 3 sites requires an OpenFlow RSpec and a compute resource RSpec. Also, an OpenFlow RSpec is required for the GENI Core (NLR in this example). To find out what resources are available use Omni tools to get a list of available resources from the available aggregates. Following is a list of MyPLC and FOAM aggregates available in the meso-scale network:

Site MyPLC Aggregate URL FOAM Aggregate URL
BBN http://myplc.gpolab.bbn.com:12346/ https://foam.gpolab.bbn.com:3626/foam/gapi/1
Clemson http://myplc.clemson.edu:12346/ https://foam.clemson.edu:3626/foam/gapi/1
GA Tech https://myplc.cip.gatech.edu:12346/ https://nox.orbit-lab.org:3626/foam/gapi/1
Indiana https://myplc.grnoc.iu.edu:12346/ https://foam.noc.iu.edu:3626/foam/gapi/1
Intenet2 https://foam.net.internet2.edu:3626/foam/gapi/1
NLR https://foam.nlr.net:3626/foam/gapi/1
Rutgers https://plc.orbit-lab.org:12346/ https://foam.oflow.cip.gatech.edu:3626/foam/gapi/1
Stanford https://myplc.stanford.edu:12346/ https://openflow4.stanford.edu:3626/foam/gapi/1
Washingtonhttps://of.cs.washington.edu:12346/ https://of.cs.washington.edu:3626/foam/gapi/1
Wisconsin https://wings-openflow-1.wail.wisc.edu:12346/https://foam.wail.wisc.edu:3626/foam/gapi/1

For complete list of available aggregates see the available GENI Aggregates page.

Define Compute Resources RSpecs

This experiment uses Omni V1.6.1 to set up the experiment. As a first step, the experimenter determines the available compute resources at each site. Following are the omni commands issued to get the manifests for available compute resources from the BBN, Clemson and Wisconsin MyPLC aggregates:

  ./src/omni.py -a http://myplc.gpolab.bbn.com:12346/ listresources -o             # generates rspec-myplc-gpolab-bbn-com-12346-.xml
  ./src/omni.py -a  http://myplc.clemson.edu:12346/ listresources -o               # generates rspec-myplc-clemson-edu-12346-.xml
  ./src/omni.py -a https://wings-openflow-1.wail.wisc.edu:12346/ listresources -o  # generates rspec-wings-openflow-1-wail-wisc-edu-12346-.xml

Each of the omni command above used the -o argument to get the listresources output to a file, all output advertisement RSpec files are attached to this page as a reference. The advertisement RSpecs are used to generate the request RSpecs to reserve the resources. Following are the compute resources RSpec defined based on the output of the listresources commands above.

BBN MyPLC Compute Resource RSpec

<?xml version="1.0"?>
<!--
This rspec will create a container on each of the BBN production MyPLC plnodes.

AM: https://myplc.gpolab.bbn.com:12346/
-->
<RSpec type="SFA">
  <network name="plc.gpolab">
       <node component_id="urn:publicid:IDN+plc:gpolab:gpolab+node+navis.gpolab.bbn.com" 
       component_manager_id="urn:publicid:IDN+plc:gpolab+authority+sa" 
       node_id="n1" site_id="urn:publicid:IDN+plc:gpolab:gpolab+authority+sa">      
            <hostname>        navis.gpolab.bbn.com      </hostname>      
        </node>    
  </network>
</RSpec>

Clemson MyPLC Compute Resources RSpec

<?xml version="1.0" ?>
<!-- Resources at AM:
        URN: unspecified_AM_URN
        URL: http://myplc.clemson.edu:12346/
 -->
<RSpec type="SFA">  
    <network name="plc">    
        <node component_id="urn:publicid:IDN+plc:cu+node+planetlab4.clemson.edu" 
             component_manager_id="urn:publicid:IDN+plc+authority+sa" 
                node_id="n1" site_id="urn:publicid:IDN+plc:cu+authority+sa">    
  
            <hostname>        planetlab4.clemson.edu      </hostname>      
        </node>    
    </network>
</RSpec>

Wisconsin MyPLC Compute Resources RSpec

<?xml version="1.0" ?>
<!-- Resources at AM:
        URN: unspecified_AM_URN
        URL: https://wings-openflow-1.wail.wisc.edu:12346/
 -->
<RSpec type="SFA">  
    <network name="plc">    
        <node component_id="urn:publicid:IDN+plc:wisc+node+wings-openflow-2.wail.wisc.edu" 
              component_manager_id="urn:publicid:IDN+plc+authority+sa" 
                node_id="n9" site_id="urn:publicid:IDN+plc:wisc+authority+sa">  
    
            <hostname>        wings-openflow-2.wail.wisc.edu      </hostname>   
   
        </node>    
    </network>  
</RSpec>

The MyPLC plnodes are pre-configured to use pre-defined addresses and MyPLC doesn't allow experimenters to change that configuration. When the experiment is running you will need to choose the appropriate interface for your experiment traffic based on the IP subnet assigned by the GPO infrastructure group when you requested one before starting the experiment.

Define OpenFlow Network Resources Rspecs

To write an OF RSpec you must determine the end-to-end OF path that will be used for the experiment. This section defines how to define the OF RSpecs by following the process outlined below to determine the content of the OF RSpec:

Step 1. Collect listresources from all FOAM Aggregate. The manifest RSpec details all resources at the aggregate, but does not provide any insight into whether they are available. Step 2. Review GeniAggregate to determine how each MyPLC host maps to the Site's OpenFlow switch. Determin addresses and ports. Step 3. Using guidelines from the Writing OF V3 RSpec page merge the information from step 1 and 2 to generate the request RSpecs.

Each of the above steps is covered in detail below:

Step 1 . Collect listresources from all FOAM Aggregate:

  1. Clemson FOAM and MyPLC aggregates:
     ./src/omni.py -a https://foam.clemson.edu:3626/foam/gapi/1 listresources -o   # generates output file rspec-foam-clemson-edu-3626-foam-gapi-1.xml
    
  2. Wisconsin FOAM and MyPLC aggregates:
     ./src/omni.py -a https://foam.wail.wisc.edu:3626/foam/gapi/1 listresources -o    # generates rspec-foam-wail-wisc-edu-3626-foam-gapi-1.xml
    
  3. BBN FOAM and MyPLC aggregates:
     ./src/omni.py -a https://foam.gpolab.bbn.com:3626/foam/gapi/1 listresources -o         # generates rspec-foam-gpolab-bbn-com-3626-foam-gapi-1.xml
    
  4. NLR OpenFlow Core FOAM server:
    $ ./src/omni.py -a https://foam.nlr.net:3626/foam/gapi/1 -o listresources           # generates rspec-foam-nlr-net-3626-foam-gapi-1.xml
    

Information in the output manifest files provides the switch and the port information to be used in making the OF flowspace reservation.

Step 2 . Review GeniAggregate to determine MyPLC hosts mapping to the Site's OpenFlow switch. In the GeniAggregate page, select the OF Aggregate link for BBN, Clemson and Wisconsin and use the OF site diagrams to determine which ports and DPID should be used in the OF RSpec.

Let map the 3 nodes from the Site's compute resources RSpec.

BBN OF AGGREGATE

To define the OF RSpec for the BBN site we need to consider the compute resource used for the site which is the node navis.gpolab.bbn.com. To determine the ports and Data Path IDentifier (DPID) see the BBN OF Aggregate diagram and locate where the node is connected.

From the BBN OF Aggregate diagram you will find that navis.bbn.com is connected to the OF switch named habanero which has a DPID of 06:d6:00:24:a8:c4:b9:00 for VLAN 1750. VLAN 1750 uses the switch poblano which has a DPID of 06:d6:00:12:e2:b8:a5:d0 for VLAN 1750. The VLAN 1750 is used at every meso-scale site for MyPLC resources to access the back bone OpenFLow VLANs, in our case the backbone OpenFlow VLAN is 3715. This DPID information maps to the following line in the BBN OpenFlow advertisement Rspec:

#habanero
  <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:foam.gpolab.bbn.com+datapath+06:d6:00:24:a8:c4:b9:00" component_manager_id="urn:publicid:IDN+openflow:foam:foam.gpolab.bbn.com+authority+am" dpid="06:d6:00:24:a8:c4:b9:00">
#poblano
<openflow:datapath component_id="urn:publicid:IDN+openflow:foam:foam.gpolab.bbn.com+datapath+06:d6:00:12:e2:b8:a5:d0" component_manager_id="urn:publicid:IDN+openflow:foam:foam.gpolab.bbn.com+authority+am" dpid="06:d6:00:12:e2:b8:a5:d0">

Now we have to add ports to the above definition. The host navis.bbn.com is on port 32, for the BBN habanero switch only, you must add 24 to the physical port number to determine the port to use in the rspec, which means you are looking for the OpenFlow port named 56 in the listresources associated to the DPID. Also you will see that port 47 (+24=71) is used to get to poblano. So these are the lines that define the ports on habanero:

 <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:foam.gpolab.bbn.com+datapath+06:d6:00:24:a8:c4:b9:00" component_manager_id="urn:publicid:IDN+openflow:foam:foam.gpolab.bbn.com+authority+am" dpid="06:d6:00:24:a8:c4:b9:00">
    <openflow:port name="32" num="56"/>
    <openflow:port name="47" num="71"/>

Habanero Connects to port 20 on poblano where port 3 and 4 are used to map VLAN 1750 to VLAN 3715 and traffic goes out to backbone via port 1. This maps to:

 <openflow:datapath component_id="urn:publicid:IDN+openflow:foam:foam.gpolab.bbn.com+datapath+06:d6:00:12:e2:b8:a5:d0" component_manager_id="urn:publicid:IDN+openflow:foam:foam.gpolab.bbn.com+authority+am" dpid="06:d6:00:12:e2:b8:a5:d0">



 * CLemson site Rspec includes node planetlab4.clemson.edu map to ports and DPID in [http://groups.geni.net/geni/wiki/GeniAggregate/ClemsonOpenFlow Clemson OF Aggregate] diagram.
 * Wisconsin site Rspec include node wings-openflow-2.wail.wisc.edu map to ports and DPID in [http://groups.geni.net/geni/wiki/GeniAggregate/WisconsinOpenFlow Winsconsin OF Aggregate].

'' '''Step 3''' ''. Merge Step 1 and 2 to generate request RSpecs.
Use the request template in the [http://groups.geni.net/geni/wiki/HowTo/WriteOFv3Rspecs#WritingOpenFlowv3requestrspecs Writing OF V3 Request RSpecs] 


=== Determine OF network path ===

From the listresources output files (attached to this page) determined the sites DPIDs 
 
''' BBN FOAM''' - Aggregate URL https://foam.gpolab.bbn.com:3626/foam/gapi/1 
''' FOAM Clemson''' - Aggregate https://foam.clemson.edu:3626/foam/gapi/1
'''FOAM NLR''' -   Aggregate URL https://foam.nlr.net:3626/foam/gapi/1              
''' FOAM Wisconsin''' - Aggregate URL https://foam.wail.wisc.edu:3626/foam/gapi/1        



=== !OpenFlow Rspecs for FOAM ===

'''BBN !OpenFlow Network Resources RSpec '''
{{{
#!xml

}}}

'''Clemson !OpenFlow Network Resources RSpec '''
{{{
#!xml

}}}

'''Wisconsin !OpenFlow Network Resources RSpec '''
{{{
#!xml

}}}

'''NLR !OpenFlow Network Resources RSpec '''
{{{
#!xml

}}}

== Create Slice and Request Resources ==

Using the RSpecs that define the required OF flowspace, you can now request OF resources with Omni. First create a slice using your GPO Clearinghouse credentials as defined in the omni_config. Note that the slice name should be meaningful to you and then create a sliver for each resource aggregate.  In this example there are 4 OF aggregates (one per site plus one for the GENI core) and 3 compute resource aggregates (3 MyPLC), which maps to creating 7 slivers, and the following commands are executed:
{{{
 ./src/omni.py createslice 3sites-OF-Exp
./src/omni.py -a https://foam.gpolab.bbn.com:3626/foam/gapi/1 createsliver 3sites-OF-Exp foam_bbn.rspec
./src/omni.py -a https://foam.noc.iu.edu:3626/foam/gapi/1 createsliver 3sites-OF-Exp foam_indiana.rspec
./src/omni.py -a https://foam.wail.wisc.edu:3626/foam/gapi/1 createsliver 3sites-OF-Exp foam_wisc.rspec
./src/omni.py -a https://foam.nlr.net:3626/foam/gapi/1 createsliver 3sites-OF-Exp foam_nlr.rspec
./src/omni.py -a https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am createsliver 3sites-OF-Exp pg-bbn.rpsec
./src/omni.py -a http://myplc.clemson.edu:12346/ createsliver  3sites-OF-Exp   myplc-clemson.rspec
./src/omni.py -a https://wings-openflow-1.wail.wisc.edu:12346/ createsliver 3sites-OF-Exp myplc-wisc.rspec


}}}


== Run Experiment ==

Once your flowspace has been opted in you should be able to exchange traffic over the approved flows between the hosts that have been allocated to your experiment.  Simply SSH into one of the hosts and ping any of the other hosts to verify connectivity. If you have connectivity between the allocated hosts, you may start your experiment, if you do not have connectivity, contact [mailto:help@geni.net].

Remember to check the expiration time for the flowspace and for each aggregate with the Omni ''sliverstatus'' and to ''renewslice'' and ''renewsliver'' to expand the duration of the resource allocation to match your experiment needs.  For an example on how to check ''sliverstatus'' and ''renewslice'' see the [wiki:GENIExperimenter/ExperimentExample#Checkingsliverresourcestatus checking status] section of the other non-OF experiment. 

== Release Resources ==

When the experiment is completed you should release the resources by deleting the sliver for each of the Resource Aggregates used in the Experiment. In the example experiment used in this page, the following commands should be issued to release resources:
{{{
./src/omni.py -a https://foam.gpolab.bbn.com:3626/foam/gapi/1 deletesliver 3sites-OF-Exp
./src/omni.py -a https://foam.noc.iu.edu:3626/foam/gapi/1 deletesliver 3sites-OF-Exp
./src/omni.py -a https://foam.wail.wisc.edu:3626/foam/gapi/1 deletesliver 3sites-OF-Exp
./src/omni.py -a https://foam.nlr.net:3626/foam/gapi/1 deletesliver 3sites-OF-Exp
./src/omni.py -a http://myplc.clemson.edu:12346/ deletesliver  3sites-OF-Exp  
./src/omni.py -a https://wings-openflow-1.wail.wisc.edu:12346/ deletesliver 3sites-OF-Exp 
./src/omni.py -a https://pgeni.gpolab.bbn.com/protogeni/xmlrpc/am deletesliver 3sites-OF-Exp 

}}}

----
{{{
#!html
<a href="mailto:luisa.nevers@bbn.com">Email us</a> with any questions and feedback on this page!
}}}