7 | | This experiment is just a quick way to reserve some resources and use netcat to show that they can talk to each other. It uses an IP subnet, which you have to reserve from a pool that the GPO maintains, but the rest of the resources, you can reserve yourself. |
8 | | |
9 | | = Resource requirements = |
| 11 | This tutorial will walk you through an example of running an experiment in Tango GENI. For the purpose of this example we are going to use a simple setup, where we are going to have 2 hosts in two different sites : |
| 12 | * a ProtoGENI host at the GPO lab |
| 13 | * a myPLC host at Clemson |
| 14 | {{{ |
| 15 | #!comment |
| 16 | * a myPLC host at Rutgers |
| 17 | }}} |
| 18 | |
| 19 | And we will use netcat to show that they can talk to each other. |
| 20 | |
| 21 | = Reserving necessary resources = |
| 22 | Tango GENI has disperse compute resources that are connected over multiple OpenFlow switches. In order to be able to reserve all the needed resources, we should first draw a detailed topology of our experiment. TangoGeni has two backbone VLANs (3715, 3716) each providing a different topology. For this example we are going to use VLAN 3715. |
| 23 | |
| 24 | So using the topology maps of TangoGeni, along with diagrams from [http://groups.geni.net/geni/attachment/wiki/NetworkCore/OF-INT-BB%2025-May-2011.png NLR core], [http://groups.geni.net/geni/wiki/GeniAggregate/GpoLabOpenFlow GPO lab] and |
| 25 | [http://groups.geni.net/geni/wiki/GeniAggregate/ClemsonOpenFlow Clemson lab], we can draw this detailed topology for this simple example : |
| 26 | |
| 27 | [[Image(hellogeni-topo.jpg, 30%)]] |
| 28 | |
| 29 | Looking at the topology, we see that we will need to reserve resources from different aggregates. In detail we need resources from : |
| 30 | * GPO's ProtoGENI Aggregate (pc11.gpolab.bbn.com, for the purpose of this example we are using tatooine (pc11), but it is better if you let ProtoGENI to choose a free node for you, all the nodes in the GPO's ProtoGENI cluster, are identically configured) |
| 31 | * GPO's OpenFlow Aggregate (switches habanero and poblano are part of GPO's lab) |
| 32 | * NLR's OpenFlow Aggregate (for the NLR switches) |
| 33 | * Clemson's OpenFlow Aggregate (for the Clemon switch) |
| 34 | * Clemson's myPLC Aggregate (for reserving planetlab5.clemson.edu) |
| 35 | |
| 36 | == Create a slice == |
| 37 | It is always a good measure to create a slice per experiment, so before we start reserving resources, we would need to create a slice for this experiment. If you have already setup your omni_config file, then follow these instructions for [http://groups.geni.net/geni/wiki/GENIExperimenter/ExperimentExample#Createaslice creating] and [http://groups.geni.net/geni/wiki/GENIExperimenter/ExperimentExample#Renewyourslice renewing] a slice. By default slices that are created with a ProtoGENI Clearing House, have an expiration time of 4 hours, that is why you need to renew it to a time that is sensible for your experiment. |
| 38 | |
| 39 | For the purpose of this example, using this [attachment:omni_config] file, created a slice named hellogeni_slice |
| 40 | {{{ |
| 41 | > src/omni.py createslice hellogeni_slice |
| 42 | > src/omni.py renewslice hellogeni_slice 20110630T18:00:00 |
| 43 | }}} |
| 44 | |
| 45 | == Reserve an IP subnet == |
| 46 | In TangoGeni, if an experiment is a layer 3 experiment, it would need it's own separate IP subnet so that it is able to control all traffic for this subnet without interfering with traffic from other experiments. GPO has set aside 10.42.0.0/16 as a pool of IP subnets for this. These subnets aren't provided by an aggregate, and thus can't be reserved via the GENI AM API. Please DO NOT use an IP subnet that you have not reserved, just request for one to assigned to you. |
| 47 | |
| 48 | === Email template for reserving IP subnet === |
| 49 | Before continuing with the tutorial, please send an email to gpo-infra@geni.net to reserve an IP subnet. This is an example email : |
| 50 | {{{ |
| 51 | To: gpo-infra@geni.net |
| 52 | From: Geni User <geniuser@example.com> |
| 53 | Subject: Reservation request for an IP subnet |
| 54 | |
| 55 | Hi, |
| 56 | I am going through the Hello Geni example, and I would like an IP subnet assigned to me, |
| 57 | so that I can complete the tutorial. |
| 58 | user urn : URI:urn:publicid:IDN+pgeni.gpolab.bbn.com+user+inki, email:inki@pgeni.gpolab.bbn.com |
| 59 | duration : until June 30th 2011 |
| 60 | |
| 61 | Thanks, |
| 62 | }}} |
| 63 | |
| 64 | To determine your user urn see [http://trac.gpolab.bbn.com/gcf/wiki/OmniTroubleShoot#Q.HowdoIdeterminemyusernameURN here] for instructions. |
| 65 | |
| 66 | For the purpose of this example we will assume that we got assigned IP subnet '''10.42.130.0/24'''. |
| 67 | |
| 68 | == Create slivers == |
| 69 | For each aggregate we would need to create a sliver that will contain the necessary resources. For all aggregates it is important to now the AM url for requesting the resources. The best place to get the information is at the Aggregate's wiki |
| 70 | page, at [wiki:UsingTangoGeni] there is also a list of URLs of active aggregates. If there is an aggregate that you can't find the URL of, please email [mailto:help@geni.net]. |
| 71 | |
| 72 | === Clemson myPLC sliver === |
| 73 | From [wiki:GeniAggregate/ClemsonMyPlc this page], we get this aggregate's URL and using [attachment:myplc-clemson-hellogeni.rspec this rspec file], we can reserve a sliver in planetlab5: |
| 74 | {{{ |
| 75 | src/omni.py createsliver -n -a https://myplc.clemson.edu:12346 -n hellogeni_slice myplc-clemson-hellogeni.rspec |
| 76 | }}} |
| 77 | The output should look like [attachment:myplc-clemson-hellogeni.out this]. |
| 78 | |
| 79 | Use sliverstatus to figure out the login name : |
| 80 | {{{ |
| 81 | >src/omni.py sliverstatus -n -a https://myplc.clemson.edu:12346 hellogeni_slice |
| 82 | }}} |
| 83 | |
| 84 | Look for the attribute 'pl_login'. For this example the login name is : 'pgenigpolabbbncom_hellogenislice'. |
| 85 | |
| 86 | For PlanetLab aggregates, the 'geni_status' field would say 'unknown'. The best way to test if your resources are ready is trial error. |
| 87 | {{{ |
| 88 | ssh -i .ssh/gcf_id_rsa pgenigpolabbbncom_hellogenislice@planetlab5.clemson.edu |
| 89 | }}} |
| 90 | Your sliver should be ready within 1 min. If after 5 min you are not able to login to the host, delete your sliver and recreate it. If the problem insists email to the support email given in the aggregate page. |
| 91 | {{{ |
| 92 | src/omni.py deletesliver -n -a https://myplc.clemson.edu:12346 hellogeni_slice |
| 93 | }}} |
| 94 | |
| 95 | After you login to the node, you can see all the available interfaces. In order to better support multiple experiments, each myPLC host is already configured with multiple subinterfaces. There should be a subinterface in the IP subnet that you have reserved |
| 96 | {{{ |
| 97 | [pgenigpolabbbncom_hellogenislice@planetlab5 ~]$ /sbin/ifconfig |grep 42.130 -A 2 -B 2 |
| 98 | |
| 99 | eth1.1750:42130 Link encap:Ethernet HWaddr 00:1B:21:43:A1:E4 |
| 100 | inet addr:10.42.130.105 Bcast:10.42.130.255 Mask:255.255.255.0 |
| 101 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 102 | }}} |
| 103 | If you can't find an interface on the reserved subnet, please email [mailto:help@geni.net]. |
| 104 | |
| 105 | === GPO ProtoGENI sliver === |
| 106 | From [wiki:GeniAggregate/GpoLabProtoGeni this page], we get this aggregate's URL and using [attachment:pg-bbn-hellogeni.rspec this rspec file], we can reserve pc11: |
| 107 | {{{ |
| 108 | src/omni.py createsliver -n -a http://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am hellogeni_slice pg-bbn-hellogeni.rspec |
| 109 | }}} |
| 110 | |
| 111 | The output should look like [attachment:pg-bbn-hellogeni.out this]. |
| 112 | |
| 113 | Then we can do sliverstatus to find out the status of the sliver |
| 114 | {{{ |
| 115 | >src/omni.py sliverstatus -n -a http://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am hellogeni_slice |
| 116 | }}} |
| 117 | |
| 118 | Toward the end of the manifest there is an attribute 'geni_status', when this says ready we can login to the host |
| 119 | {{{ |
| 120 | ssh -i ~/.ssh/gcf_id_rsa inki@pc11.pgeni.gpolab.bbn.com |
| 121 | }}} |
| 122 | |
| 123 | === Configuring OpenFow interface on PG Host === |
| 124 | |
| 125 | In TangoGeni, to provide maximum flexibility to the experimenter, the port on the OpenFlow switch where the host is connected to, is configured as a trunk port that carries multiple VLANs. This allows the experimenter, using VLAN subinterfacing, to configure the host to be part of any of the configured VLANs. For this example we are going to use VLAN 1750 that will be cross-connected to 3715 (more details about this setup see XXX). For a list of all available VLANs see [wiki:GeniAggregate/GpoLabOpenFlow GPO's OpenFlow Aggregate Page]. Before continuing we would need to configure eth3. The IP subnet assigned to us is 10.42.130.0. Although you can assign any IP address to your PG host that is not used in your experiment, the convention for the PG hosts of the GPO lab is that the last octet of the IP address is ''200+pc number''. Since we got pc 11, the IP address that should be assigned is 10.42.130.211. |
| 126 | |
| 127 | Follow these steps to configure the host |
| 128 | 1. Add these lines in the end of /etc/network/interfaces, edit this file as sudo: |
| 129 | {{{ |
| 130 | auto eth3.1750 |
| 131 | iface eth3.1750 inet static |
| 132 | address 10.42.130.211 |
| 133 | netmask 255.255.255.0 |
| 134 | mtu 1500 |
| 135 | }}} |
| 136 | 2. Install the vlan package |
| 137 | {{{ |
| 138 | sudo apt-get install vlan |
| 139 | }}} |
| 140 | 3. Reboot the machine |
| 141 | {{{ |
| 142 | sudo init 6 && exit |
| 143 | }}} |
15 | | == An IP subnet == |
16 | | |
17 | | The GPO has set aside 10.42.0.0/16 as a pool of IP subnets for this. We're currently using 10.42.101.0/24 - 10.42.110.0/24 for the Plastic Slices project, and have 10.42.111.0/24 - 10.42.120.0/24 available for other uses. |
18 | | |
19 | | These subnets aren't provided by an aggregate, and thus can't be reserved via the GENI AM API. To reserve one for your experiment, just contact gpo-infra@geni.net. Please DO NOT use an IP subnet that you haven't reserved. |
20 | | |
21 | | ''FIXME: This page should link to a general page for our GENI dataplane IP address conventions, like 10.VL.AN.x for test hosts on intercampus VLANs, using the same last octet in all of the dataplane addresses of hosts that are involved in Hello GENI type experiments, DNS information, etc. For now, the static ARP table for the mesoscale MyPLC plnodes, which we store at http://www.gpolab.bbn.com/arp/geni-core-arp.txt (so that it can be fetched easily to hosts when it changes), is probably the best place to find IP and ARP information.'' |
22 | | |
23 | | == Compute resources == |
24 | | |
25 | | Hello GENI can use MyPLC plnodes at the mesoscale campuses for its compute resources, which have been pre-configured with the appropriate IP subnets, and with static ARP entries to allow them to talk to each other without requiring a controller that handles loop detection for broadcast traffic. |
26 | | |
27 | | You can also in theory use mesoscale ProtoGENI or Wide-Area ProtoGENI hosts as compute resources, but we haven't actually done this in practice yet. |
28 | | |
29 | | See the [http://www.gpolab.bbn.com/arp/geni-core-arp.txt static ARP table] mentioned above for IP information for the compute resources. |
30 | | |
31 | | == !OpenFlow resources == |
32 | | |
33 | | In order to connect the compute resources, you'll need to reserve some !OpenFlow resources, both on campuses and in the [wiki:NetworkCore GENI network core]. |
34 | | |
35 | | On campuses, you'll want an rpsec that reserves your subnet, on the ports that (a) your compute resources are connected to; and (b) connect those ports to the cross-connect to reach the OF core VLANs (3715 and 3716). The various campus !OpenFlow [wiki:GeniAggregate aggregate information pages] have tables and/or diagrams with more information along those lines; if you need a hand figuring out exactly which ports to use, contact help@geni.net. |
36 | | |
37 | | Note that as with all !OpenFlow slivers, you'll need to contact the [wiki:OpenFlow/Expedient#Optinginyourtraffic Expedient Opt-In Manager admins] for the aggregates where you reserve resources. |
38 | | |
39 | | You'll also need a host on which you can run an !OpenFlow controller, listening on a TCP port, which the OpenFlow resources at the sites can reach (i.e. any firewalls in front of your controller must permit your TCP port). |
40 | | |
41 | | ''FIXME: This page should link to a page describing how to get and run a simple !OpenFlow controller, if you don't have one already.'' |
42 | | |
43 | | = Example = |
44 | | |
45 | | Here's a full end-to-end example, using one MyPLC plnode at each of BBN and Stanford, and using 10.42.256.0/24 (which doesn't exist) as the example IP subnet. It assumes that you're already set up with Omni. |
46 | | |
47 | | == Rspecs == |
48 | | |
49 | | Save these rspecs into files; you'll use them with omni commands later. |
50 | | |
51 | | === Compute resources === |
52 | | |
53 | | These rspecs will each reserve one MyPLC plnode. You could modify them to reserve different and/or additional plnodes, but you'd also need to modify your !OpenFlow rspecs to include the dataplane interfaces for those plnodes. See "More advanced stuff" below. |
54 | | |
55 | | ==== One MyPLC plnode at BBN ==== |
56 | | |
57 | | Save this in a file called myplc-bbn.rspec: |
58 | | |
59 | | {{{ |
60 | | <?xml version="1.0"?> |
61 | | <RSpec type="SFA"> |
62 | | <network name="plc.gpolab"> |
63 | | <site id="s1"> |
64 | | <name>myplc.gpolab.bbn.com</name> |
65 | | <node id="n1"> |
66 | | <hostname>navis.gpolab.bbn.com</hostname> |
67 | | <sliver></sliver> |
68 | | </node> |
69 | | </site> |
70 | | </network> |
71 | | </RSpec> |
72 | | }}} |
73 | | |
74 | | ==== One MyPLC plnode at Stanford ==== |
75 | | |
76 | | Save this in a file called myplc-stanford.rspec: |
77 | | |
78 | | {{{ |
79 | | <?xml version="1.0"?> |
80 | | <RSpec type="SFA"> |
81 | | <network name="plc"> |
82 | | <site id="s1"> |
83 | | <name>MyPLC</name> |
84 | | <node id="n1"> |
85 | | <hostname>of-planet1.stanford.edu</hostname> |
86 | | <sliver></sliver> |
87 | | </node> |
88 | | </site> |
89 | | </network> |
90 | | </RSpec> |
91 | | }}} |
92 | | |
93 | | === !OpenFlow resources === |
94 | | |
95 | | You'll need to modify some parts of both of these rspecs before you can use them. In particular, you'll need to modify: |
96 | | |
97 | | * In the 'user' element, sub in your own site name, e-mail address, first name, last name, and a newly-made-up password for Expedient to use. |
98 | | * In the 'project' element, sub in your own username and your full name. |
99 | | * In the 'slice' element: |
100 | | * For the 'controller_url' attribute, sub in the hostname and port where you plan to run your !OpenFlow controller. |
101 | | * For the 'name' attribute, sub in the hostname and port of your controller. |
102 | | * For the 'description' attribute, sub in your own username. |
103 | | * For the 'expiry' attribute, enter a number representing a time in the future, in seconds since the epoch. (Try 'date +%s -d "now + 1 week"' on a Linux system to get a number meaning "one week from now".) |
104 | | * In the 'nw_dst' and 'nw_src' elements, sub in your subnet instead of "256" in two places below. |
105 | | |
106 | | ==== BBN ==== |
107 | | |
108 | | Save this in a file called openflow-bbn.rspec: |
109 | | |
110 | | {{{ |
111 | | <resv_rspec type="openflow"> |
112 | | <user affiliation="YOURSITE" email="YOURUSERNAME@YOURSITE" firstname="YOURFIRST" lastname="YOURLAST" password="NEWPASSWD"/> |
113 | | <project name="YOURUSERNAME-hello-geni" description="Hello GENI experiment by YOURNAME"/> |
114 | | <slice controller_url="tcp:HOSTNAME:PORT" name="HOSTNAME-PORT" description="The controller for YOURUSERNAME-hello-geni."/> |
115 | | <flowspace> |
116 | | <port urn="urn:publicid:IDN+tulum.gpolab.bbn.com:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:56"/> |
117 | | <port urn="urn:publicid:IDN+tulum.gpolab.bbn.com:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:71"/> |
118 | | <port urn="urn:publicid:IDN+tulum.gpolab.bbn.com:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:3"/> |
119 | | <port urn="urn:publicid:IDN+tulum.gpolab.bbn.com:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:20"/> |
120 | | <dl_type from="2048" to="2048"/> |
121 | | <nw_dst from="10.42.256.0" to="10.42.256.255"/> |
122 | | </flowspace> |
123 | | <flowspace> |
124 | | <port urn="urn:publicid:IDN+tulum.gpolab.bbn.com:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:56"/> |
125 | | <port urn="urn:publicid:IDN+tulum.gpolab.bbn.com:expedient:openflow+switch:06:d6:00:24:a8:c4:b9:00+port:71"/> |
126 | | <port urn="urn:publicid:IDN+tulum.gpolab.bbn.com:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:3"/> |
127 | | <port urn="urn:publicid:IDN+tulum.gpolab.bbn.com:expedient:openflow+switch:06:d6:00:12:e2:b8:a5:d0+port:20"/> |
128 | | <dl_type from="2048" to="2048"/> |
129 | | <nw_src from="10.42.256.0" to="10.42.256.255"/> |
130 | | </flowspace> |
131 | | </resv_rspec> |
132 | | }}} |
133 | | |
134 | | Then edit it as described above. |
135 | | |
136 | | ==== Stanford ==== |
137 | | |
138 | | Save this in a file called openflow-stanford.rspec: |
139 | | |
140 | | {{{ |
141 | | <resv_rspec type="openflow" version="2"> |
142 | | <user affiliation="YOURSITE" email="YOURUSERNAME@YOURSITE" firstname="YOURFIRST" lastname="YOURLAST" password="NEWPASSWD"/> |
143 | | <project name="YOURUSERNAME-hello-geni" description="Hello GENI experiment by YOURNAME"/> |
144 | | <slice controller_url="tcp:HOSTNAME:PORT" name="HOSTNAME-PORT" description="The controller for YOURUSERNAME-hello-geni." expiry="EXPIRY"/> |
145 | | <flowspace> |
146 | | <port urn="urn:publicid:IDN+stanford:expedient:openflow+switch:00:00:00:12:e2:78:31:f5+port:2"/> |
147 | | <port urn="urn:publicid:IDN+stanford:expedient:openflow+switch:00:00:00:12:e2:78:31:f5+port:11"/> |
148 | | <port urn="urn:publicid:IDN+stanford:expedient:openflow+switch:03:85:00:23:47:4e:2e:c0+port:4"/> |
149 | | <port urn="urn:publicid:IDN+stanford:expedient:openflow+switch:03:85:00:23:47:4e:2e:c0+port:8"/> |
150 | | <dl_type from="2048" to="2048"/> |
151 | | <nw_dst from="10.42.256.0" to="10.42.256.255"/> |
152 | | </flowspace> |
153 | | <flowspace> |
154 | | <port urn="urn:publicid:IDN+stanford:expedient:openflow+switch:00:00:00:12:e2:78:31:f5+port:2"/> |
155 | | <port urn="urn:publicid:IDN+stanford:expedient:openflow+switch:00:00:00:12:e2:78:31:f5+port:11"/> |
156 | | <port urn="urn:publicid:IDN+stanford:expedient:openflow+switch:03:85:00:23:47:4e:2e:c0+port:4"/> |
157 | | <port urn="urn:publicid:IDN+stanford:expedient:openflow+switch:03:85:00:23:47:4e:2e:c0+port:8"/> |
158 | | <dl_type from="2048" to="2048"/> |
159 | | <nw_src from="10.42.256.0" to="10.42.256.255"/> |
160 | | </flowspace> |
161 | | </resv_rspec> |
162 | | }}} |
163 | | |
164 | | Then edit it as described above. |
165 | | |
166 | | ==== NLR ==== |
167 | | |
168 | | Save this in a file called openflow-nlr.rspec: |
169 | | |
170 | | {{{ |
171 | | <resv_rspec type="openflow" version="2"> |
172 | | <user affiliation="YOURSITE" email="YOURUSERNAME@YOURSITE" firstname="YOURFIRST" lastname="YOURLAST" password="NEWPASSWD"/> |
173 | | <project name="YOURUSERNAME-hello-geni" description="Hello GENI experiment by YOURNAME"/> |
174 | | <slice controller_url="tcp:HOSTNAME:PORT" name="HOSTNAME-PORT" description="The controller for YOURUSERNAME-hello-geni." expiry="EXPIRY"/> |
175 | | <flowspace> |
176 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:23:47:c8:bc:00"/> |
177 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:23:47:ca:bc:40"/> |
178 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:24:a8:d2:48:00"/> |
179 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:24:a8:d2:b8:40"/> |
180 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:26:f1:40:a8:00"/> |
181 | | <dl_type from="2048" to="2048"/> |
182 | | <nw_dst from="10.42.256.0" to="10.42.256.255"/> |
183 | | </flowspace> |
184 | | <flowspace> |
185 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:23:47:c8:bc:00"/> |
186 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:23:47:ca:bc:40"/> |
187 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:24:a8:d2:48:00"/> |
188 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:24:a8:d2:b8:40"/> |
189 | | <switch urn="urn:publicid:IDN+nlr:expedient:openflow+switch:0e:83:00:26:f1:40:a8:00"/> |
190 | | <dl_type from="2048" to="2048"/> |
191 | | <nw_src from="10.42.256.0" to="10.42.256.255"/> |
192 | | </flowspace> |
193 | | </resv_rspec> |
194 | | }}} |
195 | | |
196 | | Then edit it as described above. |
197 | | |
198 | | == Creating your slice == |
199 | | |
200 | | Now that you've got your rspecs, create your slice. |
201 | | |
202 | | First, give it a name, like "hello" followed by your username, e.g. "hellojbs". Then, create it, and set it to expire a week from now: |
203 | | |
204 | | {{{ |
205 | | slicename=helloYOURUSERNAME |
206 | | omni createslice $slicename |
207 | | omni renewslice $slicename $(date +%Y%m%dT%H:%M:%S -d "now + 1 week") |
208 | | }}} |
209 | | |
210 | | == Creating your slivers == |
211 | | |
212 | | Now that you've got a slice, create slivers within it: |
213 | | |
214 | | {{{ |
215 | | omni -n -a https://myplc.gpolab.bbn.com:12346/ createsliver $slicename myplc-bbn.rspec |
216 | | omni -n -a https://myplc.stanford.edu:12346/ createsliver $slicename myplc-stanford.rspec |
217 | | omni -n -a https://expedient.gpolab.bbn.com:1443/openflow/gapi/createsliver $slicename openflow-bbn.rspec |
218 | | omni -n -a https://endpoint.stanford.edu:1443/openflow/gapi/ $slicename openflow-stanford.rspec |
219 | | omni -n -a https://ofc-testlab.grnoc.iu.edu:1443/openflow/gapi/createsliver $slicename openflow-nlr.rspec |
220 | | }}} |
221 | | |
222 | | == Opt in your !OpenFlow resources == |
223 | | |
224 | | Creating those !OpenFlow slivers doesn't actually reserve the resources immediately, it just puts in a request to the !OpenFlow Expedient Opt-In Manager at each aggregate. In order to finish reserving them, send mail to response-team@geni.net, saying something like: |
225 | | |
226 | | {{{ |
227 | | Hi! I'm creating a slice to try out Hello GENI, and reserving some |
228 | | OpenFlow resources at BBN, Stanford, and NLR. My topology should just |
229 | | include the port for one MyPLC plnode at each site, the cross-connect port |
230 | | to VLAN 3715, and the connections between them, plus the NLR backbone |
231 | | switches, for 10.42.256.0/24 only. |
232 | | |
233 | | Can you please opt in my slivers? Thanks! |
234 | | }}} |
235 | | |
236 | | Sub in your subnet in place of "256" above, of course. |
237 | | |
238 | | == Log in to your MyPLC resources == |
239 | | |
240 | | While you wait for your !OpenFlow resources to be opted in, you can confirm that you can log in to your MyPLC resources. Run these commands to find the login name to use: |
241 | | |
242 | | {{{ |
243 | | omni -n -a https://myplc.gpolab.bbn.com:12346/ sliverstatus $slicename |
244 | | omni -n -a https://myplc.stanford.edu:12346/ sliverstatus $slicename |
245 | | }}} |
246 | | |
247 | | In the output of each of those, look for a line containing "pl_hostname" and a line containing "pl_login". You should then be able to log in via SSH using that login name to that hostname, e.g. |
248 | | |
249 | | {{{ |
250 | | ssh pgenigpolabbbncom_jbstest@navis.gpolab.bbn.com |
| 149 | It is important to configure the host '''before''' reserving the OpenFlow resources that are directly associated with this host. |
| 150 | |
| 151 | === OpenFlow Slivers === |
| 152 | After we have reserved and configured all the compute resources we are ready to reserve the OpenFlow resources. This example spans three different OpenFlow aggregates, GPO, Clemson and NLR. The first thing we need to figure out, is where to run the OpenFlow controller. The OpenFlow controller is the software that decides how packets that belong to our sliver should be handled. The host running the !OpenFlow controller listening on a TCP port, should be reachable by the OpenFlow resources at the sites (i.e. any firewalls in front of your controller must permit your TCP port).For the purpose of this example the controller will run at nineveh.gpolab.bbn.com on tcp port 1718. |
| 153 | |
| 154 | '''Note''' that for some switches, the OpenFlow port is the physical port + 24, so in your rspec you would need to account for this when requesting the resources. This information should be specified in the Aggregate page, but the best way to find out is to invoke the list available resources on the appropriate Aggregate manager. If the ports listed in the response differ by 24 from the expected port numbers, then adjust your reservation rspec appropriately. For an example of how to invoke list resources look [http://groups.geni.net/geni/wiki/GENIExperimenter/ExperimentExample#Listavailableresources here]. |
| 155 | |
| 156 | ==== GPO OpenFlow Sliver ==== |
| 157 | |
| 158 | Based on the topology diagram above, at the GPO aggregate we would like to reserve resources related to IP subnet 10.42.130.0/24 on the two GPO switches for ports 1, 47 of the first switch and ports 20 and 3 on the second. [attachment:openflow-bbn-hellogeni.rspec This] is an rspec that requests these resources. From GPO's aggregate page we can also get the AM URL. |
| 159 | {{{ |
| 160 | src/omni.py createsliver -a https://tulum.gpolab.bbn.com:1443/openflow/gapi/ -n hellogeni_slice openflow-bbn-hellogeni.rspec |
| 161 | }}} |
| 162 | |
| 163 | The output of this command should look like [attachment:openflow-bbn-hellogeni.out this.] |
| 164 | |
| 165 | ==== Clemson OpenFlow Sliver ==== |
| 166 | Based on the topology diagram above, at the Clemson aggregate we would like to reserve resources related to IP subnet 10.42.130.0/24 on the two clemson switch for ports 42 and 36. [attachment:openflow-clemson-hellogeni.rspec This] is an rspec that requests these resources. From Clemson's aggregate page we can also get the AM URL. |
| 167 | {{{ |
| 168 | src/omni.py createsliver -a https://expedient.clemson.edu:1443/openflow/gapi/ hellogeni_slice openflow-clemson-hellogeni.rspec |
| 169 | }}} |
| 170 | |
| 171 | The output of this command should look like [attachment:openflow-clemson-hellogeni.out this.] |
| 172 | |
| 173 | ==== NLR OpenFlow Sliver ==== |
| 174 | Based on the topology diagram above, at the Clemson aggregate we would like to reserve resources related to IP subnet 10.42.130.0/24 on the two NLR switch for ports 25 and 26 on both. [attachment:openflow-nlr-hellogeni.rspec This] is an rspec that requests these resources. From NLR's aggregate page we can also get the AM URL. |
| 175 | {{{ |
| 176 | src/omni.py createsliver -n -a https://ofc-testlab.grnoc.iu.edu:1443/openflow/gapi/ hellogeni_slice openflow-nlr-hellogeni.rspec |
| 177 | }}} |
| 178 | |
| 179 | The output of this command should look like [attachment:openflow-nlr-hellogeni.out this.] |
| 180 | |
| 181 | ==== Opt-in OpenFlow resources ==== |
| 182 | After requesting all the OpenFlow resources, we need to contact the administrator at each of the OpenFlow aggregates to actually opt-in the traffic. You can get the email address from each aggregate's page. |
| 183 | |
| 184 | For the email you will need the following info from your openflow rspec file |
| 185 | * <user_email> : from the user tag, the value of the email attribute |
| 186 | * <project_name> : from the the project tag, the value of the name attribute |
| 187 | * <slice_name> : from the the slice tag, the value of the name attribute |
| 188 | |
| 189 | For these rspecs the values would be : <user_email> = nriga@bbn.com, <project_name> = hellogeni, <slice_name> = hellogeni. |
| 190 | Also make sure to describe your intended topology. |
| 191 | |
| 192 | Use the following template |
| 193 | {{{ |
| 194 | To: <email@aggregate.geni> |
| 195 | From: Geni User <geniuser@example.com> |
| 196 | Subject: Opt-in traffic for slice <slice_name> |
| 197 | |
| 198 | Please opt-in the traffic for the slice with the following information : |
| 199 | * name : <slice_name> |
| 200 | * project : <project_name> |
| 201 | * email : <user_email> |
| 202 | |
| 203 | I have reserved a sliver containing pc1.pgeni.gpolab.bbn.com and planetlab5.clemson.edu. |
| 204 | I have reserved IP subnet 10.42.130.0/24 and I would like all traffic for this subnet that |
| 205 | is of type IP or ARP to be forwarded to my controller. The traffic should flow over VLAN 3715. |
| 206 | |
| 207 | Thanks, |
| 208 | |
| 209 | }}} |
| 210 | |
| 211 | Once we receive a confirmation that our traffic has been opted in from all three aggregates we are ready to run our experiment! |
| 212 | |
| 213 | = Run the experiment = |
| 214 | |
| 215 | First of all we need to start the OpenFlow controller so that our traffic is being forwarded in the network |
| 216 | |
| 217 | == Run OpenFlow controller == |
| 218 | |
| 219 | There are multiple choices for OpenFlow controllers that you might want to consider. For this example we are going to use the [http://noxrepo.org/wp/ Nox Controller]. We are going to use a simple switch controller, that will switch traffic for our slice like a layer 2 switch. Start the controller |
| 220 | {{{ |
| 221 | ./nox_core -i ptcp:1718 switch |
| 222 | }}} |
| 223 | |
| 224 | === Install netcat on myPLC resources === |
| 225 | MyPlc hosts have very few installed packages, so we need to install the necessary software. First we login to our host at clemson |
| 226 | |
| 227 | {{{ |
| 228 | ssh -i .ssh/gcf_id_rsa pgenigpolabbbncom_hellogenislice@planetlab5.clemson.edu |
259 | | == Say hello == |
260 | | |
261 | | Once you hear back from the Expedient OIM admins at BBN, Stanford, and NLR, you can try sending traffic from one of your MyPLC plnodes to another. |
262 | | |
263 | | Log in to your plnode at BBN, and run a netcat listener, on : |
264 | | |
265 | | {{{ |
266 | | nc -lk 10.42.256.55 6256 |
267 | | }}} |
268 | | |
269 | | In another window, log in to your plnode at Stanford, and connect to the listener you're running at BBN: |
270 | | |
271 | | {{{ |
272 | | nc 10.42.256.55 6256 |
273 | | }}} |
274 | | |
275 | | Use your own subnet number instead of "256" in both of these IPs. |
276 | | |
277 | | You can then type text in one window, and it'll appear in the other -- if your !OpenFlow controller is running. Try it with your controller running, and not running, to see. |
278 | | |
279 | | Note that after you stop your controller, you'll need to wait five seconds without sending any traffic in order for the flowtable entries in the switches to time out -- if you keep sending traffic continuously, it'll keep flowing even if you stop your controller. Once any existing flowtable entries time out, though, new ones won't be created (and traffic won't flow) while your controller is down. |
280 | | |
281 | | = More advanced stuff = |
282 | | |
283 | | You can run |
284 | | |
285 | | {{{ |
286 | | omni -n -a https://myplc.gpolab.bbn.com:12346/ listresources |
287 | | omni -n -a https://myplc.stanford.edu:12346/ listresources |
288 | | }}} |
289 | | |
290 | | to get a list of other BBN and/or Stanford MyPLC plnodes to use. Note that the advertisement rspec format returned by that command is subtly different than the reservation rspec format shown above. |
291 | | |
292 | | If you wanted to use different plnodes than the ones listed above, you'd need to modify your !OpenFlow rspecs to include the dataplane interfaces for those plnodes, and also any intermediate switches in the topology. |
293 | | |
294 | | ''FIXME: This page should probably include a little more information about how to figure out what ports you'd need to set up a more complicated topology.'' |
| 237 | === Say hello === |
| 238 | First we login to our hosts from two different terminals : |
| 239 | {{{ |
| 240 | ssh -i ~/.ssh/gcf_id_rsa inki@pc11.pgeni.gpolab.bbn.com |
| 241 | ssh -i .ssh/gcf_id_rsa pgenigpolabbbncom_hellogenislice@planetlab5.clemson.ed |
| 242 | }}} |
| 243 | |
| 244 | Run the listener on the myPLC host |
| 245 | |
| 246 | {{{ |
| 247 | [pgenigpolabbbncom_hellogenislice@planetlab5 ~]$ nc -lk 10.42.130.105 6256 |
| 248 | }}} |
| 249 | |
| 250 | Connect to the listener you just started from your ProtoGENI host : |
| 251 | {{{ |
| 252 | node0:~> nc 10.42.130.105 6256 |
| 253 | }}} |
| 254 | |
| 255 | Make sure your OpenFlow controller is running. Type "Hello GENI" on the PG host and see it appear on the myPLC host. |
| 256 | Try it with your controller running, and not running, to see. |
| 257 | |
| 258 | Note that after stopping our controller, we need to wait five seconds without sending any traffic in order for the flowtable entries in the switches to time out -- if traffic is flowing continuously, it'll keep flowing even if the controller is not running. Once any existing flowtable entries time out, though, new ones won't be created (and traffic won't flow) while the controller is down. |
| 259 | |
| 260 | = Release resources = |
| 261 | It is important after running an experiment to cleanup all the resources, since as long as the resources are reserved other experimenters can not use them. Although most of the reservations come with expiration times, we should be considerate and release our resources if our experiment has finished before that. |
| 262 | |
| 263 | == Release OpenFlow resources == |
| 264 | It's important to release the OpenFlow resources before the slice expires. Currently the OpenFlow slivers are not tied with the slice's expiration time and they may have an expiration time that exceeds the expiration time of the slice, in which case you won't be able to access your resources through Omni. |
| 265 | |
| 266 | For each aggregate delete the OpenFlow sliver : |
| 267 | {{{ |
| 268 | src/omni.py deletesliver -a https://ofc-testlab.grnoc.iu.edu:1443/openflow/gapi/ hellogeni_slice |
| 269 | src/omni.py deletesliver -a https://tulum.gpolab.bbn.com:1443/openflow/gapi/ hellogeni_slice |
| 270 | src/omni.py deletesliver -a https://expedient.clemson.edu:1443/openflow/gapi/ hellogeni_slice |
| 271 | }}} |
| 272 | |
| 273 | The output should look like [attachment:delete-openflow-nlr-hellogeni.out this]. |
| 274 | |
| 275 | If your slice has already expired then only the Aggregate administrator can delete your OpenFlow sliver. In this case you would need to send an email : |
| 276 | |
| 277 | {{{ |
| 278 | To: <email@aggregate.geni> |
| 279 | From: Geni User <geniuser@example.com> |
| 280 | Subject: Delete OpenFlow slice <slice_name> |
| 281 | |
| 282 | Please delete the OpenFlow slice with the following information : |
| 283 | * name : <slice_name> |
| 284 | * project : <project_name> |
| 285 | * email : <user_email> |
| 286 | |
| 287 | Thanks, |
| 288 | |
| 289 | }}} |
| 290 | |
| 291 | == Release GPO's ProtoGENI and Clemson's myPLC == |
| 292 | |
| 293 | Invoke the delete sliver command |
| 294 | {{{ |
| 295 | src/omni.py deletesliver -a http://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am hellogeni_slice |
| 296 | src/omni.py deletesliver -a https://myplc.clemson.edu:12346 hellogeni_slice |
| 297 | }}} |
| 298 | |
| 299 | If the slice has expired, then these resources are released so there is no need to worry about this case. |
| 300 | |
| 301 | Time to run your own experiment! Let us know if you need any [mailto:help@geni.net help]. |
| 302 | |