wiki:Layer1Transport/Install

Version 14 (modified by tupty@bbn.com, 11 years ago) (diff)

--

GENI layer1transport service installation

Introduction

This page describes how to install the layer1transport service.

Variables

Name Description Default Values Files that use these values
<version> Version of layer1transport
<floodlight_jar> Path to floodlight jar file
<rest_port> REST API port for FL 18080 init.d script, properties file
<of_port> OF controller port for FL 11750 properties file

Prerequisites

1. Create openflow user

Create a user named openflow on the system to run this service.

2. Install Floodlight 0.90

Download the floodlight 0.90 tarball from http://www.projectfloodlight.org/download/. From there, work on installing floodlight using instructions at http://docs.projectfloodlight.org/display/floodlightcontroller/Installation+Guide, but use the source from the tarball instead of the git repo.

3. Install curl

Make sure that the system has curl installed on it.

Installation Instructions

These are instructions to install the layer1transport service. These instructions were created and tested using an Ubuntu 10.04 system.

1. Obtain the software

The software for the layer1transport service can be downloaded at http://www.gpolab.bbn.com/local-sw/. Download the tarball, and place it in the openflow user's home directory.

2. Unpack the tarball

Unpack the tarball and rename the top level directory

sudo -u openflow tar xvzf /home/openflow/layer1transport-<version>.tar.gz -C /home/openflow
sudo -u openflow mkdir -p /home/openflow/floodlight/src
sudo -u openflow mv /home/openflow/layer1transport-<version>/* /home/openflow/floodlight/

3. Drop a floodlight jar file in place

Take the Floodlight 0.9 jar file that you created in the prerequisites section and do the following:

sudo cp <floodlight_jar> /home/openflow/floodlight/src/floodlight.jar
sudo chown openflow /home/openflow/floodlight/src/floodlight.jar

4. (optional) Update properties file

If you need to change the <of_port> and/or the <rest_port> that the Floodlight instance binds to, then the modify following lines in /home/openflow/floodlight/conf/layer1transport.properties:

net.floodlightcontroller.restserver.RestApiServer.port = <rest_port>
net.floodlightcontroller.core.FloodlightProvider.openflowport = <of_port>

5. Configure floodlight logging

There are three reference logback configurations distributed with this software:

  • /home/openflow/floodlight/conf/logback_file.xml: logs floodlight messages to /var/log/floodlight.log
  • /home/openflow/floodlight/conf/logback_syslog.xml: logs floodlight messages to syslog system
  • /home/openflow/floodlight/conf/logback_stdout.xml: logs floodlight messages to stdout

The layer1transport service reads in the floodlight logging config from the file /home/openflow/floodlight/conf/logback.xml, which by default is a symlink that points to logback_file.xml.

5.a Logging to a file

This requires using logback_file.xml, which configures floodlight to log to a file at /var/log/floodlight.log. To use this config, you must first create the logfile with the appropriate permissions as follows:

sudo touch /var/log/floodlight.log
sudo chown openflow /var/log/floodlight.log
sudo chmod 0644 /var/log/floodlight.log

5.b. Logging to syslog

To log floodlight messages to syslog, just change the logback.xml symlink as follows:

sudo -u openflow rm /home/openflow/floodlight/conf/logback.xml
sudo -u openflow ln -s /home/openflow/floodlight/conf/logback_syslog.xml /home/openflow/floodlight/conf/logback.xml

5.c. Logging to stdout

To log floodlight messages to stdout instead of a file, just change the logback.xml symlink as follows:

sudo -u openflow rm /home/openflow/floodlight/conf/logback.xml
sudo -u openflow ln -s /home/openflow/floodlight/conf/logback_stdout.xml /home/openflow/floodlight/conf/logback.xml

6. Create flows files

You will need to create files that define that flows that should be managed by the SFP module in floodlight. The flows files must have a .json file extension in order to work with this service. The API and the data format are defined in the SFP documentation. Defining the proper flows requires an understanding of your switch platforms, and where administrative flows are needed within the network. Please coordinate with us if you would like help defining these, or if you would like us to sanity check. One you have defined the flows in a set of files, place the files under /home/openflow/floodlight/flows.d/. Two files are provided as a reference.

Once you have created your flows files, please remove the reference files:

sudo -u openflow rm /home/openflow/floodlight/flows.d/gpo_to_i2_example.json
sudo -u openflow rm /home/openflow/floodlight/flows.d/gpo_to_nlr_example.json

7. Install init.d script

Move the init.d script into place and set the appropriate permissions:

sudo mv /home/openflow/floodlight/etc/init.d/layer1transport /etc/init.d/layer1transport
sudo chown root:root /etc/init.d/layer1transport

If you changed the <rest_port> from the default value, update the following line in /etc/init.d/layer1transport:

REST_PORT=<rest_port>

8. Start the service

Start the script if it isn't running already:

sudo service layer1transport start

You can check the status of the script with:

sudo service layer1transport status

9. Set the service to start on boot

Configure the host, either through an OS-specific tool or through a configuration management system, to have the layer1transport service to start up at boot time.

10. Poke holes in firewalls as needed

If you need to poke a hole in the firewall (either in the network or on the controller host itself) for the switch to reach <of_port> on the controller, do this now.

11. Point switch instances at new controller

For each OF instance that needs to have flows installed, point the instance at administrative Floodlight instance that you stood up. How this gets done will depend on the switch platform. You will point the switch at the <of_port>.