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: |
| 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 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: |
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 |
| 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 listing resources advertised by the OF Aggregate Manager for Site 1 in native RSPEC format. |
| 36 | |
| 37 | NOTE: 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 |
40 | | INFO:omni:Resources at https://ofam1.site1.com:1443/openflow/gapi/: |
| 43 | INFO:omni:Saving output to a file. |
| 44 | INFO:omni:Listed resources on 1 out of 1 possible aggregates. |
| 45 | INFO:omni:Writing to 'rspec-ofam1-site1-com-1443.xml' |
| 46 | INFO:omni: ------------------------------------------------------------ |
| 47 | INFO: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. |
| 59 | Wrote rspecs from 1 aggregates to 1 files. |
| 60 | INFO:omni: ============================================================ |
| 61 | }}} |
| 62 | |
| 63 | The resulting Advertisement RSpec looks like this: |
| 64 | {{{ |
| 65 | #!xml |
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"/> |
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 | | {{{ |
| 90 | 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. |
| 91 | |
| 92 | |
| 93 | 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). |
| 94 | |
| 95 | '''RSpec Example for Site 1 !OpenFlow Aggregate Manager''' |
| 96 | {{{ |
| 97 | #!xml |
131 | | Created slice with Name ln_OF_slice, URN urn:publicid:IDN+pgeni.gpolab.bbn.com+slice+ln_OF_slice |
| 157 | INFO: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 |
| 158 | INFO:omni: ------------------------------------------------------------ |
| 159 | INFO: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 | |
| 170 | INFO:omni: ============================================================ |
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. ^^ |
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 |
| 207 | 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: |
| 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 |