1. A method for managing flow of packets, comprising: inputting a plurality of flow rules of various priorities to a router having a plurality of hardware resources, the plurality of hardware resources having varying levels of capability relative to each other; selecting a first rule having a lowest priority from among the plurality of flow rules; determining whether the first rule conflicts with any lower priority rules stored in the hardware resource with a highest capability; storing the first rule in the resource with the highest capability if the first rule conflicts with a lower priority rule in the hardware resource with the highest capability; and processing the first rule to identify the hardware resource with a lowest capability that can support the first rule if the first rule does not conflict with a lower priority rule in the hardware resource with the highest capability, and storing the first rule in the identified resource.