In a SDN network when a switch receives a packet for which it can not find a match in its flow table, it will forward this packet to the controller. The controller will decide about this packet and will forward this packet to the sender switch for further actions.

Can controller send this packet to the destination switch directly?

For example imagine this topology: topo

h1 wants to send a packet to h2 and so the packet reaches sw1 first. Since sw1 does not have a rule for it, the packet will be sent to controller. The controller decides about this packet and returns the packet to sw1 for forwarding to sw2.

Is it possible for controller itself to forward the packet to sw2 instead of returning it to sw1?


Yes, it is possible to deliver the packet directly.

From the most recent OpenFlow Specification, (It is 1.5 but it is also valid for 1.3 and 1.4), page 94.

/* Action structure for OFPAT_OUTPUT, which sends packets out ’port’.
* When the ’port’ is the OFPP_CONTROLLER, ’max_len’ indicates the max
* number of bytes to send. A ’max_len’ of zero means no bytes of the
* packet should be sent. A ’max_len’ of OFPCML_NO_BUFFER means that
* the packet is not buffered and the complete packet is to be sent to
* the controller. */

It means you need to install a flow in sw1 that outputs packets to the controller with a max_len having the value OFPCML_NO_BUFFER.

When the controller receives the Packet-In, with the whole packet, generated by the flow in sw1, you can then send a Packet-Out to sw2.

The Packet-Out must have an output action to the port that leads to h2.


An SDN controller generally doesn't forward user data (at least not with OpenFlow). It often only gets a digest from an unmatched packet (the essential data extracted), so there might even be nothing to forward.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.