A method for routing packets between a plurality of top switches (110a-110n) and a plurality of leaf switches (120a-120n) using a balancing table (204, 208, 210) in a fat tree network, said method comprising steps performed by a processor of: detecting a failed link between at least one top switch and at least one leaf switch; determining which of the plurality of leaf switches (120a-120n) attached to the failed link; constructing a balancing table of a remote leaf switch (120a-120c), wherein the remote leaf switch (120a-120c) is not attached to the failed link; determining a packet destination address for a packet from a device associated with the leaf switch attached to the failed uplink; modifying the balancing table (202, 208, 210) based on the detected failed link, wherein the balancing table (202, 208, 210) includes an uplink virtual port indicating an uplink output port based on hash values for each of the packets, and a packet destination address associated with one of the plurality of top switches (110a-110n) for routing the packets, wherein the hash values for each of the packets are computed using a packet header of each of the packets; wherein modifying the balancing table (202, 208, 210) further comprises modifying the uplink virtual port and the uplink output port for the packet from the device associated with the leaf switch attached to the failed link, wherein the modification does not route the packet from the device to the top switch attached to the failed uplink and integrating the balancing table of the remote leaf switch (120a-120c) with the balancing table (202, 208, 210) having the modified uplink virtual port and the modified uplink output port for the packet from the device associated with the leaf switch attached to the failed link; and routing the packets between the plurality of top switches (1 10a-11 On) and the plurality of leaf switches (120a-120n) in the fat tree network based on the modified balancing table (202, 208, 210). detecting a failed link between at least one top switch and at least one leaf switch; determining which of the plurality of leaf switches (120a-120n) attached to the failed link; constructing a balancing table of a remote leaf switch (120a-120c), wherein the remote leaf switch (120a-120c) is not attached to the failed link; determining a packet destination address for a packet from a device associated with the leaf switch attached to the failed uplink; modifying the balancing table (202, 208, 210) based on the detected failed link, wherein the balancing table (202, 208, 210) includes an uplink virtual port indicating an uplink output port based on hash values for each of the packets, and a packet destination address associated with one of the plurality of top switches (110a-110n) for routing the packets, wherein the hash values for each of the packets are computed using a packet header of each of the packets; wherein modifying the balancing table (202, 208, 210) further comprises modifying the uplink virtual port and the uplink output port for the packet from the device associated with the leaf switch attached to the failed link, wherein the modification does not route the packet from the device to the top switch attached to the failed uplink and integrating the balancing table of the remote leaf switch (120a-120c) with the balancing table (202, 208, 210) having the modified uplink virtual port and the modified uplink output port for the packet from the device associated with the leaf switch attached to the failed link; and routing the packets between the plurality of top switches (1 10a-11 On) and the plurality of leaf switches (120a-120n) in the fat tree network based on the modified balancing table (202, 208, 210).