Dynamic flow generating method for distributed SDN controllers

The invention provides a dynamic flow generating method for distributed SDN controllers, which can effectively reduce flows generated by controllers, increase the bandwidth of managed networks, reduce consumption of switch storage resources and thereby improve the overall network performance. The method comprises the following steps of treating a network area managed by one controller as a network autonomous domain; adopting a shortest path algorithm to generate flows when the flow requests received by the controller are data packets sent to the domain; when the flow requests received by the controller are data packets sent from the domain to the outside, then firstly acquiring the global topology view of all networks managed by the distributed controllers through the controller to generate a global flow; sending down the flow part belonging to the domain in the global flow to switches in the domain and meanwhile sending the rest flows not belonging to the domain to their respective controllers. The respective controllers send the rest flows down.