[[PageOutline]] This page is still under construction, please email any comments/corrections you have to [mailto:help@geni.net]. = Get 2 ProtoGENI hosts connected through OpenFlow at the GPO lab = == Using GPO credentials == In order to grab all the resources needed, you will need to use the omni client, which is a software that uses the GENI AM API to get resources from the different aggregates. General information and instructions can be found at [http://trac.gpolab.bbn.com/gcf/wiki/Omni]. It will also be easier if you have credentials from GPO's ProtoGENI Clearinghouse, so it is recommended that you get an account there. All the necessary steps for this are described at [wiki:GENIExperimenter/ExperimentCredentials]. Please let us know if you need any [mailto:help@geni.net help] setting up your project, getting accounts or configuring the omni client. Once you have created an account on GPO's ProtoGENI cluster and you have configured omni to use GPO's Clearinghouse, you should be all set to get the needed resources. [attachment:omni_config This] is an example omni configuration file, that you can use as a guide. === 1. Create a slice and renew it === {{{ nriga@pella:~/gcf$ ./src/omni.py createslice niky_pgof_gpo nriga@pella:~/gcf$ ./src/omni.py renewslice niky_pgof_gpo 20110520T00:00:00Z }}} The default expiration time for a slice is only a few hours, so make sure that you renew your slice before adding any resources, since any resources that you acquire can not have an expiration time that outlives your slice. === 2. Create a PG sliver and renew it === Our ProtoGENI aggregate has 11 nodes that are identically configured. In this example the [attachment:pg.rspec provided rspec] requests for any two ProtoGENI hosts. You can modify the rspec to request for more nodes if needed. You do not need to specify the topology in the ProtoGENI rspec file, since you are going to use OpenFlow to control your traffic and create your topology. Find out the available resources using the command listresources {{{ nriga@pella:~/gcf$ src/omni.py listresources -n -a http://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am }}} If there are enough available resources then create and renew your sliver. {{{ nriga@pella:~/gcf$ src/omni.py createsliver -n -a http://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am niky_pgof_gpo pg.rspec nriga@pella:~/gcf$ src/omni.py renewsliver -a https://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am -n niky_pgof_gpo 20110520T00:00:00Z }}} For ProtoGENI slivers the expiration time is the same as the expiration time of the sliver, but you might want to make it a habit to renew your sliver after creating it since this is not true for all aggregates. Use the sliverstatus command to check whether your resources are ready for use. Be patient it will take several minutes until your nodes boot and are ready for use. The sliverstatus will also tell you which hosts you have reserved. The hosts in the GPO lab are named pc1-pc11. Make a note of the number for each one of the hosts, since you are going to need it to configure your topology. {{{ nriga@pella:~/gcf$ src/omni.py sliverstatus -a http://www.pgeni.gpolab.bbn.com/protogeni/xmlrpc/am niky_pgof_gpo }}} When the sliverstatus says ready login to the nodes : {{{ nriga@pella:~/gcf$ ssh -i /home/nriga/.ssh/gcf_id_rsa inki@pc6.pgeni.gpolab.bbn.com }}} You will need to follow [wiki:NikySandbox/GPO_PGOF#ConfigurePGHosts these instructions] in all your hosts in order to configure the network interface that is directly connected to the OpenFlow switch. It's important to do this step '''BEFORE''' creating the OpenFlow sliver, since the interfaces need to be up before being able to reserve the OpenFlow resources. === 3. Create an OpenFlow sliver === Assuming that you will start with a local test only, you will need to control all the traffic coming and going to your hosts. When you need to connect this testbed to other sites, please let us know and we will give you further instructions on how to accomplish this. To get the OpenFlow resources : {{{ nriga@pella:~/gcf$ src/omni.py createsliver -n -a https://tulum.gpolab.bbn.com:1443/openflow/gapi/ niky_pgof_gpo of.rspec }}} The OpenFlow slivers do not expire, so there is no need to renew this sliver. However it is important to delete your OpenFlow sliver BEFORE your slice expires, since you won't be able to delete after that. If your slice expires and you haven't deleted your OpenFlow sliver, please send an email to gpo-infra@geni.net and ask for your sliver to be deleted. Use this [wiki:NikySandbox/GPO_PGOF#OFdeleteemailtemplate email template]. You will need to modify the [attachment:of.rspec of.rspec file] in two ways : a. Change the port numbers that you request based on the hosts you got. The port number you need to use is port=24+xx, where xx is the number from the hosts you have reserved, the example rspec is for the case you reserved pc4 and pc6 (ports 28 and 30). b. Point the traffic to your own controller. In the example rspec, the OpenFlow resources point to a controller running at a host in the GPO lab (nineveh.gpolab.bbn.com) listening on port 1716 for connections. You can use any host you want for the controller as long as it is reachable through the internet. Performance-wise you might want to use one of your ProtoGENI hosts (make sure you specify the control interface of the host, e.g. pc4.pgeni.gpolab.bbn.com) as your OpenFlow controller. If you have never used OpenFlow before, let us know and we can help you get started. After you reserve your OpenFlow resources, send an email to gpo-infra@geni.net so that we can opt-in your traffic. Use this [wiki:NikySandbox/GPO_PGOF#OFOpt-inemailtemplate email template]. After you get an email back that your OpenFlow setup is ready you can start your experiment. To test connectivity you can first start your controller acting as a Layer 2 switch and try pinging between your hosts. == OF Opt-in email template == The email has to be addressed to [mailto:gpo-infra@geni.net]. For the email you will need the following info from your openflow rspec file * : from the user tag, the value of the email attribute * : from the the project tag, the value of the name attribute * : from the the slice tag, the value of the name attribute For this [attachment:of.rspec rspec] the values would be : = nriga@bbn.com, = PG-OF-test, = niky-test. Use the following template {{{ To: gpo-infra@geni.net From: Geni User Subject: Opt-in traffic for slice Please opt-in the traffic for the slice with the following information : * name : * project : * email : Thanks, }}} == OF delete email template == The email has to be addressed to [mailto:gpo-infra@geni.net]. For the email you will need the following info from your openflow rspec file * : from the user tag, the value of the email attribute * : from the the project tag, the value of the name attribute * : from the the slice tag, the value of the name attribute For this [attachment:of.rspec rspec] the values would be : = nriga@bbn.com, = PG-OF-test, = niky-test. Use the following template {{{ To: gpo-infra@geni.net From: Geni User Subject: Delete OpenFlow slice Please delete the OpenFlow slice with the following information : * name : * project : * email : Thanks, }}} == Configure PG Hosts == Login to the nodes : {{{ nriga@pella:~/gcf$ ssh -i /home/nriga/.ssh/gcf_id_rsa inki@pc6.pgeni.gpolab.bbn.com }}} On each of the PG hosts you reserved do: 1. Add these lines in the end of /etc/network/interfaces, edit this file as sudo: {{{ auto eth3.1700 iface eth3.1700 inet static address 10.17.0.1xx netmask 255.255.255.0 mtu 1500 }}} where xx = the number of the pc host, xx=04 for pc4 and xx=06 for pc6. 2. Install the vlan package {{{ sudo apt-get install vlan }}} 3. Reboot the machine {{{ sudo init 6 && exit }}} When the nodes rebooted they will have a new interface eth3.1700 that is configured in the 10.17.0.0/24 subnet.