A computer software product, the product comprising a tangible non-transitory computer-readable medium in which program instructions are stored, which instructions, when read by one or more processors in a communication network, which comprises multiple network switches that are divided into groups, cause the processors to predefine a strictly monotonic order among the groups, to receive an indication of a flow of packets to be routed from a source endpoint served by a source network switch belonging to a source group to a destination endpoint served by a destination network switch belonging to a destination group, to assign a first Virtual Lane (VL) to the packets in the flow if the destination group succeeds the source group in the predefined order, to assign to the packets in the flow a second VL, different from the first VL, if the destination group does not succeed the source group in the predefined order, and to configure the network switches to route the packets of the flow in accordance with the assigned VL.