Changes between Initial Version and Version 1 of GENIExperimenter/Tutorials/GettingStarted_PartI/Procedure/Execute


Ignore:
Timestamp:
01/10/14 16:13:57 (10 years ago)
Author:
sedwards@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/GettingStarted_PartI/Procedure/Execute

    v1 v1  
     1=
     2[http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/GettingStarted_PartI/Procedure  Lab Zero: A First Experiment Using GENI] =
     3{{{
     4#!html
     5
     6<div style="text-align:center; width:495px; margin-left:auto; margin-right:auto;">
     7<img id="Image-Maps_5201305222028436" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/Execute.jpg?format=raw" usemap="#Image-Maps_5201305222028436" border="0" width="495" height="138" alt="" />
     8<map id="_Image-Maps_5201305222028436" name="Image-Maps_5201305222028436">
     9<area shape="rect" coords="18,18,135,110" href="./DesignSetup" alt="" title=""    />
     10<area shape="rect" coords="180,18,297,111" href="./Execute" alt="" title=""    />
     11<area shape="rect" coords="344,17,460,110" href="./Finish" alt="" title=""    />
     12<area shape="rect" coords="493,136,495,138" href="http://www.image-maps.com/index.php?aff=mapped_users_5201305222028436" alt="Image Map" title="Image Map" />
     13</map>
     14<!-- Image map text links - End - -->
     15
     16</div>
     17}}}
     18
     19
     20== 4.  Configure and Initialize ==
     21
     22
     23Now that you have reserved your resources, you are ready to run your first GENI experiment. For the purpose of this tutorial we are going to do a simple layer 2 experiment. 
     24
     25=== 4.1 Login to nodes ===
     26{{{
     27#!html
     28<table border="0">
     29      <tr>
     30
     31       <td >
     32         <ol type='a'>
     33            <li>To login to a VM, again click the <b>i</b> in the circle.</li>
     34           <li>Now, click on the ssh link. If you have installed <a target="https://addons.mozilla.org/en-us/firefox/addon/firessh/"> FireSSH </a> a new tab will open up.
     35</li>
     36           <li> In the window that will pop up :
     37                <ul>
     38                  <li> in the password field type in your passphrase</li>
     39                  <li> for the private key, browse to the file that has your private key
     40                   <li> <b> Press OK </b> </li>
     41                </ul>
     42             </li>
     43           <li><FONT COLOR="black">Repeat the previous step for the second VM.</font></li>
     44          </ol>
     45
     46<table id="Table_03" border="0" cellpadding="5" cellspacing="0">
     47        <tr>
     48                <td>
     49                        <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/Symbols-Tips-icon.png?format=raw" width="50" height="50" alt="Tip">
     50               </td>
     51               <td>
     52                    To ssh from the command line, do the following (substituting the values shown on the screen):
     53<pre>
     54ssh USERNAME@HOSTNAME -p PORT
     55</pre>
     56        </tr>
     57</table>
     58
     59       </td>
     60        <td>
     61        <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GEC17Agenda/GettingStartedWithGENI_I/Graphics/client_ssh_highlight_v1.png?format=raw" alt="Login information for a VM"  height="325" title="Login information for a VM" />
     62<br />
     63         <b>Figure 4-1</b> <i>Login to a VM</i>.</i>
     64       </td>
     65    </tr>
     66 </table>
     67}}}
     68
     69=== 4.2 (optional) Download and compile experiment software ===
     70
     71This step is only required if you are going to do step 5.2.
     72
     73 a. In the first terminal, download the pingPlus software:
     74{{{
     75wget http://www.gpolab.bbn.com/experiment-support/Layer2Ping/pingPlus-0.2.tar.gz
     76}}}
     77 b. Decompress the pingPlus software:
     78{{{
     79tar xvfz pingPlus-0.2.tar.gz
     80}}}
     81 c. If you are using an ExoGENI rack, first install the compiler.
     82{{{
     83sudo apt-get update
     84sudo apt-get install build-essential
     85}}}
     86{{{
     87#!html
     88<table id="Table_03" border="0" cellpadding="5" cellspacing="0">
     89        <tr>
     90                <td>
     91                        <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/instageni-logo.png?format=raw" width="50" height="50" alt="InstaGENI">
     92               </td>
     93               <td>The default image on the InstaGENI rack already includes a C compiler.</td>
     94                   
     95        </tr>
     96</table>
     97}}}
     98 d. Compile the pingPlus software.
     99{{{
     100cd pingPlus-0.2
     101make
     102}}}
     103 e. Your output should look like this:
     104{{{
     105client:~% wget http://www.gpolab.bbn.com/experiment-support/Layer2Ping/pingPlus-0.2.tar.gz
     106--2013-07-05 09:32:26--  http://www.gpolab.bbn.com/experiment-support/Layer2Ping/pingPlus-0.2.tar.gz
     107Resolving www.gpolab.bbn.com (www.gpolab.bbn.com)... 192.1.249.17
     108Connecting to www.gpolab.bbn.com (www.gpolab.bbn.com)|192.1.249.17|:80... connected.
     109HTTP request sent, awaiting response... 200 OK
     110Length: 4726 (4.6K) [application/x-gzip]
     111Saving to: `pingPlus-0.2.tar.gz'
     112
     113100%[================================================================================================================================================================>] 4,726       --.-K/s   in 0.07s
     114
     1152013-07-05 09:32:27 (69.1 KB/s) - `pingPlus-0.2.tar.gz' saved [4726/4726]
     116
     117client:~% tar xvfz pingPlus-0.2.tar.gz
     118./._pingPlus-0.2
     119pingPlus-0.2/
     120pingPlus-0.2/._Makefile
     121pingPlus-0.2/Makefile
     122pingPlus-0.2/._packetFunctions.c
     123pingPlus-0.2/packetFunctions.c
     124pingPlus-0.2/._packetFunctions.h
     125pingPlus-0.2/packetFunctions.h
     126pingPlus-0.2/._pingPlus.c
     127pingPlus-0.2/pingPlus.c
     128pingPlus-0.2/._pingPlusListener.c
     129pingPlus-0.2/pingPlusListener.c
     130pingPlus-0.2/._README
     131pingPlus-0.2/README
     132client:~% cd pin
     133pingPlus-0.2/        pingPlus-0.2.tar.gz
     134client:~% cd pingPlus-0.2
     135client:~/pingPlus-0.2% make
     136gcc    -c -o packetFunctions.o packetFunctions.c
     137gcc    -c -o pingPlusListener.o pingPlusListener.c
     138gcc  packetFunctions.o pingPlusListener.o  -o pingPlusListener
     139gcc    -c -o pingPlus.o pingPlus.c
     140gcc  packetFunctions.o pingPlus.o -o pingPlus
     141}}}
     142 f. Repeat the above in the second terminal.
     143
     144== 5.  Execute Experiment ==
     145
     146=== 5.1 Send IP traffic ===
     147The first simple experiment that we will run is to verify the IP connectivity between our hosts.
     148 
     149    a. Check the interfaces of your nodes. In the terminal type:
     150    {{{
     151   sudo ifconfig
     152  }}}
     153    You should see at least two interfaces:
     154      * The '''control interface'''. This is the interface you use to access the node, e.g. ssh into your host. The control interface is mainly used for control traffic, i.e. traffic for controlling the node and the experiment.
     155      * The '''data interface'''. This is the interface that is used for sending experimental traffic. This is the interface that connects to the other hosts of your experiment through GENI. The links between these interfaces are the ones that allow you to run non-IP experiments. '''The data interface is the one that has an IP address and mask that match what you configured before you reserved your resources.'''
     156    b. Fill in the worksheet, noting the name and  IP address of the control and of the data interfaces for each node. 
     157{{{
     158#!html
     159
     160<table id="Table_02" border="0" cellpadding="5" cellspacing="0">
     161        <tr>
     162                <td>
     163                        <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/Symbols-Tips-icon.png?format=raw" width="50" height="50" alt="Tip">
     164               </td>
     165               <td>
     166                    The command prompt on each node says "client" or "server" respectively.
     167               </td>
     168        </tr>
     169</table>
     170}}} 
     171    c. From the client, ping the server. From the terminal window that is logged in to the client type :
     172{{{
     173    ping <server data IP addr> -c 5
     174}}}
     175       For example:
     176{{{
     177    ping 10.17.1.2 -c 5
     178}}}
     179       An example output should look like :
     180    {{{
     181
     182[sedwards@client ~]$ ping 10.17.1.2 -c 5
     183PING 10.17.1.2 (10.17.1.2) 56(84) bytes of data.
     18464 bytes from 10.17.1.2: icmp_req=1 ttl=64 time=183 ms
     18564 bytes from 10.17.1.2: icmp_req=2 ttl=64 time=91.2 ms
     18664 bytes from 10.17.1.2: icmp_req=3 ttl=64 time=91.1 ms
     18764 bytes from 10.17.1.2: icmp_req=4 ttl=64 time=91.1 ms
     18864 bytes from 10.17.1.2: icmp_req=5 ttl=64 time=91.2 ms
     189
     190--- 10.17.1.2 ping statistics ---
     1915 packets transmitted, 5 received, 0% packet loss, time 4004ms
     192rtt min/avg/max/mdev = 91.156/109.579/183.129/36.775 ms
     193}}}
     194
     195
     196=== 5.2 (optional) Send non-IP traffic ===
     197
     198Doing this step requires that you did step 4.2 above.
     199
     200GENI provides the capability of running non-IP experiments, since you can connect your hosts at Layer 2. For the purpose of this tutorial we will use a very simple Layer 2 ping program that sends packets using a custom ethernet type.
     201
     202    a. ExoGENI nodes run a service called "neuca" that managed network interfaces on the node.  To manually adjust the IP address, we must first disable neuca on both nodes.
     203{{{
     204sudo service neuca stop
     205}}}
     206{{{
     207#!html
     208<table id="Table_03" border="0" cellpadding="5" cellspacing="0">
     209        <tr>
     210                <td>
     211                        <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/exogeni-logo.png?format=raw" width="50" height="50" alt="ExoGENI">
     212               </td>
     213               <td>The ExoGENI "neuca" service controls a variety of network configuration details.</td>
     214                   
     215        </tr>
     216</table>
     217}}}
     218    b. Disable the IP on both of your nodes (being careful to disable IP on the data interface NOT the control interface).
     219       In each of the terminals type:
     220{{{
     221  sudo ifconfig <data interface name> 0.0.0.0
     222}}}
     223{{{
     224#!html
     225
     226<table id="Table_01" border="0" cellpadding="5" cellspacing="0">
     227        <tr>
     228                <td>
     229                        <img src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/warning-icon-hi.png?format=raw" width="50" height="50" alt="Warning">
     230               </td>
     231               <td>
     232                    Be extra careful to disable the IP on the data interface, bringing down the IP on the control interface means that you will lose connectivity to your host.
     233               </td>
     234        </tr>
     235</table>
     236}}}
     237    c. Try again to ping from the client to the server. In the terminal window of the client type:
     238{{{
     239    ping <server data IP addr> -c 5
     240}}}
     241       For example:
     242{{{
     243    ping 10.17.1.2 -c 5
     244}}}
     245    This time the ping should indicate that the destination is unreachable.
     246    d. Start the Layer 2 ping server. In the server terminal window, type:
     247    {{{
     248  sudo ~/pingPlus-0.2/pingPlusListener <EtherType from worksheet>
     249  }}}
     250    e. From the client try to ping the server at layer 2. You will need the mac address of the data interface of the server, the name of the data interface of the client, and the !EtherType from your worksheet. In the terminal window of the client, type:
     251    {{{
     252sudo ~/pingPlus-0.2/pingPlus <server mac> <client i/f name> <EtherType>
     253
     254where <server mac> is the server's data interface's MAC address,
     255<client i/f name> is the client data interface's name, and
     256<EtherType> is the EtherType from the worksheet.
     257  }}}
     258    The result should look like :
     259    {{{
     260$ sudo ~/pingPlus-0.2/pingPlus 02:00:9B:48:3E:20 eth3742 10001
     261RQ:'5582+2067' to 2:0:9b:48:3e:20.
     262RL:5582+2067 from 2:0:3e:15:6c:ab.
     263}}}
     264
     265== 6.  Analyze Experiment ==
     266
     267Now is when you would ordinarily analyze the results of your experiment.
     268
     269=== 6.1 Logout of your nodes ===
     270
     271 * When you are done, CTRL-C in the server window to stop !PingPlusListener.
     272 * Then type `exit` in each of your open terminals.
     273
     274Congratulations you have run a Layer 2 experiment in GENI!
     275
     276----
     277
     278= [wiki:GENIExperimenter/Tutorials/GettingStarted_PartI/Procedure Introduction] =
     279= [wiki:GENIExperimenter/Tutorials/GettingStarted_PartI/Procedure/Finish Next:  Finish] =