1. A method comprising: defining link used variables for links related to an interconnection fabric representative of whether corresponding links are used for handling flows between a plurality of hosts and devices, wherein each of the link used variables is a binary variable having one of two binary values depending on whether or not the corresponding link is used for handling a respective flow; defining constraints for links; defining a maximum hop count constraint specifying that a hop count of a particular flow should be less than a maximum hop count; defining an objective function that minimizes a value based on a sum, over the flows, of a bandwidth of each corresponding flow times a number of hops used by the corresponding flow; and determining, by a computer system, connections between the hosts and devices as a function of the link used variables, the constraints for links, the maximum hop count constraint, and the objective function by use of an integer programming solver.