Special Coverage Series

Network Computing

Special Coverage Series

Commentary

Brent Salisbury
Brent Salisbury

How To Set Up Floodlight and Test OpenFlow Rules

Floodlight is an open source controller for SDN. Here’s how to set it up to use with OpenFlow-enabled switches for testing and development.

The following tutorial demonstrates how to set up the Floodlight open source controller for controlling an OpenFlow-enabled switch. Once installed and running, I use the RESTful API to send an OpenFlow flow modification (flowmod) to instantiate a flow rule.

Using the "OpenFlow normal" rule as the default action allows for integration of OpenFlow/SDN islands to be connected into the native network. This provides a blank slate for network engineers to install custom flow rules to forward, rewrite or drop traffic.

More Insights

Webcasts

More >>

White Papers

More >>

Reports

More >>

There are many potential uses. For instance, firewalling policies could be implemented to drop any L2-L4 traffic to specific ports, MAC addresses or IP addresses. Rules can be installed for forwarding flows to multiple ports for selective traffic monitoring. As new users plug into the network, their packets could be redirected to a server for authentication, which could then add a security policy based on identity. Traffic can be forwarded down particular links based on price of bandwidth, time of day, controller-to-switch latency, or any other constraint.

A key concept of this tutorial is how to take an OpenFlow switch and instantiate a "table miss" flow policy. Flow tables are required to support table miss functionality. A table miss is when a packet does not match an entry in a flow table. The table miss fields in the following flow rule have wildcards that will match any value. A "table miss" looks like any other rule, but is intended to catch all traffic that is not matched in the flow lookup by wildcarding all of the fields.

The table miss action in this tutorial matches all ingress packets with the lowest priority and sends that matched traffic to the normal forwarding L2/L3 pipeline.

OpenFlow Table Miss

This example uses the Java-based Floodlight open source controller from Big Switch on a virtual machine running Ubuntu Linux. Floodlight can just as easily be ported to other Linux flavors or to Windows or Mac, because the Java Virtual Machine is platform-agnostic.

The instructions assumes you have an OpenFlow switching element pointing at the Floodlight controller's IP address on port 6633. By default, Floodlight instructs the switch to be a normal L2/L3 learning switch. That is disabled in step #5, which instructs the switch to forward proactively, using only pre-installed rules. Removing the "Forwarding" module prevents any packet-in latency from switch to controller for reactive instruction requests.

[ Join us at Interop Las Vegas for access to 125+ IT sessions and 300+ exhibiting companies. Register today! ]

The example table-miss policy uses the normal forwarding pipeline, rather than having unmatched traffic sent to the controller to request forwarding instructions. If you are brand new to FloodLight, running it as a L2 learning switch is a good place to start. The only difference is to not remove the forwarding module from loading in step 5.

For Ubuntu Linux Builds, install the following pre-requisites:

1. 'sudo apt-get install build-essential ant python-dev eclipse default-jdk git curl'

2. 'git clone git://github.com/floodlight/floodlight.git'

3. cd floodlight

4. Next edit the file src/main/resources/floodlightdefault.properties

5. Remove the line "net.floodlightcontroller.forwarding.Forwarding, \". This tells FloodLight to only perform proactive forwarding meaning the switch will only send packets to the controller if there is an explicit match + action instructing it to do so. All unmatched packets in a table-miss will be dropped.

6. Run ant to build a jar. It will be in the ~/floodlight/target directory.

7. 'ant'

8. java -jar target/floodlight.jar

By default, Floodlight will bind to port 6633 and start as a learning switch. Attach your OpenFlow switches (hardware or software) at the controller.

Next page: Adding Match-Plus-Actions

 1 | 2  | Next Page »


Related Reading



Network Computing encourages readers to engage in spirited, healthy debate, including taking us to task. However, Network Computing moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing/SPAM. Network Computing further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | Please read our commenting policy.
 

