1. A non-transitory computer-readable medium storing machine-readable instructions for operating a controller on a network, wherein the instructions are such that they, when executed by one or more processors, cause the one or more processors to: transition a group of switches of the network from implementing a first rule set for routing packets to implementing a second rule set for routing packets by, instructing the group of switches to implement, during a first transition period, a transition rule set for routing packets according to which each switch in the group of switches is to, for a given packet: if a next hop of the packet would be the same according to the first rule set and the second rule set, then forward the packet to the next hop for the packet according to the second rule set, and otherwise forward the packet to the controller; during a second transition time period following the first transition period, instructing the group of switches to implement the second rule set.