Changes between Version 1 and Version 2 of GEC17Agenda/GettingStartedWithGENI_II/Exercise2/Procedure/Execute


Ignore:
Timestamp:
07/19/13 16:24:43 (11 years ago)
Author:
Vic Thomas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC17Agenda/GettingStartedWithGENI_II/Exercise2/Procedure/Execute

    v1 v2  
    1 = [http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_II/Procedure Getting Started With GENI - Part 2 Exercise 2] =
     1= [http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_II/Exercise2/Procedure Getting Started With GENI - Part 2 Exercise 2] =
    22{{{
    33#!html
     
    1717}}}
    1818
    19 == Execute the Experiment ==
     19== 2. Execute the Experiment ==
    2020
    21 =
     21=== 2.1 Open two terminal windows ===
     22Click on the terminal program icon on the dock to the left of your screen.  This will open up a terminal.  From the "File" menu of the terminal program, select "New Window" to open a second terminal window.
     23
     24=== 2.2 Log into the server node ===
     25From terminal 1, ssh into the server node.
     26
     27'''ExoGENI Rack:'''  {{{ssh -p <server_port_num> -l root <server_ip_addr> }}}
     28
     29'''InstaGENI Rack:''' {{{ssh -p <server_port_num> <server_name> }}}
     30
     31=== 2.3 Log into the client node ===
     32From terminal 2, ssh into the client node.
     33
     34'''ExoGENI Rack:'''  {{{ssh -p <client_port_num> -l root <client_ip_addr> }}}
     35
     36'''InstaGENI Rack:''' {{{ssh -p <client_port_num> <client_name> }}}
     37
     38=== 2.4 Gather information about the network interfaces on the server and client ===
     39Find the name and hardware address (MAC address) of the data network interface on the server and the client.
     40
     411. In terminal 1 where you are logged into the server, type {{{ifconfig}}}.  This will list all network interfaces on the server.  Look for the interface with the IP address 10.20.30.40,  This is the IP address specified in our request RSpec.   On your worksheet record the name and hardware address of this interface.
     42
     432. In terminal 2 where you are logged into the client, type {{{ifconfig}}}.  This will list all network interfaces on the server.  Look for the interface with the IP address 10.20.30.41,  This is the IP address specified in our request RSpec.   On your worksheet record the name and hardware address of this interface.
     44
     45=== 2.5 Verify you can connect to the client from the server and vice versa ===
     46We will use ping to do this.
     47
     48   1. In terminal 1 (server node), type {{{ping -c 3 10.20.30.41}}}.
     49   2. In terminal 2 (client node), type {{{ping -c 3 10.20.30.40}}}.
     50
     51If the pings succeed you know you have IP connectivity between the two nodes.
     52
     53=== 2.6 Download and install !PingPlus on the server and client nodes ===
     54We will download and install a program that does Layer 2 pings on the server and client nodes.  Do this on both nodes:
     55   {{{
     56   wget http://www.gpolab.bbn.com/experiment-support/Layer2Ping/pingPlus-0.2.tar.gz
     57   tar xvfz pingPlus-0.2.tar.gz
     58   }}}
     59You should see a directory called {{{pingPlus-0.2}}}.  This directory has the source code for {{{pingPlus}}}.
     60
     61=== 2.7 Compile pingPlus ===
     62Do this on both nodes:
     63
     64'''ExoGENI: ''' ExoGENI nodes do not include a compiler.  Download and install the compiler:
     65   {{{
     66   apt-get update
     67   apt-get install build-essential
     68   }}}
     69
     70We are now ready to compile {{{pingPlus}}}:
     71   {{{
     72   cd pingPlus-0.2
     73   make
     74   }}}
     75
     76=== 2.8 Turn off IP on the data interface ===
     77We now turn off IP on the data interface.  ''Be very careful to not turn off IP on any of the other interfaces as this will make your node unreachable.''
     78
     79'''ExoGENI:'''
     80   {{{
     81   service neuca stop
     82   /sbin/ifconfig <data_interface_name> 0.0.0.0
     83   }}}
     84
     85'''InstaGENI:'''
     86   {{{
     87   sudo /sbin/ifconfig <data_interface_name> 0.0.0.0
     88   }}}
     89
     90=== 2.9 Run {{{pingPlus}}} ===
     91In terminal 1 (server node):
     92   {{{
     93   ./pingPlusListener 10002
     94   }}}
     95The 10002 is the value we'll use for the type field in the header of the Ethernet frames we send and receive.  The above command tells the server to look for Ethernet packets of this type.  (In this exercise you can use almost any value for this type field.)
     96
     97In terminal 2 (client node):
     98   {{{
     99   ./pingPlus <server_data_interface_hardware_addr> <client_data_interface_name> 10002
     100   }}}
     101This tells the client to send an Ethernet frame with destination address set to the server's data interface MAC address and with the type field set to 10002.  This frame will be sent out of the specified interface on the client. 
     102
     103The client prints out the contents of the data field of the frame it sent to the server and the contents of the data field in the frame it got back from the server.
     104
     105In terminal 1 (server node), kill the {{{pingPlusListener}}} by typing {{{control-c}}}.
     106
     107=== 2.10 Examine the {{{pingPlus}}} program ===
     108Open up an editor (vi or emacs) to view {{{pingPlus.c}}}.  All the interesting stuff happens starting line 110 of this file:
     109     - Open a Layer 2 socket (lines 110 - 115)
     110     - Bind the socket to the specified interface (lines 117 - 125)
     111     - In a buffer compose the contents of the data portion of the Ethernet frame to be sent to the server.  In our case the data portion has the format "RQ:<randomNumber>+<randomNumber>"   (line 133)
     112     - Send the packet.  The send is successful if the return from {{{sendPacket}}} matches the number of bytes sent.   The {{{sendPacket}}} function is implemented in the file {{{packetFunctions.c}}} in this directory.  This function sets the appropriate header fields in the ethernet frame before sending it.
     113     - Wait for the server to respond (line 145).  The {{{receivePacket}}} function is implemented in file {{{packetFunctions.c}}}.
     114
     115=== 2.11 Modify {{{pingPlus}}} to measure round-trip delays ===
     116You should by now have a feel for how Layer 2 sockets work.   You can now modify ping2Plus to measure round-trip delays similar to the Layer 3 ping.  You will want to:
     117    - get the current time before you send the packet using
     118    - get the current time when you get a response from the server.
     119
     120=== 2.12 (Optional) Get a solution to the exercise ===
     121To see a solution to this exercise, create a new directory and dowload the solution to that directory:
     122    {{{
     123    cd
     124    wget http://www.gpolab.bbn.com/experiment-support/gec17/pingPlus/pingPlus_v3.tar.gz         tar xvfz pingPlus_v3.tar.gz
     125    cd pingPlus_v3
     126    }}}
     127 The file {{{pingPlus.c}}} in this directory will have the solution.   The statements that do the timing measurement are around lines 151 and 175.
     128
     129= [wiki:GENIExperimenter/Tutorials/PortalOmniExample/TeardownExperiment Next: Finish] =
     130