A method for routing traffic between a source node and a destination node in a network, wherein a topology of the network is represented by a hierarchy of groups of nodes based on one or more grouping criteria, wherein a group of nodes has an associated group level in the hierarchy of groups of nodes and a group identifier; the method comprising: identifying (S402) a first group level at which a source group identifier in a source group vector and a destination group identifier in a destination group vector differ, wherein the source group vector includes a set of source group identifiers for the source node, each source group identifier in the set of source group identifiers identifying a source group at a respective group level in a hierarchy of source groups including the source node, and the destination group vector includes a set of destination group identifiers for the destination node, each destination group identifier in the set of destination group identifiers identifying a destination group at a respective group level in a hierarchy of destination groups including the destination node; obtaining one or more first route segments between a first source group and a first destination group at the first group level; computing (S426) an end-to-end route between the source node and the destination node based on at least the one or more first route segments; and routing (S428) traffic between the source node and the destination node on the end-to-end route. identifying (S402) a first group level at which a source group identifier in a source group vector and a destination group identifier in a destination group vector differ, wherein the source group vector includes a set of source group identifiers for the source node, each source group identifier in the set of source group identifiers identifying a source group at a respective group level in a hierarchy of source groups including the source node, and the destination group vector includes a set of destination group identifiers for the destination node, each destination group identifier in the set of destination group identifiers identifying a destination group at a respective group level in a hierarchy of destination groups including the destination node; the source group vector includes a set of source group identifiers for the source node, each source group identifier in the set of source group identifiers identifying a source group at a respective group level in a hierarchy of source groups including the source node, and the destination group vector includes a set of destination group identifiers for the destination node, each destination group identifier in the set of destination group identifiers identifying a destination group at a respective group level in a hierarchy of destination groups including the destination node; obtaining one or more first route segments between a first source group and a first destination group at the first group level; computing (S426) an end-to-end route between the source node and the destination node based on at least the one or more first route segments; and routing (S428) traffic between the source node and the destination node on the end-to-end route. <EOS>