Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This tutorial is for Floodlight v1.0 and later. If you need to use Floodlight v0.91 or earlier, you can find the v0.91 and v0.90 documentation here

...

Code Block
@Override
public void init(FloodlightModuleContext context) throws FloodlightModuleException {
    floodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);
    buffer = new ConcurrentCircularBuffer<SwitchMessagePair>(SwitchMessagePair.class, 100);
}

(warning)

You'll need to import the ConcurrentCircularBuffer into the PktInHistory package. It is available here.

Now we have to define the behavior for what to do when the module receives a PacketIn message. This is done in the receive() function.

...

Note

After you complete this tutorial, you should to change the serializer for IOFSwitch back to @JsonSerialize(using=IOFSwitchSerializer.class) in order to restore the original serializer.

...

Code Block
$ sudo mn --controller=remote --ip=[Your IP Address] --mac --topo=tree,2 --switch=ovsk,protocols=OpenFlow10
*** Adding controller
*** Creating network
*** Adding hosts:
h1 h2 h3 h4
*** Adding switches:
s5 s6 s7
*** Adding links:
(h1, s6) (h2, s6) (h3, s7) (h4, s7) (s5, s6) (s5, s7)
*** Configuring hosts
h1 h2 h3 h4
*** Starting controller
*** Starting 3 switches
s5 s6 s7
*** Starting CLI:

...