Presentation is loading. Please wait.

Presentation is loading. Please wait.

Luis Gomez, Principal SW Test Engineer, Brocade

Similar presentations


Presentation on theme: "Luis Gomez, Principal SW Test Engineer, Brocade"— Presentation transcript:

1 Luis Gomez, Principal SW Test Engineer, Brocade
OpenFlow Tutorial Luis Gomez, Principal SW Test Engineer, Brocade

2 Agenda Introduction OpenFlow Plugin Architecture
OpenFlow Plugin Installation OpenFlow Plugin Operation OpenFlow Plugin Troubleshooting

3 Introduction

4 OpenDaylight The OpenDaylight project is a collaborative open source project that aims to accelerate adoption of Software-Defined Networking (SDN) and Network Functions Virtualization (NFV) with a transparent approach that fosters new innovation. Main page: Wiki page: Documentation:

5 OpenFlow OpenFlow is the first standard communications interface defined between the control and forwarding layers of an SDN architecture. OpenFlow allows direct access to and manipulation of the forwarding plane of network devices such as switches and routers, both physical and virtual (hypervisor-based). ONF page: resources/openflow

6 OpenFlow Plugin Architecture

7 OpenFlow Plugin Architecture

8 OpenFlow Components OpenFlowJava is a library that implements the OpenFlow codec – it translates OpenFlow messages into their respective internal representations and vice versa. OpenFlow Plugin: terminates sessions to OpenFlow switches, provides a per-switch low- level OpenFlow service API (add-modify-flow, delete-flow, etc.) Statistics Manager: is responsible for collecting statistics/status from attached OpenFlow switches and storing them into the operational data store for applications’ use. Topology Manager: is responsible for discovering the OpenFlow topology using LLDP and putting them into the operational data store for applications’ use. Forwarding Rules Manager: the “top level” OpenFlow module that exposes the OF functionality to controller apps, provides the app-level API. Main entity that manages the OpenFlow switch inventory and the configuration (programming) of flows in switches. It also reconciles user configuration with network state discovered by the OpenFlow plugin.

9 OpenFlow Plugin Installation

10 OpenFlow Plugin Features
Normal user features odl-openflowplugin-flow-services-rest -> OF plugin with REST API. odl-openflowplugin-flow-services-ui -> OF plugin with REST API + GUI. odl-openflowplugin-app-table-miss-enforcer -> Adds default flow to controller. odl-openflowplugin-nxm-extensions -> Nicira extensions for OVS. Test features: odl-openflowplugin-drop-test -> Test application for pushing flows on packet-in. odl-openflowplugin-app-bulk-o-matic -> Test application for pushing bulk flows.

11 OpenFlow Plugin Configuration
New configuration is in: <distribution-folder>/etc/org.opendaylight.openflowplugin.cfg Old configuration is in: <distribution-folder>/etc/opendaylight/karaf/42-openflowplugin-Li.xml

12 Lab 1 – Install Tools VM Plug USB stick in your laptop.
Install VirtualBox. Import VM image: tools-vm-ubuntu.ova Check VM specs (2 Cores/4 GB RAM) fit in your system. Start VM (user:vagrant/pwd:vagrant)

13 Lab 2 – Install Controller
Open a terminal window: Click on the black terminal icon on the left quick launch menu. Extract the distribution: unzip distribution-karaf Boron.zip Start the controller: cd distribution-karaf Lithium bin/karaf Install openflow main feature: feature:install odl-openflowplugin-flow-services-ui

14 Lab 3 – Start Network Simulation
Open a terminal window: Click on the terminal icon on the left menu or open a new tab on existing terminal window. Start mininet simulation and ping all hosts: sudo mn --controller=remote,ip= topo tree,2 Open the controller GUI at Default user/pasw is admin/admin. Install table miss feature (this is required for link discovery): feature:install odl-openflowplugin-app-table-miss-enforcer

15 OpenFlow Plugin Operation

16 OpenFlow REST API OpenFlow REST API is automatically generated from internal yang models. Models support for Datastore read/write and RPC operations. Datastore read only API: Topology operational: contains link information discovered by topology manager. Inventory operational: contains nodes, ports, tables, flows, groups and meters information and statistics collected by the OpenFlow plugin. Datastore write/read API: Inventory config: allows user to configure flows, groups and meters. The configuration is stored, persisted in disk and replicated in cluster. RPC Operations API: Sal-flow operations: allows user to configure flows, groups and meters. The configuration goes directy to the OpenFlow plugin.

17 REST Tools YangUI application in controller GUI.
Allows to browse controller URLs and methods. Chrome POSTMAN extension. Easy create and share REST collections. cURL command in Linux systems. Easy write shell script. REST libraries are available for most programming languages. IMPORTANT: In all tools set the following headers: Authorization (basic): admin/admin Accept (answer body): application/xml or application/json Content-Type (request body): application/xml or application/json

18 OpenFlow Information Read Topology Operational Information:
GET  Read Inventory Information: GET  Read Node information: GET  inventory:nodes/node/openflow:1 Read Table information: GET  inventory:nodes/node/openflow:1/table/0

19 Lab 4 – Read OpenFlow Information
Open Chrome POSTMAN extension. Click on the white “applications” icon on the left quick launch menu. On the left select Collections and click on OpenFlow. Select Get Topology and press Send button. Check Topology operational information. Select Get Inventory and press Send button. Check Inventory operational information. Modify request URL to retrieve specific node or table information.

20 Flow Programming Add a Flow in Datastore: Add a Flow via RPC:
PUT  inventory:nodes/node/openflow:1/table/0/flow/1 Add a Flow via RPC: POST  Comments: Examples of flow configuration are available in: _Flows:Example_Flows Flow configuration can be expressed in json or xml. It is possible to add multiple flows to Datastore in a single REST request. RPC call returns flow installation errors.

21 Flow ID match function When the controller receives flow information from a switch, this information is compared with all flows stored in config, in case of a match the flow ID of the flow config is automatically added to the flow operational information. This way we can easily relate flows stored in controller with flows received from the switch. In case of flows added via RPC or in general when the controller cannot match received flow information with any flow in datastore, it adds an alien ID in the flow operational information.

22 Lab 6 – Configure flows Select Add Flow in POSTMAN and press Send button. Check flow operational information with Get Flow Operational. Check Flow ID in the flow operational information. Select Delete Flow in POSTMAN and press Send button. Check flow is no in switch with Get Flow Operational. Select Add Flow RPC in POSTMAN and press Send button. Select Delete Flow RPC in POSTMAN and press Send button. Check flow is not in switch with Get Flow Operational.

23 OpenFlow Plugin Troubleshooting

24 Controller Log Controller log is in: <distribution-folder>/data/log/karaf.log It can be also displayed on karaf console: log:display For troubleshooting do: log:set TRACE org.opendaylight.openflowplugin.openflow.md.core log:set TRACE org.opendaylight.openflowplugin.impl To restore log settings: log:set INFO org.opendaylight.openflowplugin.openflow.md.core log:set INFO org.opendaylight.openflowplugin.impl

25 Lab 7 – Enable OpenFlow Debug
Enable debug in controller karaf console: log:set TRACE org.opendaylight.openflowplugin.openflow.md.core log:set TRACE org.opendaylight.openflowplugin.impl Display controller log: log:display


Download ppt "Luis Gomez, Principal SW Test Engineer, Brocade"

Similar presentations


Ads by Google