119 | | |
120 | | = 4. Create an experiment using Omni = |
121 | | In this step we are going to setup a sample GENI experiment, in order to |
122 | | get familiarized with most of the Omni commands. |
123 | | |
124 | | == 4a. Create and renew a slice == |
125 | | The first thing to do when preparing to run a GENI experiment is to create a |
126 | | slice. |
127 | | i. To create a slice type, use the `<slicename>` given in your paper slip: |
128 | | {{{ |
129 | | omni.py createslice <slicename> |
130 | | }}} |
131 | | ii. To verify that your slice has been created and in general to keep track of |
132 | | your slices, use the `listmyslices` command. use the <username> given in your |
133 | | paper slip. Type: |
134 | | {{{ |
135 | | omni.py listmyslices <username> |
136 | | }}} |
137 | | iii. Renew your slice. To extend the lifetime of your slice type: |
138 | | {{{ |
139 | | omni.py renewslice <slicename> 20121025 |
140 | | }}} |
141 | | |
142 | | == 4b. Reserve resources, a.k.a create a sliver == |
143 | | The next step in a GENI experiment is to actually reserve resources. For this |
144 | | experiment we are going to use the Aggregate manager of ProtoGENI in Utah. |
145 | | i. In Omni in order to see what each AM offers you can use the |
146 | | `listresources` command. Type: |
147 | | {{{ |
148 | | omni.py listresources -a pg-utah -o |
149 | | }}} |
150 | | The `-o` option will save the output to a file. The filename is chosen by Omni and printed as part of the output. The output will look like : |
151 | | {{{ |
152 | | geni@geni-VirtualBox:~$ omni.py listresources -a pg-utah -o |
153 | | INFO:omni:Loading config file /home/geni/.gcf/omni_config |
154 | | INFO:omni:Using control framework pg |
155 | | INFO:omni:Saving output to a file. |
156 | | INFO:omni:Substituting AM nickname pg-utah with URL https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0, URN unspecified_AM_URN |
157 | | INFO:omni:Listed resources on 1 out of 1 possible aggregates. |
158 | | INFO:omni:Writing to 'rspec-www-emulab-net-protogeniv2.xml' |
159 | | INFO:omni: ------------------------------------------------------------ |
160 | | INFO:omni: Completed listresources: |
161 | | |
162 | | Options as run: |
163 | | aggregate: ['pg-utah'] |
164 | | framework: pg |
165 | | output: True |
166 | | |
167 | | Args: listresources |
168 | | |
169 | | Result Summary: Queried resources from 1 of 1 aggregate(s). |
170 | | Wrote rspecs from 1 aggregate(s) to 1 file(s) |
171 | | Saved listresources RSpec at 'unspecified_AM_URN' (url 'https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0') to file rspec-www-emulab-net-protogeniv2.xml; |
172 | | INFO:omni: ============================================================ |
173 | | }}} |
174 | | In the last line of the output Omni will tell you the name of the file that output is saved at. In the example above this would be `rspec-www-emulab-net-protogeniv2.xml`. Open the file that Omni saved and just take a look to see how an advertisement RSpec looks like. |
175 | | In order to see only available resources type |
176 | | {{{ |
177 | | omni.py listresources -a pg-utah --available -o |
178 | | }}} |
179 | | i. To be able to reserve resources you will need to craft a request rspec. |
180 | | For this example we have created the rspecs for you, use the rspec URL given |
181 | | in your paper slip. Type : |
182 | | {{{ |
183 | | omni.py createsliver -a pg-utah <slicename> <rspec_url> |
184 | | }}} |
185 | | For example |
186 | | {{{ |
187 | | omni.py createsliver -a pg-utah iomni30 http://www.gpolab.bbn.com/experiment-support/gec15/omni-intro/rspecs/iomni-30.rspec |
188 | | }}} |
189 | | '''Tip:''' If you are copying the above line make sure to substitute the slicename and the actual rspec name with the ones that are specified in your paper slip. |
190 | | i. Look at your reserved resources. Type: |
191 | | {{{ |
192 | | omni.py listresources -a pg-utah <slicename> |
193 | | }}} |
194 | | i. Extend the lifetime of your sliver: |
195 | | {{{ |
196 | | omni.py renewsliver -a pg-utah <slicename> 20121025 |
197 | | }}} |
198 | | i. Check the status of your resources. Type: |
199 | | {{{ |
200 | | omni.py sliverstatus -a pg-utah <slicename> |
201 | | }}} |
202 | | The `sliverstatus` command reports the status of your overall GENI slice. When |
203 | | the status is ready we are ready to continue to the next step. |
204 | | |
205 | | = 5. Run your experiment = |
206 | | Now that resources are ready we can start running our experiment. We will first |
207 | | start by logging in to our reserved nodes. |
208 | | |
209 | | == 5a. Logging Into the nodes -- Omni Scripting == |
210 | | Depending on the Aggregate the login information are either part of the |
211 | | `sliverstatus` call, or as part of the manifest rspec, i.e. returned from the |
212 | | `listresources` call. Omni comes with a script that makes it easy to gather all |
213 | | this information. |
214 | | i. In the terminal run: |
215 | | {{{ |
216 | | readyToLogin.py -a pg-utah <slicename> |
217 | | }}} |
218 | | The script will return the actual command that you would need to use for logging in. |
219 | | ii. Login to both nodes by copy-paste the commands from the output of the |
220 | | script. |
221 | | |
222 | | [[Image(Tutorials/Graphics:readytologin_output.png, 40%)]] |
223 | | |
224 | | == 5b. Send IP traffic == |
225 | | The first simple experiment that we will run is to verify the IP connectivity |
226 | | between our hosts. |
227 | | i. Check the interfaces of your nodes. In the terminal type: |
228 | | {{{ |
229 | | /sbin/ifconfig |
230 | | }}} |
231 | | You should see at least two interfaces: |
232 | | * The '''control interface'''. This is the interface from where you access |
233 | | the node, e.g. ssh into your host. The control interface is mainly used for |
234 | | control traffic, i.e. traffic for controlling the node and the experiment. |
235 | | The control interface usually has a publicly routable IP. |
236 | | * The '''data interface'''. This is the interface that is used for sending |
237 | | experimental traffic. This is the interface that connects to the other hosts |
238 | | of your experiment through GENI. The links between these interfaces are the |
239 | | ones that allow you to run non-IP experiments. |
240 | | i. Note the name and the MAC address of the control and of the data interface for each node. The data interface is the one that has an IP that starts with 10. |
241 | | i. From the client ping the server. From the xterm that is logged in to the |
242 | | client type : |
243 | | {{{ |
244 | | ping server -c 5 |
245 | | }}} |
246 | | '''Note''': You can use the name that is assigned to the host to directly ping |
247 | | the host, you can also ping using the IP of the data interface of the node. |
248 | | An example output should look like : |
249 | | {{{ |
250 | | [[inki@r2 ~]$ ping server -c 5 |
251 | | PING 10.10.2.1 (10.10.2.1) 56(84) bytes of data. |
252 | | 64 bytes from 10.10.2.1: icmp_seq=1 ttl=64 time=1.95 ms |
253 | | 64 bytes from 10.10.2.1: icmp_seq=2 ttl=64 time=2.27 ms |
254 | | 64 bytes from 10.10.2.1: icmp_seq=3 ttl=64 time=2.04 ms |
255 | | 64 bytes from 10.10.2.1: icmp_seq=4 ttl=64 time=1.95 ms |
256 | | 64 bytes from 10.10.2.1: icmp_seq=5 ttl=64 time=1.72 ms |
257 | | |
258 | | --- 10.10.2.1 ping statistics --- |
259 | | 5 packets transmitted, 5 received, 0% packet loss, time 4005ms |
260 | | rtt min/avg/max/mdev = 1.728/1.992/2.278/0.179 ms |
261 | | }}} |
262 | | |
263 | | == 5c. Send non-IP traffic == |
264 | | GENI provides the capability of running non-IP experiments, since you can |
265 | | connect your hosts at Layer 2. For the purpose of this tutorial we have |
266 | | installed in all the hosts a very simple Layer 2 ping program that sends packets |
267 | | using a custom ethernet type. |
268 | | i. Disable the IP in your nodes. First of all we are going to completely |
269 | | disable IP on our nodes. In each of the terminals type: |
270 | | {{{ |
271 | | sudo /sbin/ifconfig <data i/f name> 0.0.0.0 |
272 | | }}} |
273 | | '''Note''': Be extra careful to bring down the IP on the data interface, |
274 | | bringing down the IP on the control interface means that you will lose |
275 | | connectivity to your host. |
276 | | ii. Try again to ping from the client to the server. In the xterm of the |
277 | | client type: |
278 | | {{{ |
279 | | ping server -c 5 |
280 | | }}} |
281 | | This time the ping should timeout. |
282 | | iii. Start the Layer 2 ping server: In the server xterm, type: |
283 | | {{{ |
284 | | sudo /usr/local/bin/pingPlusListener 12345 |
285 | | }}} |
286 | | iii. From the client try to ping the server at layer 2. You will need the mac |
287 | | address of the data interface of the server and the name of the data interface |
288 | | of the client. In the xterm of the client, type: |
289 | | {{{ |
290 | | sudo /usr/local/bin/pingPlus <server data mac addr> <client data i/f name> 12345 |
291 | | }}} |
292 | | |
293 | | The result should look like : |
294 | | {{{ |
295 | | [uncusr20@client ~]$ sudo /usr/local/bin/pingPlus 02:00:9B:48:3E:20 mv1.1 12345 |
296 | | RQ:'5582+2067' to 2:0:9b:48:3e:20. |
297 | | RQ:5582+2067 from 2:0:3e:15:6c:ab. |
298 | | }}} |
299 | | |
300 | | Congratulations you have run a Layer 2 experiment in GENI! |
301 | | |
302 | | = 6. Cleanup resources = |
303 | | Although all your reservations, have expiration times, you should always release |
304 | | your resources once you have completed your experiment to make them available |
305 | | to other experimenters. |
306 | | i. In the terminal, where you have been running your omni commands do: |
307 | | {{{ |
308 | | omni.py deletesliver -a pg-utah <slicename> |
309 | | }}} |
310 | | |
311 | | = 7. Wrap up = |
312 | | Congratulations, you have finished the tutorial! Now you are ready to design and |
313 | | run your own experiments. Don't hesitate to [mailto:help@geni.net email us] with |
314 | | any questions you might have. |
315 | | |
316 | | == 7a. Fill out the tutorial survey == |
317 | | We love to hear what you think so that we can improve the tutorials in the future. |
318 | | Please complete the [http://tinyurl.com/8kxm6ys online survey] and get a temporary GENI tatoo! |
319 | | |
320 | | == 7b. Get Your Own Account == |
321 | | The accounts, that you used in the above steps will be deactivated after the |
322 | | tutorial. If you do not already have an account at GPO's ProtoGENI cluster, you |
323 | | should can follow [wiki:GEC15Agenda/ExperimenterDropIn/GetAGENIAccount these instructions] |
324 | | to get an account and start using GENI. |