= [http://groups.geni.net/geni/wiki/GEC17Agenda/GettingStartedWithGENI_I/Procedure Getting Started With GENI - Part I] = {{{ #!html
Image Map
}}} == 4. Configure and Initialize == Now 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. === 4.1 Login to nodes === {{{ #!html
  1. To login to a VM, again click the i in the circle.
  2. Now, click on the ssh link. If you have installed FireSSH a new tab will open up.
    ExoGENI If you are using an ExoGENI rack and don't see the ssh link. Wait for the background to turn green, then refresh the page in the browser and try again.
  3. In the window that will pop up :
    • in the password field type in your passphrase
    • in the private key, browse to the file that has your private key
    • Press OK
  4. Repeat the previous step for the second VM.
Tip To ssh from the command line, do the following (substituting the values shown on the screen):
ssh USERNAME@HOSTNAME -p PORT
Login information for a VM
Figure 9-1 Login to a VM.
}}} === 4.2 Download and compile experiment software === 1. In the first VM, download the pingPlus software: {{{ wget http://www.gpolab.bbn.com/experiment-support/Layer2Ping/pingPlus-0.2.tar.gz }}} 2. Decompress the pingPlus software: {{{ tar xvfz pingPlus-0.2.tar.gz }}} 3. If you are using an ExoGENI rack, first install the compiler. {{{ apt-get update apt-get install build-essential }}} {{{ #!html
InstaGENI The default image on the InstaGENI rack already includes a C compiler.
}}} 3. Compile the pingPlus software. {{{ cd pingPlus-0.2 make }}} 4. Your output should look like this: {{{ client:~% wget http://www.gpolab.bbn.com/experiment-support/Layer2Ping/pingPlus-0.2.tar.gz --2013-07-05 09:32:26-- http://www.gpolab.bbn.com/experiment-support/Layer2Ping/pingPlus-0.2.tar.gz Resolving www.gpolab.bbn.com (www.gpolab.bbn.com)... 192.1.249.17 Connecting to www.gpolab.bbn.com (www.gpolab.bbn.com)|192.1.249.17|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 4726 (4.6K) [application/x-gzip] Saving to: `pingPlus-0.2.tar.gz' 100%[================================================================================================================================================================>] 4,726 --.-K/s in 0.07s 2013-07-05 09:32:27 (69.1 KB/s) - `pingPlus-0.2.tar.gz' saved [4726/4726] client:~% tar xvfz pingPlus-0.2.tar.gz ./._pingPlus-0.2 pingPlus-0.2/ pingPlus-0.2/._Makefile pingPlus-0.2/Makefile pingPlus-0.2/._packetFunctions.c pingPlus-0.2/packetFunctions.c pingPlus-0.2/._packetFunctions.h pingPlus-0.2/packetFunctions.h pingPlus-0.2/._pingPlus.c pingPlus-0.2/pingPlus.c pingPlus-0.2/._pingPlusListener.c pingPlus-0.2/pingPlusListener.c pingPlus-0.2/._README pingPlus-0.2/README client:~% cd pin pingPlus-0.2/ pingPlus-0.2.tar.gz client:~% cd pingPlus-0.2 client:~/pingPlus-0.2% make gcc -c -o packetFunctions.o packetFunctions.c gcc -c -o pingPlusListener.o pingPlusListener.c gcc packetFunctions.o pingPlusListener.o -o pingPlusListener gcc -c -o pingPlus.o pingPlus.c gcc packetFunctions.o pingPlus.o -o pingPlus }}} 5. Repeat the above on the second VM. == 5. Execute Experiment == === 5.1 Send IP traffic === The first simple experiment that we will run is to verify the IP connectivity between our hosts. 1. For InstaGENI nodes, add `/sbin` to the `PATH`: {{{ setenv PATH $PATH\:/sbin }}} {{{ #!html
InstaGENI For InstaGENI resources, the default PATH does not include /sbin
}}} 1. Check the interfaces of your nodes. In the terminal type: {{{ ifconfig }}} You should see at least two interfaces: * 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. The control interface usually has a publicly routable IP. * 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 and mask that match what you configured before we reserved the resources. 1. Fill in the worksheet, noting the name and IP address of the control and of the data interfaces for each node. {{{ #!html
InstaGENI For InstaGENI resources, the command prompt on each node says "client" or "server" respectively.
}}} 1. From the client, ping the server. From the terminal window that is logged in to the client type : {{{ ping -c 5 }}} For example: {{{ ping 10.17.1.2 -c 5 }}} An example output should look like : {{{ [sedwards@client ~]$ ping 10.17.1.2 -c 5 PING 10.17.1.2 (10.17.1.2) 56(84) bytes of data. 64 bytes from 10.17.1.2: icmp_req=1 ttl=64 time=183 ms 64 bytes from 10.17.1.2: icmp_req=2 ttl=64 time=91.2 ms 64 bytes from 10.17.1.2: icmp_req=3 ttl=64 time=91.1 ms 64 bytes from 10.17.1.2: icmp_req=4 ttl=64 time=91.1 ms 64 bytes from 10.17.1.2: icmp_req=5 ttl=64 time=91.2 ms --- 10.17.1.2 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4004ms rtt min/avg/max/mdev = 91.156/109.579/183.129/36.775 ms }}} === 5.1 Send non-IP traffic === GENI 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. 1. 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. {{{ service neuca stop }}} {{{ #!html
ExoGENI The ExoGENI "neuca" service controls a variety of network configuration details.
}}} 1. Disable the IP on your nodes (being careful to disable IP on the data interface NOT the control interface). In each of the terminals type: {{{ sudo ifconfig 0.0.0.0 }}} {{{ #!html
Warning Be extra careful to bring down the IP on the data interface, bringing down the IP on the control interface means that you will lose connectivity to your host.
}}} 1. Try again to ping from the client to the server. In the terminal window of the client type: {{{ ping -c 5 }}} For example: {{{ ping 10.17.1.2 -c 5 }}} This time the ping should timeout. 1. Start the Layer 2 ping server: In the server terminal window, type: {{{ sudo ~/pingPlus-0.2/pingPlusListener }}} 1. 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: {{{ sudo ~/pingPlus-0.2/pingPlus where is the server's data interface's MAC address, is the client data interface' name, and is the EtherType from the worksheet. }}} The result should look like : {{{ $ sudo ~/pingPlus-0.2/pingPlus 02:00:9B:48:3E:20 eth3742 10001 RQ:'5582+2067' to 2:0:9b:48:3e:20. RQ:5582+2067 from 2:0:3e:15:6c:ab. }}} == 6. Analyze Experiment == Now is when you would ordinarily analyze the results of your experiment. === 6.1 Logout of your nodes === * When you are done, CTRL-C in the server window to stop !PingPlusListener. * Then type `exit` in each of your open terminals. Congratulations you have run a Layer 2 experiment in GENI! ---- = [wiki:GEC17Agenda/GettingStartedWithGENI_I/Procedure Introduction] = = [wiki:GEC17Agenda/GettingStartedWithGENI_I/Procedure/Finish Next: Finish] =