A method of selecting routing tables to include in a network line card consists of determining dependencies of local routes on remote routes using a reference count on prefixes, and selectively downloading remote routes when resolution of a route has a dependency on a remote route. In one embodiment, only remote routes that are needed to forward traffic are downloaded to a network line card.