= SDN Tutorial Using GENIDesktop and Adopt-A-GENI = The [wiki:AAG Adopt-A-GENI] project makes it easy to incorporate SDN network resources into a GENI experiment. This tutorial will guide you through the automatic process of setting up a Software-Defined Networking experiment using the GENIDesktop. You will perform flow management and monitoring tasks using the GENIDesktop's modules and the topology view of the experiment. == Goals == In this experiment you will learn how to do the following tasks: * Enable Adopt-A-GENI (AAG) features in the GENI Desktop * Setup an SDN experiment using OVS and Floodlight/RYU controller with NO manual configuration * Setup and configure shortest path flows for communication between hosts through a graphical module * Interact with the topology view of the network to install custom flows * Live monitor flow counters present at installed flow rules * Distribute a single flow entry to multiple OVS nodes == Prerequisites == * A GENI account, if you don't already have one [http://groups.geni.net/geni/wiki/SignMeUp sign up!] * Familiarity with reserving GENI resources using JACKS. See Jacks [http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/jacks/GettingStarted_PartI/Procedure A First Experiment Using GENI and Jacks Tool] * Familiarity with the UNIX command line and networking tools (e.g. ssh, ping, iperf) == Tools == * Latest version of Firefox or Google Chrome browser * Pop-up blockers and Javascript blockers disabled == Where to get help: == - If you need help with GENIDesktop, please email us at [mailto:geni-users@googlegroups.com] == Tutorial Instructions == === '''!Exercises/Tasks''' === 1. ''' Create the Experiment: ''' * Login to the GENIDesktop As usual. If you need help see the GENIDesktop Manual [wiki:GeniDesktop/Manual/gettingStarted/GENI_Desktop_login#TologintotheGENIDesktop Login] page. * Create a slice as usual. If you need help see the GENIDesktop Manual [wiki:GeniDesktop/Manual/gettingStarted/Create_slice#CreateaSlice Create A Slice] page. * Allocate Resources for the topology below using JACKS in the GENIDesktop. If you need help see the GENIDesktop Manual [wiki:GeniDesktop/Manual/gettingStarted/Create_sliver_jacks#CreatingaSliversusingJACKSintheGeniDesktop JACKS] page (but we are not using the topology listed on that page). In this tutorial we will be using [http://www.openvswitch.org/ Open vSwitch (OVS)] nodes to represent OpenFlow Software Switches [[Image(ovs_node.png, 24px)]] and XEN VMs nodes to represent hosts [[Image(xen_node.png, 24px)]]. The general topology contains two hosts, h1 and h2 with 3 switches, s1, s2 and s3: [[Image(allocate_topo.png)]] Draw this topology. Rename your nodes to match the given topology. Click node name, then type in the new name in the ```Name``` box in the left side dialog box. Before allocating the resources, click the ```Extra Features``` checkbox. This will show the drop down for ```Select AAG (Adopt-a-GENI) Controller```. You may choose between a "Floodlight Controller for AAG" or an "RYU Controller for AAG". For this tutorial we will be using the default option of "Floodlight Controller for AAG". [[Image(initial_topology_arrows.png)]] Click ```Allocate Resources Using This RSPEC``` You can watch the allocation progress as the slice is allocated. [[Image(progress.png)]] Once the allocation is complete the GENIDesktop will automatically load the Slice View page. Here the allocated topology will be shown. Note that two extra nodes have been automatically added to your topology. One is the AAG Contoller, ```AAGCTRL0``` and the other is the Global Node ```GDGN0```. These nodes provide the OpenFlow controller and the measuring controller respectively. [[Image(final_topo.png)]] Once the resources have been allocated we must wait for the nodes to be created/booted. We can track the progress. As the nodes come up they will turn green. Any failed nodes will be red. Once all the nodes have been booted, the nodes will all return to gray. [[Image(booting.png)]] After all the resources have been allocated and booted the GENIDesktop will run an Initialization and Instrumentation process that will configure, start up and attach all the OVS nodes to the controller. It will also start the monitoring of the slice. [[Image(welcome.png)]] 2. '''Execute Experiment:''' After your slice is ready, you will be able to interact with your nodes. Even though your OVS nodes are now visible to the controller, their tables are empty and therefore they will not forward any packet. 2.1 '''Login to hosts''' To start our experiment we need to ssh our hosts (h1 and h2), you may use any SSH client or the GENI Dekstop's SSH module to access the hosts from the browser (it will load a shell prompt per host on a separate tab). In the terminal of h1, ping h2. This should timeout, since there are no rules installed at the switches. {{{ user@h1:~$ ping h2 PING h2-link-4 (10.10.5.2) 56(84) bytes of data. From h1-link-0 (10.10.1.1) icmp_seq=1 Destination Host Unreachable From h1-link-0 (10.10.1.1) icmp_seq=2 Destination Host Unreachable From h1-link-0 (10.10.1.1) icmp_seq=3 Destination Host Unreachable }}} 2.2 '''Setup Shortest Path Flows''' Now we want to make h1 and h2 able to communicate using shortest paths. To do so, you have to load the Flow Install module from the list of modules on the left hand side of your screen. [[Image(xxx.png)]] The first section tells you the public IP address where the controller is running, and what controller did you choose when creating the slice. The second section allows you compute shortest paths between all hosts and automatically install the corresponding flow entries at every switch in the path. We need to handle ARP processing as well in order to be able to communicate between hosts. The controller images loaded in the AAG features include ARP processing modules. Therefore, by checking the ARP processing box we will let the controller handle all ARP requests/responses. Then, click on the Initialize button. The output message should be: {{{ ARP flow entries successfully installed. Shortest paths successfully installed. }}} Now, if we try to ping h2 from h1 we can see that communication is successful. {{{ user@h1:~$ ping h2 PING h2-link-4 (10.10.5.2) 56(84) bytes of data. 64 bytes from h2-link-4 (10.10.5.2): icmp_seq=1 ttl=64 time=7.40 ms 64 bytes from h2-link-4 (10.10.5.2): icmp_seq=2 ttl=64 time=1.74 ms 64 bytes from h2-link-4 (10.10.5.2): icmp_seq=3 ttl=64 time=1.69 ms }}} * [wiki:GENIExperimenter/Tutorials/GENIDesktop/05032016/ready_init_instr View resources while they are being created, initialized and Instrumentized] 1. '''[wiki:GENIExperimenter/Tutorials/GENIDesktop/05032016/GENI_Desktop_runcmd Running Experiments:]''' Load and execute code 1. '''[wiki:GENIExperimenter/Tutorials/GENIDesktop/05032016/GENI_Desktop_ssh Viewing Traffic:]''' SSH into nodes, generate and view traffic 1. '''[wiki:GENIExperimenter/Tutorials/GENIDesktop/05032016/GENIDesktop_CLI GENIDesktop CLI:]''' Perform GENIDesktop operations using a Command Line Interface. == Create Experiment == 1. Login to GENIDesktop 1.1 === Create Slice === 1.2 === Allocate Resources using JACKS and the GENIDesktop === 1.3 ==== Wait for slice to be allocated and instrumentized === The controller node will automatically be added by the GENIDesktop when the slice is allocated. In this tutorial we will be using [http://www.openvswitch.org/ Open vSwitch (OVS)] to represent OpenFlow Software Switches and XEN VMs to represent hosts. The controller node is automatically added by the GENIDesktop. The general topology is: [[Image(topo.png)]] 1. 1.