= [http://groups.geni.net/geni/wiki/GENIExperimenter/Tutorials/NFV NFV Tutorial: Managing a Virtual Network Function using SDN and Control Theory] = {{{ #!html
Image Map
}}} = Part II: Execute = First thing we are doing in the experiment is pinging the VMs. By now, our switch is already configured, so we start working on the controller. As mentioned earlier, we are using a POX controller and it is already installed on the controller host. == 1. Login to the hosts == We need to ssh to all our hosts. Again, if you don't know how to login into a node, click here to learn. Open the following windows: - one window with ssh into the controller - one window with ssh into OVS - one window with ssh into s1 - one window with ssh into VNF1 - one window with ssh into VNF2 - one window with ssh into destination '''Note:''' when you need to open more windows on the same host, it may be convenient to open a new tab in the same window/terminal, e.g., by using Command + "T" on a Mac, and ssh there. == 2. Configure and Initialize services == '''2.1. Use A Learning Switch Controller''' This is a very simple example where we are going to run a learning switch control to forward traffic from s1 to VNF1.[[BR]] 1. First start a ping from s1 to VNF1, which should timeout, since there is no controller running.[[BR]] {{{ #!html ping vnf1 -c 10 }}} 2. The POX controller is installed under /tmp/pox on the controller host. POX comes with a set of example modules that you can use. One of the modules is a learning switch. Start the learning switch controller which is already available by running the following two commands:[[BR]] {{{ #!html    cd /tmp/pox
   python pox.py --verbose forwarding.l2_learning
}}} {{{ #!html
'l2' above uses the letter 'l' as in level and is not the number one. In addition, you should wait for the "INFO ... connected" line to ensure that the switch and the controller are communicating.
}}} The output should look like this: {{{ #!html }}} 3. In the terminal of ''s1'', ping ''VNF1'': Now the ping should work and the output should look like this: {{{ #!html }}} 4. Go to your controller host and take a look at the printouts. You should see that your controller installed flows based on the mac addresses of your packets. {{{ #!html
In case the controller and OVS are not communicating, you may try changing the port of your controller, this is the command:
sudo ./pox.py --verbose openflow.of_01 --port=443 forwarding.l2_learning
Then tell the ovs switch that the controller will be listening on this new port, i.e. change 6633 to 443:
sudo ovs-vsctl set-controller br0 tcp:<controller_ip>:443
}}} '''2.2 NFV OVS controller''' Now we are going to run a different controller that will install !OpenFlow rules to support NFV load balancing. In this controller, the traffic shall go from a source to destination, and duplicate packets are sent to one of the IDS nodes (VNF1 or VNF2) for Intrusion detection. The picture below shows a red line representing traffic going from source1 to destination, and the green line represents the duplicate traffic that is sent to VNF1 for intrusion detection. {{{ #!html }}} == 3. Execute Experiments: == First we need to load the configuration files for the NFV !OpenFlow controller. - We will first remove the default files for the controller and replace them with our controller files. Execute the following: {{{ #!html    cd /tmp/pox/ext
   sudo chmod 777 ../ext/
   sudo rm *
   wget http://csr.bu.edu/rina/grw-bu2016/nfv/OVS_files.tar.gz
   tar -xvf OVS_files.tar.gz
}}} - Now you should have different files for the controller. Open port.config file to configure the system parameters. You can use any editor to edit the file. We will use nano here as an example. {{{ #!html     nano port.config }}} - You will see a window as shown below. Change the values of ''vnf1_interface'' and ''vnf2_interface'' to the values that you noted down in ''Section 3.3.1'' in the '''[wiki:GENIExperimenter/Tutorials/NFV/Pox/Design Design/Setup]''' section of this tutorial. These values will tell the controller which interfaces are connected to VNF1 and VNF2. {{{ #!html }}} '''[wiki:GENIExperimenter/Tutorials/NFV/Pox/Execute/LoadBalanceRR Experiment 1: Load Balancing using Round Robin Control]'''[[BR]] '''[wiki:GENIExperimenter/Tutorials/NFV/Pox/Execute/LoadBalancePI Experiment 2: Load Balancing using Proportional Integral (PI) Control]''' == [wiki:GENIExperimenter/Tutorials/NFV/Pox/Finish Next: Finish] ==