TopologyService (Dev)

Description

TopologyService maintains the topology information for the controller, as well as to find routing in the network.

Services Provided

  • ITopologyService
  • IRoutingService

Service Dependencies

  • ILinkDiscoveryService
  • IThreadPoolService
  • IFloodlightProviderService
  • IRestApiService
  • IDebugCounterService
  • IDebugEventService
  • IOFSwitchService

Java File

The module is implemented in net.floodlightcontroller.topology.TopologyManager.

How it works

The Topology Service computes topologies based on link information it learns from the ILinkDiscoveryService. An important concept that the TopologyService keeps is the idea of an OpenFlow 'island'. An island is defined as a group of strongly connected OpenFlow switches under the same instance of Floodlight. Islands can be interconnected using non-OpenFlow switches on the same layer 2 domain. Let's take this example:

[OF switch 1] -- [OF switch 2] -- [traditional L2 switch] -- [OF switch 3]

Two islands would be formed by the topology service. Island 1 would contain switches 1 and 2 while island 2 would contain just switch 3.

All the information about the current topology is stored in an immutable data structure called the topology instance. If there is any change in the topology, a new instance is created and the topology changed notification message is called. If other modules want to listen for changes in topology they can implement the ITopologyListener interface.

Limitations

  • While you can have redundant links coming in an OpenFlow island you can NOT have redundant links from non-OpenFlow switches into an OpenFlow island.

Configuration

No extra configuration is required, this module is loaded by default.

Configuration Options

  • None.

REST API

URI

Description

Arguments

/wm/topology/switchclusters/json

Lists the switch clusters computed by the controller.

None.

/wm/topology/route/<src-dpid>/<src-port>/<dst-dpid>/<dst-port>/json

Get a route defined by switch DPIDs and switch ports from the source switch and port to the destination switch and port.

src-dpid: Valid Switch DPID (XX:XX:XX:XX:XX:XX:XX:XX) 
src-port: Valid Switch Port Number 
dst-dpid: Valid Switch DPID (XX:XX:XX:XX:XX:XX:XX:XX) 
dst-port: Valid Switch Port Number

Sample REST calls with curl

Getting all devices

curl -s http://localhost:8080/wm/topology/switchclusters/json