A Method for providing control in a communication network comprising one or more network elements (3, 7), the method comprising: - configuring a switch of a first network element of the communication network and a local controller of the first network element by means of one or more configuration messages received (6a, 6b) from a centralized controller; and - controlling one or more packet flows (9a - 9r) between one or more of the switch of the first network element, the local controller of the first network element, the centralized controller and one or more second network elements based on the configuration of the switch and of the local controller of the first network element, wherein the step of controlling the one or more packet flows further comprises: - receiving (9a, 9b, 9d, 9f, 9h, 9l, 9p) packets of a packet flow of the one or more packet flows at the switch of the first network element; - deciding by the switch of the first network element on the forwarding of the packets of the packet flow; and - forwarding (9c, 9g, 9e, 9k, 9o, 9q) the packets of the packet flow by the switch, wherein the step of deciding by the switch of the network element on the forwarding of the packets of the packet flow comprises: if the packet flow is an unknown flow according to the configuration of the switch: - sending by the switch one or more packets of the unknown packet flow to the centralized controller or to the local controller according to the configuration of the switch; - determining a target of the packets by the centralized controller, in case the one or more packets of the unknown packet flow have been sent to the centralized controller, or by the local controller, in case the one or more packets of the unknown packet flow have been sent to the local controller; and - indicating by the centralized controller the target of the packet flow to the switch, in case the one or more packets of the unknown packet flow have been sent to the centralized controller, or indicating by the local controller the target of the packet flow to the switch, in case the one or more packets of the unknown packet flow have been sent to the local controller. - configuring a switch of a first network element of the communication network and a local controller of the first network element by means of one or more configuration messages received (6a, 6b) from a centralized controller; and - controlling one or more packet flows (9a - 9r) between one or more of the switch of the first network element, the local controller of the first network element, the centralized controller and one or more second network elements based on the configuration of the switch and of the local controller of the first network element, wherein the step of controlling the one or more packet flows further comprises: - receiving (9a, 9b, 9d, 9f, 9h, 9l, 9p) packets of a packet flow of the one or more packet flows at the switch of the first network element; - deciding by the switch of the first network element on the forwarding of the packets of the packet flow; and - forwarding (9c, 9g, 9e, 9k, 9o, 9q) the packets of the packet flow by the switch, if the packet flow is an unknown flow according to the configuration of the switch: - sending by the switch one or more packets of the unknown packet flow to the centralized controller or to the local controller according to the configuration of the switch; - determining a target of the packets by the centralized controller, in case the one or more packets of the unknown packet flow have been sent to the centralized controller, or by the local controller, in case the one or more packets of the unknown packet flow have been sent to the local controller; and - indicating by the centralized controller the target of the packet flow to the switch, in case the one or more packets of the unknown packet flow have been sent to the centralized controller, or indicating by the local controller the target of the packet flow to the switch, in case the one or more packets of the unknown packet flow have been sent to the local controller. - sending by the switch one or more packets of the unknown packet flow to the centralized controller or to the local controller according to the configuration of the switch; - determining a target of the packets by the centralized controller, in case the one or more packets of the unknown packet flow have been sent to the centralized controller, or by the local controller, in case the one or more packets of the unknown packet flow have been sent to the local controller; and - indicating by the centralized controller the target of the packet flow to the switch, in case the one or more packets of the unknown packet flow have been sent to the centralized controller, or indicating by the local controller the target of the packet flow to the switch, in case the one or more packets of the unknown packet flow have been sent to the local controller.