Changes between Version 5 and Version 6 of GENIExperimenter/ExperimentExample-OF


Ignore:
Timestamp:
06/22/11 16:30:19 (13 years ago)
Author:
Aaron Helsinger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/ExperimentExample-OF

    v5 v6  
    77For experimenters who desire control over the network switching fabric in their slices, !OpenFlow provides increased flexibility.  Your experiment will incorporate an !OpenFlow controller.  If you have never written a controller, don't panic.  Many experiments can use existing controller code as-is, or with relatively simple modifications.  The GPO is available to help design your controller and plan your experiment configuration.  Feel free to contact us at [mailto:help@geni.net].
    88
    9 The example captured in this page uses credentials from pgeni.gpolab.bbn.com, the GPO ProtoGENI Clearinghouse, to set up an experiment that includes 3 fictional sites (1 PG and 2 MyPLC nodes). This examples assumes that a OF Controller, such as NOX, is running on a slice resource, and is available and is accessible to the !FlowVisor instances. In this scenario, two sites are Web Servers and 3 are clients, as shown in the diagram below:
     9The example captured in this page uses credentials from pgeni.gpolab.bbn.com, the GPO ProtoGENI Clearinghouse, to set up an experiment that includes 3 fictional sites (1 PG and 2 MyPLC nodes). This example assumes that an !OpenFlow Controller, such as NOX, is running on a slice resource, and is available and is accessible to the !FlowVisor instances. In this scenario, two sites are Web Servers and 3 are clients, as shown in the diagram below:
    1010
    1111[[Image(OF-Experiment-example.jpg)]]
     
    2424This example assumes that GENI credentials have been set up as detailed in the [wiki:GENIExperimenter#a1.GetGENICredentials GENI Credentials] section of the main GENI Experimenter page.
    2525
    26 The settings as defined in the [wiki:GENIExperimenter/ExperimentExample#OmniConfiguration Omni Configuration] section of the non OF GENI Experiment Example will work for this OF set up.  The credentials from from the GPO Clearinghouse will allow access to the GPO OF aggregate manager.  A list of Aggregate managers is being compiled in the [http://groups.geni.net/geni/wiki/GeniAggregate GENI Aggregate] page, if your site is not listed on this page you should contact you site administrator, or help@geni.net.
     26The settings as defined in the [wiki:GENIExperimenter/ExperimentExample#OmniConfiguration Omni Configuration] section of the non-OF GENI Experiment Example will work for this OF setup.  The credentials from the GPO Clearinghouse will allow access to the GPO OF aggregate manager.  A list of Aggregate managers is being compiled in the [http://groups.geni.net/geni/wiki/GeniAggregate GENI Aggregate] page, if your site is not listed on this page you should contact your site administrator, or help@geni.net.
    2727
    2828== Determine Resources ==
     
    3333  * Data Path Identifier (DPID).
    3434
    35 To find out what OF resources are available from each of the OF Aggregate Manager, you may use Omni tools to get a list of available resources. Here is an example of resources the OF Aggregate Manager for Site 1 in native RSPEC format:
    36 {{{
    37 $ ./src/omni.py -n -a https://ofam1.site1.com:1443/openflow/gapi/ listresources
     35To find out what OF resources are available from each of the OF Aggregate Manager, you may use Omni tools to get a list of available resources. Here is an example of listing resources advertised by the OF Aggregate Manager for Site 1 in native RSPEC format.
     36
     37NOTE: This example uses Omni V1.3 syntax (native is the default, and the {{{-o}}} option allows you to save the output to a file). For earlier versions of omni, you should (a) include the {{{-n}}} argument, (b) re-direct output to a file (''>'') instead of the -o option, and (c) use PG V0.2 RSpecs at Emulab and SFA format RSpecs at PlanetLab.
     38
     39{{{
     40$ ./src/omni.py -a https://ofam1.site1.com:1443/openflow/gapi/ -o listresources
    3841INFO:omni:Loading config file omni_config
    3942INFO:omni:Using control framework pgeni
    40 INFO:omni:Resources at https://ofam1.site1.com:1443/openflow/gapi/:
     43INFO:omni:Saving output to a file.
     44INFO:omni:Listed resources on 1 out of 1 possible aggregates.
     45INFO:omni:Writing to 'rspec-ofam1-site1-com-1443.xml'
     46INFO:omni: ------------------------------------------------------------
     47INFO:omni: Completed listresources:
     48
     49  Options as run:
     50                aggregate: https://ofam1.site1.com:1443/openflow/gapi/
     51                configfile: omni_config
     52                framework: pgeni
     53                native: True
     54                output: True
     55
     56  Args: listresources
     57
     58  Result Summary: Retrieved resources from 1 aggregates.
     59Wrote rspecs from 1 aggregates to 1 files.
     60INFO:omni: ============================================================
     61}}}
     62
     63The resulting Advertisement RSpec looks like this:
     64{{{
     65#!xml
    4166<?xml version="1.0" ?>
     67<!-- Resources at AM:
     68        URN: unspecified_AM_URN
     69        URL: https://ofam1.site1.com:1443/openflow/gapi/
     70 -->
     71
    4272<rspec type="openflow">
    43   <network location="Cambridge MA" name="local-oim">
     73  <network location="Somewhere USA " name="local-oim ">
    4474    <switches>
    45       <switch urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0">
    46         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:26"/>
    47         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:27"/>
    48         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:28"/>
    49         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:29"/>
    50         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:43"/>
    51         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:44"/>
    52         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:45"/>
    53         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:46"/>
    54         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:47"/>
    55         <port urn="urn:publicid:IDN+ofam1.site1.bbn.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:65534"/>
     75      <switch urn="urn:publicid:IDN+ofam1.site1.com:expedient:openflow+switch
     76:06:bb:00:24:88:cc:bb:00">
     77        <port urn="urn:publicid:IDN+ofam1.site1.com:expedient:openflow+switch:044:d0:02:6f:13:f3:b0:0+port:26"/>
    5678      </switch>
    5779    </switches>
     
    6183}}}
    6284
    63 The above provides the switch and the port URN information to be used in making the OF flowspace reservation.  The above results will give you some insight into what is available, but it is recommended that you coordinate with the site contact to ensure RSPEC accuracy for each of the OF Aggregate Managers. 
     85
     86The above provides the switch and the port URN information to be used in making the OF flowspace reservation.  The above results will give you some insight into what is available, but it is recommended that you coordinate with the site contact to ensure RSpec accuracy for each of the OF Aggregate Managers. 
    6487
    6588== Request Resources ==
    6689
    67 The OF RSPECs are used to request resources at each site's !OpenFlow Aggregate Manager.  This will result in your resource request being imported into the Opt-In manager, where an Administrator must approve your request for resources. Currently requesting OF resources for the sites in the experiment does not require OF setup for the Network Core path; the default handling will allow OF traffic.  This is expected to change.
    68 
    69 
    70 The OF RSPEC defines a flowspace for each OF rule for your traffic sliver.  Following are example OF RSPECs that could be used to reserve the flowspaces needed for each of the generic 3 node scenario in this page. The scenario uses 3 OF Aggregate Managers (one per site) and one OF Controller at Site 1 for all sites.  The example RSPECs are for each of the 3 OF AM and assume that the flowspace is based on traffic type and port (TCP port 9080 and 9082).
    71 
    72 '''RSPEC Example for Site 1 !OpenFlow Aggregate Manager'''
    73 {{{
     90The OF RSpecs are used to request resources at each site's !OpenFlow Aggregate Manager.  This will result in your resource request being imported into the Opt-In manager, where an Administrator must approve your request for resources. Currently requesting OF resources for the sites in the experiment does not require OF setup for the Network Core path; the default handling will allow OF traffic.  This is expected to change.
     91
     92
     93The OF RSpec defines a flowspace for each OF rule for your traffic sliver.  Following are example OF RSpecs that could be used to reserve the flowspaces needed for each of the generic 3 node scenario in this page. The scenario uses 3 OF Aggregate Managers (one per site) and one OF Controller at Site 1 for all sites.  The example RSpecs are for each of the 3 OF AM and assume that the flowspace is based on traffic type and port (TCP port 9080 and 9082).
     94
     95'''RSpec Example for Site 1 !OpenFlow Aggregate Manager'''
     96{{{
     97#!xml
    7498<resv_rspec type="openflow">
    75   <user affiliation="GPO" email="help@geni-net" firstname="GPO" lastname="Ops" password="xxxxxxx"/>
     99  <user affiliation="GPO" email="help@geni.net" firstname="GPO" lastname="Ops" password="xxxxxxx"/>
    76100  <project description="Project description" name=" Project name"/>
    77101  <slice controller_url="tcp:controller.site1.com:9933" description="description" name="name"/>
     
    87111}}}
    88112
    89 '''RSPEC Example for Site 2 !OpenFlow Aggregate Manager'''
    90 {{{
     113'''RSpec Example for Site 2 !OpenFlow Aggregate Manager'''
     114{{{
     115#!xml
    91116<resv_rspec type="openflow">
    92   <user affiliation="GPO" email="help@geni-net" firstname="GPO" lastname="Ops" password="xxxxxxx"/>
     117  <user affiliation="GPO" email="help@geni.net" firstname="GPO" lastname="Ops" password="xxxxxxx"/>
    93118  <project description="Project description" name=" Project name"/>
    94119  <slice controller_url="tcp:controller.site1.com:9933" description="description" name="name"/>
     
    104129}}}
    105130
    106 '''RSPEC Example for Site 3 !OpenFlow Aggregate Manager'''
    107 {{{
     131'''RSpec Example for Site 3 !OpenFlow Aggregate Manager'''
     132{{{
     133#!xml
    108134<resv_rspec type="openflow">
    109   <user affiliation="GPO" email="help@geni-net" firstname="GPO" lastname="Ops" password="xxxxxxx"/>
     135  <user affiliation="GPO" email="help@geni.net" firstname="GPO" lastname="Ops" password="xxxxxxx"/>
    110136  <project description="Project description" name=" Project name"/>
    111137  <slice controller_url="tcp:controller.site1.com:9933" description="description" name="name"/>
     
    124150'''Create Slice and Request Resources'''
    125151
    126 Using the RSPEC that defines the required OF flowspace, you can now request OF resources with the Omni tools. First create a slice using your GPO Clearing House credentials as defined in the omni_config, note that the slice name should be meaningful to you:
     152Using the RSpec that defines 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:
    127153{{{
    128154$ ./src/omni.py createslice ln_OF_slice
    129155INFO:omni:Loading config file omni_config
    130156INFO:omni:Using control framework pgeni
    131 Created slice with Name ln_OF_slice, URN urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+ln_OF_slice
     157INFO:omni:Created slice with Name ln_OF_slice, URN urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+ln_OF_slice, Expiration 2011-06-16 19:46:49
     158INFO:omni: ------------------------------------------------------------
     159INFO:omni: Completed createslice:
     160
     161  Options as run:
     162                configfile: omni_config
     163                framework: pgeni
     164                native: True
     165
     166  Args: createslice ln_OF_slice
     167
     168  Result Summary: Created slice with Name ln_OF_slice, URN urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+ln_OF_slice, Expiration 2011-06-16 19:46:49
     169 
     170INFO:omni: ============================================================
    132171}}}
    133172
    134173Then create a sliver for each resource aggregate.  In this example there are 3 OF aggregates (one per site) and 3 compute resource aggregates (1 PG & 2 MyPLC), which maps to creating 6 slivers, and the following commands are executed:
    135174{{{
    136  $ ./src/omni.py -n -a https://ofam1.site1.com:1443/openflow/gapi/ createsliver ln_OF_slice OF-site1.txt.rspec
    137  $ ./src/omni.py -n -a https://ofam2.site2.com:1443/openflow/gapi/ createsliver ln_OF_slice OF-site2.rspec
    138  $ ./src/omni.py -n -a https://ofam3.site3.com:1443/openflow/gapi/ createsliver ln_OF_slice OF-site3.rspec
    139  $ ./src/omni.py -n -a https://www.emulab.net/protogeni/xmlrpc/am createsliver ln_OF_slice emulab-site2.rspec
    140  $ ./src/omni.py -n -a http://myplc.site1.com:12346 createsliver ln_OF_slice myplc-site1.rspec
    141  $ ./src/omni.py -n -a http://myplc.site3.com:12346 createsliver ln_OF_slice myplc-site3.rspec
    142 }}}
    143 
    144 ^^ Note: Examples that detail rspec creation for the PG and MyPLC resource aggregates can be found in the other non-OF [wiki:GENIExperimenter/ExperimentExample experiment] example. ^^
     175 $ ./src/omni.py -a https://ofam1.site1.com:1443/openflow/gapi/ -o createsliver ln_OF_slice OF-site1.txt.rspec
     176 $ ./src/omni.py -a https://ofam2.site2.com:1443/openflow/gapi/ -o createsliver ln_OF_slice OF-site2.rspec
     177 $ ./src/omni.py -a https://ofam3.site3.com:1443/openflow/gapi/ -o createsliver ln_OF_slice OF-site3.rspec
     178 $ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am -o createsliver ln_OF_slice emulab-site2.rspec
     179 $ ./src/omni.py -a http://myplc.site1.com:12346 -o createsliver ln_OF_slice myplc-site1.rspec
     180 $ ./src/omni.py -a http://myplc.site3.com:12346 -o createsliver ln_OF_slice myplc-site3.rspec
     181}}}
     182
     183^^ Note: Examples that detailed rspec creation examples for the PG and MyPLC resource aggregates can be found in the other non-OF [wiki:GENIExperimenter/ExperimentExample experiment] example. ^^
    145184
    146185== Opt-in Manager Administrative Approval ==
     
    151190  - PI name
    152191  - duration of your experiment
    153   - IP address and names of the nodes whose traffic you need opted in (see the result of listresource and/or sliverstatus)
     192  - IP address and names of the nodes whose traffic you need opted in (see the result of {{{listresources}}} and/or {{{sliverstatus}}})
    154193  - your flowspace request in plain text - what were you looking for
    155194
    156195The OF Aggregate Administrator that opts-in your flows is responsible for resolving any conflicts between the traffic flows that you are requesting and the traffic flows requested by other experiments. If your flows are too generic (ex. all port 80 traffic) then they may overlap with other experiments; the administrator will have control over whether the conflict is resolved in your favor or someone else's.
    157196
    158 Once the OF Aggregate  Administrator has opted-in your traffic, you may start using the OF Resources.
     197Once the OF Aggregate  Administrator has opted-in your traffic, you may start using the OF resources.
    159198
    160199== Run Experiment ==
     
    162201Once 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].
    163202
    164 Remember to check the expiration time for the flowspace and for each aggregate with the Omni ''sliverstatus'' and to ''renewslice'' 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.
     203Remember 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.
    165204
    166205== Release Resources ==
    167206
    168 When the experiment is completed you should release the resources by deleting the resource sliver for each the Resource Aggregates used in the Experiment. In the example experiment used in this page, the following commands should be issued to release resources:
    169 {{{
    170  $ ./src/omni.py -n -a https://ofam1.site1.com:1443/openflow/gapi/ deletesliver ln_OF_slice
    171  $ ./src/omni.py -n -a https://ofam2.site2.com:1443/openflow/gapi/ deletesliver ln_OF_slice
    172  $ ./src/omni.py -n -a https://ofam3.site3.com:1443/openflow/gapi/ deletesliver ln_OF_slice
    173  $ ./src/omni.py -n -a https://www.emulab.net/protogeni/xmlrpc/am deletesliver ln_OF_slice
    174  $ ./src/omni.py -n -a http://myplc.site1.com:12346 deletesliver ln_OF_slice
    175  $ ./src/omni.py -n -a http://myplc.site3.com:12346 deletesliver ln_OF_slice
     207When 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:
     208{{{
     209 $ ./src/omni.py -a https://ofam1.site1.com:1443/openflow/gapi/ deletesliver ln_OF_slice
     210 $ ./src/omni.py -a https://ofam2.site2.com:1443/openflow/gapi/ deletesliver ln_OF_slice
     211 $ ./src/omni.py -a https://ofam3.site3.com:1443/openflow/gapi/ deletesliver ln_OF_slice
     212 $ ./src/omni.py -a https://www.emulab.net/protogeni/xmlrpc/am deletesliver ln_OF_slice
     213 $ ./src/omni.py -a http://myplc.site1.com:12346 deletesliver ln_OF_slice
     214 $ ./src/omni.py -a http://myplc.site3.com:12346 deletesliver ln_OF_slice
    176215}}}
    177216
     
    179218{{{
    180219#!html
    181 <a href="mailto: help@geni.net">Email us</a> with any questions and feedback on this page!
    182 }}}
    183 
    184 
    185 
    186 
     220<a href="mailto:luisa.nevers@bbn.com">Email us</a> with any questions and feedback on this page!
     221}}}