Deployment Guide

53
The datapath ID of the switch is shown above as 160088049758712. This datapath ID uniquely identifies this
switch node within the OpenFlow network and is used for all other OpenFlow ccommunications with the
switch. Any REST capable interface will be able to access this, but for the following examples we use the
Postman REST application.
An example of accessing the switch stats and datapath ID using the Postman REST API application is also show
below. First set the REST command type to GET, and use the URL for accessing the stats/switches command
call, using your controller IP address for the address, i.e.:
http://<my controller IP address>:8080/stats/switches
Next set up basic authentication using username/password set up for the Ryu controller when it was installed:
There is no body required for this API command so you can then hit the Send button to send the command to
the REST API. The output from the controller is captured and a status shown as seen below where you see
200 OK” as the status of the call. If this call fails there will be an error code where the “200 OK” is, and error
status information shown below that, otherwise it returns the list of datapath ID’s that the controller knows
about. In this case since there is only one controller connected, it shows us our switch datapath ID. This
datapath ID will be used for all of the other communications with the switch via the Ryu controller for actions
such as adding, modifying and deleting flows, retrieving error and counter status and establishing default switch
behaviors.