OpenFlow is a communications protocol that gives access to the forwarding plane of a network switch or router over the network
The most common and widely deployed southbound interface towards SDN (Software Defined Networking) devices is known as the OpenFlow (OF) protocol. This protocol were originally developed at Stanford university during the Ethane project, but has become a de facto industry standard. In later years, the protocol has come under control and development from the Open Networking Foundation (ONF).
A secure socket layer (SSL) (or TSL) connection is set up between an SDN controller and the OF device. Then the OF protocol is used to push OF rules to the flow tables of that device. These rules will have match fields, and action fields. New packets that arrive will be checked towards the flow tables and if a match is found, the corresponding action to that match will be implmented (e.g. outputport, drop, decrement ttl, pop tag etc). If the packet doesn't match any of the flow tables (which could be multiple in a pipeline fashion), it will be encapsulated and sent to the controller. The packet will be processed at the controller and will then be returned to the switch together with a new flow rule. New flow rules will also be sent to other devices in the network that the SDN controller controls. This way a 'path' will be created for the flow all the way through the network. Later revisions of the OF protocol also implments support for group tables and meter tables.