Editor's Choice

Research: 2014 State of Server Technology

Research: 2014 State of Server Technology

Buying power and influence are rapidly shifting to service providers. Where does that leave enterprise IT? Not at the cutting edge, thatís for sure: Only 19% are increasing both the number and capability of servers, budgets are level or down for 60% and just 12% are using new micro technology.
Get full survey results now! »

Vendor Turf Wars

Vendor Turf Wars

The enterprise tech market used to be an orderly place, where vendors had clearly defined markets. No more. Driven both by increasing complexity and Wall Street demands for growth, big vendors are duking it out for primacy -- and refusing to work together for IT's benefit. Must we now pick a side, or is neutrality an option?
Get the Digital Issue »

WEBCAST: Software Defined Networking (SDN) First Steps

WEBCAST: Software Defined Networking (SDN) First Steps


Software defined networking encompasses several emerging technologies that bring programmable interfaces to data center networks and promise to make networks more observable and automated, as well as better suited to the specific needs of large virtualized data centers. Attend this webcast to learn the overall concept of SDN and its benefits, describe the different conceptual approaches to SDN, and examine the various technologies, both proprietary and open source, that are emerging.
Register Today »

Related Content

From Our Sponsor

How Data Center Infrastructure Management Software Improves Planning and Cuts Operational Cost

How Data Center Infrastructure Management Software Improves Planning and Cuts Operational Cost

Business executives are challenging their IT staffs to convert data centers from cost centers into producers of business value. Data centers can make a significant impact to the bottom line by enabling the business to respond more quickly to market demands. This paper demonstrates, through a series of examples, how data center infrastructure management software tools can simplify operational processes, cut costs, and speed up information delivery.

Impact of Hot and Cold Aisle Containment on Data Center Temperature and Efficiency

Impact of Hot and Cold Aisle Containment on Data Center Temperature and Efficiency

Both hot-air and cold-air containment can improve the predictability and efficiency of traditional data center cooling systems. While both approaches minimize the mixing of hot and cold air, there are practical differences in implementation and operation that have significant consequences on work environment conditions, PUE, and economizer mode hours. The choice of hot-aisle containment over cold-aisle containment can save 43% in annual cooling system energy cost, corresponding to a 15% reduction in annualized PUE. This paper examines both methodologies and highlights the reasons why hot-aisle containment emerges as the preferred best practice for new data centers.

Monitoring Physical Threats in the Data Center

Monitoring Physical Threats in the Data Center

Traditional methodologies for monitoring the data center environment are no longer sufficient. With technologies such as blade servers driving up cooling demands and regulations such as Sarbanes-Oxley driving up data security requirements, the physical environment in the data center must be watched more closely. While well understood protocols exist for monitoring physical devices such as UPS systems, computer room air conditioners, and fire suppression systems, there is a class of distributed monitoring points that is often ignored. This paper describes this class of threats, suggests approaches to deploying monitoring devices, and provides best practices in leveraging the collected data to reduce downtime.

Cooling Strategies for Ultra-High Density Racks and Blade Servers

Cooling Strategies for Ultra-High Density Racks and Blade Servers

Rack power of 10 kW per rack or more can result from the deployment of high density information technology equipment such as blade servers. This creates difficult cooling challenges in a data center environment where the industry average rack power consumption is under 2 kW. Five strategies for deploying ultra-high power racks are described, covering practical solutions for both new and existing data centers.

Power and Cooling Capacity Management for Data Centers

Power and Cooling Capacity Management for Data Centers

High density IT equipment stresses the power density capability of modern data centers. Installation and unmanaged proliferation of this equipment can lead to unexpected problems with power and cooling infrastructure including overheating, overloads, and loss of redundancy. The ability to measure and predict power and cooling capability at the rack enclosure level is required to ensure predictable performance and optimize use of the physical infrastructure resource. This paper describes the principles for achieving power and cooling capacity management.