Version 8 (modified by, 9 years ago) (diff)



Floodlight is a OpenFlow controller platform. It is primarily written in Java, although it has some REST APIs, and the source contains some tools written in other languages that can interface with those APIs.

For Operators

Configuration explains how to load specific modules. Modules are documented at The default configuration uses the Forwarding module to forward traffic, so if you do not want your controller forwarding data plane traffic, you will need to disable the forwarding module first.


Monitoring what is going on within an OpenFlow network can be done with a few basic curl commands and a basic understanding of how to read JSON. The full set of commands are documented at, but a few select useful ones are documented below.


Variable Description Example Value
<host_url> hostname of the host running the controller localhost
<rest_api_port> Port to which the REST server is bound 8080
<controller_url> http://<host_url>:<rest_api_port> http://localhost:8080
<ip_address> IP address in A.B.C.D form
<mac_address> MAC address in xx:xx:xx:xx:xx:xx form 12:de:ad:be:ef:90

Querying for Flow Stats

This will tell you what flows are in the switch currently, which table that flow is in, and statistics on the flow (i.e. how many packets have matched that flow, how long that flow has been in the table for, etc.). This is probably the most useful query in terms of collecting information for debugging issues.

curl <controller_url>/wm/core/switch/all/flows/json | python -m json.tool

Querying for Topology Information

This will tell you how the OpenFlow switches are interconnected. This will only work for switches that are physically directly connected or logically directly connected (i.e. via a tunnel). If a non-OpenFlow switch is between two OpenFlow switches, then this query cannot tell you how these two OpenFlow switches connect. To query this information, the net.floodlightcontroller.topology.TopologyManager module must be loaded.

curl <controller_url>/wm/topology/links/json | python -m json.tool

To see how OpenFlow switches interconnect through non-OpenFlow switches, the following query can be used:

curl <controller_url>/wm/topology/external-links/json | python -m json.tool

Note that this second query relies on the controller being able to handle traffic for a specific ethertype.

Detecting where devices enter the OpenFlow network

These queries can let you know where a given MAC address or IP address is entering the network, as well as if there are things like multiple interfaces with the same IP address within the network (which is particularly useful in shared VLAN environments).

curl <controller_url>/wm/device/?ipv4=<ip_address> | python -m json.tool
curl <controller_url>/wm/device/?mac=<mac_address> | python -m json.tool

Querying for Switch Features

This will let you see the supported ofp_actions and ofp_capabilities of each switch that is being queried. You can also see information on the ports, including their name (according to the switch), their port number (according to OpenFlow), and some of their features. Decoding these values will require looking at the spec, because many of them are presented as bitmasks.

curl <controller_url>/wm/core/switch/all/features/json | python -m json.tool

Testing specific OpenFlow features

Flows can be pushed through the static flow pusher API, which is documented at This can be a useful tool for testing specific features on a switch.

For Developers

Developers can refer to for information on how to develop controllers in Floodlight.