We consider a general control problem for networks with linear dynamics which includes the special cases of scheduling in multiclass queueing networks and routeing problems. The fluid approximation of the network is used to derive new results about the optimal control for the stochastic network. The main emphasis lies on the average-cost criterion; however, the β-discounted as well as the finite-cost problems are also investigated. One of our main results states that the fluid problem provides a lower bound to the stochastic network problem. For scheduling problems in multiclass queueing networks we show the existence of an average-cost optimal decision rule, if the usual traffic conditions are satisfied. Moreover, we give under the same conditions a simple stabilizing scheduling policy. Another important issue that we address is the construction of simple asymptotically optimal decision rules. Asymptotic optimality is here seen with respect to fluid scaling. We show that every minimizer of the optimality equation is asymptotically optimal and, what is more important for practical purposes, we outline a general way to identify fluid optimal feedback rules as asymptotically optimal. Last, but not least, for routeing problems an asymptotically optimal decision rule is given explicitly, namely a so-called least-loaded-routeing rule.