Floodlight REST Interface


We can use the browser to view Floodlight's real time information. The URL can be http://172.16.0.179:8080/ui/index.html or http://127.0.0.1:8080/ui/index.html if users access it from Controller PC.

Figure 17 – Access Floodlight Info

 
User should pay attention to the DPID in the picture above. User needs to replace it with user's own DPID in the following tests.

curl

Use the command line tool curl for transferring data with URL syntax. It is also the tool to send Floodlight REST APIs to configure Pica8 switch flows. We can use apt-get to install it on Controller PC:

  • sudo apt-get install curl

Add Flows

Here is the command to add a flow from port 1 to port 2:

We need another flow from port 2 to port 1 in order to make the ping between PC1 and PC2 work.

Now, the ping from PC1 to PC2 works.

Figure 18 – Ping Successes


We can add the same flows between port 3 and port 4 to make ping working between them.

Figure 19 – Flows Added


Delete Flows

We can remove all of the flows by issuing:

 

Copyright © 2024 Pica8 Inc. All Rights Reserved.