In this paper we investigate dynamic routing in queueing networks. We show that there is a heavy traffic limiting regime in which a network model based on Brownian motion can be used to approximate and solve an optimal control problem for a queueing network with multiple customer types. Under the solution of this approximating problem the network behaves as if the service-stations of the original system are combined to form a single pooled resource. This resource pooling is a result of dynamic routing, it can be achieved by a form of shortest expected delay routing, and we find that dynamic routing can offer substantial improvements in comparison with less responsive routing strategies.