Data center networks (DCNs) connect hundreds and thousands of computers and, as a result of the exponential growth in their number of nodes, the design of scalable (compact) routing schemes plays a pivotal role in the optimal operation of the DCN. Traditional trends in the design of DCN architectures have led to solutions, where routing schemes and network topologies are interdependent, i.e., specialized routing schemes. Unlike these, we propose a routing scheme that is compact and generic, i.e., independent of the DCN topology, the word-metric-based greedy routing. In this scheme, each node is assigned to a coordinate (or label) in the word-metric space (WMS) of an algebraic group and then nodes forward packets to the closest neighbor to the destination in this WMS. We evaluate our scheme and compare it with other routing schemes in several topologies. We prove that the memory space requirements in nodes and the forwarding decision time grow sub-linearly (with respect to n, the number of nodes) in all of these topologies. The scheme finds the shortest paths in topologies based on Cayley graphs and trees (e.g. Fat tree), while in the rest of topologies, the length of any path is stretched by a factor that grows logarithmically (with respect to n). Moreover, the simulation results show that many of the paths remain far below this upper bound.